Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,807 Members 53,143 Now Online
XDA Developers Android and Mobile Development Forum

[CWM Touch][TWRP] Root + Recovery for Tilapia

Tip us?
 
mateorod
Old
(Last edited by mateorod; 23rd December 2012 at 05:25 PM.)
#1  
Recognized Developer - OP
Thanks Meter 3505
Posts: 1,976
Join Date: Nov 2011
Location: New Orleans

 
DONATE TO ME
Default [CWM Touch][TWRP] Root + Recovery for Tilapia

Shinj1EVA reported that koush's web builder is now producing boo table CWM Touch images. I have built one and added it to the download page. I have not updated the regular CWM to 6.0.2.3 since there are no commits that affect how it works since I last built 6.0.2.1


12/20- All recoveries are functionally up to date as of this day.

I have seen most of the guides recommend flashing the 'grouper' recovery image. Don't do this. This is why your OTAs and update.zips are failing with 'Status 7'. Those zips have an assert check that ensures you are flashing your zips to the correct device. This is failing if you have a recovery image that was made for a different device.

Those assert checks are there for your protection and you should not get in the practice of working around them. Using grouper recovery.imgs is ill-advised and conceivably dangerous. The two devices differ in more respects than a simple assert check, including having different recovery.fstab files, which are used to make and configure recovery.

I have ported TWRP and compiled a CWM-based (Touch and non-touch) recovery image, made from CM10.1 tilapia source. You will need fastboot, at minimum, to write this recovery. To root, you will need the CWM-flashable zip of SuperSU by chainfire..

Instructions
  1. Boot into the bootloader (2 choices)
    • Turn the device on while pressing volume down; or
    • Code:
      Select Code
      adb reboot bootloader
  2. Unlock your bootloader
    • THIS WILL WIPE ALL OF YOUR DATA! No way around it...
    • Code:
      Select Code
      fastboot oem unlock
  3. With your Nexus 7 3G in the bootloader and connected to your computer through the usb cable:
    • replace recovery-CWM-tilapia-regular with the name of the recovery image you chose to download.
    • Code:
      Select Code
      fastboot flash recovery recovery-CWM-tilapia-regular.img
  4. To make CWM your permanent recovery: (this can, despite the warnings, be undone. Do it.)
    1. Boot into recovery mode by pressing 'vol up' and when the menu says 'recovery mode' press the power button.
    2. Mount system in the 'mounts' menu
    3. Code:
      Select Code
      adb shell
      mv system/recovery-from-boot.p system/recovery-from-boot.bak
      exit
  5. To Root (With /system still mounted):
    • Code:
      Select Code
      adb push CWM-SuperSU-v0.98.zip /sdcard/
    • Flash the SuperSU zip in recovery ('Install' menu with TWRP or 'choose zip from sdcard' in CWM)
    • Reboot System


Congratulations, you now have the proper tilapia custom recovery and can flash roms and OTAs. Anytime you get a 'status 7' from now on, you know that rom was not made for your device. CWM will have instructions that gives you the option of preserving custom recovery and maintaining root.
  • If you just want to boot into custom recovery instead of overwriting the stock or grouper recovery(playing fast and loose- keeping grouper recovery on-device for grouper roms, at least until devs add tilapia asserts to their updater-scripts), use
    Code:
    Select Code
    fastboot boot recovery recovery-CWM-tilapia-regular.img
  • If you want to keep tilapia recovery but have a grouper rom you want to try, you will have to change the updater-script of that rom. It takes two seconds. Look at the third post for instructions.

Downloads

Recovery (just pick one)
CWM Recovery (Touch/Non-Touch) (6.0.2.1)
TWRP 2.3.2.1

Root (Get the CWM flashable zip)
SuperSU

ClockworkMod is the work of the estimable koush and TWRP is from the good men of Team Win.
Support Beloko Games' source ports of Doom and Quake 1-3, Jedi Knight, etc.

He is hurting from piracy...I need Doom 3 on my phone, you guys. Buy them, ok?
The Following 33 Users Say Thank You to mateorod For This Useful Post: [ Click to Expand ]
 
Ather
Old
#2  
Ather's Avatar
Retired Senior Moderator
Thanks Meter 110
Posts: 3,489
Join Date: May 2007
Location: East Riffa
a mirror please?
Visit my Tech Blog
Current Device:
HTC One M8
Running Stock Android 4.4.2


Older Devices:
hTC Himalaya | hTC Wizard | hTC Kaiser | hTC Touch Pro 2 | hTC Dream | Samsung Galaxy S II | iPhone 4 | hTC One X | Acer Iconia A100 | Nexus 7 3G | Samsung Galaxy Note II | Samsung Galaxy S4 | Samsung Galaxy Note 3
 
mateorod
Old
(Last edited by mateorod; 2nd December 2012 at 09:36 PM.)
#3  
Recognized Developer - OP
Thanks Meter 3505
Posts: 1,976
Join Date: Nov 2011
Location: New Orleans

 
DONATE TO ME
How to use grouper roms w/tilapia recovery
  • Use an archive manager like 7zip and open your rom without unzipping.
  • Open META-INF/com/google/android/updater-script
  • Look for the line (usually the first) that says something like this:
  • Code:
    Select Code
    assert(getprop("ro.product.device") == "grouper" || getprop("ro.build.product") == "grouper");
  • Change 'grouper' to 'tilapia'
  • Save and flash!

  • Hopefully soon, devs will make two versions of their roms, although that may not happen until we finish porting the GSM stack. A solution for the meantime would be to edit the above assert to (off the top of my head):
    Code:
    Select Code
    assert(getprop("ro.product.device") == "grouper" || getprop("ro.build.product") == "grouper") || (getprop("ro.product.device") == "tilapia" || getprop("ro.build.product") == "tilapia")
    For anything meant to service both devices. The devs should not be expecting users to run another device's recovery in my opinion, even if it is working. Because, as we know, it breaks other things, like OTAs and other update.zips.

    My expectation would be that they will begin to build separate roms, as that is best practice and doesn't make use use the grouper fstab stuff. Not the most efficient use of bandwidth, I concede...

    Quote:
    Originally Posted by Ather View Post
    a mirror please?
    Sure. Is techerrata/Goo a non-working option for some people? I use it for a project that is has mostly international users and haven't had any complaints. What/where would be helpful to you?

    Update: Since I am here...I will post CWM Touch eventually. CWM Touch still has closed source elements, so the only way I know of to compile it is to use koush's web builder. But the result of that build is not booting. I ported Touch by hand, but it is too buggy to release, something needs to be modified in the recovery.fstab, I guess.
    Support Beloko Games' source ports of Doom and Quake 1-3, Jedi Knight, etc.

    He is hurting from piracy...I need Doom 3 on my phone, you guys. Buy them, ok?
    The Following 5 Users Say Thank You to mateorod For This Useful Post: [ Click to Expand ]
     
    phonic
    Old
    #4  
    phonic's Avatar
    Senior Member
    Thanks Meter 411
    Posts: 1,129
    Join Date: May 2008
    Location: Florida

     
    DONATE TO ME
    Mirror:
    http://core.routed.com/nexus7/
     
    Xentar712
    Old
    #5  
    Senior Member
    Thanks Meter 32
    Posts: 197
    Join Date: Sep 2007
    If this is installed, will I be barred from installing grouper roms? I currently have multirom running, with stock as the main rom and PA as the alternate. PA doesn't get 3G but it works fine. Other grouper roms still work too, just no 3G. This is holding me over until they get the "tilapia" roms up. I just installed the OTA manually through fastboot.
     
    mateorod
    Old
    (Last edited by mateorod; 1st December 2012 at 03:01 AM.)
    #6  
    Recognized Developer - OP
    Thanks Meter 3505
    Posts: 1,976
    Join Date: Nov 2011
    Location: New Orleans

     
    DONATE TO ME
    Quote:
    Originally Posted by Xentar712 View Post
    If this is installed, will I be barred from installing grouper roms? I currently have multirom running, with stock as the main rom and PA as the alternate. PA doesn't get 3G but it works fine. Other grouper roms still work too, just no 3G. This is holding me over until they get the "tilapia" roms up. I just installed the OTA manually through fastboot.
    You will have to hack the grouper roms to change their assert to read tilapia rather than grouper (assuming they have them, and it is REALLY easy to do either way, easier than flashing an OTA in fastboot easy). I tend to be of the opinion that it is better to have a hack like that when you know you are doing something dangerous as opposed to the reverse.

    Not that it is all that dangerous with the Nexus devices. But if you are flashing a rom from a different device onto your tablet, I think that you should have to indicate you are aware you are doing it.

    The best thing would be for roms that are able to work on both devices should have updater-scripts that reflect that. You shouldn't be required to run recovery not for your device. But personal choice, as always.

    Edit: As indicated on the OP, grouper and tilapia have different layouts. Look at the recovery.fstab, tilapia has this line:
    Code:
    Select Code
    /radio		ext4		/dev/block/platform/sdhci-tegra.3/by-name/RDO
    That file is used in making and configuring recovery...the rom makers will have to be able to work with tilapia recovery if they ever hope to have the GSM stack work, I would guess.
    Support Beloko Games' source ports of Doom and Quake 1-3, Jedi Knight, etc.

    He is hurting from piracy...I need Doom 3 on my phone, you guys. Buy them, ok?
     
    Xentar712
    Old
    #7  
    Senior Member
    Thanks Meter 32
    Posts: 197
    Join Date: Sep 2007
    Quote:
    Originally Posted by mateorod View Post
    You will have to hack the grouper roms to change their assert to read tilapia rather than grouper (REALLY easy, easier than flashing an OTA in fastboot easy). I tend to be of the opinion that it is better to have a hack like that when you know you are doing something dangerous as opposed to the reverse.

    Not that it is all that dangerous with the Nexus devices. But if you are flashing a rom from a different device onto your tablet, I think that you should have to indicate you are aware you are doing it.

    The best thing would be for roms that are able to work on both devices should have updater-scripts that reflect that. You shouldn't be required to run recovery not for your device. But personal choice, as always.
    Cool, I'll give it a go once you get TWRP up and running. Maybe Tassadar, over in the MultiROM forum, can tweak it for MultiRom as well. I'm really liking MultiRom - IMHO it's less risky when toying with unknowns. It's probably more risky in reality though, and I'm just crazy
     
    superc0w
    Old
    #8  
    Junior Member
    Thanks Meter 1
    Posts: 7
    Join Date: Jan 2011
    I've flashed this recovery to get 4.2.1 on my Nexus 7 3G, but it seems that I can't go into recovery mode anymore. The screen shows me picture of an android lying down with its front open.

    The only way I'm able to go into recovery is to reflash, or do a
    Code:
    Select Code
    fastboot boot recovery recovery-CWM-tilapia-regular.img
    This works for that 1 boot, after which I get the same issue.
     
    mateorod
    Old
    #9  
    Recognized Developer - OP
    Thanks Meter 3505
    Posts: 1,976
    Join Date: Nov 2011
    Location: New Orleans

     
    DONATE TO ME
    Quote:
    Originally Posted by superc0w View Post
    I've flashed this recovery to get 4.2.1 on my Nexus 7 3G, but it seems that I can't go into recovery mode anymore. The screen shows me picture of an android lying down with its front open.

    The only way I'm able to go into recovery is to reflash, or do a
    Code:
    Select Code
    fastboot boot recovery recovery-CWM-tilapia-regular.img
    This works for that 1 boot, after which I get the same issue.
    Okay. After I flashed the OTA, CWM asked me if I wanted to make it permanent, but maybe that by itself us not enough. I had already done the following step.

    flash recovery and boot into it. Mount system, and then:
    Code:
    Select Code
    adb shell
    mv system/recovery-from-boot.p system/recovery-from-boot.bak
    exit
    CWM asked me if i wanted to prevent the updates from flashing stock recovery and if I wanted to secure the root (su binary). But maybe that doesn't work right out of the box.
    Support Beloko Games' source ports of Doom and Quake 1-3, Jedi Knight, etc.

    He is hurting from piracy...I need Doom 3 on my phone, you guys. Buy them, ok?
     
    superc0w
    Old
    #10  
    Junior Member
    Thanks Meter 1
    Posts: 7
    Join Date: Jan 2011
    Quote:
    Originally Posted by mateorod View Post
    Okay. After I flashed the OTA, CWM asked me if I wanted to make it permanent, but maybe that by itself us not enough. I had already done the following step.

    flash recovery and boot into it. Mount system, and then:
    Code:
    Select Code
    adb shell
    mv system/recovery-from-boot.p system/recovery-from-boot.bak
    exit
    CWM asked me if i wanted to prevent the updates from flashing stock recovery and if I wanted to secure the root (su binary). But maybe that doesn't work right out of the box.
    Yup, I renamed recovery-from-boot.p to recovery-from-boot.p.bak using ES File Explorer and it's all good now. I'm now able to use CWM. However, CWM always asks me if I want to prevent updates from flashing stock recovery and I always chose no (since it warns that this is irreversible).

    Strange though. I assumed that even if CWM doesn't stick without renaming recovery-from-boot.p, the N7 3G would flash stock recovery and it would still be functional.

    Tags
    cwm, nexus 7 3g, recovery, tilapia, twrp
    THREAD CLOSED
    Subscribe
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes