AppOpsXposed is a module for the Xposed framework that restores AppOps functionality on Android >= 4.4.2, and works on all Android versions from Jellybean 4.3 up to Marshmallow 6.0.1. Why not just install XPrivacy? you may ask - read this post.
Source code is available on github (License: GPLv3+)
ChangeLog:
1.30.3 (2016-02-21):
* Fix missing op labels/summaries
* Fix issue in "Show changed"
* Fix OP_BOOT_COMPLETED on Marshmallow
1.30.2 (2016-02-20):
* Fixed crashes
1.30.1 (2016-02-20):
* Fixed crash
* Updated Slovak translation
1.30 (2016-02-19):
* Better support for Marshmallow
* Fixed crashes
* Fixed label/summary issues
* Fixed multiple icons in "App info" screen
* New "Minimal" variant (disables icon in "Settings" app)
1.29-BETA10
* Fixed crashes
1.29-BETA9
* Fixed crashes
1.29-BETA8 (2015-11-09):
* Fixed crashes / empty app lists
* Potentially fixed missing bootup tab
1.29-BETA7:
* Add option to customize appearance (theme, icons)
* Fixed issue on MiUi where ops were reset
* Add AppOps to AOSP Lollipop Settings
* Add option to export/import app restrictions
* AOX now displays notifications on app installs/updates, launching the AppOps screen for that particular app
1.28.1 (2015-08-04)
* Fix bugs in hacks for OP_WAKE_LOCK and OP_BOOT_COMPLETED
1.28 (2015-05-17)
* Fix crashes on certain HTC devices
* Fix switch labels
* Smaller icon in Settings
1.27 (2015-05-15):
* Add translations for 22 languages
1.26.1:
* Fixed issue on Sony ROMs where all ops were shown as disabled
* Restrictions can be reset under "Show changed"
* Fix crash when changing ops
* Better handling of non-AOSP ops (labels, summaries)
1.25.3:
* Multiple fixes for Lollipop
1.24:
* Add option to disable verbose logs
* Potential fix for LG icon issue
* Potential fix for Samsung GridSettings bug
* Add hack to fix ops resetting on reboot if
installed on SD.
1.23
* Finally got the HTC variant working
(thanks to @Mikanoshi)
* Fixed some system-app-install issues
* Bugfixes
1.22:
* AppOpsXposed now works without Xposed, by installing
as a system-app.
* Add new ops for Lollipop (compatibility mode)
* When enabled, use compatibility mode when launching
from settings app as well
1.21.1:
* Fix compatibility mode
1.21:
* Added new compatibility mode (BETA)
* Fix crash on LG ROMs
* Attempted to fix wrong icon size on some ROMs
* WakeLock hack disabled on JellyBean for now
1.20.2:
* Fixed version number (updates should work now)
1.20.1:
* Fixed compatibility with some LG ROMs
* Fixed WakeLockFix (JellyBean currently broken)
* Updated icon in settings for non-AOSP ROMs
1.19:
- Fixed some issues in Samsung ROMs
- Fixed issue in detection of CyanogenMod-based ROMs
- Added bug report functionality
1.18:
* Added OP_BOOT_COMPLETED hack (must be enabled manually under "Hacks")
* Added WakeLock fix (must be enabled manually under "Hacks")
* Fixed crashes in CyanogenMod-based ROMs
* Now using a dedicated icon in Settings (thanks @Kickinpigeons)
* Added Spanish translation (thanks @Jose Artuñedo)
1.17.2:
- Xperia only: more human readable info (e.g. "Run at start-up" vs "BOOT_COMPLETED")
1.17:
- Fixed compatibility with Galaxy S5 settings app (grid layout)
- Fixed crash on Xperia KitKat ROMs
1.16:
- Added OmniROM variant (no header in settings, only icon in "App info")
- Added variant for Sony KitKat ROMs with a switch in AppOps, as opposed to the drop-down menu found in 4.3 ROMs
1.15.1:
- Fix crashes on Android 4.3
1.15:
- Added module-specific settings (click module name in Xposed Installer's "Module" section)
- Launcher icon can now be hidden
- Added Korean translation by [email protected]
1.14:
- This release should fix further crashes on recent cn11 nightlies
1.13:
- Attempted to fix issues on recent cm11 nightlies - again
- Added Japanese translation ([email protected])
1.12:
- Hopefully fixed crashes on Xperia devices
- For now, on CM11 nightlies >= 2014-01-28 almost all features are disabled. AppOps can be launched via the launcher icon only.
1.11:
- Fixed layout issue on Xperia ROMs.
1.10.2:
- Hopefully fix crash on Sony stock ROMs
1.10.1:
- On Android 4.3, AppOpsXposed now works as a launcher even if the Xposed Framework is not installed
- Fixed issue where AppOps could not be started from "App info"
1.9:
- AppOpsXposed is now compatible with Sony Xperia devices
- Fixed AppOps details layout for languages where strings were much longer than in English
- Fixed error where AppOps could not be launched from "App info"
- "App info" now uses AppOpsXposed's icon instead of text
- Better detection of Stock vs. AOSP ROMs
- Added 63 translations of "App ops"
- New icon
1.8:
- AppOps for a specific app can now also be launched from the "App info" page of an app
- The module should now work correctly on Sony (Xperia) devices
1.7:
- Added launcher icon for ROMs where there's no icon in Settings
- Reverted sorting in AppOps to default for now
- Potential fix for HTC devices
1.6.1:
- Sort entries in App ops alphabetically.
1.6:
- Another attempt at fixing Samsung-related issues. "App ops" should now be listed below "Apps", wherever "Apps" may be
on your device.
1.5:
- On Samsung devices with a tabbed interface in "Settings", "App ops" should now be displayed in the "General" tab only.
1.4:
- Should fix issue where "App ops" was shown more than once in "Settings"
1.3:
- Fixed Android 4.3 compatibility
1.2:
- No longer allow module to be installed on Android versions before 4.3
1.1:
- Add "App ops" in Settings app; thirdparty AppOps-launcher no longer required!
What is AppOps(Xposed)? What's the difference between AppOps and permissions?
AppOps is a feature that is included in Android starting with JellyBean 4.3. It allows the user to limit an apps functionality, regardless of permissions granted; for example, you can prevent an app from reading your contact list, or accessing your current location. The difference between revoking permissions and using AppOps is that in the latter case, the affected app will not know what happend and, most importantly, will (usually) not crash. In the case of the location, the app will think that the location is currently unavailable. In the case of your contact list, the app will see an empty list. See this flowchart for an example:

You'll notice ALLOWED, IGNORED and ERRORED; these are the so-called modes, which can be set for each operation. The AppOps interface is very simple, as it provides an on/off switch for every operation. Using this, you switch between ALLOWED and IGNORED, which is usually enough. ERRORED will (likely) make an app crash, or in some cases it will behave exactly as IGNORED.
In the flowchart above, the permission for reading the contact list is android.permission.READ_CALL_LOG,
the corresponding app op is OP_READ_CALL_LOG. Not every permission has a corresponding op, and likewise some ops don't have a corresponding permission. For example, there's no op for the network access permission android.permission.INTERNET, and there's no permission corresponding to the OP_POST_NOTIFICATION op. Note that some app ops are used internally by Android: for example, starting with KitKat Android only allows one app to act as the messaging app; this is controlled by OP_WRITE_SMS.
You'll also notice that in the AppOps app-list, there are often more ops listed for an app than when clicking it. This is because Android groups certain ops into one switch. For example, the "Location" switch controls 7 ops at once: OP_COARSE_LOCATION, OP_FINE_LOCATION, OP_GPS, OP_WIFI_SCAN, OP_NEIGHBORING_CELLS, OP_MONITOR_LOCATION, OP_MONITOR_HIGH_POWER_LOCATION.
Another important thing to keep in mind is that AppOps was not intended for end-users, so some features do not work as advertised. Limiting "Keep awake" for example has no effect, as this was not implemented by the Android developers.
Now that Marshmallow has permission control, what does this module do on Marshmallow?
It may come as a surprise that permission control on Marshmallow doesn't directly use AppOps directly, but instead operates on the permission level. The mechanism used in Marshmallow is this:
This is in contrast to previous Android versions, where an app was granted all requested permissions after install. Revoking a permission thus most often caused the app to crash, since it generally did not expect the permission to be denied.
The mechanism layed out above leads to a slightly different permission/op flowchart, as compared to pre-Marshmallow:

The major difference here is, as explained above, that the app itself must check whether a permission has been granted, and then handle the result accordingly. This also means that an app will be notified of the users decision on a permission level, but not the AppOps level,
i.e. an app may believe that it can access the user's contact list, because the user permitted the app to do so (i.e. granted it the READ_CONTACTS permission), when in fact it is not, because OP_READ_CONTACTS is set to MODE_IGNORED).
A list of so-called "dangerous" permissions can be found here.
The history of AppOps(Xposed)
Until Android 4.4.2, you could access a hidden AppOps interface in the "Settings" app, which you could use to limit the operations of apps; root access was not needed. In 4.4.2, this possibility was disabled. The interface was still there, but it could not be launched from the outside anymore. It was at this point that I decided to create AppOpsXposed, initially a *really* simple (source code) Xposed module, that restored the previous behaviour by hacking into the "Settings" app and re-enabling the interface again.
Starting with AppOpsXposed 1.1, I also added an entry in the "Settings" app, so a launcher icon was not needed anymore. This however only worked for AOSP and AOSP-based ROMs, so I had to add support for ROMs from Sony, HTC, Samsung, etc.. This proved to be a difficult task over time, as many made major modifications to the "Settings" app, and I had no way of testing the code without an actual device - my only device is a Nexus 4. I thus had to rely on user-supplied logs, and then hope that they follow up with more info, to get an issue in the "Settings" app fixed.
Starting with AppOpsXposed 1.21, I added a feature called "Compatibility mode", which ignored the AppOps interface in the Settings app, which didn't use the AppOps interface in your settings app, but rather one included in AppOpsXposed itself. This makes it much easier to fix bugs and add new features, and relieves me of the pain in the ass that is the support of so many different ROMs out there. See another flowchart for a TL;DR:

Starting with AppOpsXposed 1.25, "Compatibility mode" was enabled for all ROMs, and could no longer be disabled. The app uses the GET_APP_OPS_STATS and UPDATE_APP_OPS_STATS permissions to access and change operation modes; this also allows the app to work without Xposed, by installing it as a system app (because the *_APP_OPS_STATS permissions are not granted to normal applications).
I have plans to add several new features in the AppOps interface, but as always, be patient. I'm often busy and this is just my hobby!
READ BEFORE YOU POST
It might seem stupid, but before reporting a crash please try the following: uninstall AppOpsXposed, reinstall it, re-enable it in the Xposed Installer, reboot. It often helps, don't as me why.
Post AT LEAST the following info:


>>> DOWNLOAD LINK (github) <<<
Source code is available on github (License: GPLv3+)
ChangeLog:
1.30.3 (2016-02-21):
* Fix missing op labels/summaries
* Fix issue in "Show changed"
* Fix OP_BOOT_COMPLETED on Marshmallow
1.30.2 (2016-02-20):
* Fixed crashes
1.30.1 (2016-02-20):
* Fixed crash
* Updated Slovak translation
1.30 (2016-02-19):
* Better support for Marshmallow
* Fixed crashes
* Fixed label/summary issues
* Fixed multiple icons in "App info" screen
* New "Minimal" variant (disables icon in "Settings" app)
1.29-BETA10
* Fixed crashes
1.29-BETA9
* Fixed crashes
1.29-BETA8 (2015-11-09):
* Fixed crashes / empty app lists
* Potentially fixed missing bootup tab
1.29-BETA7:
* Add option to customize appearance (theme, icons)
* Fixed issue on MiUi where ops were reset
* Add AppOps to AOSP Lollipop Settings
* Add option to export/import app restrictions
* AOX now displays notifications on app installs/updates, launching the AppOps screen for that particular app
1.28.1 (2015-08-04)
* Fix bugs in hacks for OP_WAKE_LOCK and OP_BOOT_COMPLETED
1.28 (2015-05-17)
* Fix crashes on certain HTC devices
* Fix switch labels
* Smaller icon in Settings
1.27 (2015-05-15):
* Add translations for 22 languages
1.26.1:
* Fixed issue on Sony ROMs where all ops were shown as disabled
* Restrictions can be reset under "Show changed"
* Fix crash when changing ops
* Better handling of non-AOSP ops (labels, summaries)
1.25.3:
* Multiple fixes for Lollipop
1.24:
* Add option to disable verbose logs
* Potential fix for LG icon issue
* Potential fix for Samsung GridSettings bug
* Add hack to fix ops resetting on reboot if
installed on SD.
1.23
* Finally got the HTC variant working
(thanks to @Mikanoshi)
* Fixed some system-app-install issues
* Bugfixes
1.22:
* AppOpsXposed now works without Xposed, by installing
as a system-app.
* Add new ops for Lollipop (compatibility mode)
* When enabled, use compatibility mode when launching
from settings app as well
1.21.1:
* Fix compatibility mode
1.21:
* Added new compatibility mode (BETA)
* Fix crash on LG ROMs
* Attempted to fix wrong icon size on some ROMs
* WakeLock hack disabled on JellyBean for now
1.20.2:
* Fixed version number (updates should work now)
1.20.1:
* Fixed compatibility with some LG ROMs
* Fixed WakeLockFix (JellyBean currently broken)
* Updated icon in settings for non-AOSP ROMs
1.19:
- Fixed some issues in Samsung ROMs
- Fixed issue in detection of CyanogenMod-based ROMs
- Added bug report functionality
1.18:
* Added OP_BOOT_COMPLETED hack (must be enabled manually under "Hacks")
* Added WakeLock fix (must be enabled manually under "Hacks")
* Fixed crashes in CyanogenMod-based ROMs
* Now using a dedicated icon in Settings (thanks @Kickinpigeons)
* Added Spanish translation (thanks @Jose Artuñedo)
1.17.2:
- Xperia only: more human readable info (e.g. "Run at start-up" vs "BOOT_COMPLETED")
1.17:
- Fixed compatibility with Galaxy S5 settings app (grid layout)
- Fixed crash on Xperia KitKat ROMs
1.16:
- Added OmniROM variant (no header in settings, only icon in "App info")
- Added variant for Sony KitKat ROMs with a switch in AppOps, as opposed to the drop-down menu found in 4.3 ROMs
1.15.1:
- Fix crashes on Android 4.3
1.15:
- Added module-specific settings (click module name in Xposed Installer's "Module" section)
- Launcher icon can now be hidden
- Added Korean translation by [email protected]
1.14:
- This release should fix further crashes on recent cn11 nightlies
1.13:
- Attempted to fix issues on recent cm11 nightlies - again
- Added Japanese translation ([email protected])
1.12:
- Hopefully fixed crashes on Xperia devices
- For now, on CM11 nightlies >= 2014-01-28 almost all features are disabled. AppOps can be launched via the launcher icon only.
1.11:
- Fixed layout issue on Xperia ROMs.
1.10.2:
- Hopefully fix crash on Sony stock ROMs
1.10.1:
- On Android 4.3, AppOpsXposed now works as a launcher even if the Xposed Framework is not installed
- Fixed issue where AppOps could not be started from "App info"
1.9:
- AppOpsXposed is now compatible with Sony Xperia devices
- Fixed AppOps details layout for languages where strings were much longer than in English
- Fixed error where AppOps could not be launched from "App info"
- "App info" now uses AppOpsXposed's icon instead of text
- Better detection of Stock vs. AOSP ROMs
- Added 63 translations of "App ops"
- New icon
1.8:
- AppOps for a specific app can now also be launched from the "App info" page of an app
- The module should now work correctly on Sony (Xperia) devices
1.7:
- Added launcher icon for ROMs where there's no icon in Settings
- Reverted sorting in AppOps to default for now
- Potential fix for HTC devices
1.6.1:
- Sort entries in App ops alphabetically.
1.6:
- Another attempt at fixing Samsung-related issues. "App ops" should now be listed below "Apps", wherever "Apps" may be
on your device.
1.5:
- On Samsung devices with a tabbed interface in "Settings", "App ops" should now be displayed in the "General" tab only.
1.4:
- Should fix issue where "App ops" was shown more than once in "Settings"
1.3:
- Fixed Android 4.3 compatibility
1.2:
- No longer allow module to be installed on Android versions before 4.3
1.1:
- Add "App ops" in Settings app; thirdparty AppOps-launcher no longer required!
What is AppOps(Xposed)? What's the difference between AppOps and permissions?
AppOps is a feature that is included in Android starting with JellyBean 4.3. It allows the user to limit an apps functionality, regardless of permissions granted; for example, you can prevent an app from reading your contact list, or accessing your current location. The difference between revoking permissions and using AppOps is that in the latter case, the affected app will not know what happend and, most importantly, will (usually) not crash. In the case of the location, the app will think that the location is currently unavailable. In the case of your contact list, the app will see an empty list. See this flowchart for an example:

You'll notice ALLOWED, IGNORED and ERRORED; these are the so-called modes, which can be set for each operation. The AppOps interface is very simple, as it provides an on/off switch for every operation. Using this, you switch between ALLOWED and IGNORED, which is usually enough. ERRORED will (likely) make an app crash, or in some cases it will behave exactly as IGNORED.
In the flowchart above, the permission for reading the contact list is android.permission.READ_CALL_LOG,
the corresponding app op is OP_READ_CALL_LOG. Not every permission has a corresponding op, and likewise some ops don't have a corresponding permission. For example, there's no op for the network access permission android.permission.INTERNET, and there's no permission corresponding to the OP_POST_NOTIFICATION op. Note that some app ops are used internally by Android: for example, starting with KitKat Android only allows one app to act as the messaging app; this is controlled by OP_WRITE_SMS.
You'll also notice that in the AppOps app-list, there are often more ops listed for an app than when clicking it. This is because Android groups certain ops into one switch. For example, the "Location" switch controls 7 ops at once: OP_COARSE_LOCATION, OP_FINE_LOCATION, OP_GPS, OP_WIFI_SCAN, OP_NEIGHBORING_CELLS, OP_MONITOR_LOCATION, OP_MONITOR_HIGH_POWER_LOCATION.
Another important thing to keep in mind is that AppOps was not intended for end-users, so some features do not work as advertised. Limiting "Keep awake" for example has no effect, as this was not implemented by the Android developers.
Now that Marshmallow has permission control, what does this module do on Marshmallow?
It may come as a surprise that permission control on Marshmallow doesn't directly use AppOps directly, but instead operates on the permission level. The mechanism used in Marshmallow is this:
- When installing an app, so-called "dangerous permissions" [1]are not immediately granted
- An app must check whether a permission has been granted before performing an operation that requires this permission
- The app is notified of the user's decision and must handle it accordingly (displaying an error message, for example).
This is in contrast to previous Android versions, where an app was granted all requested permissions after install. Revoking a permission thus most often caused the app to crash, since it generally did not expect the permission to be denied.
The mechanism layed out above leads to a slightly different permission/op flowchart, as compared to pre-Marshmallow:

The major difference here is, as explained above, that the app itself must check whether a permission has been granted, and then handle the result accordingly. This also means that an app will be notified of the users decision on a permission level, but not the AppOps level,
i.e. an app may believe that it can access the user's contact list, because the user permitted the app to do so (i.e. granted it the READ_CONTACTS permission), when in fact it is not, because OP_READ_CONTACTS is set to MODE_IGNORED).
A list of so-called "dangerous" permissions can be found here.
The history of AppOps(Xposed)
Until Android 4.4.2, you could access a hidden AppOps interface in the "Settings" app, which you could use to limit the operations of apps; root access was not needed. In 4.4.2, this possibility was disabled. The interface was still there, but it could not be launched from the outside anymore. It was at this point that I decided to create AppOpsXposed, initially a *really* simple (source code) Xposed module, that restored the previous behaviour by hacking into the "Settings" app and re-enabling the interface again.
Starting with AppOpsXposed 1.1, I also added an entry in the "Settings" app, so a launcher icon was not needed anymore. This however only worked for AOSP and AOSP-based ROMs, so I had to add support for ROMs from Sony, HTC, Samsung, etc.. This proved to be a difficult task over time, as many made major modifications to the "Settings" app, and I had no way of testing the code without an actual device - my only device is a Nexus 4. I thus had to rely on user-supplied logs, and then hope that they follow up with more info, to get an issue in the "Settings" app fixed.
Starting with AppOpsXposed 1.21, I added a feature called "Compatibility mode", which ignored the AppOps interface in the Settings app, which didn't use the AppOps interface in your settings app, but rather one included in AppOpsXposed itself. This makes it much easier to fix bugs and add new features, and relieves me of the pain in the ass that is the support of so many different ROMs out there. See another flowchart for a TL;DR:

Starting with AppOpsXposed 1.25, "Compatibility mode" was enabled for all ROMs, and could no longer be disabled. The app uses the GET_APP_OPS_STATS and UPDATE_APP_OPS_STATS permissions to access and change operation modes; this also allows the app to work without Xposed, by installing it as a system app (because the *_APP_OPS_STATS permissions are not granted to normal applications).
I have plans to add several new features in the AppOps interface, but as always, be patient. I'm often busy and this is just my hobby!
READ BEFORE YOU POST
It might seem stupid, but before reporting a crash please try the following: uninstall AppOpsXposed, reinstall it, re-enable it in the Xposed Installer, reboot. It often helps, don't as me why.
Post AT LEAST the following info:
- Device,
- Android version (4.3, 4.4, etc.)
- Name and type (stock/custom) of ROM
- In AppOpsXposed's settings menu there's an option "Build bug report" (see below) - use it! Normal logcats are not enough!


>>> DOWNLOAD LINK (github) <<<
Attachments
Last edited: