Repository navigation
Releases: meta/SoLoader
Releases · meta/SoLoader
Release list
v0.13.0
Full Changelog: v0.12.1...v0.13.0
Breaking change
- SoLoader.init(Context, ExternalSoMapping) no longer throws IOException, matching init(Context, boolean) (#135). Java code that catches IOException around this call must drop the catch to compile.
New APIs
- SoLoader.appendSoSource(SoSource) adds a source after the existing ones, the counterpart of prependSoSource.
- SoLoader.loadLibraryUnsafe(String) and loadLibraryUnsafe(String, int) behave like loadLibrary, for library names that are not constants. Keep loadLibrary for constant names, so build tools can see which libraries an app loads.
- New init flags:
- SOLOADER_ENABLE_DIRECT_SPLIT_SO_SOURCE: load libraries straight from split APKs, including ABI config splits (Android 5.0+).
- SOLOADER_SYSTEM_SOSOURCE_ONLY: initialize only the system SoSource.
- SOLOADER_ENABLE_SYSTEM_FALLBACK: fall back to System.loadLibrary() when a library is not in SoLoader's search paths.
- SOLOADER_USE_DEVICE_PROTECTED_STORAGE_FOR_BACKUP_SOSOURCE: keep the backup SoSource in device-protected storage, so libraries load during Direct Boot (Android 7.0+).
- SOLOADER_IMPLICIT_DEPENDENCIES: on Android 7.0+, the backup SoSource leaves a library's dependencies to the system linker.
Improvements
- DirectApkSoSource searches the APK directory of the ABI the app was installed for first, then every other supported ABI (#155, fixes #154; #148). This fixes loading on x86_64 devices that run ARM libraries.
- ABI detection reads ApplicationInfo.primaryCpuAbi, and falls back to the supported-ABI list when it cannot.
- /system_ext/lib64 is now a default system library search path.
- Split APKs: libraries can be registered per application split, including sideloaded splits, with one manifest per ABI.
- The library dependency file (native_deps) is read through AssetManager.
Fixes
- Android 17 (API 37): extracted libraries and their directory are now fully read-only, as System.load() requires.
- Threads in one process that lock the same file now wait for each other instead of failing with OverlappingFileLockException.
- NativeLoader no longer throws when two threads initialize it at the same time.
- SystemLoadWrapperSoSource reports real load errors, such as missing symbols, instead of dropping them, and catches Throwable rather than only Exception.
- Libraries are unpacked again when the app's /data/app/.../lib/arm directory is missing.
Diagnostics
- MinElf load errors name the library and give its size.
- SoLoader logs libraries loaded on the main thread, and its initialization logs are quieter.
Compatibility
- Version checks for Android releases older than KitKat (API 19) were removed.
- The DirectorySoSource denylist was removed.
Build
- A Gradle build for the soloader AAR and the annotation and nativeloader JARs, checked in CI.
v0.12.1
Full Changelog: v0.12.0...v0.12.1
v0.12.0
Full Changelog: v0.11.0...v0.12.0
v0.11.0
The system is more robust, we’ve pushed fixes for issues related to library unpacking, corruption and loading. The release introduces different recovery schemes, better categorization of SoLoader errors, better logging and better synchronization for unpacking and loading.
Full Changelog: v0.10.5...v0.11.0
v0.10.5
Use system linker by default on Android N and above devices.
Full Changelog: v0.10.4...v0.10.5
v0.10.4
v0.10.3
Fixes
Fix UnsatisfiedLinkError if OEM is using the library that the APP is using as well.
Full Changelog: v0.10.2...v0.10.3
v0.10.2
Fixes
- Fix Crash on android v12, unable to create application *java.io.SyncFailedException: sync failed (#80)
- Fix Android app bundle crashes of soloader:Anyone can run my issues sample (#83)
Highlights
- Support directly load the libraries from the APK, if they're uncompressed and page-aligned in APK.
Full Changelog: v0.10.1...v0.10.2