12
[CM11S] Fresh CM11S Installation Guide

  1. Haters_Gonna_H8
    Ice Cream Sandwich Oct 18, 2014

    Haters_Gonna_H8 , Oct 18, 2014 :
    CM11s Fresh Clean Install

    Why 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 friends for now are My BackUp (for non rooted devices) or Titanium Backup (for rooted devices).


    Backing up all data with My BackUp (for non rooted devices):
    1. Download and install My BackUp from here: https://play.google.com/store/apps/details?id=com.rerware.android.MyBackup&hl=en

    2. Open My BackUp.

    3. Select the backup options as per your preference. You may select either to backup your data in your device or online.

    4. Kindly take note, due to limitation of an un-rooted device, you may not be able to backup all of your apps and system settings.

    5. If you choose to do the backup locally, kindly make sure that the backups are stored in internal storage/sd card.

    6. Follow the instructions as guided in the app

    7. Let the backup process finishes itself

    8. Once backup is done, transfer all backup files located in the Backup folder location from your device to your PC.

    Backing up all data with Titanium Backup (for rooted devices):
    1. Download and install Titanium Backup from here: https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup&hl=en

    2. You may also buy the Pro version for its additional features here: https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackupPro&hl=en

    3. 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:
    1. Download and install the latest Java Runtime Environment (JRE) from here: http://java.com/en/download/index.jsp

    2. Go to this page: http://developer.android.com/sdk/index.html#download

    3. 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-driver

    15. Alternatively, use this method to install the USB ADB Driver: https://forums.oneplus.net/threads/install-adb-drivers-for-windows-8-1-64-bits.51264/

    16. If both the above mentioned USB ADB Driver still does not work, you can download and install the 3rd alternative driver: https://drive.google.com/file/d/0B1N4FpF8XJYoTWFBTEFxTjZzTEE/view?usp=sharing
     
    Last edited: Nov 21, 2014

    #1
    tovyy, gawain98, AlexGuroff and 9 others like this.
  2. Haters_Gonna_H8
    Ice Cream Sandwich Oct 18, 2014

    Haters_Gonna_H8 , Oct 18, 2014 :
    Preliminary steps and checks before proceeding further:
    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 Down 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:
    1. Download the latest TWRP Recovery from here: http://techerrata.com/browse/twrp2/bacon

    2. Download the latest SuperSU from here: http://download.chainfire.eu/supersu

    3. Download the latest CM11s full rom from here: http://builds.cyngn.com/factory/bacon/cm-11.0-XNPH05Q-bacon-signed-fastboot.zip

    4. Optional: download the latest OTA (not applicable for now as the full XNPH05Q rom is already released).

    Unlocking Bootloader:
    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
    
     
    Last edited: Mar 9, 2015

    #2
    tovyy, gawain98, AlexGuroff and 3 others like this.
  3. Haters_Gonna_H8
    Ice Cream Sandwich Oct 18, 2014

    Haters_Gonna_H8 , Oct 18, 2014 :
    Installing TWRP Recovery:
    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:
    1. Turn on your phone. Connect it to your PC.

    2. Copy and paste the Update-SuperSU-v2.xx.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.xx.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?id=org.freeandroidtools.root_checker&hl=en

    14. 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:
    1. Download and install Terminal Emulator from here: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en

    2. 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)
    dd if=/dev/block/mmcblk0p15 of=/sdcard/persist.img bs=4096
    dd if=/dev/block/mmcblk0p12 of=/sdcard/oppodycnvbk.img bs=512
    dd if=/dev/block/mmcblk0p13 of=/sdcard/oppostanvbk.img bs=512
    
    3. Backup files modemst1.bin, modemst2.bin, persist.img, oppodycnvbk.img and oppostanvbk.img will be created in the phone's internal storage.

    4. Plug your device to your PC and copy the files to a safe location.

    5. In case at any time you lost your modem info, i.e. IMEI, MAC address, you can restore the imgs via fastboot.

    Code:
    fastboot flash modemst1 modemst1.bin
    fastboot flash modemst2 modemst2.bin
    fastboot flash persist persist.img
    fastboot flash oppodycnvbk oppodycnvbk.img
    fastboot flash oppostanvbk oppostanvbk.img
    
     
    Last edited: Nov 21, 2014

    #3
    tovyy, gawain98, AlexGuroff and 4 others like this.
  4. Haters_Gonna_H8
    Ice Cream Sandwich Oct 18, 2014

    Haters_Gonna_H8 , Oct 18, 2014 :
    Nandroid Backup:
    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:
    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:
    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:
    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-XNPH44S-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
    
     
    Last edited: Nov 19, 2014

    #4
    tovyy, gawain98, AlexGuroff and 4 others like this.
  5. Haters_Gonna_H8
    Ice Cream Sandwich Oct 18, 2014

    Haters_Gonna_H8 , Oct 18, 2014 :
    Sideloading the latest OTA: (this step is currently not applicable as the full XNPH05Q rom is already released).
    1. Copy and paste the cm-bacon-ac1ccf7921-to-5fa8c79c0b-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-ac1ccf7921-to-5fa8c79c0b-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.

    Steps required prior re-installing TWRP Recovery and re-rooting the device.
    1. DO NOT relink your device with your google account yet.

    2. DO NOT press the Play Store icon.

    3. 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.

    4. Disable CM Recovery Protection - On your phone go to Settings > Developer options. Untick the 'Update recovery with system updates' option.

    5. Reboot the device.

    6. Connect your device to your PC.

    7. Copy and paste the Update-SuperSU-v2.xx.zip you had downloaded earlier into the /Download folder of the phone’s internal memory.

    8. Turn off the device and proceed to the next step.

    Re-installing TWRP Recovery and Re-Rooting The Device:
    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:
    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:
    • MyBackup Folder (for previously non-rooted devices)
    • Titanium Backup Folder (for previously rooted devices)
    • 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. If you had used My Backup app for your previous backup. Download and install the app from the Play Store. Then restore back your data from internal storage.

    7. If you had used Titanium Backup for your previous backup. Download Titanium Backup. You may also download the pro version if you had previously bought it.

    8. Google will prompt to restore your previous data, accept and confirm the restoration.

    9. Once Titanium Backup is installed, press the icon.

    10. 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.

    11. Tick “Auto-Sync TB Settings”

    12. Select Backup folder location, and reconfirm its location.

    13. Tick “Migrate System Data” under Restorations settings.

    14. 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.

    15. Select “Restore all user apps + system data”

    16. Press Select All and press the tick icon on the top right corner of the screen.

    17. Let the restore process finishes itself. You may notice that both google and Titanium Backup are running together to restore all your data back.

    18. Do not close the Titanium Backup screen, because at any time, it will prompt to restore your SMS.

    19. At 1st, it will prompt Titanium Backup to be the default SMS app. Press accept.

    20. Then, it will prompt your default SMS app to be the default SMS app. Press accept.

    21. Do not play with the device until the restoration is completed.

    22. Once restoration is completed, close Titanium Backup.

    23. Reboot your system

    24. Enjoy your OPO.
     
    Last edited: Mar 9, 2015

    #5
    tovyy, AlexGuroff, lameking91 and 4 others like this.
  6. Haters_Gonna_H8
    Ice Cream Sandwich Oct 18, 2014

    Last edited by a moderator: Nov 12, 2014

    #6
    tovyy likes this.
  7. Haters_Gonna_H8
    Ice Cream Sandwich Nov 19, 2014


    #7
    tovyy, Jevoly and finaldentiny like this.
  8. hrzakrm
    Gingerbread Nov 21, 2014


    #8
    Haters_Gonna_H8 likes this.
  9. banchew
    Froyo Nov 24, 2014

    banchew , Nov 24, 2014 :
    So, it's better to perform this as new? I just received my phone hour ago and this will be my first experience with Android. Previously, I'm iOS user for many years.
     

    #9
  10. Haters_Gonna_H8
    Ice Cream Sandwich Nov 24, 2014

    Haters_Gonna_H8 , Nov 24, 2014 :
    if international set out of the box, then no need.
     

    #10
    tovyy likes this.
  11. John lemboo
    Gingerbread Nov 29, 2014


    #11
  12. neugal
    Honeycomb Dec 1, 2014


    #12
  13. RikuduSenin1
    Cupcake Dec 19, 2014

    RikuduSenin1 , Dec 19, 2014 :
    Haters_Gonna_H8 I want to install cm11s on my opo without rooting or flashing a custom recovery by the method u provided . Is it possible to flash without unlocking the bootloader on my opo?
     

    #13
  14. 9had
    Gingerbread Dec 19, 2014

    9had , Dec 19, 2014 :
    Not as much as i know...
    You can unlock, flash and lock it...
     

    #14
  15. RikuduSenin1
    Cupcake Dec 19, 2014


    #15
  16. martikung
    Froyo Dec 19, 2014


    #16
  17. RikuduSenin1
    Cupcake Dec 19, 2014


    #17
  18. chong527
    Cupcake Dec 22, 2014


    #18
  19. Haters_Gonna_H8
    Ice Cream Sandwich Dec 27, 2014

    Haters_Gonna_H8 , Dec 27, 2014 :
    what rom are you using now?

    can by OTA
     

    #19
  20. gawain98
    Eclair Dec 28, 2014

    gawain98 , Dec 28, 2014 :
    Is it possible to load the cyanogenmod zip on your phone and just wipe dalvik cache system data internal storage and cache and then install from twrp when you have already rooted your device?
     

    #20