MuntashirAkon / AppManager

A full-featured package manager and viewer for Android
https://muntashirakon.github.io/AppManager/
Other
5.01k stars 282 forks source link

App Op can't change #1183

Open researchscum opened 1 year ago

researchscum commented 1 year ago

Please check before submitting an issue

Describe the bug

tried to change app op by tap and hold the app op but any option "can't change"

To Reproduce

1 go to any app info by app manager of any app 2 go to app ops tab 3 choose any app ops or just the common POST_NOTIFICATION

  1. tap and hold the text "mode" of the app ops
  2. in new pop up choose anything or just allow/deny
  3. fail

Expected behavior

it change, at lease what i expect is like App Ops+Shizuku by rikka.

Screenshots

Screenshot_2023-09-16-19-11-58-855_io github muntashirakon AppManager debug

Logs

No response

Device info

Additional context

No response

shuvashish76 commented 1 year ago

Test app: Binary Eye (de.markusfisch.android.binaryeye) Test App Ops: ACTIVITY_RECOGNITION [Android: 12 Mode: Root App version: AM Debug v4.0.0-alpha01 Run#2583]

Steps:

  1. Click on the switch to turn it off ✔️
  2. Again click the switch to turn it on ❌
  3. Long click > Set app op mode > allow ✔️
  4. Long click > Set app op mode > ignore/deny/default/foreground (nothing works) ❌

repeat the steps again to recheck if reproducible 100% of the time ✅

Logs: 18-09_11-25-54.txt

MuntashirAkon commented 1 year ago

These issues depend on Android version, app op mode, sequence of setting the modes (ignore->default->foreground vs foreground->default->ignore), associated permission (Binary Eye does not have the runtime permission declared), application state (running, stopped, disabled, hidden, etc.) and time of execution. These factors have become so complicated that even the AOSP's own command line program does not work as expected, and they've so far declined to fix the issue (in the issue tracker, they've asked us to verify if anything has altered but in the actual codebase, they altered nothing relevant to the issue). Earlier, permissions were decoupled from app ops which resulted in other issues as some feature require both permissions and app ops to operate.

Hence, there exists no effective way to split uses permissions from app ops (not to mention the total absence of any public documentation by Google). The reason why App Ops (the app) works is because they have studied them well and merged them together which I cannot do because I alone do not have the capability to analyse all those permissions and app ops to figure out what modes or flags work with which permission/app op (#1104).

HarriBuh commented 6 months ago

It's a shame this issue still exists and according to your very detailed explanation (thanks for this!), is won't change. Indeed Rikka's App Ops is the only app to date which still works, even if only partially.