ARTICLE AD BOX
I'm working on a IDE that runs on Android and includes SDK (actually GCC toolchains for various MCUs). To workaround Google Play 200Mb aab file size limitation i decided to pack every SDK as a dynamic module containing executables as shared libs and various files as assets.
I expected to follow the native lib workaround (symlinking to the shared lib with human-readable executable lib symlinked from some fs directory) that works as expected on Android 10+ (if shared lib is a part of the apk/aab, not dynamic module). However the same workaround does not work with dynamic modules.
To be more detailed.
I renamed "xtensa-esp32-elf-g++" executable to "libesp32_xtensa-esp32-elf-g++.so", put it into into dynamic module "jniLibs/arm64-v8a" folder, installed the dynamic module programmatically in the app so the file path is "/data/user/0/%package%/files/splitcompat/7900/native-libraries/esp32_sdk.config.arm64_v8a/libesp32_xtensa-esp32-elf-g++.so". I'm trying to symlink it from some directory inside context.filesDir and the run it and it fails with "Cannot run program "/data/user/0/%package%/files/splitcompat/7900/native-libraries/esp32_sdk.config.arm64_v8a/libesp32_xtensa-esp32-elf-g++.so": error=13, Permission denied" exception.
How can i run it?
I've tried to copy it to some dir and none of context.codeCacheDir, context.cacheDir, context.filesDir worked with the same error. Similar approach with shared lib inside apk/aab works, but not with dynamic modules.
PS. Trying on emulator with Android 16 and few hardware devices with Android 10+.
