I am trying to migrate my app from a monolithic APK to the app bundle format. I need to set LD_LIBRARY_PATH
environment variable for an exec()
call, therefore I need the location of my native libraries. With the original APK I would call getApplicationInfo().nativeLibDir
and the libraries were there.
With the app bundle they are not. I can see the correct abi split APK installed, but for some reason the libraries are not extracted.
I have tried installing with bundletool
and through Google Play,
Tried to run 'ls -alR'
and I can clearly see the directory exists as well as the split apk, but the libraries are simply not extracted. I guess I could extract them manually as a workaround but that would seem unnecessary..?
Here is the output of ls
on the parent folder of nativeLibPath
genLibraryPath: Dir Contents: /data/app/com.unseenonline-raAFLhJMQpjqWkVdG1Vocg==:
total 16704
drwxr-xr-x 4 system system 4096 2019-06-11 12:41 .
drwxrwx--x 114 system system 12288 2019-06-11 12:41 ..
-rw-r--r-- 1 system system 5688352 2019-06-11 12:41 base.apk
drwxr-xr-x 3 system system 4096 2019-06-11 12:41 lib
drwxrwx--x 3 system install 4096 2019-06-11 12:41 oat
-rw-r--r-- 1 system system 11226112 2019-06-11 12:41 split_config.arm64_v8a.apk
-rw-r--r-- 1 system system 35636 2019-06-11 12:41 split_config.en.apk
-rw-r--r-- 1 system system 90443 2019-06-11 12:41 split_config.xxhdpi.apk
/data/app/com.unseenonline-raAFLhJMQpjqWkVdG1Vocg==/lib:
total 24
drwxr-xr-x 3 system system 4096 2019-06-11 12:41 .
drwxr-xr-x 4 system system 4096 2019-06-11 12:41 ..
drwxr-xr-x 2 system system 4096 2019-06-11 12:41 arm64
/data/app/com.unseenonline-raAFLhJMQpjqWkVdG1Vocg==/lib/arm64:
total 16
drwxr-xr-x 2 system system 4096 2019-06-11 12:41 .
drwxr-xr-x 3 system system 4096 2019-06-11 12:41 ..
As you can see the split apks are there but the libraries are not extracted.
Libraries should be extracted to the same location as they were with the original apk