title: Obscuring JNI Code From End Users in Android
body: <p>I've written a bunch of android JNI code that I want to make into a library for a customer.  Obviously, I don't want the customer to be able to see my JNI code.  Is there a way I can include just the so file in a library project for them?</p>
  
  <p>I've tried just using <code>System.loadLibrary(&lt;library&gt;);</code> but I get an Unsatisfied Link Error every time.</p>
  
  <p>One thing that's worked, is I've just compiled my project and deleted all the c files.  I'm still able to use the .so file, but if I do a make clean, it deletes my so file and there's no way to recover it without the source.</p>
  
  <p>In short, what I want is to be able to compile an so file on my own, and give it to my customer with some java code that interfaces with it.  I don't care if they see the java 'wrapper' source but I don't want them to be able to see the JNI code.  I also want them to be able to treat this library as they would any other (ie make cleans don't wreck it).</p>
  
  <p>Thanks! </p>