KeepSafe / ReLinker

A robust native library loader for Android.
Apache License 2.0
3.23k stars 371 forks source link

Better error message if supported ABI's cannot be found inside the APK. #65

Closed cmelchior closed 4 years ago

cmelchior commented 5 years ago

This PR adds a better error message if an ABI cannot be successfully located.

This is helpful as some app users are side-loading APKs outside the Play Store. If those apps have been built using App Bundle or APK Split, it could result in users loading an APK that doesn't support their device, which results in a rather unhelpful error message like com.getkeepsafe.relinker.MissingLibraryException: libtest.so. This isn't particularly helpful for an app developer tracking their crashes. Especially if they are using a 3rd party library that includes native code. In that case, it could look like it is a bug in the 3rd party library.

With this PR, the error message now tries to be more descriptive about what has been tried and what is actually supported by the device, so the error message will now look like this:

Could not find 'libtest.so'. Looking for: [armeabi-v7a], but only [x86, arm64-v8a] are supported.

Tweener commented 4 years ago

Hi there,

Any idea when this PR will be merged/released? It is apparently blocking the mentioned PR for Realm Java (https://github.com/realm/realm-java/issues/6673), which crashes the app for a significant percentage of users.

Cheers

emarc-m commented 4 years ago

Hi there,

Any idea when this PR will be merged/released? It is apparently blocking the mentioned PR for Realm Java (realm/realm-java#6673), which crashes the app for a significant percentage of users.

Cheers

Please see: https://github.com/KeepSafe/ReLinker/pull/65#pullrequestreview-336893515 for tentative release with these changes.

cmelchior commented 4 years ago

Ready for 2nd round @emarc-m

emarc-m commented 4 years ago

Ready for 2nd round @emarc-m

Thank you for addressing the comments.

emarc-m commented 4 years ago

@cmelchior (cc: @Tweener) version 1.4.0 has been released which includes these changes. Thank you for the contribution.

cmelchior commented 4 years ago

Awesome. Thanks 👏