-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Missing "App list" permission on Samsung devices with Android 14 #1354
Comments
The crash is caused by this error: 2024-08-05T04:17:42.829Z E/SDMSE:App: UNCAUGHT EXCEPTION: eu.darken.sdmse.common.pkgs.pkgops.IllegalPkgDataException: No installed packages
at eu.darken.sdmse.common.pkgs.sources.NormalPkgsSource.access$coreList(Unknown Source:420)
at eu.darken.sdmse.common.pkgs.sources.NormalPkgsSource$coreList$1.invokeSuspend(Unknown Source:11)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:112)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:95)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@316cea8, Dispatchers.Default] This is a "safety" crash. SD Maid asks the system for a list of installed apps. The system says "0 apps" which can't be true (there are always at least system apps). To not make any mistakes based on false data (e.g. delete corpses), SD Maid crashes. Now the question is why the system is saying "0 apps installed" 🤔 Have you rebooted the phone? |
Sorry, I found that the crash was caused by not granting SD Maid the "read app list" permission. However, I noticed that SD Maid did not request the "read app list" permission from me before crashing, but instead crashed first and then asked for the permission. |
Are you using a specific root app to do additional permission management? |
According to the log, the permission is granted though 🤔
|
I am not using any permission management tools. I re-downloaded the app several times, and the app did not automatically receive the QUERY_ALL_PACKAGES permission. SD Maid was not granted this permission. |
A Samsung Android 14 specific behavior? 🤔
This is concerning because the code check says that SD Maid did get the permission. This would mean that Samsung fakes the permission and just returns an empty list of installed apps? 😠 Can you show me a few screenshots (or a video), with english UI, of the extra permission granting process that is required? |
Hm this was already an issue in February (#1015), also an S24 with Android 14 🤔 I closed that by adding a check and setup prompt if |
vedio[https://s-share.samsungcloudcn.com/a7ZqXu82nJNy] |
Thanks, good video 👍 I probably have to handle this different and show an error and explain to the user how to solve it. Maybe add an FAQ entry too (can I include your video as example?). I'm still confused why I don't get more reports about this. Google Play console does not show any crashes and with the many thousands of users SD Maid has, only two reports about this behavior. My guess would be that usually the permission is automatically granted, but sometimes it is not. Could you help me investigate this a bit more? According to the log, you have the FOSS build installed. Did you manually sideload (e.g. ADB) or did you install it through an app store (e.g. F-DROID)? Can you access Google Play and install it from there to check if the permission was automatically granted then? |
Of course, you can use my video, that's not a problem. I downloaded the APK from GitHub and installed it directly. I also installed it from Google Play, but the permissions were still not granted automatically. |
Thanks for the details. I will work on a new info card that shows instead of a crash. I checked Google Play and there are over 6000 Samsung Galaxy S23 Ultra ( If you can think of any reason why it is working for others and not for your device, please let me know 🙏 . |
Thanks! 😊 If I find out why it's happening on my device, I'll let you know. 🔍 |
`QUERY_ALL_PACKAGES` is a permission that is automatically granted, at least according to documentation. Except, of course, on some Samsung devices running Android 14, because why not do things differently... This PR prevents SD Maid from crashing in these cases. A specific error is shown. The state is now detected and treated as a permission error and will show as incomplete-setup. Fixes #1354
`QUERY_ALL_PACKAGES` is a permission that is automatically granted, at least according to documentation. Except, of course, on some Samsung devices running Android 14, because why not do things differently... This PR prevents SD Maid from crashing in these cases. A specific error is shown. The state is now detected and treated as a permission error and will show as incomplete-setup. Fixes #1354
Describe the bug
Software crashes
To Reproduce
Steps to reproduce the behavior:
1.Click on 'Cleanup Keys'
Expected behavior
Start cleaning
Smartphone (please complete the following information):
Debug log
[https://drive.google.com/file/d/101JmJHkGVU_hfkZqXTpDglJkURhHrlHl/view?usp=drivesdk]
Screenshots/Video
https://github.com/user-attachments/assets/a87159ae-2589-4c72-8bc9-4b12733d7938
The text was updated successfully, but these errors were encountered: