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 3


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, 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.
    – allo
    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">

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)? Nov 4, 2018 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 :) 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .