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

Status
Not open for further replies.
Search This thread

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
Hi,
In fact I am also confused about the warning. Not sure does choosing "Yes" means retain CWM or not. So I just choose "Yes" and saw that CWM is still the recovery after reboot.

So do you mean after this step:
Code:
adb shell
mv system/recovery-from-boot.p system/recovery-from-boot.bak
exit
It does not matter whether I choose "Yes" or "No" in the final phase, and I will still have CWM as my recovery?

Well, what answering 'yes' does is a decidedly more elebant solution, it just removes the execute permission from system/etc/install-recovery.sh. But the effect is the same, and since the above is what people have been recommending...
 

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
At the top of the OP I explain that CWM Touch has closed source elements. The only way I know how to build Touch is on koush's web builder. But as of last week, it was still producing non-working images of both touch and regular CWM for tilapia.

I ported and compiled TWRP and CWM regular because the source was available to me. I did port the CWM touch by hand but it was too buggy to release.

I will be posting a Twrp update in the next day or so.

Edit: I just saw that PA finally went public with their builds. As the roms start coming out you will need tilapia recovery if you want to have working 3g roms. CM10.1 builds are starting to role out, so as they fix up the source, the automatic web builder will finally have access to working source. Then CWM Touch will go up.
 
Last edited:

shinji257

Senior Member
At the top of the OP I explain that CWM Touch has closed source elements. The only way I know how to build Touch is on koush's web builder. But as of last week, it was still producing non-working images of both touch and regular CWM for tilapia.

I ported and compiled TWRP and CWM regular because the source was available to me. I did port the CWM touch by hand but it was too buggy to release.

I will be posting a Twrp update in the next day or so.

Edit: I just saw that PA finally went public with their builds. As the roms start coming out you will need tilapia recovery if you want to have working 3g roms. CM10.1 builds are starting to role out, so as they fix up the source, the automatic web builder will finally have access to working source. Then CWM Touch will go up.

I look forward to it. I'm running TWRP on mine but I assume at this point it is a grouper build since It is 2.3.2.1 and this thread only has a 2.3.1.2 build. I'll await your update then flash it replacing the old recovery. It seems the toolkits only install the grouper recoveries?
 
  • Like
Reactions: mateorod

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
I look forward to it. I'm running TWRP on mine but I assume at this point it is a grouper build since It is 2.3.2.1 and this thread only has a 2.3.1.2 build. I'll await your update then flash it replacing the old recovery. It seems the toolkits only install the grouper recoveries?

Well, I know that sparksco committed my patches to get TWRP to compile, so there is the possibility that there is another working tilapia build out there. The TWRP guys just added a bunch of stuff over the last week. I was kind of waiting until they finished getting it close to stable, just so I wasn't pumping out updates daily.

Even with my patches to fix the compile, I don't have TWRP working completely out of the box...the busybox in the recovery.img isn't working for some reason so I have to port over a working sbin folder by hand. But that is a very minor thing and doesn't impact how the images behave.

I also updated the CWM based on your report the other day, so thanks for that. I hadn't noticed any problems myself, but since koush had updated it seemed the thing to do.

The web builder for CWM Touch is based on the github source for CM. And since they hadn't added all the makefiles yet, it was producing a non-booting image, likely with the same binary issues. But now that tilapia roms are coming out, all those tool kits will need to add recovery. And it doesn't just build out of the box yet, so they will probably be these recoveries.

If you want to check your recovery, you can unpack it with the unpackbootimg binary in your SDK.
 

p0izn

Senior Member
Jun 14, 2010
237
42
What is the path for cwm-made backups? Where i can find them? Because in cwm backup is located in sdcard/clockworkmod/backup , but in Android (via TC) this path doesnt exist.
 
Last edited:

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
try /mnt/shell/emulated/clockworkmod
I don't use back ups, is that the only place? It isn't in sdcard? I may change that for the next update. Should really be on TWRP to fix, but since I am the only person messing with the recoery right now...I will look into it.
Will it be possible to make in a future a tilapia recovery with this multi boot feature?

http://xdaforums.com/showthread.php?t=2011403


------------------------
Nexus 7 3G - Tapatalk 2

I don't really know what you are asking. That is a rom that needs a modded recovery to flash itself, right? Does it not work with your device and if not what does it say?

If the dev is only building for grouper, than you can use grouper recovery (not the best idea) or change the assert in the update zip (still not the best idea) to read tilapia.

Or preferably, you can ask the dev to build for tilapia too, since if it is only for grouper, the 3g stuff won't work anyway.
 

manekineko

Senior Member
Jul 26, 2009
1,005
229
I don't use back ups, is that the only place? It isn't in sdcard? I may change that for the next update. Should really be on TWRP to fix, but since I am the only person messing with the recoery right now...I will look into it.

It's an Android 4.2 thing. Because of multi-user support, the location of backups shifted off of the sdcard, as I believe each user has their own virtual sdcard.
 
  • Like
Reactions: mateorod

mouse100

Senior Member
Sep 20, 2010
574
55
I don't use back ups, is that the only place? It isn't in sdcard? I may change that for the next update. Should really be on TWRP to fix, but since I am the only person messing with the recoery right now...I will look into it.


I don't really know what you are asking. That is a rom that needs a modded recovery to flash itself, right? Does it not work with your device and if not what does it say?

If the dev is only building for grouper, than you can use grouper recovery (not the best idea) or change the assert in the update zip (still not the best idea) to read tilapia.

Or preferably, you can ask the dev to build for tilapia too, since if it is only for grouper, the 3g stuff won't work anyway.

No it's a modded twrp recovery that supports multi-ROM installation and so multi boot. But since it's in grouper section I think it's not for tilapia so I ask you if it's possible to port this recovery also on nexus 7 3g. I didn't try that modified recovery yet.

------------------------
Nexus 7 3G - Tapatalk 2
 

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
No it's a modded twrp recovery that supports multi-ROM installation and so multi boot. But since it's in grouper section I think it's not for tilapia so I ask you if it's possible to port this recovery also on nexus 7 3g. I didn't try that modified recovery yet.

------------------------
Nexus 7 3G - Tapatalk 2

But why? If the ROM is for tilapia, then you need tilapia recovery. If the ROM is only for grouper, then take your chances and change the ROM's updater script or use grouper recovery. It isn't that it is specifically a bad idea to use grouper's recovery, just generally a bad practice. You won't have working 3g, but if the ROM isn't built for tilapia you won't have that anyway.

Like I said, the best thing is to ask the developer to build for tilapia too. It won't be that hard for him since the process is so similar.
 

kEvinErd

Senior Member
Jul 23, 2011
280
35
Hey guys.. Thanks for the awesome guide. Very helpful for a newbie like me.

Just got a few questions as I come from Samsung phones previously:

1) In the OP, the steps are to first flash CWM, then root whereas for Samsung phones, it's usually root, and then flash CWM. Does the sequence matter?

2) In the OP, to root, we use the CWM installable zip. But I also notice that Chainfire has released a CF-auto-root specifically for Nexus 7 models (found here: http://xdaforums.com/showthread.php?t=2025272). Are there any differences in the two versions?
 

mateorod

Inactive Recognized Developer
Nov 16, 2011
1,981
3,503
New Orleans
www.gigmasters.com
Hey guys.. Thanks for the awesome guide. Very helpful for a newbie like me.

Just got a few questions as I come from Samsung phones previously:

1) In the OP, the steps are to first flash CWM, then root whereas for Samsung phones, it's usually root, and then flash CWM. Does the sequence matter?

2) In the OP, to root, we use the CWM installable zip. But I also notice that Chainfire has released a CF-auto-root specifically for Nexus 7 models (found here: http://xdaforums.com/showthread.php?t=2025272). Are there any differences in the two versions?

Well, sequence matters in that you need to flash recovery to flash the SuperSu zip. Basically, you will need to do it as written. Unlocking the bootloader allows you to flash recovery, then you root from there. The difference is that we are not dealing with exploits here, the Nexus devices come ready to be rooted and flashed.

As for CF-auto-root, I am sure it works just like intended, But I wouldn't say it is necessary for Nexus devices. He likely added Nexus support to that program simply because it was easy to do and to give the program wider support.

I am not slagging CF-auto-root, Chainfire is the man. But rooting the Nexus devices is easy. If you have already read this guide, you are basically already there.

Good luck!
 
  • Like
Reactions: kEvinErd

cmstlist

Senior Member
Jan 11, 2010
3,349
522
Toronto
Google Pixel 4a
Hey guys.. Thanks for the awesome guide. Very helpful for a newbie like me.

Just got a few questions as I come from Samsung phones previously:

1) In the OP, the steps are to first flash CWM, then root whereas for Samsung phones, it's usually root, and then flash CWM. Does the sequence matter?

Explanation: You were probably using Samsung non-Nexus devices which are always released with an initial OS version older than the most recent. As a result, there is often a root exploit which has been discovered by that time, that does not require you to first modify the bootloader or recovery partitions. If Google has patched that exploit in the source code, it takes a while for the patch upgrade to percolate through Samsung and the carriers before it hits your phone, if it ever does.

Typically on Nexus devices, the first root method is to go through bootloader to flash an insecure boot.img or custom recovery to then get it rooted, because on devices with an easy unlocked bootloader this is always the most straightforward method. Any root exploits in the OS rarely last very long, because the fix comes along straight from Google in short order.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    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.
    8
    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...


    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.
    7
    CWM 6.0.2.3 for Tilapia (Touch and non-touch)

    Just built these from the last CM nightly. The touch build server seems to compile fine now as well.

    Regular: https://www.dropbox.com/s/qaqjy9rtkb94sm2/recovery-cwm-tilapia-6.0.2.3.img
    Touch: https://www.dropbox.com/s/tjbysidf5y2ndzv/recovery-cwm-tilapia-6.0.2.3-touch.img
    4
    TWRP is up...

    I compiled a TWRP image for tilapia as well.

    This actually took a little doing...my intention here was to simply compile some images, but since tilapia is only Android 4.2, and we don't have CM10.1 (officially), I actually endied up having to port TWRP whole cloth. This is compiled from TWRP source code, with a few tweaks.

    There are a couple things about the port I would like to eventually tweak, I had to copy the sbin folder over by hand, and due to the intertwined nature of grouper/tilapia, settings derived from common files in the source code are named grouper still, (i.e. ueventd.grouper.rc instead of ueventd.tilapia.rc) but that is quibble stuff and may end up staying that way regardless, since many of the tilapia make files are merely pointers to the grouper files. It certainly doesn't hurt anything.

    The TWRP image has been confirmed working with the OTAs.

    I thought long and hard about possibly modifying these recovery images to allow users to flash grouper roms as well. I know it is unlikely that everything will be made available in two versions, even though it should be.

    Any thoughts on this? It is a demonstrably better idea than having people use the grouper images, but I still think the developers/modders should be the ones handling this problem. People are going to NEED this recovery image once the nightlies of AOKP/CM10.1 and whatever start coming down, but I know that grouper zips will still be tempting to many.
    2
    try /mnt/shell/emulated/clockworkmod