08-11-2013 04:09 PM
33 12
tools
  1. mikemike162012's Avatar
    Is unlocking the bootloader on the new Nexus 7 2013 the same way method that applies to the old Nexus 7?
    Are there any guide to unlock the bootloader for the new Nexus 7 2013 in a step by step dummy proof tutorial?

    I want to unlock the device bootloader so if in the future if Google or Asus happened to dropped support for the device in 2+years, I can have the option to install an custom updated android os on the device. Basically I want my device to run an stock android os with the option to install custom os in the near future and the ability to run root software/programs.

    Anyone can help me? Thanks
    07-29-2013 02:03 AM
  2. Paul627g's Avatar
    Yes the basics of unlocking the bootloader on any Nexus device is still the same.

    • Setup your drivers
    • Make sure you have the Android SDK or at least Fastboot & ADB setup on your computer
    • Boot into the bootloader
    • Open a command prompt from your computer and connect the device via USB
    • type " fastboot devices " verify you have a connection
    • type " fastboot oem unlock " to unlock the bootloader and follow the on screen prompt on the device.


    As far as rooting is concerned at this point its still in an infancy stage with Android 4.3 so I would be patient there and keep in tune with the thread we have in the forums keeping up with its progress.

    Note: This is posted in the Nexus 4 forums, but it still concerns Android 4.3 in general so it applies across the board for all...

    http://forums.androidcentral.com/nex...oid-4-3-a.html
    2defmouze likes this.
    07-29-2013 12:14 PM
  3. mikemike162012's Avatar
    Thanks, found the unlocking bootloader tutorial. Also, found a guide to root it, can you comment?
    Step 1: unlock the bootloader
    Step 2: Download the TWRP image to your PC (place in same folder you have your fastboot and adb files), Download the SuperSU.zip and place on the Nexus 7's internal memory
    Step 3: Boot Nexus 7 into bootloader (from powered off hold power+volumeup+volumedown)
    Step 4: Open command line from the folder where you have the TWRP image (easiest way is to navigate to that folder, shift+rightclick, open command line here)
    Step 5: type command "fastboot flash recovery filename.img"
    Step 6: reboot into recovery by entering the command "adb reboot recovery"
    Step 7: Flash the SuperSu
    Done!

    -Can someone teach me how to do a backup of the system images before I try flashing the SuperSu? The guide above did not mention a backup in a worst case scenario, and I don't know how to manually use TWRP to do an complet backup, since I'm new at this. Can someone teach me how to do the backup before I try to flash anything? thanks!
    07-30-2013 01:07 AM
  4. Paul627g's Avatar
    Hello

    First just so your aware the root for Android 4.3 is still very new and there may very well be issues that pop up and both Koush and Chains have acknowledged this even though they have done their best to avoid problems with the new root package for 4.3

    As far as doing a backup of system images you have options.

    There is always the factory images available directly from Google to restore back to stock Android 4.3 or lower. Yes this will however erase (reset) your device to flash these images back to the device.

    The way you go about unlocking and rooting the Nexus you first unlock the bootloader, then flash your custom recovery. Next you boot into your custom recovery and at this point you can then MAKE your Nandroid backup of your setup BEFORE you flash the SuperSu zip file in recovery and boot up for the first time.

    From TWRP you would select BACKUP/ (Then Set Backup Name if you choose) otherwise it will give it a filename by date. This will backup your /system/data/boot (kernel), so basically all the important stuff. Once your complete with that portion you can follow thru in flashing SuperSU to obtain root access and then boot up the system for the first time since unlocking the bootloader & flashing TWRP.



    Thanks, found the unlocking bootloader tutorial. Also, found a guide to root it, can you comment?
    Step 1: unlock the bootloader
    Step 2: Download the TWRP image to your PC (place in same folder you have your fastboot and adb files), Download the SuperSU.zip and place on the Nexus 7's internal memory
    Step 3: Boot Nexus 7 into bootloader (from powered off hold power+volumeup+volumedown)
    Step 4: Open command line from the folder where you have the TWRP image (easiest way is to navigate to that folder, shift+rightclick, open command line here)
    Step 5: type command "fastboot flash recovery filename.img"
    Step 6: reboot into recovery by entering the command "adb reboot recovery"
    Step 7: Flash the SuperSu
    Done!

    -Can someone teach me how to do a backup of the system images before I try flashing the SuperSu? The guide above did not mention a backup in a worst case scenario, and I don't know how to manually use TWRP to do an complet backup, since I'm new at this. Can someone teach me how to do the backup before I try to flash anything? thanks!
    07-30-2013 09:55 AM
  5. mikemike162012's Avatar
    The way you go about unlocking and rooting the Nexus you first unlock the bootloader, then flash your custom recovery. Next you boot into your custom recovery and at this point you can then MAKE your Nandroid backup of your setup BEFORE you flash the SuperSu zip file in recovery and boot up for the first time.
    Okay, hold on! You got me a bit confuse. So to sum this down, I first need to:
    #1 unlock bootloader
    #2 flash a custom recovery (image)?
    #3 boot into my custom recovery to make a nandroid backup (image)?
    #4 Root to flash SuperSu zip

    Do I have all the above correct?

    So if I follow from this guide below to unlock the bootloader:

    Step 1: Install the Android SDK (really you only need the fastboot.exe and adb.exe)
    Step 2: Install the Google USB Drivers
    Step 3: Enable USB Debugging on the Nexus 7 (Go to "About Tablet" in settings and rapidly click build number 7 times to unlock developer settings, then go into developer settings and turn on usb debugging
    Step 4: Open a command line from your platform-tools folder (wherever you have your fastboot and adb files) [easiest way in windows is to navigate to that folder, right click, and select open command line here]
    Step 5: type the command "adb reboot bootloader"
    Step 6: Once Nexus 7 boots into bootloader type the command in the same terminal window "fastboot oem unlock"
    Step 7: On nexus 7 use volume up to highlight Yes then hit the power button to select it
    Step 8: Once you confirm lock state says Unlocked you will want to scroll to "Start" using volume buttons and select it with power button and reboot the device.

    After that done, how do I proceed to do a Custom Recovery... i assuming using TWRP?

    My goal is to root the device by unlock the bootloader and finally make a backup that I can restore if something bad happens. Don't plan on installing any roms, like using the stock rom android 4.3.
    07-30-2013 04:09 PM
  6. Paul627g's Avatar
    Yes your steps to this point are correct for unlocking the bootloader.

    To install TWRP recovery first you need to obtain the recovery image. TeamWin Projects - TeamWin Recovery Project (twrp) - | TeamWin

    You need to select the image for your specific device from their menu. Then you can download the actual " img " file to flash to your phone. Place the downloaded image into the same file folder that contains your FASTBOOT/ADB files.

    Once you get the image you need to boot into your bootloader just like you did to unlock it.

    Then connect your computer/phone and open a command prompt to the folder containing the recovery image & FASTBOOT.

    Type " fastboot flash recovery recovery.img " Note: Insert the proper recovery.img filename in place of what I put.

    Press Enter and this should only take a few seconds to flash.

    Once complete you will can use your Volume Up/Down on the phone to select RECOVERY then press START and it will boot into your custom recovery.
    mikemike162012 likes this.
    07-30-2013 06:37 PM
  7. mikemike162012's Avatar
    Type " fastboot flash recovery recovery.img " Note: Insert the proper recovery.img filename in place of what I put.

    Press Enter and this should only take a few seconds to flash.

    Once complete you will can use your Volume Up/Down on the phone to select RECOVERY then press START and it will boot into your custom recovery.
    Thanks, glad I'm still on the right track. Thanks for clarifying. As for the command input, i should type only " fastboot flash recovery.img " or " fastboot flash recovery nexus2013.img " (pretending the image file name is nexus2013.img that is how I should type it in the command window? Edited: I went to TWRP website and click on "please choose your device" but I cannot find the new nexus7, which should I use?

    So after Booting into Recovery mode... This is where I begin to do my Nandroid backup? If so, can you guide be through the first time. Thanks so much!
    07-30-2013 07:15 PM
  8. Paul627g's Avatar
    Once you boot into TWRP, you will see the option BACKUP. Select that and do what it says and you will have an exact backup/image of your phone at that point in time.

    Probably take about 5 minutes to do the backup.


    Sent from my Nexus 7 using AC Forums mobile app
    mikemike162012 likes this.
    07-30-2013 09:27 PM
  9. mikemike162012's Avatar
    Okay, thanks a lot. Think I got this correctly in my mind now. Just one last question. After rooting it and flashed SuperSu.. I can still receive official OTA update from Asus correct? and I can always use my backup custom recovery to downgrade back to 4.3 right if the update is bad?
    07-31-2013 12:30 AM
  10. sfhub's Avatar
    If you want to run official OTA, it is best to restore the stock recovery first, before choosing to apply the OTA update.

    TWRP only backs up what you tell it to back up (by default boot, system, data). By default it doesn't backup recovery, probably because it assumes you are running TWRP so no need to back it up.

    When I installed root, I never bothered to flash twrp onto the tablet. I just loaded it temporarily into memory to do the backup and install the su binaries. In that situation, I told TWRP to also backup the recovery partition, so I could get the stock recovery image backed up as well.

    In any event, there are enough archives available to get you back to stock 4.3 if you need it, even if you never backed anything up.
    Paul627g and mikemike162012 like this.
    07-31-2013 04:18 AM
  11. Paul627g's Avatar
    If you want to run official OTA, it is best to restore the stock recovery first, before choosing to apply the OTA update.

    TWRP only backs up what you tell it to back up (by default boot, system, data). By default it doesn't backup recovery, probably because it assumes you are running TWRP so no need to back it up.

    When I installed root, I never bothered to flash twrp onto the tablet. I just loaded it temporarily into memory to do the backup and install the su binaries. In that situation, I told TWRP to also backup the recovery partition, so I could get the stock recovery image backed up as well.

    In any event, there are enough archives available to get you back to stock 4.3 if you need it, even if you never backed anything up.
    Thanks for jumping in sfhub! Nice to see you around again, its been a while.
    07-31-2013 09:25 AM
  12. mikemike162012's Avatar
    If you want to run official OTA, it is best to restore the stock recovery first, before choosing to apply the OTA update.
    Restore to stock recovery first. You mean the Nandroid backup I just did (boot, data, system, cache) before I flashed the SuperSu zip file correct? So I restore my Nandroid backup before applying OTA update, correct?

    TWRP only backs up what you tell it to back up (by default boot, system, data). By default it doesn't backup recovery, probably because it assumes you are running TWRP so no need to back it up.
    Not sure if I get you correctly but isn't the Nandroid backup is what I need to do an recovery to restore back to 4.3 stock android?

    When I installed root, I never bothered to flash twrp onto the tablet. I just loaded it temporarily into memory to do the backup and install the su binaries. In that situation, I told TWRP to also backup the recovery partition, so I could get the stock recovery image backed up as well.
    so from the above posts, am I doing it your way or the other way? And if i'm not yet backup the stock recovery image, how should I do it, when and how?

    In any event, there are enough archives available to get you back to stock 4.3 if you need it, even if you never backed anything up.
    If you don't mind to show me more, I be interest to learn. Thanks!
    07-31-2013 01:23 PM
  13. sfhub's Avatar
    Restore to stock recovery first. You mean the Nandroid backup I just did (boot, data, system, cache) before I flashed the SuperSu zip file correct? So I restore my Nandroid backup before applying OTA update, correct?
    when you do
    Code:
    fastboot flash recovery twrp.img
    you are writing the twrp image into the tablet's recovery partition

    When you run twrp, by default it will have selected backup of the system, data, and boot partitions. If you then choose to also backup the recovery partition, it will just end up backing up the twrp image you just installed in the previous fastboot command. If you end up restoring this backup, you'll get twrp in your recovery partition rather than stock recovery (which is already gone since you overwrote it with the fastboot flash) You can recover the stock recovery by grabbing it from someone else as the stock recovery is generic for everyone.

    Now, if instead of using fastboot flash, you instead use
    Code:
    fastboot boot twrp.img
    as your first command after unlocking, and then you subsequently choose to backup system, data, boot, and recovery partitions, you will have a full backup of your stock install, including recovery. This is because you never wrote/flashed the twrp recovery onto the tablet. You are only temporarily loading twrp recovery from PC into tablet memory over USB, not permanently making it the recovery installed on your tablets recovery partition.

    You can still run twrp recovery whenever you want and you will be able to install OTAs when they come out (as long as you don't modify/remove ANY existing OS files) If you modify some minor OS files there's probably still a 10% chance the OTA will work (as long as it doesn't contain an update to the file you modified), but if you modify/remove something major like removing Maps.apk and replacing with a newer one, then that will almost 100% cause the OTA to fail. Installing SuperSU in and of itself won't cause an OTA to fail, because you are just adding files to the system. You aren't modifying any files at all, so the files the OTA is trying to patch will still pass the SHA integrity check. I haven't looked at the OTAs on Nexus 7, but on past phones, the OTAs often would contain updates to recovery as well. If you had twrp installed as your recovery and the OTA contained a patch-style update to the recovery partition, then having twrp installed would cause the OTA to fail the integrity check. Now if the OTA update didn't update the recovery partition then it could probably pass, as long as twrp is honoring the protocol used to pass updates from Android OS to recovery. Android OS proper (the stuff you are running daily) is responsible for checking whether you need and downloading the updates into the cache partition. Then when you select to install the update, it reboots into recovery and points to recovery to look for an update.zip in the cache directory. As long was twrp (installed on the tablet's recovery partition) is playing by those rules it should theoretically be able to install OTAs which do not modify the recovery partition.

    Now if you instead load twrp temporarily from PC into memory, then your tablet's recovery partition still contains the stock recovery. You will thus still look like a stock phone from the OTAs perspective and thus any OTA will work (as long as you haven't modified/removed any existing OS files) Adding Titanium Backup or other root apps normally just adds files, so that won't prevent you from getting the OTA (though the OTA will commonly reset permissions on su, which I believe SuperSU has tried to counter, but I haven't tested) You may or may not lose root after the OTA. By "lose" root, I am referring to the "capability" of becoming root, rather than the root files itself. OTAs won't delete the root files, so you will definitely still see SuperSU in your app folder, it just might have reset the permissions, so when you try to become root, it fails. However, as I mentioned, I believe SuperSU tries to restore its permissions after an OTA update.

    The disadvantage of loading twrp temporarily from PC into memory is you will need a PC connected to your tablet to initiate twrp recovery. You'll need to do
    Code:
    adb reboot bootloader
    fastboot boot twrp.img
    each time you want to run twrp.

    If you install twrp onto the tablet's recovery partition, you can start twrp by doing
    Code:
    Power Down the tablet (ie shutoff)
    Press-and-hold Power+Vol-
    Select Recovery (using Vol+/- and Power)
    This is convenient if you are not by your computer and want to initiate a Backup or install some update.zip or new custom ROM.

    On my every day phones, I usually write custom recovery onto the recovery partition because I make backups all the time and I run customized ROMs. On this tablet, since it is from Google, I plan an getting the OTAs as soon as they are available to see the latest and greatest, so I'm leaving stock recovery on the tablet. I still want root for the convenience of what it allows me to tinker with, but don't really need access to twrp all the time.

    That's just my opinion though for my usage. If you run custom ROMs all the time and have no intention of running the OTAs (instead waiting for the devs to update their ROMs), then it is better to install twrp onto the tablet's recovery partition.

    Hope that clears things up.
    mikemike162012 likes this.
    07-31-2013 02:43 PM
  14. sfhub's Avatar
    Thanks for jumping in sfhub! Nice to see you around again, its been a while.
    Good to hear from you also. Was off for a while doing real-world stuff, then got enticed by the staples deal.
    Paul627g likes this.
    07-31-2013 02:46 PM
  15. mikemike162012's Avatar
    Now, if instead of using fastboot flash, you instead use
    Code:
    fastboot boot twrp.img
    as your first command after unlocking, and then you subsequently choose to backup system, data, boot, and recovery partitions, you will have a full backup of your stock install, including recovery. This is because you never wrote/flashed the twrp recovery onto the tablet. You are only temporarily loading twrp recovery from sdcard into memory, not permanently making it the recovery installed on your tablets recovery partition.
    Got that. I will follow your example to not flash TWRP but temporarily load from sdcard so I can keep my stock backup for recovery. So from there I do my backup, assuming Nandroid backup using TWRP for backing up my system, data, boot and recovery partitions, correct?

    Now if you instead load twrp temporarily from sdcard into memory, then your tablet's recovery partition still contains the stock recovery. You will thus still look like a stock phone from the OTAs perspective and thus any OTA will work (as long as you haven't modified/removed any existing OS files) Adding Titanium Backup or other root apps normally just adds files, so that won't prevent you from getting the OTA (though the OTA will commonly reset permissions on su, which I believe SuperSU has tried to counter, but I haven't tested) You may or may not lose root after the OTA. By "lose" root, I am referring to the "capability" of becoming root, rather than the root files itself. OTAs won't delete the root files, so you will definitely still see SuperSU in your app folder, it just might have reset the permissions, so when you try to become root, it fails. However, as I mentioned, I believe SuperSU tries to restore its permissions after an OTA update.
    So if I did the TWRP system recovery back to stock above, I will need to reroot again, to be safe right? Or if I updated OTA, I need to wait until they updated SuperSu for the new update and then I need to reroot it correct? (Thats assuming the OTA update disabled my rooting or I did my TWRP backup stock recovery before my rooting process).


    The disadvantage of loading twrp temporarily from sdcard into memory is you will need a PC connected to your tablet to initiate twrp recovery. You'll need to do
    Code:
    adb reboot bootloader
    fastboot boot twrp.img
    each time you want to run twrp.
    I agree that its a but more inconvenience doing it this way. So If I did it this way, whenever I need to do a backup or recovery I will need to type " adb reboot bootloader " on my PC where I put the files folder on command to load into boot mode, correct?
    Then after in boot mode, type the following " fastboot boot twrp.img " on my device to Backup or Recovery, correct?

    If you install twrp onto the tablet's recovery partition, you can start twrp by doing
    Code:
    Power Down the tablet (ie shutoff)
    Press-and-hold Power+Vol-
    Select Recovery (using Vol+/- and Power)
    This is convenient if you are not by your computer and want to initiate a Backup or install some update.zip or new custom ROM.
    Let say if I go this route flashing TWRP and lost my Stock recovery backup. You said I can get it back, do you mean by go to site like this: https://developers.google.com/android/nexus/images download the stock image and flash it onto the device like how we did to flash SuperSu?

    And how do you transfer/save your device stock recovery to computer, if that is possible?

    And how many stock recovery can you keep or make on a single device? Or is my understanind only one possible stock recovery at a time and need to flash it onto the device... i was thinking along the line like where TWRB let you make multiple backup from different dates and settings. Was hoping you can make multiple stock recovery for different update under the same device, and choose which you want to restore at will.
    07-31-2013 05:16 PM
  16. sfhub's Avatar
    Got that. I will follow your example to not flash TWRP but temporarily load from sdcard so I can keep my stock backup for recovery. So from there I do my backup, assuming Nandroid backup using TWRP for backing up my system, data, boot and recovery partitions, correct?
    BTW I meant to say load it from the PC to the tablet rather than sdcard to tablet. Fastboot uploads the boot image over the USB connection and boots the tablet. I corrected the original post.

    Regarding the partitions to backup that is correct. If you haven't done fastboot flash recovery twrp.img, then your recovery partition should still be stock. Incidentally, I realized that TWRP for some reason allows you to backup the recovery partition but doesn't allow you to restore it. No big deal, you can always fastboot flash it (using the backup that fastboot created)

    So if I did the TWRP system recovery back to stock above, I will need to reroot again, to be safe right?
    If you are already rooted (ie installed SuperSU into system), I wouldn't bother restoring to stock system/data/boot. I would just decide whether you want twrp to be your recovery or stock recovery. If you plan on running the OTAs rather than waiting for ROM developers to integrate the changes, it might be simpler to keep stock recovery on the tablet. If that's the case (assuming you fastboot flashed twrp), just fastboot flash the stock recovery image and you'll be where you want to end up (ie stock boot, recovery, SuperSU installed into system)

    Or if I updated OTA, I need to wait until they updated SuperSu for the new update and then I need to reroot it correct? (Thats assuming the OTA update disabled my rooting or I did my TWRP backup stock recovery before my rooting process).
    I believe SuperSU is supposed to try and preserve itself after OTA updates, but I haven't personally tested this. Worst case, after the OTA, just rerun
    Code:
    adb reboot bootloader
    fastboot boot twrp.img
    install update-SuperSU.zip from twrp
    and you'll have root again (with no loss of data and no other changes)

    I agree that its a but more inconvenience doing it this way. So If I did it this way, whenever I need to do a backup or recovery I will need to type " adb reboot bootloader " on my PC where I put the files folder on command to load into boot mode, correct?
    Then after in boot mode, type the following " fastboot boot twrp.img " on my device to Backup or Recovery, correct?
    Yup, I usually use Titanium to backup my important apps, so that runs all the time. I only make full image Backups occasionally as I don't really need them unless something goes terribly wrong. Since this tablet is from Google, I don't need to wait for the OEM to go through their release process so I want to see what google has put out right away. On the other hand, for my everyday phone, I need to wait for Samsung to go through their release process so I don't really have the advantage of seeing whats new as soon as it is available, so I don't bother setting up my phone to work with OTAs. On the phone, I leave custom recovery flashed onto the phone (though after I've had the phone initially setup, I find I hardly need to use custom recovery) Actually on my phone, I often don't want to accept the OTAs from the manufacturer since they often break things and I rely on my phone to be stable. The tablet I want to be the latest and greatest as I'm more flexible with things not working perfect on it.

    Let say if I go this route flashing TWRP and lost my Stock recovery backup. You said I can get it back, do you mean by go to site like this: https://developers.google.com/android/nexus/images download the stock image and flash it onto the device like how we did to flash SuperSu?
    You can grab it from Google (when they eventually publish the images for the nexus 7.2) or just grab anybody's backup. They are all the same (for a particular OS release) You would flash stock recovery back onto the tablet using the same basic commands
    Code:
    adb reboot bootloader
    fastboot flash recovery stock-recovery.img
    And how do you transfer/save your device stock recovery to computer, if that is possible?
    Assuming you backed up stock recovery while it was on your tablet's recovery partition, it'll be in the TWRP backup directory on the sdcard. The filename will be recovery.emmc.win.
    Just rename it to recovery.img or stock-recovery.img. It isn't compressed (even if you chose compression) Only user, data, and cache get compressed. Actually I would advise you copy your TWRP backups to a second location like your PC or online storage account. You never know when you'll be forced to wipe the tablet due to something going wrong and it is annoying when you realize you just wiped out all your backups when you pressed to button "are you sure you want to continue"

    And how many stock recovery can you keep or make on a single device? Or is my understanind only one possible stock recovery at a time and need to flash it onto the device... i was thinking along the line like where TWRB let you make multiple backup from different dates and settings. Was hoping you can make multiple stock recovery for different update under the same device, and choose which you want to restore at will.
    There is only one recovery partition on the tablet. Thus you can only place one recovery on the tablet at a time.

    When you do fastboot flash or fastboot boot over the USB connection, it is just grabbing filenames from your local filesystem, so you can store as many recovery (and boot) images as you desire. You are only limited by disk space on the PC and your creative file naming capabilities.
    mikemike162012 likes this.
    07-31-2013 06:17 PM
  17. mikemike162012's Avatar
    Thanks for the info. Now I just need to get my hand on an Nexus 7 to try and if any problem arise, I'll post here for help. Should have one by next weekend to try... I hope, but thank you and everyone for posting in this thread topic, I've learned a lot from it.
    07-31-2013 11:57 PM
  18. mikemike162012's Avatar
    @sfhub

    One last question regarding flashing SuperSu.

    Since now I no longer flash TWRP image as recovery, but rather follow your advise to temporarily load it from SDcard and did my Nandroid stock recovery backup, do I still follow this step from the original guide to flash the SuperSu by:
    Step 6: reboot into recovery by entering the command "adb reboot recovery"
    Step 7: Flash the SuperSu
    Hope you get what I mean.

    Another concern, others said they get into a boot loop after flashing the SuperSu, do you think I will experience the same problem? and to fix it, I will have to wipe the device and reflash the image???
    http://forums.androidcentral.com/goo...talled-os.html (boot loop problem)
    edt: just a thought, could the loop be caused when they unlocked the device but never fully rebooted hence the problem arise when you rooted later?
    08-01-2013 12:37 AM
  19. sfhub's Avatar
    After doing the unlock
    fastboot oem unlock
    let the tablet reboot using stock recovery, go through initial install

    Then you'll need to setup adb again
    tap on OS version 7 times th enable developer option
    enable usb debugging in settings->developer options

    Make sure the following files are in the same directory as your adb client on your pc
    twrp.img
    UPDATE-SuperSU-v1.51.zip

    then copy SuperSU to your sdcard, reboot to bootloader and run twrp
    adb push UPDATE-SuperSU-v1.51.zip /sdcard/
    adb reboot bootloader
    fastboot boot twrp.img

    Then backup your boot, system, data, recovery partitions inside twrp
    Do not reboot yet
    In same twrp session, choose install, navigate to /sdcard and choose UPDATE-SuperSU-v1.51.zip, swipe to install
    Now reboot and you'll have
    1) backed up your original system
    2) installed root
    3) continued to run stock recovery

    Regarding bootloop, I don't know what those people did. Possibly they tried to flash twrp in the same session they did the oem unlock. I suggest every time you unlock, you let the system reboot and do the initial install before you do anything else.
    mikemike162012 likes this.
    08-01-2013 04:00 AM
  20. mikemike162012's Avatar
    After doing the unlock
    fastboot oem unlock
    let the tablet reboot using stock recovery, go through initial install

    Then you'll need to setup adb again
    tap on OS version 7 times th enable developer option
    enable usb debugging in settings->developer options

    Make sure the following files are in the same directory as your adb client on your pc
    twrp.img
    UPDATE-SuperSU-v1.51.zip
    Sorry late reply, but where can I get UPDATE-SuperSu-v.1.51.zip ? I only have download link for UPDATE-SuperSu-v1.43.zip and that is compatible with Android 4.3. Is the newer 1.51 better with bug fixes?
    edited: found the link, but not sure if I should wait for more errors to be fixed or get it now?

    then copy SuperSU to your sdcard, reboot to bootloader and run twrp
    adb push UPDATE-SuperSU-v1.51.zip /sdcard/
    adb reboot bootloader
    fastboot boot twrp.img
    I don't quite get the first part " adb push UPDATE-SuperSU-v1.51.zip /sdcard/ " since I don't remember seeing this step when unlocking the bootloader (do you mean click install on TWRP, but that don't sound right as that step it listed at the latter step below), so I presume, boot in bootloader mode, then how do I push UPDATE-SuperSU-v1.51.zip /sdcard/ ? Or was that an typo?

    Then backup your boot, system, data, recovery partitions inside twrp
    Do not reboot yet
    In same twrp session, choose install, navigate to /sdcard and choose UPDATE-SuperSU-v1.51.zip, swipe to install
    Now reboot and you'll have
    1) backed up your original system
    2) installed root
    3) continued to run stock recovery
    you mentioned to restore back to stock android I need to reflash it with a clean stock image since you said my way of backing up the stock image won't let me restore it like that with TWRP restore. So don't that kind of defeat the purpose. Scond thought, well it let me save an stock image that I can transfer to computer in case I need it but to restore it, I need to reflash it. Much more trouble some than to run a Custom Recovery right? Oh well.

    When enabled custom recovery doing it the other way (with TRWP flashed), if I need to restore back to stock do I also too need to reflash it with a clean stock image? If yes too, then I don't feel too bad doing it the other way. =)

    Regarding bootloop, I don't know what those people did. Possibly they tried to flash twrp in the same session they did the oem unlock. I suggest every time you unlock, you let the system reboot and do the initial install before you do anything else.
    I read a bit on the web and it seem android 4.3 is causing this for some device tho. Thanks so much for your guidance, hope to hear back from you again. Might have my Nexus by this weekend so just hope I can be up to date when I start to do the whole process.
    Also what you think of the new Nexus Root Kit http://forums.androidcentral.com/goo...-v1-6-8-a.html
    08-07-2013 12:11 AM
  21. sfhub's Avatar
    Is the newer 1.51 better with bug fixes?
    edited: found the link, but not sure if I should wait for more errors to be fixed or get it now?
    Changelog here:
    [2013.07.29] SuperSU v1.51 - xda-developers

    I'm using 1.51 w/o issues.

    I don't quite get the first part " adb push UPDATE-SuperSU-v1.51.zip /sdcard/ " since I don't remember seeing this step when unlocking the bootloader (do you mean click install on TWRP, but that don't sound right as that step it listed at the latter step below), so I presume, boot in bootloader mode, then how do I push UPDATE-SuperSU-v1.51.zip /sdcard/ ? Or was that an typo?
    Not a typo. adb push will copy the SuperSU update.zip install file onto the virtual sdcard on your tablet. Otherwise when you try to install SuperSU from TWRP recovery, it won't be able to find the file to install. Alternatively, instead of doing the adb push, you can turn on MTP mode in your tablet and drag and drop onto the Nexus 7 MTP folder. Somehow you need to get the SuperSU update.zip onto the tablet. I just suggested one way of doing it.

    you mentioned to restore back to stock android I need to reflash it with a clean stock image since you said my way of backing up the stock image won't let me restore it like that with TWRP restore. So don't that kind of defeat the purpose. Scond thought, well it let me save an stock image that I can transfer to computer in case I need it but to restore it, I need to reflash it. Much more trouble some than to run a Custom Recovery right? Oh well.
    Assuming you *flashed* TWRP onto your tablet's recovery partition (ie fastboot flash recovery twrp.img) You can take your TWRP backup (of your original tablet software) and restore it. That will give you stock everything, except for recovery, which TWRP doesn't have an option to restore (even though it has one to back up). To get full stock, you'd then have to use fastboot to flash the stock recovery image you backed up with TWRP in the first place. You can do this with
    Code:
    adb reboot bootloader
    fastboot flash recovery stock-recovery.img
    Now if instead, you left stock recovery on your tablet and just temporarily ran TWRP to make your backup and install root (ie fastboot boot twrp.img), then your stock recovery is still on the tablet, untouched. If you get an OTA (and assuming you haven't removed or modified any of the OS files) then the OTA will install correctly. If you want to make another backup or do the restore, then you need to connect to a PC and type
    Code:
    adb reboot bootloader
    fastboot boot twrp.img
    It really just depends on what you are doing more often. If you are making full nandroid backups all the time, put recovery on the tablet. If you just wanted TWRP to make that initial nandroid backup and install root and don't really have a need to run it all the time, then I'd suggest you don't flash it onto the tablet, just run it from the PC when you need it. This will allow you to get the OTAs when they come w/o needing to restore stock recovery.

    Personally I only use TWRP to make the initial backup of my stock software. After that I probably only make full image backups once every 3-6 months. In the interim, I'm mostly backing up my data on a per app basis using Titanium.

    When enabled custom recovery doing it the other way (with TRWP flashed), if I need to restore back to stock do I also too need to reflash it with a clean stock image? If yes too, then I don't feel too bad doing it the other way. =)
    If you flash twrp.img onto the recovery partition, I would suggest you flash the stock recovery back onto the tablet before accepting any OTAs. You don't need to flash the whole stock ROM onto the tablet to have the OTA install successfully. You just need to make sure you don't modify or delete any of the original OS files (you can add files w/o issue for the OTA, like adding root files)

    Also what you think of the new Nexus Root Kit http://forums.androidcentral.com/goo...-v1-6-8-a.html
    It probably works fine. I always do my installs by hand so I know what is going underneath the hoods. If it is a complex install prone to errors, I might run or write some tool, but Nexus is extremely easy to work with, so doing it by hand is perfectly reasonable and much more educational.
    mikemike162012 and Impulses like this.
    08-07-2013 01:44 AM
  22. ne0ne's Avatar
    I also agree you should always reboot the system after unlocking the bootloader. I would not suggest writing twrp to the recovery partition or flashing the supersu zip without first doing a full boot..

    Even if you do flash twrp and want to do an ota, you can simply restore your stock non rooted Nandroid and then flash the stock Recovery. That's how I go about it.

    AT&T HTC One MoDaCo.Switch Beta 8
    Nexus 7 2013 Unlocked Root + TWRP
    Chromecast
    mikemike162012 likes this.
    08-07-2013 01:52 AM
  23. mikemike162012's Avatar
    Not a typo. adb push will copy the SuperSU update.zip install file onto the virtual sdcard on your tablet. Otherwise when you try to install SuperSU from TWRP recovery, it won't be able to find the file to install. Alternatively, instead of doing the adb push, you can turn on MTP mode in your tablet and drag and drop onto the Nexus 7 MTP folder. Somehow you need to get the SuperSU update.zip onto the tablet. I just suggested one way of doing it.
    Now I see what you mean by that with " adb push UPDATE-SuperSU-v1.51.zip /sdcard/ ". That seem to be the automatic method way to place the file onto the device, while in the guide it gave me the manual way in Step #2: Download the TWRP image to your PC (place in same folder you have your fastboot and adb files), Download the SuperSU.zip and place on the Nexus 7's internal memory.

    And what is MTP mean and how do you enable MTP? Sorry, so many noob questions, but each time I ask for more info. I always learned something new from you.

    It probably works fine. I always do my installs by hand so I know what is going underneath the hoods. If it is a complex install prone to errors, I might run or write some tool, but Nexus is extremely easy to work with, so doing it by hand is perfectly reasonable and much more educational.
    Thanks for the info. and I agree, its better for me to do it first time manually to learn how to do it for the experience. Also NRT might not be good to me with spotty wifi anyway.
    08-07-2013 11:32 PM
  24. mikemike162012's Avatar
    I also agree you should always reboot the system after unlocking the bootloader. I would not suggest writing twrp to the recovery partition or flashing the supersu zip without first doing a full boot..

    Even if you do flash twrp and want to do an ota, you can simply restore your stock non rooted Nandroid and then flash the stock Recovery. That's how I go about it.

    AT&T HTC One MoDaCo.Switch Beta 8
    Nexus 7 2013 Unlocked Root + TWRP
    Chromecast
    Thanks for the caution warning, yeah I suppose I better let the device fully rebooted before doing the other step especially this my first time, want to avoid any problems.
    08-07-2013 11:34 PM
  25. sfhub's Avatar
    And what is MTP mean and how do you enable MTP? Sorry, so many noob questions, but each time I ask for more info. I always learned something new from you.
    In older versions of Android a segment of your internal flash storage was carved out and worked like a sdcard. When you connected the device to your pc, it would show up as a drive letter just like a USB flash drive. For interoperability with windows, it would normally be formatted fat32, which has 4GB file size limitations and doesn't support permissions. Also it forces the device manufacturer to decide between how much memory to allocate to the sdcard partition and how much to allocate to UserData. Also in USB mass storage mode, if the PC is accessing the sdcard, then Android cannot access it at the same time.

    In newer versions of Android they no longer support USB mass storage mode. Instead of an sdcard partition formatted fat32, they use a folder under UserData (/data/media) as the sdcard. They simulate an sdcard using a program called fuse. However since this isn't formatted fat32 it doesn't make much sense to support mass storage mode when you plug into your PC as most PCs wouldn't be able to mount a ext4 subdirectory. So how to solve the problem of the user wanting to transfer files to their device?

    They had to find some existing protocol that could be relatively easily supported and wouldn't require major changes on the OSs. Enter MTP and PTP. These were simple existing protocols created to support transfering files from media players and cameras to PCs. They weren't part of the original Windows XP distribution but later versions of windows included them built-in. Windows XP got support as part of user-mode driver framework and windows media player 11.

    MTP is a multimedia transfer protocol. Under Android MTP mode, you have access to your entire (virtual) sdcard contents. PTP is a picture transfer protocol. Under Android PTP mode you have access to the camera folders only.

    Think of MTP and PTP as more like ftp, but with a folder interface. They have no concept of filesystem types. They just deal with files and folders. Since you aren't "mounting" the drive on the PC, Android OS can continue accessing the folders even while you are using MTP mode to transfer files back and forth.

    Most people will want to have MTP mode working as they want to transfer files to the top directory of the virtual sdcard. With PTP mode, you have to transfer files to the camera folder, then use a file manager on the tablet to move the files to the top directory of the virtual sdcard. Also with PTP you can't access the directories other than the camera directories, so to copy files, you'd have to use a file manager to move/copy the files into the camera folders.

    In windows, instead of showing up as a driver letter (as in usb mass storage mode) MTP and PTP devices will show up as virtual folder named Nexus 7 along with the type of Portable Media or Imaging Device.

    On Android, MTP mode is enabled by default. To switch to PTP mode, go to settings->storage and choose the menu (three horizontal lines). You'll see options for enabling media and camera mode.

    On the PC side, MTP mode should be automatically supported as long as USB debugging is disabled (you need to enable USB debugging to support ADB)

    If you enable USB debugging, the USB IDs change and there is a bug where MTP mode won't be recognized on the PC.

    I created a windows driver inf file to fix this issue. It is available here:
    [FIX] MTP and usb debugging on windows - xda-developers
    mikemike162012 and Impulses like this.
    08-07-2013 11:44 PM
33 12

Similar Threads

  1. Turn off Profanity Filter on Voice to Text?
    By Eclipse2K in forum Samsung Galaxy Note 2
    Replies: 1
    Last Post: 08-16-2016, 11:48 PM
  2. Cracked screen on GT2
    By Uncle Reemus in forum Samsung Galaxy Tab 2
    Replies: 1
    Last Post: 08-19-2013, 10:43 PM
  3. Replies: 5
    Last Post: 07-31-2013, 12:32 PM
  4. the only thing I don't like about the nexus 7
    By daveddy in forum Google Nexus 7 Tablet (2013)
    Replies: 2
    Last Post: 07-29-2013, 08:50 AM
LINK TO POST COPIED TO CLIPBOARD