This is a step-by-step guide that lays out the process for upgrading to the latest version of Cyanogenmod on a Nexus 5, while retaining your XPrivacy settings. It incorporates instructions from XPrivacy’s Github page:
- Get the latest nightly (or stable) ROM for your phone make/model from Cyanogenmod’s (CM) site
- Verify the sha1 hash of the download. Compare the result to the sha1 hash provided on CM’s website. For example:
sha1sum cm-12.1-date-NIGHTLY-hammerhead.zip
- Copy the ROM file to the internal storage of your phone
- Check for updated versions of the Xposed module and Gapps package and copy them to internal storage if you wish to update them as well.
- Export your XPrivacy settings
- Xprivacy Menu -> Operations -> Export
- Enable airplane/flight mode
- Use the menu option in XPrivacy to clear all data
- Xprivacy Menu -> Operations -> Select All
- Xprivacy Menu -> Operations -> Toggle Restrictions -> Clear
- Reboot into recovery mode (Ex: TWRP)
- (Optional) Make an encrypted backup of the data partition.
- Flash the new Cyanogenmod ROM along with Gapps and the Xposed Privacy module.
- Enable zip signature verification (TWRP)
- Reboot. Android will take some time to optimize the installed apps.
- If your phone does not boot after flashing CM, Gapps, Xposed, check the latest posts on theĀ Xposed thread at XDA developers. There may been an updated version which you need to install to get the phone to boot properly. Reboot the phone into recovery mode and re-flash with the updated version.
- Verify that XPrivacy is still enabled under modules in Xposed Framework
- If you receive a notification that “XPrivacy is not enabled in the Xposed installer”, try rebooting the phone one more time
- Import XPrivacy settings
- Xprivacy Menu -> Operations -> Import
- Xprivacy Menu -> Operations -> Import
- Reboot the phone so that the Xprivacy settings take affect
- Disable airplane mode
As per XPrivacy’s Github instructions:
“If you skip the export, clear, or import steps above, some system applications can end up with the wrong restrictions because the ROM update might have changed these applications’ UID’s.
To import and export XPrivacy’s data, you need a pro license.”