Thread Closed

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

30th November 2012, 04:22 PM   |  #1  
OP Recognized Developer
New Orleans
Thanks Meter: 3,511
 
1,977 posts
Join Date:Joined: Nov 2011
Donate to Me
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:
      adb reboot bootloader
  2. Unlock your bootloader
    • THIS WILL WIPE ALL OF YOUR DATA! No way around it...
    • 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:
      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:
      adb shell
      mv system/recovery-from-boot.p system/recovery-from-boot.bak
      exit
  5. To Root (With /system still mounted):
    • 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:
    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.
Last edited by mateorod; 23rd December 2012 at 05:25 PM.
The Following 33 Users Say Thank You to mateorod For This Useful Post: [ View ]
30th November 2012, 08:57 PM   |  #2  
Ather's Avatar
Retired Senior Moderator
Flag East Riffa
Thanks Meter: 116
 
3,518 posts
Join Date:Joined: May 2007
More
a mirror please?
30th November 2012, 11:07 PM   |  #3  
OP Recognized Developer
New Orleans
Thanks Meter: 3,511
 
1,977 posts
Join Date:Joined: Nov 2011
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:
    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:
    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

    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.
    Last edited by mateorod; 2nd December 2012 at 09:36 PM.
    The Following 6 Users Say Thank You to mateorod For This Useful Post: [ View ]
    1st December 2012, 01:22 AM   |  #4  
    phonic's Avatar
    Senior Member
    Flag Florida
    Thanks Meter: 411
     
    1,129 posts
    Join Date:Joined: May 2008
    Donate to Me
    More
    Mirror:
    http://core.routed.com/nexus7/
    1st December 2012, 02:40 AM   |  #5  
    Senior Member
    Thanks Meter: 32
     
    200 posts
    Join Date:Joined: Sep 2007
    More
    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.
    1st December 2012, 02:45 AM   |  #6  
    OP Recognized Developer
    New Orleans
    Thanks Meter: 3,511
     
    1,977 posts
    Join Date:Joined: Nov 2011
    Donate to Me
    Quote:
    Originally Posted by Xentar712

    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:
    /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.
    Last edited by mateorod; 1st December 2012 at 03:01 AM.
    1st December 2012, 02:52 AM   |  #7  
    Senior Member
    Thanks Meter: 32
     
    200 posts
    Join Date:Joined: Sep 2007
    More
    Quote:
    Originally Posted by mateorod

    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
    1st December 2012, 03:34 AM   |  #8  
    Junior Member
    Thanks Meter: 1
     
    7 posts
    Join Date:Joined: 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:
    fastboot boot recovery recovery-CWM-tilapia-regular.img
    This works for that 1 boot, after which I get the same issue.
    1st December 2012, 03:45 AM   |  #9  
    OP Recognized Developer
    New Orleans
    Thanks Meter: 3,511
     
    1,977 posts
    Join Date:Joined: Nov 2011
    Donate to Me
    Quote:
    Originally Posted by superc0w

    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:
    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:
    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.
    1st December 2012, 06:25 AM   |  #10  
    Junior Member
    Thanks Meter: 1
     
    7 posts
    Join Date:Joined: Jan 2011
    Quote:
    Originally Posted by mateorod

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

    Thread Closed Subscribe to Thread

    Tags
    cwm, nexus 7 3g, recovery, tilapia, twrp
    Previous Thread Next Thread
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes


    Top Threads in Nexus 7 3G Android Development by ThreadRank