What happens if I ignore the warning: "If you deny this permission, basic features of your device may no longer function as intended"?


Question

If I go into the permissions settings for the Google app and change the Location permission from "Allow all the time" to "Allow only while using the app" or "Deny," I am presented with a warning: "If you deny this permission, basic features of your device may no longer function as intended."



I am inclined to give it a try anyway, but what might happen? It seems like "Allow only while using the app" should not be very impactful? What is Google trying to warn me about when they say that "basic features of your device may no longer function as intended." Or are they just trying to scare me into not changing the permission (so they can keep their watchful eyes on me)?



enter image description here


Answer

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:




Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes