Skip to content

Releases: meta/SoLoader

v0.13.0

Choose a tag to compare

@nightwolf-chen nightwolf-chen released this 04 Nov 15:36

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

v0.12.1 Pre-release
Pre-release

Choose a tag to compare

@simpleton simpleton released this 12 Sep 23:25

Full Changelog: v0.12.0...v0.12.1

v0.12.0

v0.12.0 Pre-release
Pre-release

Choose a tag to compare

@simpleton simpleton released this 11 Sep 20:32

Full Changelog: v0.11.0...v0.12.0

v0.11.0

Choose a tag to compare

@simpleton simpleton released this 03 Jan 17:48

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

Choose a tag to compare

@simpleton simpleton released this 01 Dec 23:28

Use system linker by default on Android N and above devices.

Full Changelog: v0.10.4...v0.10.5

v0.10.4

Choose a tag to compare

@simpleton simpleton released this 28 Jun 18:08

Feature

Support pre-computing the dependency

Fixes

Wrongly loaded directApkLdPath(#104)
SoLoader causes crashes on migration to an Android 12 device(#100 #88 )
Fix race condition in SoLoader#init(#99 )

Full Changelog: v0.10.3...v0.10.4

v0.10.3

Choose a tag to compare

@simpleton simpleton released this 04 Nov 23:36

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

Choose a tag to compare

@simpleton simpleton released this 04 Nov 08:21

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

v0.10.1

Choose a tag to compare

@passy passy released this 01 Feb 14:08

This fixes an issue with the POM of the previous release.

v0.10.0

Choose a tag to compare

@passy passy released this 29 Jan 13:46

Fixes

  • Fix ClosedChannelException (f8d54f5)
  • Invoke Thread.interrupted() to fix infinite loop (0aae633)
  • Release lib lock before JniOnLoad to avoid deadlock on re-entry (06e415e)
  • Add synchronized block to protect against race condition (#69)

Highlights

  • Improved error message in case of unsatisfied links. (30af7ce)
  • Retry extract_DT_NEEDED when interrupted (a5e96b9)