I setup privacy guard for some of the ROM-Apps and now the GUI crashes when i even try to get the pin entry field on the lockscreen. My phone is rooted and i can try via adb or recovery. How can i disable the privacy guard or reset it from a root shell?
3 Answers
Removing /data/system/appops.xml
from TWRP (recovery) helped.
-
And per this answer you'd be losing your notification settings. Thought to mention that point.– Firelord ♦Commented Jan 22, 2016 at 16:51
-
Yeah. The file could be edited, but i did not see which value does what without reading source or testing on another phone, so i just deleted it.– alloCommented Jan 23, 2016 at 18:40
Instead of removing /data/system/appops.xml
you can also edit it, at least if only the permissions to "Google Play Services" are the problem.
As I didn't want to re-configure all the app permissions, I downloaded appops.xml
through adb (adb pull /data/system/appops.xml
) and removed the section
<pkg n="com.google.android.gms">
…
</pkg>
This just removes all settings for Google Play Services.
After that I uploaded the edited file again (adb push appops.xml /data/system/appops.xml
) and everything works after restart.
-
This is the best answer, saved my day. Privacy Guard was stopping Google Services and the Phone was unusable (LineageOS). Also safe mode didn't work. Changing the configuration file with twrp/adb worked like a charm. Also your answer permits to not lose privacy configuration for other apps. A question, have you any documentation of the exact meaning of attributes/tags into this xml conf file (in case I need to perform minor changes)? Commented Nov 4, 2018 at 11:35
-
1Thanks. As to the doc: No, I don't have it. I just figured out how to edit the file by guessing + try and error :) Commented Nov 6, 2018 at 17:23
A solution that worked for me was to simply boot into safe mode, and then revert to my previous settings.