title: importing custom SO file to AOSP
body: <p>I've built an AOSP system service following this tutorial:
  <a href="http://www.androidenea.com/2009/12/adding-system-server-to-android.html" rel="noreferrer">http://www.androidenea.com/2009/12/adding-system-server-to-android.html</a></p>
  
  <p>Now I want to use a pre-compiled .so file and cannot figure out where to put it so my code will be able to access it. </p>
  
  <p>so, i created a folder at framewaork/base/libs/my_folder/
  and put there two files:
  my_lib.so
  android.mk</p>
  
  <p>the content of the android.mk is :</p>
  
  <pre><code>LOCAL_PATH:= $(call my-dir)
  include $(CLEAR_VARS)
  
  LOCAL_MODULE:= my_lib
  LOCAL_MODULE_TAGS := optional
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>the make ran without errors, but when the code tried to load the library via:
      System.loadLibrary("my_lib");</p>
  
  <p>i got this error:</p>
  
  <p>06-27 13:58:55.581: E/AndroidRuntime(806): Caused by: java.lang.UnsatisfiedLinkError: Library my_lib not found; tried [/vendor/lib/my_lib.so, /system/lib/my_lib.so]</p>
  
  <p>so i added the so file to out/target/product/generic/system/lib
  but got the same error.</p>
  
  <p>so where should i place the my_lib.so file ? and is an android.mk needed for it ?
  maybe i should register it somewhere on the system ?</p>
  
  <p>Thanks in advance!</p>