I've installed CyanogenMod 12.1 (stable branch: cm-12.1-20151117-SNAPSHOT-YOG7DAO1K9) on my phone (MotoX, 1st gen) using Clockwork Recovery, including the version of OpenGApps recommended on CM wiki, and SuperSU. There are three issues i've noticed - putting them all here in case they're related...

  1. App install from Play Store triggers soft reboot
  2. Android is upgrading, Starting apps message on every boot
  3. Can't copy files to device: The device has either stopped responding or has been disconnected

I've searched around but advice seems pretty thin.

UPDATE: I've checked adb logcat during install, and found that this seems to happen shortly prior to reboot:

F/PackageManager( 5905): java.io.FileNotFoundException: /data/system/users/0/package-restrictions.xml: open failed: ENOENT (No such file or directory)

Having checked for the file I can confirm it's not there. Is there a replacement I can add in order to resolve this? I've noticed that any new users created do have this file, though it doesn't seem possible to copy it across, even with root.

UPDATE2: Somehow i have files located in /data/media/0/0/0/0/0/clockworkmod: .recovery_version and philz-touch_6.sav

When I format in preparation for reinstall these files cannot be removed. I've also tried using root and adb shell to delete with no success. As a result apps seem to persist across OS reinstalls.

I think the best thing to try now is a manual reformat of the data partition...

  • Thanks. Yes I used the version recommended on the CM wiki: OpenGApps. CGApps is also linked, so maybe worth trying that. Is it ok to just install one over the other, or is there a method to remove it first? Jan 12, 2016 at 10:21
  • @Izzy The Open GApps FAQ says that only TWRP recovery is officially supported, though I had issues with it when flashing CM, so would prefer to stick with CWM. I also found this in the details txt file: APK contains a new Google certificate not yet available in the keystore, please contact Open GApps maintainer to get it included - so maybe there's a key i need to install? Jan 12, 2016 at 10:35
  • Haven't checked myself in a while (no longer using GApps), but as far as I've heard the packages do a removal first. If you want to be on the safe side, wipe and flash CM again before installing a different GApps package. Not sure about the certificate thing, but that might indeed be the cause of a crash (though not of a reboot).
    – Izzy
    Jan 12, 2016 at 12:23
  • I think it might be related to package-restrictions.xml (updated in question), but I've been unable to create a new one in that directory. If I create a new user everything seems to be in the right place though, so maybe a complete reset is the way to go. Jan 12, 2016 at 12:42
  • 1
    That file missing shouldn't be the cause of a reboot. If it's not found, it should simply be created (see here and here for some background). Though I wonder why it was not created to start with, as it should include details of all packages (whether they're enabled/disabled, default app, etc.). I'd expect it to be created at the first startup automatically. Note that except from package manager, only root can access that file.
    – Izzy
    Jan 12, 2016 at 12:54

2 Answers 2


I'm writing this here because I am unable to comment.

  • Hi, thanks for the input! I'm actually trying to do that at the moment, but the factory reset won't complete properly (fails to format data) due to the files mentioned in Update2 above. I'm currently looking into manually formatting the partiton, but so far have some up with little to nothing... Jan 13, 2016 at 22:34

I seem to have all these issues resolved now.

Firstly I forced a format of my data partition, by flashing TWRP, switching the filesystem for /data to ext4, and then switching back to f2fs. This means that instead of just deleting files as it tends to do during a wipe it has to recreate the entire filesystem, removing those troublesome files from before in the process.

I then pushed CM12, OpenGApps and SuperSU zip files over adb to the data partition, before re-flashing CWM and installing them.

Boot into CM12 and everything works!

.recovery_version and philz-touch_6.sav have returned, this time to /data/media/0/0/clockworkmod but as I've already formatted by this point, they don't seem to be causing any problems.

Thanks to @Izzy and @Kshitij for their help.

You must log in to answer this question.

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