using armeabi-v7a apks in arm64-v8a devices can lead to app crash (mozilla vpn)
- /e/ version: 0.18-q
- Device model(s): FP3 (arm64)
- Device rooted: no
Summary
a user experienced a fatal crash on app startup of org.mozilla.firefox.vpn
and posted to the forum. Mozilla VPN showed:
Your application encountered a fatal error and cannot continue
Looking at the stacktrace, QtLoader tried to load libraries specific to the device architecture arm64-v8a, but those aren't included in the apk downloaded. Apps choose to install the armeabi-v7a apk that does not include arm64-v8a libraries
Querying cleanapk at the time, it offered the most current version (update_15) only in armeabi-v7a, has arm64-v8a missing for the update slug, but has it available one version past (update_14). The installed version was then the most current update_15 with armeabi-v7a Qt libraries.
Not using the exact arch version can thus lead to problems with some Apps, and the exact_arch=false
url param is risky for them: https://gitlab.e.foundation/e/apps/apps/-/merge_requests/28 - maybe it is special to how Mozilla includes Qt in their App and Qt would need to be able to handle to fall back to the compatible 32bit arch.
The problem
Steps to reproduce
- Download from /e/ App store
- Launch
What is the current behavior?
- See fatal error
What is the expected correct behavior?
- App runs
Technical informations
Relevant logs (adb logcat
)
(this being a arm64-v8a device)
W System : ClassLoader referenced unknown path:
I Qt JAVA : Can't find '/data/app/org.mozilla.firefox.vpn-meEWM_YUnEqSS3x8kXTGIg==/lib/arm/libQt5Core_arm64-v8a.so'
...
W n:QtOnlyProces: Accessing hidden field Landroid/graphics/drawable/GradientDrawable$GradientState;->mShape:I (greylist-max-p, reflection, denied)
W System.err: java.lang.NoSuchFieldException: mShape
W System.err: at java.lang.Class.getField(Class.java:1604)
..
E n:QtOnlyProces: No implementation found for int[] org.qtproject.qt5.android.ExtractStyle.extractNativeChunkInfo20(long) (tried Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20 and Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20__J)
see full attached log org.mozilla.firefox.vpn.log
Solutions
Possible fixes
multiple ideas:
- cleanapk only offers both arch versions if no universal apk can be offered (impractical?)
- Apps has an option to prefer it's own arch (was default behaviour at some point)
- Qt can fall back to the compatible libraries instead (field at mozilla-mobile/mozilla-vpn-client#1831 or possibly Qt bugtracker)