title: Decrypt shared library in memory at run-time in Android
body: <p>Can we load an encrypted .so library and decrypt in real-time in memory to use it?</p>
  <p>So for example, I have an Android app signature, as possibly everyone that released a public app does. I also have in an app I'm making, a shared library (.so file) that I made. The idea would be that I could encrypt that .so file with some encryption key and then decrypt the file using the current APK signature, which can be gotten easily.</p>
  <p>Someone modifies the APK file, someone's screwed, unless they steal my signature from my personal files and such, since that library won't work at all and part of the app will not work. Is this possible?</p>
  <p>Thanks for any help!</p>
  <p><strong>EDIT:</strong> after the chat with CommonsWare, solutions seem to be Java check code for APK signature, or the libraries checking for the signature, and in case the APK is modified, the libraries stop working and only part of the app works (not perfect, of course - reverse-engineering -, but better than nothing, maybe).</p>