Permissions not requested
See original GitHub issueFirst, thank you very much for latest release! (v0.2.11.202414) Even though I collected all the checkmarks in self-check, gmscore is still missing permissions ACCESS_FINE_LOCATION and READ_EXTERNAL_STORAGE. It does not request them.
One can check for ungranted permissions with:
$ dumpsys package com.google.android.gms | grep granted=false
For now I have granted the permissions manually:
$ pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
$ pm grant com.google.android.gms android.permission.READ_EXTERNAL_STORAGE
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Android permissions not being requested - Stack Overflow
First thing to note here is that Android permissions are no longer asked when the app is installed, but rather when the app...
Read more >Change app permissions on your Android phone
On your phone, open the Settings app. Tap Privacy And then Permission manager. Tap a permission type. If you allowed or denied permission...
Read more >Request app permissions - Android Developers
Overview · Standalone apps · Authentication · Request permissions · Detect location · Playing audio on wearables · Appear in Recents and App...
Read more >Understanding App Permissions | CodePath Android Cliffnotes
When an app requests a permission that belongs to a particular permission group (i.e. READ_CONTACTS), Android asks the user about the higher level...
Read more >Requesting Android Permissions - HERE Developer
permissions request code */ private final static int ... makeText(this, "Required permission '" + permissions[index] + "' not granted, exiting", Toast.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The fix is to install microG not just as a priv-app, but also as a user-app, i. e. an update.
a) go to /data/adb/modules/microG_blabla/system/priv-app/GmsCore/GmsCore.apk and tap on the APK to install it as update b) remove any runtime-permissions.xml from /data/users/*/ c) reboot d) grant all permissions again
profit.
Yes, it’s just like that. Installing NanoDroid into /system before booting the ROM the first time (just as one does with GApps; install ROM > install NanoDroid to /system > boot into ROM) solves that issue. It also properly auto-grants all permissions to GmsCore (except
android.permission.FAKE_PACKAGE_SIGNATURE
), which is desireable, though.Most A/B or S-A-R devices require /data to be clean when starting the first time (observed this on OnePlus 5T and OnePlus 6), thus installing NanoDroid as Magisk Module is always “dirty flashed” (flash ROM > boot into ROM > boot into TWRP > Flash Magisk > Flash NanoDroid); “clean flash” (install ROM > install Magisk > install NanoDroid > boot into ROM) like mentioned above results in a boot loop on those devices, thus is not possible.
For one reason or another Android does deny
android.permission.ACCESS_BACKGROUND_LOCATION
on “dirty flashes”, even though it is properly privapp-whitelisted. Also all other should-be auto-granted permission need to be manually granted, as opposed to /system mode installation.On older devices where you can flash ROM and Magisk in one go and sucessfully boot up, this does not happen. As mentioned before
pm install -r /data/adb/modules/NanoDroid/system/priv-app/GmsCore/GmsCore.apk
fixes the issue for Magisk Installations aswell.I observed this on both Android 10 (AICP 15) and Android 11 (Syberia 4.1). Tomorrow I’ll update the Magisk Modules’s
service.sh
in order to silently auto-“userify” GmsCore, to workaround the issue.Since no Magisk GApps package exists (until now I never thought about why that’s the case) and given that privapps should be available right from the very first start, I suspect that behaviour is actually on purpose, so that proposed change to
service.sh
is likely the ultimate best I could come up with for installing NanoDroid as Magisk Module.Unless someone can point me into a different direction.