[TUTORIAL] Flash CyanogenMod on TWRP

Search This thread

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
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
 

Attachments

  • IMAG1315.jpg
    IMAG1315.jpg
    219.7 KB · Views: 1,428
  • IMAG1314.jpg
    IMAG1314.jpg
    245.6 KB · Views: 1,388
  • IMAG1297.jpg
    IMAG1297.jpg
    255.1 KB · Views: 1,341
  • updater-script.zip
    2.4 KB · Views: 474
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY

kenjilolip0p

Senior Member
Sep 25, 2011
174
4
That's fantastic. I'm glad to hear that it's being work on/working. I suppose fixing TWRP trumps fixing the ROM :highfive:

i have some question can u help me :3

1. this download link is the file you already fix it right ?


so i just have to download and flash with TWRP. dont have to fix any else ?

2. This is CM10.2 rom official for N1 work with O-Touch in the back ?
 

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
so i just have to download and flash with TWRP. dont have to fix any else ?

2. This is CM10.2 rom official for N1 work with O-Touch in the back ?

Correct, the very top link in the OP is the full ROM. You can download the full ROM and flash it in TWRP. It's already fixed and ready to go.

So far that has been the only ROM to come out from Oppo for CM. It contains most of the ColorOS features that work. "Knock" to wake (double-tap), screen off gestures, camera orientation, etc. I'm almost positive that the back touch-pad was working. I haven't been on CM in a little bit though. I'm still working on making changes to ColorOS, and updating as I go.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Correct, the very top link in the OP is the full ROM. You can download the full ROM and flash it in TWRP. It's already fixed and ready to go.

So far that has been the only ROM to come out from Oppo for CM. It contains most of the ColorOS features that work. "Knock" to wake (double-tap), screen off gestures, camera orientation, etc. I'm almost positive that the back touch-pad was working. I haven't been on CM in a little bit though. I'm still working on making changes to ColorOS, and updating as I go.

Camera orientation is handled by the camera HAL blobs.

CM does have back touchpad support but it's wonky (which is why omni hasn't merged it yet, we're still discussing whether to completely rearchitect it or just fix it.)
 

fesar

Senior Member
Mar 31, 2005
152
24
Chennai
Except root it works

Hi,

I tried everything and it works. But the root is not working well. I tried installing SuperSu.zip as well as apk nothing works. Any thoughts ?

Francis.
 

nowy57

Senior Member
Nov 3, 2007
1,055
674
Poland
Hi,

I tried everything and it works. But the root is not working well. I tried installing SuperSu.zip as well as apk nothing works. Any thoughts ?

Francis.

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 ?
 
Last edited:

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
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:
 
  • Like
Reactions: nowy57

nowy57

Senior Member
Nov 3, 2007
1,055
674
Poland
i have installed TWRP from #3 - not succes install CM newest version after this
i have unthick superSU and then install again via TWRP superSU.zip after that thick superSU on system android and no succes - root acces didnt come

happy new year :)


-------
I am a little dissapointed couse I downloaded CM ROM from OFFICIAL SITE http://www.cyanogenmod.org/hardware/oppo-n1/#images and I cannot install it SIMPLE on my device :(
 
Last edited:

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
OP updated! The newest release of CM has been added. I'll keep on top of it from now on, sorry about the delay.

I'm not going to host the CM builds anymore, since the modification is so small from the original CM build. Everyone flashing this should be capable of making the small change that's outlined in the OP.

:highfive:
 

nowy57

Senior Member
Nov 3, 2007
1,055
674
Poland
@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
 

Harfainx

Retired Forum Moderator
Apr 10, 2010
1,658
1,803
@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.
 
  • Like
Reactions: nowy57

nowy57

Senior Member
Nov 3, 2007
1,055
674
Poland
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.
okay , I will try it and confirm

I v got mac osx
under mac I unzip ROM , deleted first line from script then zip it , it doesent work .

but under windows - working good :)
 
Last edited:

ChodTheWacko

Senior Member
Feb 8, 2011
1,521
468
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!

What's wrong with wiping system?
You don't even wipe system if you go from ColorOS to CyanogenMod?

- Frank
 

giuliano rigon

Senior Member
Oct 17, 2011
64
5
cm11 nightlies are out and downloadable from cyanogenmod

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.
Cm11 nightlies are out..
Do you think we can flash on twrp
If so what would you wipe...
I was thinking about using banks minimal.. 19 MB..
Please give the community tour thoughts and a step by step tutorial..
I would download the nightly from cyanogenmod and banks gapps.. Check md5 alla onmy phone
Reboot recovery and wipe all maybe even system except sdcard
Flash cyanogen then gapps then
Rewipe cache and dalvik
Reboot

I am on omni nightlies now.. Thanks in advance
 

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.