While revoking a runtime manifest permission requested by an app, the system warning: “If you deny this permission, basic features of your device may no longer function as intended.†is displayed by PackageInstaller if the permission was GRANTED_BY_DEFAULT
:
~$ pm dump packages | grep -E 'Package |GRANTED_BY_DEFAULT' | grep -B1 android.permission
All runtime requested permissions are granted by default during grantDefaultPermissions on first boot or on new user/profile creation in three cases generally as referred in official documentation, so that “the device is usable out-of-the-boxâ€:
If the app is a privileged system app (i.e. installed in /system/priv-app/
) e.g. Settings and Google Play Services. Or the app is a system component (i.e. UID is less than 10000) e.g. SIM Toolkit and FM Radio. Some apps may fulfill both criteria e.g. Shell (com.android.shell
, UID: 2000
).
If the app provides some core OS functionality:
Apps must prompt users to grant application permissions at runtime. Limited exceptions may be granted to default applications and handlers that provide basic device functionality fundamental to the expected operation of the device.
Some of these apps necessarily have to be privileged or system component apps e.g. Location Provider. Others can also be non-system apps (even installed in /system/app
) e.g. stock Messaging and Calendar, or third-party apps (installed in /data/app
) e.g. user installed SMS and dialer apps.
- If ROM developer explicitly creates an exception for some app(s).
However SYSTEM_FIXED
runtime permissions (set for privileged/system apps) cannot be revoked.
What is Google trying to warn me about when they say that "basic features of your device may no longer function as intended."
Revoking location permission would not let the app (and its dependent apps if any) access location. Nothing else should happen.
Or are they just trying to scare me into not changing the permission (so they can keep their watchful eyes on me)?
Play Services are privileged, they won't work if you try to completely stop them keeping eyes on you.
It seems like "Allow only while using the app" should not be very impactful?
“Allow only while using the app†is not a normal manifest permission. It's appops
which lets you set location operations to foreground so that Google app won't use location in background. You can also do that from commadline:
~$ appops set com.google.android.googlequicksearchbox COARSE_LOCATION foreground
~$ appops set com.google.android.googlequicksearchbox FINE_LOCATION foreground
RELATED: