CM11s Fresh Clean InstallWhy do it? • Incremental OTA were too buggy and you wanted a clean state for your device.
• You’ve bought a used set from someone, and god knows what have been installed in the device. Kindly take note, apps can be turned into system apps and will survive factory resets. A good example is Cerberus.
• You’ve bought a China set, and the resellers used toolkit to flash CM11s over China ColorOS. The flash was not clean and your device contains China based apps like Weibo, Baidu, QQ, etc.
I’ll be using the fastboot method, as it is known to be the safest method to flash roms, kernels, radio modems and recovery images.
1st Most important part is BACKUP.
If your OPO is an international set and you have been using stock settings with no other modification done on the device, it is almost all the time, your device bootloader is locked. Unfortunately, the latest CM11s version requires an unlocked bootloader in order to root and flash custom recovery on the device. Hence, you will need to backup all your precious files and saved data for restoration purposes later.
Your greatest friend for now is Titanium Backup.
Backing up all data with Titanium Backup:» Click to show Spoiler - click again to hide... «
1. Download and install Titanium Backup from here:
https://play.google.com/store/apps/details?...iumBackup&hl=en2. You may also buy the Pro version for its additional features here:
https://play.google.com/store/apps/details?...BackupPro&hl=en3. Open Titanium Backup.
4. Open the setting screen by pressing the menu button.
5. Select Preference
6. Tick “Auto-Sync TB Settings”
7. Select Backup folder location, and reconfirm its location.
8. Tick “Migrate System Data” under Restorations settings.
9. Go back to the main menu and select the box icon with the tick under it, on the top right corner of the screen. This will open the “Batch Action-All” screen.
10. Select “Backup all user apps + system data”
11. Press Select All and press the tick icon on the top right corner of the screen
12. Let the backup process finishes itself
13. Once backup is done, transfer all backup files located in the Backup folder location from your device to your PC.
Before proceeding to the next step, your device needs to be rooted, hence you will need to install Android SDK, unlock bootloader, flash TWRP recovery and install SuperSU.
Installing ADB:» Click to show Spoiler - click again to hide... «
1. Download and install the latest Java Runtime Environment (JRE) from here:
http://java.com/en/download/index.jsp2. Go to this page:
http://developer.android.com/sdk/index.html#download3. Scroll down and select “VIEW ALL DOWNLOADS AND SIZES”
4. Download the latest android-sdk_rxx.x.x-OSplatfrom.zip under SDK Tools Only, according to your PC specifications. For the purpose of this guide, I am using android-sdk_r23.0.2-windows.zip.
5. Place the downloaded android-sdk_rxx.x.x-OSplatfrom.zip to any location in your PC to your liking.
6. Right click the zip file and select “Extract Here”.
7. A folder named ”android-sdk-windows” will be created.
8. Open the android-sdk-windows folder and run the “SDK Manager.exe”.
9. Install the following packages (there are a total of 4 packages):
- Tools > Android SDK Tools, Android SDK Platform-tools
- Extras > Android Support Library, Google USB Driver
10. Go back into the android-sdk-windows directory, and you should see a new folder named “platform-tools”. If you don't see this new folder, repeat the step above.
11. This is an optional step, applicable only if you stumbled into any error running SDK Manager.exe. You can also install the proper ADB by going into “\android-sdk-windows\tools” and run “android.bat”. Once you run the bat file, the steps are similar to Item 9.
12. To confirm that ADB was properly installed and working, go to the “\android-sdk-windows\platform-tools”, Press Shift + Right Click simultaneously at any blank area of the screen. Make sure no files or directory is highlighted while doing this. Then select: open a command prompt window here.
13. Enter the following commands in the command prompt screen:
CODE
adb version
If it displays "Android Debug Bridge version x.x.xx". Then the ADB is working. If it is gives an error saying that adb is not a recognized command, it has not been successful. Carefully repeat the steps above if this is the case. Close the command prompt window when you are done.
14. Download and install the USB ADB Driver from here:
http://www.koushikdutta.com/post/universal-adb-driver15. Alternatively, use this method to install the USB ADB Driver:
https://forums.oneplus.net/threads/install-...-64-bits.51264/ Preliminary steps and checks before proceeding further:» Click to show Spoiler - click again to hide... «
Once ADB is installed on your PC, together with the required USB ADB driver, kindly test out that your PC can detect your device while it is under fastboot mode and recovery mode.
Power on your device and do the following steps:
1. USB Debugging - On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging.
2. Disable CM Recovery Protection - On your phone go to Settings > Developer options. Untick the 'Update recovery with system updates' option.
Fastboot mode:1. To enter into fasboot mode: Power off the device. Press the power button, then quickly press the Volume Up button.
2. Please take note, if you press Press the power button + Volume Up button at the same time, it will not work.
3. The phone will display "fastboot" text indicating that it has successfully entered fastboot mode.
4. Once in fastboot mode, connect your device to your PC, go to the “\android-sdk-windows\platform-tools”, Press Shift + Right Click simultaneously at any blank area of the screen. Make sure no files or directory is highlighted while doing this. Then select: open a command prompt window here.
5. Enter the following command in the command prompt screen:
CODE
fastboot devices
This command will list the connected devices. If your phones serial number shows up you are good to go. If the phone is NOT listed, this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.
6. You can now exit the fastboot mode by entering the following command in the command prompt screen:
CODE
fastboot reboot
Recovery mode:1. To enter into recovery mode: Power off the device. Press the power button + Volume Up button simultaneously. Keep pressing both buttons and only release upon sensing a vibrate from your device.
2. The phone will display the recovery text, according to the recovery installed into the device, either stock or custom recovery (TWRP or CWM). This indicates that the device has successfully entered recovery mode.
3. Once in recovery mode, connect your device to your PC.
4. Open the command prompt screen in your PC.
5. Enter the following command in the command prompt screen:
CODE
adb devices
This command will list the connected devices. If your phones serial number shows up you are good to go. If the phone is NOT listed, this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under ADB devices.
6. You can now exit the recovery mode by entering the following command in the command prompt screen:
CODE
adb reboot
Now, you may proceed to the next steps that are needed before you complete all the necessary backup on your device.
Download all the following files:7. Download the latest TWRP Recovery from here:
http://techerrata.com/browse/twrp2/bacon8. Download the latest SuperSU from here:
http://download.chainfire.eu/578/SuperSU/U...perSU-v2.14.zip9. Download the latest CM11s full rom from here:
https://cyngn.com/products/oneplusone/Scroll down and download the cm-11.0-XNPHXXX-bacon-signed-fastboot.zip
10. Optional: download the latest XNPH38R OTA from here:
https://www.androidfilehost.com/?fid=95747613655042874Unlocking Bootloader:» Click to show Spoiler - click again to hide... «
1. Turn the phone off. Then boot it into fastboot mode.
2. Plug the phone into your PC, then open the command prompt screen.
3. Enter the following command in the command prompt screen:
CODE
fastboot devices
4. Confirm that your phone is detected by your PC.
5. Now proceed to unlock the bootloader. Remember that this step will wipe EVERYTHING from your device
CODE
fastboot oem unlock
6. Wait until the command had completed its execution.
7. Then, type the following command
CODE
fastboot reboot
Installing TWRP Recovery:» Click to show Spoiler - click again to hide... «
1. Copy and paste the openrecovery-twrp-x.x.x.x-bacon.img you had downloaded earlier to the “\android-sdk-windows\platform-tools” folder.
2. Put your device into fastboot mode.
3. Once in fastboot mode, connect your device to your PC.
4. Open the command prompt screen in your PC.
5. Confirm that your PC had detected your phone by typing the following command in the command prompt screen:
CODE
fastboot devices
6. Now, flash the TWRP Recovery img file into your device by entering the following command in the command prompt screen:
CODE
fastboot flash recovery openrecovery-twrp-x.x.x.x-bacon.img
7. Let the flashing be completed. Then type following command to reboot the phone:
CODE
fastboot reboot
8. Close the command prompt window.
Rooting The Device:» Click to show Spoiler - click again to hide... «
1. Turn on your phone. Connect it to your PC.
2. Copy and paste the Update-SuperSU-v2.14.zip you had downloaded earlier into the /Download folder of the phone’s internal memory.
3. Disconnect the device from your PC.
4. Boot the device into recovery mode. Your device will be booted into TWRP recovery this time, instead of the stock recovery.
5. At the main TWRP menu, select Install.
6. Select Update-SuperSU-v2.14.zip
7. Swipe right on the bottom of the screen.
8. Let the process completes itself.
9. Press back until you are back at TWRP main menu.
10. Select Reboot.
11. Select System.
You had now successfully rooted your device.
12. SuperSU icon will be on your homescreen by now. Press it and let it run for once.
13. To confirm that the rooting had been done correctly, download the Root Checker from here:
https://play.google.com/store/apps/details?...t_checker&hl=en14. Once Root Checker is installed, open the app and press CHECK at the top right corner of the screen.
15. The app will produce a line: Root access: Access granted.
Once you had successfully rooted your device, proceed to the next step.
EFS Backup:» Click to show Spoiler - click again to hide... «
1. Download and install Terminal Emulator from here:
https://play.google.com/store/apps/details?...droidterm&hl=en2. Open Terminal Emulator and type (if SuperSU screen appears and is asking for root access, grant it):
CODE
su (press Return)
dd if=/dev/block/mmcblk0p10 of=/sdcard/modemst1.bin bs=512 (press Return)
dd if=/dev/block/mmcblk0p11 of=/sdcard/modemst2.bin bs=512 (press Return)
3. Backup files modemst1.bin and modemst2.bin will be created on the root your internal storage.
4. Plug your device to your PC and copy both files to a safe location.
5. In case at any time you lost your modem info, i.e. IMEI, MAC address, you can restore both bin file via fastboot.
CODE
fastboot flash modemst1 modemst1.bin
fastboot flash modemst2 modemst2.bin
Nandroid Backup:» Click to show Spoiler - click again to hide... «
1. Power off your device and enter into recovery mode.
2. Select Backup.
3. You will noticed that TWRP had already ticked 3 options, i.e. Boot, System and Data. Leave it as it is and don’t change anything
4. At the bottom of the screen. swipe right to initiate the backup.
5. Wait until TWRP finished the backup. The larger your saved files, the longer it takes to complete.
6. Once the backup is completed, select reboot, select system.
7. Connect the device to your PC
8. Browse to folder TWRP. You find your TWRP backups in there.
9. Copy paste that folder into your PC. This is very important. Just in case something goes wrong, this will help you to get back your device.
SD Card/Internal Memory Backup:» Click to show Spoiler - click again to hide... «
1. While your device in turned on, connect the device to your PC.
2. Browse the internal memory of your device from your PC.
3. You may copy and paste the following folders from your device into your PC:
• Download
• DCIM
• Pictures
• Music
• Ringtones
• Notifications
Well, that was quite lengthy, but now, you had backed up everything that you could have, in order to proceed with the clean rom installation.
Wiping All Data from Your Device:» Click to show Spoiler - click again to hide... «
1. Power off your device. Enter into recovery mode.
2. Select wipe.
3. Select advance wipe
4. Tick all 5 selection, i.e. dalvik cache, system, data, internal storage, cache
5. At the bottom of the screen, swipe right to initiate wipe.
6. Wait until the process is completed.
7. Once done. press back button. Your screen will go back to the previous screen that has 2 option: Advance wipe and format data
8. Now select format data
9. The screen will show the following message: "Format Data will wipe all of your apps, backups, pictures, videos, media, and removes encryption on internal storage. This cannot be undone. Press back to cancel. Type yes to continue."
10. Type yes in the box below the warning message.
11. Swipe right to proceed.
12. Wait until the process is completed.
13. Once done, you now have a fresh OPO with no OS.
Flashing a Fresh CM11s Rom:» Click to show Spoiler - click again to hide... «
1. Copy and paste the cm-11.0-XNPHXXX-bacon-signed-fastboot.zip you had downloaded earlier to the “\android-sdk-windows\platform-tools” folder. At the point of this guide is posted, the file should be cm-11.0-XNPH33R-bacon-signed-fastboot.zip
2. Right click the zip file that is now placed in “\android-sdk-windows\platform-tools” folder and select “Extract Here”.
3. Put your device into fastboot mode.
4. Once in fastboot mode, connect your device to your PC.
5. Open the command prompt screen in your PC.
6. Confirm that your PC had detected your phone by typing the following command in the command prompt screen:
CODE
fastboot devices
7. Now, flash the CM11s Rom files into your device by entering the following command in the command prompt screen:
For 64GB device:
CODE
fastboot flash boot boot.img
fastboot flash userdata userdata_64G.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash dbi sdi.mbn
fastboot flash aboot emmc_appsboot.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash LOGO logo.bin
fastboot reboot
For 16GB device:
CODE
fastboot flash boot boot.img
fastboot flash userdata userdata.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash dbi sdi.mbn
fastboot flash aboot emmc_appsboot.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash LOGO logo.bin
fastboot reboot
Sideloading OTA (at this point OTA to XNPH38R):» Click to show Spoiler - click again to hide... «
1. Copy and paste the cm-bacon-3628510d76-to-ac1ccf7921-signed.zip you had downloaded earlier to the “\android-sdk-windows\platform-tools” folder.
2. Put your device into recovery mode. Now, your device recovery is the stock recovery, as you had flashed a fresh CM11s into the device.
3. Select Apply update
4. Select Sideload
5. Connect your device to your PC.
6. Open the command prompt screen in your PC.
7. Confirm that your PC had detected your phone by typing the following command in the command prompt screen:
CODE
adb devices
8. Sideload the OTA into your device by entering the following command in the command prompt screen:
CODE
adb sideload cm-bacon-3628510d76-to-ac1ccf7921-signed.zip
9. Wait for the sideload to finish in the command screen
10. Do not unplug your device from the PC.
11. Wait for the sideload to finish the update on your device.
12. Once your device confirms that the update had been completed. Reboot your device.
13. Your will see that the message “Android is updating x of N apps” will appear on your device.
14. Disconnect the device from your PC once the update is completed.
15. DO NOT relink your device with your Google account yet.
16. DO NOT press the Play Store icon.
17. Re-do USB Debugging - On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging.
18. Disable CM Recovery Protection - On your phone go to Settings > Developer options. Untick the 'Update recovery with system updates' option.
19. Reboot the device.
20. Connect your device to your PC.
21. Copy and paste the Update-SuperSU-v2.14.zip you had downloaded earlier into the /Download folder of the phone’s internal memory.
22. Turn off the device and proceed to the next step.
Re-installing TWRP Recovery and Re-Rooting The Device:» Click to show Spoiler - click again to hide... «
1. Reflash TWRP via fastboot as per the previous mentioned guide.
2. Reboot the device.
3. Power off and put the device into recovery mode.
4. Re-root the device as per the previous mentioned guide.
Restoring All Your Data Back:» Click to show Spoiler - click again to hide... «
1. Power on the device.
2. Connect your device to your PC.
3. Copy back all the following folders from your PC into your device:
• Titanium Backup Folder
• Download
• DCIM
• Pictures
• Music
• Ringtones
• Notifications
4. Redo your WIFI connection. If you prefer to do this with your data plan, go ahead.
5. Press the Play Store icon and sign in as an existing user.
6. Download Titanium Backup. You may also download the pro version if you had previously bought it.
7. Google will prompt to restore your previous data, accept and confirm the restoration.
8. Once Titanium Backup is installed, press the icon.
9. You will get a message that Titanium Backup had detected a previous android identifier. Confirm that you want to change back to your previous identifier.
10. Tick “Auto-Sync TB Settings”
11. Select Backup folder location, and reconfirm its location.
12. Tick “Migrate System Data” under Restorations settings.
13. Go back to the main menu and select the box icon with the tick under it, on the top right corner of the screen. This will open the “Batch Action-All” screen.
14. Select “Restore all user apps + system data”
15. Press Select All and press the tick icon on the top right corner of the screen.
16. Let the restore process finishes itself. You may notice that both Google and Titanium Backup are running together to restore all your data back.
17. Do not close the Titanium Backup screen, because at any time, it will prompt to restore your SMS.
18. Titanium Backup will prompt the method to restore SMS. Select XML. Then, Titanium Backup will ask to be the default SMS app. Press accept.
19. Then, it will prompt your default SMS app to be the default SMS app. Press accept.
20. Do not play with the device until the restoration is completed.
21. Once restoration is completed, close Titanium Backup.
22. Reboot your system
23. Enjoy your OPO.