[TUTORIAL] Flash CyanogenMod on TWRP

Search This thread

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
If you're already on CM 10.2, just wipe cache and dalvik. Flash over your current build.

If you're coming from anything else, wipe cache, dalvik, data, and system. Then flash normally.
If you want gapps, you'll have to flash gapps as well.

No need for any modified files on nightlies. I assume that official stable builds will still be defaulted to flash on stock recovery though.

Sent from my N1 using Tapatalk
 

mcteague

Senior Member
Dec 22, 2008
460
49
Stevenage
If you're already on CM 10.2, just wipe cache and dalvik. Flash over your current build.

If you're coming from anything else, wipe cache, dalvik, data, and system. Then flash normally.
If you want gapps, you'll have to flash gapps as well.

No need for any modified files on nightlies. I assume that official stable builds will still be defaulted to flash on stock recovery though.

Sent from my N1 using Tapatalk

Have i read right that the linked copy of TWRP will allow me to flash between ColourOS and latest CM11, not needing Oppo recovery to do so.
 

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
Have i read right that the linked copy of TWRP will allow me to flash between ColourOS and latest CM11, not needing Oppo recovery to do so.

The nightlies can be flashed in TWRP without any issues. I haven't been modifying them at all.

I believe that nightlies straight from CM will be compatible with TWRP, but full stable releases that have been finalized and approved (like the first two) will be setup to flash in stock recovery.
 
  • Like
Reactions: mcteague

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
The nightlies can be flashed in TWRP without any issues. I haven't been modifying them at all.

I believe that nightlies straight from CM will be compatible with TWRP, but full stable releases that have been finalized and approved (like the first two) will be setup to flash in stock recovery.

The official releases should flash in TWRP too, now that TWRP has been fixed to flash older (pre-4.4) packages.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    For CM11 Nightlies:

    Find nightlies here:
    http://download.cyanogenmod.com/?device=n1

    If you're already on CM 10.2, just wipe cache and dalvik. Flash over your current build.

    If you're coming from anything else, wipe cache, dalvik, data, and system. Then flash normally.
    If you want gapps, you'll have to flash gapps as well.

    No need for any modified files on nightlies. I assume that official stable builds will still be defaulted to flash on stock recovery though.

    ————————————————————————————————

    CM 10.2 Information. Please do not use the following to flash CM11!

    This is the method that I used to install CyanogenMod on TWRP.

    I have tested this, and it is working perfectly on CM builds:
    cm-10.2-WPPH47N-n1
    cm-10.2-WPPH50O-n1
    I will continue to test and update as new CM builds come out until CM flashes normally on TWRP

    ————————————————

    • First - Have TWRP as your recovery (2.6.3.1). Don't ask me how to do that.
    • Second - Backup your ROM! Just in-case something breaks, it's not my fault, and I'm not responsible.

    ————————————————

    Now, we begin:

    Download the newest CM build for the Oppo N1 from http://www.cyanogenmod.org/hardware/oppo-n1/#images

    ————————————————

    After downloading your CM build from the above link, you'll need to follow these instructions to get setup for flashing in TWRP.

    To modify your downloaded CM file, you can use either of the two methods below:

    1: You can modify it yourself. It's actually very simple, just one line change.
    2: I have attached an already modified updater-script to my post. You can use that and drop it into place (the file inside the zip, not the whole zip).[/b]

    YOU ONLY NEED TO USE ONE OF THESE METHODS!

    Method 1: To modify the file yourself:

    • First, open your CM zip that you have downloaded.
    • Navigate to the folder: META-INF\com\google\android\
    • Open the updater-script

    Remove the first line only! You will remove:
    Code:
    assert(getprop("ro.product.device") == "N1" || getprop("ro.build.product") == "N1");
    Do not remove anything else unless you know exactly what you're doing!
    • If you modified the file within the .zip, just save the file and it should save to the CM zip.
    • If you extracted the .zip, save the file and then go back and rebuild the zip.

    Transfer over your newly modified CM.zip file to wherever you can find it on your phone (I drop it straight in the root folder).

    ——————————

    Method 2: To download my pre-modified updater-script

    • Download my attached file (updater-script.zip)
    • Extract the file inside the zip (there's only one file)

    • Open your CM zip that you have downloaded.
    • Navigate to the folder: META-INF\com\google\android\
    • Simply copy your extracted updater-script from where you extracted it and drop it into the CM zip (It should save after)

    Transfer over your newly modified CM.zip file to wherever you can find it on your phone (I drop it straight in the root folder).

    ————————————————

    Reboot into TWRP:

    Advanced Wipe ->
    Wipe Dalvik Cache, Cache, and Data. ***DO NOT WIPE SYSTEM***

    Then install your modified CM file. Please, remember, DO NOTE WIPE SYSTEM.

    Reboot system! Done!

    :victory:

    I hope this all makes sense...
    Basically you download the CM rom
    Modify or copy the updater-script into the zip
    Then you move the ROM to you phone
    Then you go through the above area with wiping and flashing


    * Pictures are attached
    * Please let me know if there are any problems with this.
    * Both versions of CM released so far have identical updater-script files. The .zip that I have attached will work on both builds.
    * I will keep updating as needed

    • Last updated: January 1, 2014
    2
    We're working on fixing TWRP so the asserts work properly.

    https://github.com/omnirom/android_bionic/commit/4482d8513920d614e3799a214c5bad07b72580d2#diff-1 broke a lot of things.

    https://github.com/omnirom/android_bionic/commit/ad76c85b9ca587084089d086f954158bc0eae905 allows flashing newer firmwares on older recoveries - but not the other way around.

    The short-term fix is a TWRP build made from a 4.3 tree - this is 90% done.
    2
    @OP: Working with Entropy last night to squash this bug, I flashed his newly built TWRP and was able to go back to ColorOS or CM without issue. https://dl.dropboxusercontent.com/u/22964990/n1_twrp_43.img
    1
    I lost root as well
    and superSU files insatlled into TWRP didnt work ...
    any ideas how to back root acces ?

    apart of it
    I cannot instal via TWRP CM10.2 (4.3) cm-10.2-WPPH50O-n1-signed.zip
    I v got error message
    what you are latest build on ?

    Go into SuperSU and remove it in the settings (unroot). That will get rid of all of the current SuperSU stuff.
    Then flash SuperSU in TWRP.

    To flash the unmodified CM, you can try the TWRP in post #3 of this thread HERE.

    Or you'll have to remove the same line in the updater-script. The same method posted in the OP. Don't use the uploaded updater-script that I have there though. You'll need to change your own. It's a really simple fix. You don't have to extract all the files out. You can just modify the one file (I use Notepad++).

    Sometime tomorrow I'll update the whole OP to include the newest CM version. I'm about to head out to our New Year's event, so I won't be available for the evening.

    Enjoy the evening everyone. I wish you all the best! :good: :victory:
    1
    @Harfainx

    it is not a problem to me to delete first line from updater-script but what then ?
    I have to zip ii normally or compile using special prgogram ?
    why dedicated ROM from CM/OPPO site is not allow to simple install via TWRP ?
    it shuld be so easy

    After dropping the file in, just save the zip again. If you haven't extracted it, you shouldn't have to do anything special.

    Also, CM can easily be installed on the stock recovery. Oppo doesn't control other recoveries.