1

In android, I want to make a single .so file from multiple other .so files.

Example like i have libtest.so which depends on several other .so files (lie liba.so, lib.so),

So instead of linking them at runtime, i want to create a single static file from these dependent .so files.

Finally i will load .so from my android app so that it will run without need of runtime support of these libraries.

Any body have idea about that.

Thanks,

1 Answers1

0

In my experience, there is NOT an easy way to finish this task. The simple way is How to combine shared libraries?. And in my developing, I built these modules both static and shared libraries. And change the dependence from LOCAL_SHARED_LIBRARIES to LOCAL_STATIC_LIBRARIES. And then build them.

The steps:

  1. Find all libraries you want to change to static
  2. Appending a LOCAL_MODULE and include $(BUILD_STATIC_LIBRARY) to the Android.mk
  3. Change the dependence from SHARED to STATIC
  4. Rebuild
Community
  • 1
  • 1
QJGui
  • 907
  • 8
  • 10