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?

up vote 7 down vote accepted

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 Jan 22 '16 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. – allo Jan 23 '16 at 18:40
  • 1
    You are a lifesaver, thanks! – danizmax May 30 '17 at 4:50

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)? – Fabiano Tarlao Nov 4 at 11:35
  • 1
    Thanks. As to the doc: No, I don't have it. I just figured out how to edit the file by guessing + try and error :) – LaTechneuse Nov 6 at 17:23

A solution that worked for me was to simply boot into safe mode, and then revert to my previous settings.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.