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

Backup incomplete

Open gitthangbaby opened this issue 4 years ago • 4 comments

AppOps backup only partial

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

Backup doesn't store system apps. Those settings are much more valuable than normal apps, it is the actual reason to use AppOps. Restoring shouldn't cause any problems, just add a warning of checkbox if there's a slight chance of wrongdoing. I'd strongly appreciate complete backup. It's an incredible waste of time, restoring hundreds of system apps click by click, sometime even on the same phone/ROM.

Backup is not scheduled. It'd be nice to run it periodically, and drop the file anywhere on the disk, so that a sync tool like FolderSync can pick it.

gitthangbaby avatar Jun 28 '21 14:06 gitthangbaby

Just check the logic again, only framework packages (packages that have the same signature with Android framework) are skipped. Such packages are usually core system components. I'm wondering why you want to backup such apps since changing the permission of them is extremely dangerous.

RikkaW avatar Jul 10 '22 03:07 RikkaW

Just check the logic again, only framework packages (packages that have the same signature with Android framework) are skipped. Such packages are usually core system components. I'm wondering why you want to backup such apps since changing the permission of them is extremely dangerous.

i'v checked again. Out of 600 packages, 300 are hiding under "framework" disguise. These are the juicy bloatware apps i want to limit like no other. For example, Samsung has just 11 apps when unchecking "[ ] Show system framework apps", and hundred when checking it. All ready to steal data. Changing their permissions is not dangerous at all (and can be done in Settings UI which i also do), been doing it for years using more hacky methods than just permissions. The inconvenience here is that with AppOps i have to redo all of them after restore on every phone:( Root backup doesn't store them either.

gitthangbaby avatar Jul 10 '22 17:07 gitthangbaby

Checked the code again, non-regular apps, which app id (uid % 100000) is not between 10000 to 19999, are also skipped. Can you give some examples of skipped apps?

RikkaW avatar Jul 15 '22 07:07 RikkaW

these for example: AAService,Accessibility,Adapt sound,App update,Application recommendations,AppLinker,Apps,AR Doodle,AR Emoji,AR Emoji Editor, AR Emoji stickers,AR Zone,Authentication Framework,AuthFw TaPack,Auto Hotspot,AutoDoodle,Autofill with Samsung Pass,Automation Test,BadgeProvider,Bixby dictation,Bixby Routines,Bixby Vision,Bixby Voice,BixbyVision Framework,Bluetooth,BluetoothTest

gitthangbaby avatar Jul 15 '22 09:07 gitthangbaby

Some additional information:

After reading this I was shocked to learn that Samsung also uses UID 1000 for system applications like Xiaomi. UID 1000 can bypass all permission checks because 1000 is the UID of the system server itself. This is clearly not best practice, see AOSP document.

Even through changing ops do works for UID 1000, but ops related to runtime permissions are "uid ops", all applications with a same UID shares the same "uid ops". Some other ops are "uid ops" also. This means it could be possible that what the user does is change the ops of an unimportant system application, the real thing is all packages of UID 1000, including applications that does important are affected.

Therefore, I skipped the non-regular apps in AppOps, which includes UID 1000.

RikkaW avatar Jan 20 '23 04:01 RikkaW

Version 9.0.0 has added an option to allow backup non-regular apps. But it needs to be used with caution since many ops are "uid ops", change it will affect all the apps with the same UID.

RikkaW avatar Apr 07 '23 18:04 RikkaW