title: Building System App With Prebuilt .so Library
body: <p>I've been stuck here for a week trying to build a 3rd party .so library along with my app into custom Android system. I followed <a href="http://www.maxters.net/2012/05/adding-prebuilt-shared-library-to-android-build-system/" rel="nofollow">http://www.maxters.net/2012/05/adding-prebuilt-shared-library-to-android-build-system/</a> and successfully add the .so lib as prebuilt shared library to Android Build System. Now I can see the .so lib at ../out/target/product/crespo4g/obj/lib/.</p>
  
  <p>But the libraries in this directory are not going to be migrated to device when flashing. And my .so lib is not appeared at /data/data/my_app_name/lib either. So <strong>UnsatisfiedLinkError</strong> occurs when executing <strong>System.loadLibrary()</strong>.</p>
  
  <p>I thought there are three ways to solve this, but just don't know how to implement:</p>
  
  <ol>
  <li>Maybe my app failed to indicate to compiler that my .so is along with my app as a whole,  so the .so lib is not compiled into the system image with my app. But I did declare by "LOCAL_STATIC_LIBRARIES := libXX", anything wrong?</li>
  <li>Is there a way to build my .so lib into /system/lib/? Where are the so libs under /system/lib/ derived from?</li>
  </ol>
  
  <p>I am new to Android building, please help..</p>
  
  <p>Thanks!</p>