I have found that you must place your .so libraries in /libs/none/.
When I try to launch the simplest app: hello-jni, it tells it cannot find libc.so:
I can see a libc-2.12.2.so and libc.so.6 (a link to libc-2.12.2.so), in /lib using ./adb shell; I think I would only need to make a new link with the required name. Is it possible to make this link in the filesystem?10-13 17:54:26.116: WARN/dalvikvm(9834): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/example/hellojni/HelloJni;
10-13 17:54:26.116: WARN/dalvikvm(9834): Class init failed in newInstance call (Lcom/example/hellojni/HelloJni;)
10-13 17:54:26.116: DEBUG/AndroidRuntime(9834): Shutting down VM
10-13 17:54:26.116: WARN/dalvikvm(9834): threadid=1: thread exiting with uncaught exception (group=0x66ac9778)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): FATAL EXCEPTION: main
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): java.lang.ExceptionInInitializerError
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at java.lang.Class.newInstanceImpl(Native Method)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at java.lang.Class.newInstance(Class.java:1301)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1683)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.app.ActivityThread.access$1500(ActivityThread.java:124)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1016)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.os.Looper.loop(Looper.java:132)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at android.app.ActivityThread.main(ActivityThread.java:4083)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at java.lang.reflect.Method.invokeNative(Native Method)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at java.lang.reflect.Method.invoke(Method.java:491)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at dalvik.system.NativeStart.main(Native Method)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): Caused by: java.lang.UnsatisfiedLinkError: libc.so: cannot open shared object file: No such file or directory
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at java.lang.Runtime.loadLibrary(Runtime.java:430)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at java.lang.System.loadLibrary(System.java:554)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): at com.example.hellojni.HelloJni.<clinit>(HelloJni.java:64)
10-13 17:54:26.120: ERROR/AndroidRuntime(9834): ... 15 more
I have even tried to use an extracted libc.so inside the apk and load it before my .so with no success.
Anyone has gone any step further?