CM12 app install/reboot issue 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...


App install from Play Store triggers soft reboot
Android is upgrading, Starting apps message on every boot
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...
I'm writing this here because I am unable to comment.


You could try a clean install i.e. wipe system, data, cache
partitions and flash ROM &amp; GApps packages.
OpenGApps recommends that you flash OpenGApps package right after you
flash the ROM without any reboots in between
https://github.com/opengapps/opengapps/wiki/Notes-for-Android-6.0 (I
know this is for 6.0 but it might be applicable to previous versions
as well)
You could try posting your logs in the OpenGApps XDA Forum link given on
their FAQ page
https://github.com/opengapps/opengapps/wiki/FAQ#2-im-having-a-problem-with-my-open-gapps-install-what-information-do-you-need-to-help-me