App-Ops-issue-tracker icon indicating copy to clipboard operation
App-Ops-issue-tracker copied to clipboard

Automatic recovery slow

Open gitthangbaby opened this issue 4 years ago • 5 comments

AppOps automatic recovery slow

AppOps: 5.4.3 Magisk 23 Sui 11.6.122 Android 11 Note20 OneUI 3.1

The automatic recovery process happens too often. After the phone is unlocked, it works multiple times, and the phone becomes very slow to the point, it freezes. E.g. the notification bar can stop in the middle, overall UI of other apps doesn't respond, and after few seconds, it's fine. Is it possible to run it less or scheduled at some frequency, or postpone it during unlock, or insert delay between multiple runs, or optimize its speed?

gitthangbaby avatar Jun 28 '21 14:06 gitthangbaby

I use phone only for 1hr a day, and have 80 AppOps recovery operations per day. So basically the phone is freezing nonstop for me. I don't want to turn off either, since the description says in Android 10+ the rules disappear by the OS.

gitthangbaby avatar Jul 26 '21 09:07 gitthangbaby

without autorecovery the permissions are lost indeed. there are thousands of these messages in log: setUidmode() called with a mode inconsistent with runtime permission state, this is discouraged... uid=1000, switchCode=4, mode=1, permission=<all types> there are even apps that trigger "Wating for recover configurations..." every 10 seconds. Like ProtonMail. A single tap in such app takes 5 seconds instead of ASAP. So the phone feels downgraded to a 20year old phone. Now i've checked another app, Permission Manager X, and there's no delay in recovery.

gitthangbaby avatar Oct 10 '21 02:10 gitthangbaby

On modern Android, "ignore" mode of appops can only be set after runtime permission is granted (setUidmode() called with a mode inconsistent with runtime permission state). And the system reset appops for all apps in many situations such as runtime permission changes and app installation/uninstallation ("freeze/unfreeze" from some freezer apps are treated as install/uninstall).

So in the AppOps app, I have to change the runtime permission to granted in the auto-recovery and the auto-recovery needs to be run very frequently. In AOSP systems, this completes in an instant. Maybe the Samsung system does some time-consuming work on runtime permission changes, which causes your bad experience.

About how to solve the problem, I believe that does the auto-recovery only for running apps rather than all apps will have a significant improvement. But this will be only possible under Shizuku mode.

RikkaW avatar Oct 11 '21 13:10 RikkaW

Thanks. I bought a newest (Samsung) flagship to tackle this issue but it still slowed down. Automatic recovery can also trigger when switching between apps back and forth which makes the transition choppy. Perhaps the idea of running apps isn't bad. I am running in Sui mode by the way.

gitthangbaby avatar Nov 04 '21 20:11 gitthangbaby

It looks like the version 5.5.1.r1429.885ceae9 (1429) is "applying permission" significantly less or it is super fast.

gitthangbaby avatar Mar 12 '22 15:03 gitthangbaby