I have an android plugin (.so) that has some dependencies on other shared libraries.
Say my library is libA.so and it is dependent on libB.so and libC.so.
If I place libA.so, libB.so and libC.so in Plugins/Android (in Unity), and then DLLImport a function from libA.so it will fail, saying DLLNotFound, even though I can see it places each in /data/data/com.myproject/file/lib on the device.
If I place libA.so in /Plugins/Android (which then appears in /data/data/com.myproject/file/lib on the device) and instead I place libB.so and libC.so in /system/lib/ on the device (i.e. in the system’s path), then it seems to find the dependencies, and DllImport’ing a function from libA.so succeeeds.
I would like to avoid having to install things in /system/lib/ since that’s a device system path and requires root access on the Android device.
My question is - is there a better way to have the Unity app find the dependent libraries, libB.so and libC.so? Is there a way to specify a custom search path or ensure it searches its own /data/data/com.myproject/file/lib path?