After this tutorial, I created the AOSP system service: http://www.androidenea.com/2009/12/adding-system-server-to-android.html
Now I want to use a pre-compiled .so file and cannot figure out where to put it so that my code can access it.
So, I created a folder in framewaork / base / libs / my_folder / and put two files there: my_lib.so android.mk
android.mk content:
LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE:= my_lib LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY)
make was executed without errors, but when the code tried to load the library through: System.loadLibrary ("my_lib");
I got this error:
06-27 13: 58: 55.581: E / AndroidRuntime (806): called: java.lang.UnsatisfiedLinkError: my_lib library was not found; [/vendor/lib/my_lib.so,/system/lib/my_lib.so]
so I added this file to out / target / product / generic / system / lib but got the same error.
So where should I place the my_lib.so file? and does it need android.mk? maybe i should register it somewhere in the system?
Thanks in advance!
source share