-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: resolve crash on Play Store version #894
Conversation
anhappdev
commented
Jun 22, 2024
•
edited
Loading
edited
- Closes Test Android Play Store version #893
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
@anhappdev do you want me to try out this version of the app from the playstore? |
Yes. Please. |
i see the play store version was updated on 18th June. Can you push the apk with these fixes as well to playstore? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@mohitmundhragithub Ok. Thanks for the feedback. Is the crash occurred on any Android devices with the QTI backend or only on the Galaxy S23? |
I tried the apk on another device (Samsung galaxy tab s8+, SD8Gen1). It crashes there as well. Sadly I am still unable to upload the device logs... but following up with IT team internally. |
@anhappdev please add [email protected] for internal testing |
Hi Anh, Finally able to upload the logs. Can you please check? |
It looks like the same issue we have here: For this issue, I still cannot find a solution. |
actually the symptom (final log) for failure is same. But the reason would be different. Seems like when uploading to playstore, the DSP access gets denied but not otherwise. Seems like we are missing some checks when uploading to playstore? |
Let's see if we can
|
Works on
@AhmedTElthakeb and @Mostelk: please check if the Play Store apk works on Exynos devices. |
I opened a support ticket on Google Play, but they don't provide support for this kind of issue. Here is their answer:
|
@AhmedTElthakeb will try to run the in Play Store one w/ SELinux disabled (if that works, we are almost sure that there is some kind of permission setting problem). |
|
I don't know if it makes a different, but I deployed the app to the closed testing channel. @mohitmundhragithub @AhmedTElthakeb Can you please test the app (v4.1.0 (164)) again: |
didn't work on GS23Ultra. |
on rooted device, |
I think I found one workaround for the issue. For QTI backend, if we push few of the dependent libs to the "files" folder, instead of packing it in the apk's "lib" folder, then the issue gets resolved for qti backend. @anhappdev, i will push a change to this PR... can you please help to push the aab file to the playstore? i can test with that. |
72e6ba1
to
fad36c1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@mohitmundhragithub I am told the one from Play Store works on a Samsung S24+ (8 Gen 3 inside). |
That's surprising. Not sure how that could happen. The apk when sideloaded should work fine, but not the app from play store. |
Thanks a lot @anhappdev. This link worked fine. I am able to download the updated app now. The workaround that i had worked fine. Now we need to have a proper fix for the same. My suggestion is,
|
NB: the other minSDK 30 issue also gets resolved with this workaround. |
@anhappdev, @freedomtan I have pushed the changes to download the libs directory as listed in the backend setting. Can you please review once? After this change, we will need a way to host the required .so files somewhere, either in github or somewhere else. The backends will need to update the required files in the settings (just like the model files). |
|
Another solution is to download the libs in the build step and put them in the same place where the native libs are: mobile_app_open/flutter/android/android.mk Lines 50 to 65 in fad36c1
More info at https://developer.android.com/ndk/guides/abis#am |
The cause of this issue is that the App cannot access some of the .so libraries in devices (e.g., in either /system or /vendor partition). Why this restriction: there is some kind of SELinux rule(s) which prevent libraries not listed in a white list to be accessed by an App from the Play Store. @mohitmundhragithub's solution is to copy the libraries the app needs to the App's library directory. However, I think this is a hack. Long term solution: fix the "whitelist". debugging hint: ld debug options (Android specific) to get more verbose ld outputs (which may help find the libraries been accessed), @freedomtan to find the options from Android documentation site |
we have already been doing this. all the .so files are already part of the libs/abi folder. It used to work till now. however from, sdk 29 and above, there is an additional W^X restrictions. there are a few libs required to access npu (suffixed skel.so), which have become inaccessible, from android 29 onwards. i think there is similar restrictions for samsung stack as well. when we copy the libs to files folder, the app is able to access those. this change facilitates that. if we can find a way to pack these libs during build time to the files folder, then we dont need to download them separately. |
Really? Did you try copy the Updated: I just checked the unified APK and the
https://developer.android.com/about/versions/10/behavior-changes-10#execute-permission |
Did we try to specify all the libs in the AndroidManifest.xml with either uses-native-library or uses-library tag? |
yes. already tried this earlier. |
tried it. didnt work on galaxy s23 ultra. |
there is a IPC involved when trying to invoke the skel files. may be thats resulting in this behaviour. same issue is seen for both playstore version and for apps with minsdkversion >= 29 |
Ok. Let move on with @mohitmundhragithub's solution: let the app download the *.so files. |
@mohitmundhragithub Did we try to set
|
the apk uploaded to play store (252) using PR #893 seems to resolve the play store issue at least on Galaxy S23 ultra. |
Yes. It also resolved the issue with QTI backend in the PR #859. |