[Q]root before updating? - Nexus 7 Q&A, Help & Troubleshooting

I just purchased a N7 yesterday, and it's supposed to arrive in a couple of days. I'm using a Mac OS computer and comfortable with ADB, so which is better: root first before updating the firmware, or update to the most recent version of firmare and then root? And which rooting method do you recommend with a Mac?
Thanks for your suggestions!

mj56gt said:
I just purchased a N7 yesterday, and it's supposed to arrive in a couple of days. I'm using a Mac OS computer and comfortable with ADB, so which is better: root first before updating the firmware, or update to the most recent version of firmare and then root? And which rooting method do you recommend with a Mac?
Thanks for your suggestions!
Click to expand...
Click to collapse
I would update first then root, and use wug's toolkit to help you through the process.

mj56gt said:
I just purchased a N7 yesterday, and it's supposed to arrive in a couple of days. I'm using a Mac OS computer and comfortable with ADB, so which is better: root first before updating the firmware, or update to the most recent version of firmare and then root? And which rooting method do you recommend with a Mac?
Thanks for your suggestions!
Click to expand...
Click to collapse
I personally have done the following steps:
- I've rooted it first;
- installed OTA RootKeeper (to keep the root after updating - the app must be configured before updating firmware);
- I've updated the firmware to the last version.
I performed all those steps using my notebook which has Windows 7 OS, so for Mac OS I cannot make any recommendation.
I hope this helps you.

Thank you both for the suggestions! Is the Wug's toolkit for Windows OS? Any such toolkit for Mac OS or Linux system? Thanks!

Leonhan said:
I would update first then root, and use wug's toolkit to help you through the process.
Click to expand...
Click to collapse
Good Dog. The OP said he had a Mac.
@OP
May as well do stock firmware upgrade first if it is needed.* On the rare chance that you get a device that suffers some kind of infant mortality - the device will be pure stock for the first little bit of operation (in case an RMA is needed). And the flashing operations which take place IF an OTA is needed will give flash memory a little workout.
Just bear in mind that the bootloader unlock operation will erase everything from /data (factory reset) when the "fastboot unlock" command occurs. So, if you operate the device as pure stock for a while, you will either need to backup stuff or regard your initial customizations as disposable.
fastboot methods are the most expeditious way to proceed on a Mac.
If you use TWRP 2.4.4.0 as your custom recovery, it will peek in /system to see if you are rooted and offer to root your device with SuperSU for you (just before you reboot from within TWRP).
The way I see it, the rooting procedure is 4 steps total:
(Note: use the "tilapia", not grouper recovery image if you have the 3G/LTE Nexus 7)
Code:
fastboot unlock
fastboot boot openrecovery-twrp-2.4.4.0-grouper.img
... make a pure stock Nandroid backup
... reboot TWRP and it will offer to install SuperSU for you
(optionally: fastboot flash recovery openrecovery-twrp-2.4.4.0-grouper.img )
Those 4 steps above will leave you with Pure Stock + Rooted ; even the recovery on the tablet will be pure stock until you flash it there (optional step 5 above).
It's up to you to get the Mac SDK (for fastboot & adb) installed and figure out using command lines - search for that, don't ask.
good luck
* I thought I saw a report recently that someone had JDQ39 on a device purchased less than 4 weeks after the last update - your device may not need upgrading yet.

bftb0 said:
@OP
May as well do stock firmware upgrade first if it is needed.* On the rare chance that you get a device that suffers some kind of infant mortality - the device will be pure stock for the first little bit of operation (in case an RMA is needed). And the flashing operations which take place IF an OTA is needed will give flash memory a little workout.
Just bear in mind that the bootloader unlock operation will erase everything from /data (factory reset) when the "fastboot unlock" command occurs. So, if you operate the device as pure stock for a while, you will either need to backup stuff or regard your initial customizations as disposable.
fastboot methods are the most expeditious way to proceed on a Mac.
If you use TWRP 2.4.4.0 as your custom recovery, it will peek in /system to see if you are rooted and offer to root your device with SuperSU for you (just before you reboot from within TWRP).
The way I see it, the rooting procedure is 4 steps total:
(Note: use the "tilapia", not grouper recovery image if you have the 3G/LTE Nexus 7)
Code:
fastboot unlock
fastboot boot openrecovery-twrp-2.4.4.0-grouper.img
... make a pure stock Nandroid backup
... reboot TWRP and it will offer to install SuperSU for you
(optionally: fastboot flash recovery openrecovery-twrp-2.4.4.0-grouper.img )
Those 4 steps above will leave you with Pure Stock + Rooted ; even the recovery on the tablet will be pure stock until you flash it there (optional step 5 above).
It's up to you to get the Mac SDK (for fastboot & adb) installed and figure out using command lines - search for that, don't ask.
good luck
* I thought I saw a report recently that someone had JDQ39 on a device purchased less than 4 weeks after the last update - your device may not need upgrading yet.
Click to expand...
Click to collapse
Thanks a lot for the detailed information and the kind help, bftb0! I really appreciated it.
I had a two-year-old version of Mac SDK, and only used adb before. Just finished grabbing the most recent version. I prefer command lines instead of button pushing. Once N7 arrives, I will start to have fun with fastboot...

bftb0 said:
Code:
fastboot unlock
fastboot boot openrecovery-twrp-2.4.4.0-grouper.img
... make a pure stock Nandroid backup
... reboot TWRP and it will offer to install SuperSU for you
(optionally: fastboot flash recovery openrecovery-twrp-2.4.4.0-grouper.img )
Click to expand...
Click to collapse
One more question. Is the first step (unlocking) necessary for the later steps such as root access? The reason I'm asking is that, unlike rooting, unlocking is irreversible, and would avoid the warranty.
Edit: I guess that the bootloader has to be unlocked to flash a custom recovery, right?

Unlocking is necessary to use fastboot commands and it's not irreversible as you can relock it with "fastboot oem lock" but if you want to unlock it another time it will wipe your device again. And if you flash recovery with fastboot then yes your bootloader must be unlocked but you can relock it after.

Nico_60 said:
Unlocking is necessary to use fastboot commands and it's not irreversible as you can relock it with "fastboot oem lock" but if you want to unlock it another time it will wipe your device again. And if you flash recovery with fastboot then yes your bootloader must be unlocked but you can relock it after.
Click to expand...
Click to collapse
That's great! Thanks a lot for the help...

Related

Cannot root 4.1.2

After I got my new nexus, I decided to root it. I used mskips toolkit with 4.1 and it worked like a beaut. But I can't for the life of me root 4.1.2.
Checklist:
Downloaded the drivers succesfully
Can enter ADB succesfully. Under device manager it says "Google Nexus 7 ADB interface"
Tried WugFresh's toolkit
Unlocked bootloader
Tried installing custom recovery (see below)
(Checklist to know what I have done, for people to help me and future people with problems)
The reason adding CWM or TWRP doesn't work is because the device can't be rooted. You need to be rooted to change recovery file names, and whenever I boot recovery, I get the dead android and a red ! (stock recovery).
When it sees if busybox is installed, and sends the command, it comes back negative.
I'm having the exact same problem -- generating the same set of error messages as you show at the top of your screen capture. I bought a new Nexus 7 32GB and updated it to 4.1.2 before trying to root it. At the time I hadn't read anything that told me this might be a bad idea. I figured -- update to the latest version then root it. I've tried changing how I have it connected (media or camera), what USB port I connect to, what USB cable I use, which boot options I select -- NOTHING makes a difference. I have gotten my bootloader to unlock, or so it seems, as I've got the unlocked padlock image during boot up. But I'm totally stuck on how to proceed to get root.
lesdense said:
I'm having the exact same problem -- generating the same set of error messages as you show at the top of your screen capture. I bought a new Nexus 7 32GB and updated it to 4.1.2 before trying to root it. At the time I hadn't read anything that told me this might be a bad idea. I figured -- update to the latest version then root it. I've tried changing how I have it connected (media or camera), what USB port I connect to, what USB cable I use, which boot options I select -- NOTHING makes a difference. I have gotten my bootloader to unlock, or so it seems, as I've got the unlocked padlock image during boot up. But I'm totally stuck on how to proceed to get root.
Click to expand...
Click to collapse
When you run wugs toolkit to root, does it reboot your nexus? I have not rooted a 32GB yet but I have done a 16GB on 4.1.2 factory image without any problems.
There is nothing different between rooting an 8/16GB unit versus the 32GB ones. Nor does 4.1.1 or 4.1.2 matter.
I bought a 32GB one a few days ago, upgraded to 4.1.2, and had the bootloader unlocked, custom recovery installed and device rooted in about 5 minutes.
The issues you are having are why I hate these "toolkits". They don't always work properly, and when they fail, the user has no idea what's going on. It's much better for people to actually perform the steps manually so that they understand what's going on behind the scenes. Because when you understand, you can better troubleshoot problems.
Based on the errors, it looks like the toolkit failed to remount /system as writable. As such, it couldn't push the APKs for superuser, nor make the su binary suid root. Which of course would break the rest of the install script.
It's a very simply process and doesn't need a toolkit. Use the android development toolkit tools adb and fastboot.
1) adb reboot bootloader
2) fastboot oem unlock
(select yes on tablet)
3) fastboot reboot-bootloader
(confirm bootloader is unlocked)
4) fastboot erase recovery
5) fastboot flash recovery <recovery.img>
(recovery.img should be a downloaded custom recovery file - CWM or TWRP, your choice).
6) Reboot into recovery
7) adb push <superuser.zip> /sdcard/superuser.zip
(superuser.zip should be whatever recovery flashable 'root' zip you want to use).
8) Using recovery, flash the zip file.
9) Reboot
10) Done.
phonic said:
There is nothing different between rooting an 8/16GB unit versus the 32GB ones. Nor does 4.1.1 or 4.1.2 matter.
I bought a 32GB one a few days ago, upgraded to 4.1.2, and had the bootloader unlocked, custom recovery installed and device rooted in about 5 minutes.
The issues you are having are why I hate these "toolkits". They don't always work properly, and when they fail, the user has no idea what's going on. It's much better for people to actually perform the steps manually so that they understand what's going on behind the scenes. Because when you understand, you can better troubleshoot problems.
Based on the errors, it looks like the toolkit failed to remount /system as writable. As such, it couldn't push the APKs for superuser, nor make the su binary suid root. Which of course would break the rest of the install script.
It's a very simply process and doesn't need a toolkit. Use the android development toolkit tools adb and fastboot.
1) adb reboot bootloader
2) fastboot oem unlock
(select yes on tablet)
3) fastboot reboot-bootloader
(confirm bootloader is unlocked)
4) fastboot erase recovery
5) fastboot flash recovery <recovery.img>
(recovery.img should be a downloaded custom recovery file - CWM or TWRP, your choice).
6) Reboot into recovery
7) adb push <superuser.zip> /sdcard/superuser.zip
(superuser.zip should be whatever recovery flashable 'root' zip you want to use).
8) Using recovery, flash the zip file.
9) Reboot
10) Done.
Click to expand...
Click to collapse
I agree with you, the problem of the tool kits, I experimented two of then
M, is that you are lost when something don't work, I lost hours and hours before understand it and do it by myself for 50 per cent .
Now that everything is good, I am very prudent with theses helpers,:good:

[Q] Re-root after 4.3 OTA update?

I sideloaded the 4.3 OTA and it worked great but now I've lost root.
When I start SuperSU i tells me to re-root but how do I do that? My boot loader is already unlocked so do I lock it and then unlock it again (and loose all my data) or is there another way?
No need to lock/unlock or lose any data. You have to flash the updated su zip file through a custom recovery.
Sent from my Nexus 4 using xda premium
mbeltoft said:
I sideloaded the 4.3 OTA and it worked great but now I've lost root.
When I start SuperSU i tells me to re-root but how do I do that? My boot loader is already unlocked so do I lock it and then unlock it again (and loose all my data) or is there another way?
Click to expand...
Click to collapse
Get ChainFires last SuperSU and flash in recovery.
can i do it via adb? - i really don't wanna install a custom recovery
EDIT:
fastboot should be able to do it using this command: fastboot update UPDATE-SuperSU-v1.43.zip but i get the error:
archive does not contain 'android-info.txt'
archive does not contain 'android-product.txt'
error: update package has no android-info.txt or android-product.txt
mbeltoft said:
can i do it via adb? - i really don't wanna install a custom recovery
EDIT:
fastboot should be able to do it using this command: fastboot update UPDATE-SuperSU-v1.43.zip but i get the error:
archive does not contain 'android-info.txt'
archive does not contain 'android-product.txt'
error: update package has no android-info.txt or android-product.txt
Click to expand...
Click to collapse
If you don't want to install a custom recovery, you can use fastboot to just boot to it once and install supersu, without actually flashing the recovery. Just download the recovery (I've always used Cwm for this), put it in the folder with fastboot, boot to the bootloader, and type fastboot boot imagename.img. You'll reboot to the custom recovery, but it won't flash it.
Sent from my Nexus 10 using XDA Premium HD app
nyijedi;43986325ust download the recovery (I've always used Cwm for this) said:
Thank you for helping out...I have the same issue but I cannot figure out what to do with your instructions above. Would you be kind enough to provide a more detailed manual of what this means (ie for noob like me)? My nexus 7 was rooted and working fine using SuperSU until I did 4.3 update by OTA. Also, will this delete my user data?
Many thanks
Well for anyone interested, I sorted this by using WugFresh and selected root device. I did not delete my data. Perfect tool for noob.
Click to expand...
Click to collapse
How can I root 4.3 on nexus 10 without losing data. My boot loader is locked and all the instructions need an unlocked boot loader which will delete data to do. In stuck. I had my boot loader unlocked but I licked it with bootlocker from play store before ota update and I used voodoo root keeper but obviously that failed so now I can't reunlock my boot loader and I can't get root. Any help please?
Sent from my Xperia Play (r800x)
fcna72 said:
Thank you for helping out...I have the same issue but I cannot figure out what to do with your instructions above. Would you be kind enough to provide a more detailed manual of what this means (ie for noob like me)? My nexus 7 was rooted and working fine using SuperSU until I did 4.3 update by OTA. Also, will this delete my user data?
Many thanks
Well for anyone interested, I sorted this by using WugFresh and selected root device. I did not delete my data. Perfect tool for noob.
Click to expand...
Click to collapse
You need to download a recovery .img, and in a command prompt/terminal, run:
fastboot boot recovery <path-to-recovery.img> (obviously, if you're running fastboot from an .exe, you'll need to run fastboot.exe boot recovery <path-to-recovery.img> instead). That will send the custom recovery image to the device, load it into memory, and boot once.
abdel12345 said:
How can I root 4.3 on nexus 10 without losing data. My boot loader is locked and all the instructions need an unlocked boot loader which will delete data to do. In stuck. I had my boot loader unlocked but I licked it with bootlocker from play store before ota update and I used voodoo root keeper but obviously that failed so now I can't reunlock my boot loader and I can't get root. Any help please?
Sent from my Xperia Play (r800x)
Click to expand...
Click to collapse
Until we see another locked-bootloader tool like motochopper, you're stuck. I would try using a tool like Helium to grab your backups and then bite the bullet and do an unlock. Given the changes in Android 4.3, the recovery flash is the only known way to get full root right now.
Rirere said:
You need to download a recovery .img, and in a command prompt/terminal, run:
fastboot boot recovery <path-to-recovery.img> (obviously, if you're running fastboot from an .exe, you'll need to run fastboot.exe boot recovery <path-to-recovery.img> instead). That will send the custom recovery image to the device, load it into memory, and boot once.
Until we see another locked-bootloader tool like motochopper, you're stuck. I would try using a tool like Helium to grab your backups and then bite the bullet and do an unlock. Given the changes in Android 4.3, the recovery flash is the only known way to get full root right now.
Click to expand...
Click to collapse
Actually I was able to root without unlocking using n-crys nexus toolkit. Then from there I unlocked my bootloader using the boot unlocked app so I still have all my data
Sent from my Nexus 10 using xda app-developers app
abdel12345 said:
How can I root 4.3 on nexus 10 without losing data. My boot loader is locked and all the instructions need an unlocked boot loader which will delete data to do. In stuck. I had my boot loader unlocked but I licked it with bootlocker from play store before ota update and I used voodoo root keeper but obviously that failed so now I can't reunlock my boot loader and I can't get root. Any help please?
Sent from my Xperia Play (r800x)
Click to expand...
Click to collapse
I have locked bootloader and rooted after 4.3. (Stock recovery and everything)
How i did it was pretty easy:
- Reboot to bootloader (Either manually or "adb reboot bootloader")
- "fastboot boot recovery.img" (latest cwm recovery or whichever you prefer)
- then install latest superSU.zip (either directly from internal memory or via sideload)
- then reboot and you're done (ROM overwrites the "temporary" recovery with stock again when booting)
At least this as far as i understand it, and it works perfectly for me.
Drood said:
I have locked bootloader and rooted after 4.3. (Stock recovery and everything)
How i did it was pretty easy:
- Reboot to bootloader (Either manually or "adb reboot bootloader")
- "fastboot boot recovery.img" (latest cwm recovery or whichever you prefer)
- then install latest superSU.zip (either directly from internal memory or via sideload)
- then reboot and you're done (ROM overwrites the "temporary" recovery with stock again when booting)
At least this as far as i understand it, and it works perfectly for me.
Click to expand...
Click to collapse
Look at the post right above you and you will see I already solved it lol but thanks anyways.
Sent from my Xperia Play (r800x)
abdel12345 said:
Look at the post right above you and you will see I already solved it lol but thanks anyways.
Sent from my Xperia Play (r800x)
Click to expand...
Click to collapse
Haha, yeah true.. sorry about that My eyes aren't what they used to be i guess.. hehe
because we all don't won't someones toolkit...
abdel12345 said:
Look at the post right above you and you will see I already solved it lol but thanks anyways.
Sent from my Xperia Play (r800x)
Click to expand...
Click to collapse
I'm actually really glad drood posted his method as it doesn't rely on any so called toolkits written by anybody and explains how to just do it with adb and booting one time into a custom recovery. I too am in this same position and have always used chainfires root-keeper to get root back after doing an upgrade.
I've always thought it was pretty cool having bootloader locked, stock recovery, always getting all the OTA's directly and having ROOT! :victory:
Drood said:
I have locked bootloader and rooted after 4.3. (Stock recovery and everything)
How i did it was pretty easy:
- Reboot to bootloader (Either manually or "adb reboot bootloader")
- "fastboot boot recovery.img" (latest cwm recovery or whichever you prefer)
- then install latest superSU.zip (either directly from internal memory or via sideload)
- then reboot and you're done (ROM overwrites the "temporary" recovery with stock again when booting)
At least this as far as i understand it, and it works perfectly for me.
Click to expand...
Click to collapse
fastboot boot recovery.img no longer works on the Nexus 4 because of a change in 4.3. I assume it no longer works on the Nexus 10 also. The new command for the Nexus 4 is fastboot -c "lge.kcal=0|0|0|x" boot recovery.img. I don't know if the same string works on the Nexus 10 or not. Replace recovery.img with the name of the recovery image you want to boot to.
xda6969 said:
fastboot boot recovery.img no longer works on the Nexus 4 because of a change in 4.3. I assume it no longer works on the Nexus 10 also. The new command for the Nexus 4 is fastboot -c "lge.kcal=0|0|0|x" boot recovery.img. I don't know if the same string works on the Nexus 10 or not. Replace recovery.img with the name of the recovery image you want to boot to.
Click to expand...
Click to collapse
Fastboot boot recovery.img worked fine on my N10.
Sent from my Nexus 10 using xda app-developers app
On my N10 when supposed to reboot to recovery is just power down?
Drood said:
I have locked bootloader and rooted after 4.3. (Stock recovery and everything)
How i did it was pretty easy:
- Reboot to bootloader (Either manually or "adb reboot bootloader")
- "fastboot boot recovery.img" (latest cwm recovery or whichever you prefer)
- then install latest superSU.zip (either directly from internal memory or via sideload)
- then reboot and you're done (ROM overwrites the "temporary" recovery with stock again when booting)
At least this as far as i understand it, and it works perfectly for me.
Click to expand...
Click to collapse
The above method worked for me too. :good: No issues with fastboot as descrived above on my nexus 10 with locked bootloader. No data lost. :laugh:
Thank you.
help
PuroKaibil said:
The above method worked for me too. :good: No issues with fastboot as descrived above on my nexus 10 with locked bootloader. No data lost. :laugh:
Thank you.
Click to expand...
Click to collapse
I must be missing something , but I get the following error when i try and boot the recovery,
./fastboot boot openrecovery-twrp-2.6.0.0-mako.img
downloading 'boot.img'...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.010s
Yes my boot loader is locked and im all stocked, but it seems others can do this so im more sure what I'm doing wrong, or have I missed something any help would be great thanks
G/
Nexus 4 & 7 running 4.3 both were rooted, but lost during OTA
Nexus 10 update
Reading through this thread I started to wonder something.
My nexus 10 already downloaded the update to 4.3 and wants to install it.
My nexus 10 is unlocked and rooted, what's the best way to install the update?
I get the feeling the OP installed the update without locking and unrooting, is that okay to do? Or may that cause complications?
Tangonaf said:
Reading through this thread I started to wonder something.
My nexus 10 already downloaded the update to 4.3 and wants to install it.
My nexus 10 is unlocked and rooted, what's the best way to install the update?
I get the feeling the OP installed the update without locking and unrooting, is that okay to do? Or may that cause complications?
Click to expand...
Click to collapse
I'm pretty sure you can just go ahead and install the update.
You will loose root though, but can easily re-root using the earlier mentioned method.
---------- Post added at 04:35 PM ---------- Previous post was at 04:29 PM ----------
gymmy said:
I must be missing something , but I get the following error when i try and boot the recovery,
./fastboot boot openrecovery-twrp-2.6.0.0-mako.img
downloading 'boot.img'...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.010s
Yes my boot loader is locked and im all stocked, but it seems others can do this so im more sure what I'm doing wrong, or have I missed something any help would be great thanks
G/
Nexus 4 & 7 running 4.3 both were rooted, but lost during OTA
Click to expand...
Click to collapse
I'm far from an expert here, and have never seen that error, but maybe try cwm recovery instead of twrp could be worth a try?
And, downloading the latest adb/fastboot, if you haven't already?
Just brainstorming here =)

[Q] Recover from 4.4 update problem?

My Nexus 7 (2012-wifi) was running 4.4 rooted with CWM. I flashed the 4.4 update zip from recovery which failed late in the flash.
Did it fail because I forgot to unroot before I flashed the update?
At any rate even though the flash failed I also flashed SuperSu in case the update was good enough.
It wasn't, when I boot I get rotating/expanding/contracting colored balls forever.
Is there some way for me to recover from this without wiping the device? I was over confident and didn't do an external backup.
I don't know how to help you fix the problemm but it definitely didn't fail because you were rooted. I was rooted too and all it did was that I lost root (had to root again)
You can try wiping dalvik cache from recovery?
I got into the exact same problem as you.
I fixed it by following the steps here:
http://forum.xda-developers.com/showthread.php?t=2376978
It basically flashes back your 4.3 firmware. Just one thing to note though, DO NOT flash the userdata, YOU MUST SKIP THIS STEP unless you want to lose your files.
Tehloy said:
I got into the exact same problem as you.
I fixed it by following the steps here:
http://forum.xda-developers.com/showthread.php?t=2376978
It basically flashes back your 4.3 firmware. Just one thing to note though, DO NOT flash the userdata, YOU MUST SKIP THIS STEP unless you want to lose your files.
Click to expand...
Click to collapse
I had a look at this. One thing I'm wondering is, doI really need to update the boot loader as in the instructions, or can I go directly to the fastboot flash of the system and boot img?
kmandel said:
I had a look at this. One thing I'm wondering is, doI really need to update the boot loader as in the instructions, or can I go directly to the fastboot flash of the system and boot img?
Click to expand...
Click to collapse
I think you can skip flashing the bootloader. Just jump straight in to flashing the rest.
I got ready to try fastboot flash of the system img. I booted into bootloader mode and adb doesn't see the device. I then went into CWM and it does see the device from there. "adb devices" and "adb shell" work from recovery. However, "fastboot flash" just waits forever for device.
Suggestions?
kmandel said:
I got ready to try fastboot flash of the system img. I booted into bootloader mode and adb doesn't see the device. I then went into CWM and it does see the device from there. "adb devices" and "adb shell" work from recovery. However, "fastboot flash" just waits forever for device.
Suggestions?
Click to expand...
Click to collapse
Never mind, fastboot did work from the bootloader, I was just surprised that adb devices didn't see it. All is good, I'm back on 4.3 with my files intact. I'll try the 4.4 update again tonight.

[RECOVERY][YotaPhone2][Lollipop][ROOT]Modified YotaPhone 2 Stock Recovery for ROOT

YotaPhone 2 ROOT with modified stock recovery​
NOTE:
Check out the more functional TWRP recovery for YotaPhone 2.
Since not much dev work is happening on the YotaPhone 2, I though I'd kick off by publishing a recovery image that will hopefully allow you to root your YotaPhone 2 device with lollipop, and e.g. make partition backups.
First off: Disclaimer!
I am not responsible for damaged or bricked devices. If you follow instructions in this post, then YOU are making the choice to tinker with your device, and you are likely to void your warranty by doing so. You might even damage or brick your device, so ask yourself if the benefits outweigh the risks, because after proceeding you are pretty much on your own.
What is it?
It's a slightly modified stock recovery that allows to install packages signed with testkeys, plus adb root access and busybox for e.g. shell. That's it.
What can you do with it?
- adb root & shell access (e.g. to manually backup partitions or modify system files)
- install update zips signed with testkeys (e.g. SuperSU) in addition to original Yota Devices software
- root your device
What can it NOT do?
- probably can NOT install unsigned zips (must be signed by YD (like fota update zips), OR signed with standard testkeys)
- no fancy features, just boring AOSP stock recovery as included in stock firmware
- installing of apks/zips only through adb sideload, not from (emulated) SD card
What do you need?
- YotaPhone 2 (YD201) with Lollipop 5.0, I used firmware 1.39 YMMV with other versions
- Some technical confidence
- USB cable with a PC or laptop on one end
Steps overview:
1) First read the whole post to understand what's going to happen
2) backup (sync stuff, copy photos off, use a backup app etc, use search if unsure how to)
3) Unlock the bootloader
4) Install adb and fastboot if not yet installed. (For Windows look e.g. here, for linux the fastest is probably to install Android SDK with platform tools, see here If this is not enough info to get you started, please use xda search!)
5) Download recovery image: yd201_reco_139_testkeys_v01.img
6) boot the recovery image
7) root the device by sideloading SuperSU,
Unlocking bootloader:
Warning 1: It is currently not known how to re-lock the bootloader. (fastboot oem lock just hangs). This means you cannot completely undo the next step as of yet. This might have consequences for sending the device in for repairs, if they check for this, and deem it a (warranty) problem.
Warning 2: on some devices unlocking the bootloader wipes the device clean to factory defaults. I didn't see this happening on my YD201, but be warned, backup first!
On Linux:
Code:
sdk/platform-tools$ sudo ./fastboot oem unlock
...
OKAY [ 0.002s]
finished. total time: 0.002s
On Windows:
Code:
C:\android-sdk-windows\platform-tools>fastboot oem unlock
...
OKAY [ 0.002s]
finished. total time: 0.002s
Maybe Windows will install some extra drivers in the process.
BOOT the recovery image:
a) First: put the device in fastboot/download mode:
method 1: Power off with USB cable disconnected, then hold volume down key while inserting USB cable (which should already be in your PC on the other end).
method 2: do a
Code:
adb reboot bootloader
You should see a black screen with a tiny white: downloading...
b) boot the recovery image:
On linux:
Code:
sdk/platform-tools$ sudo ./fastboot devices
Should show a connected device in fastboot mode, then proceed:
Code:
sdk/platform-tools$ sudo ./fastboot boot <path>/<to>/yd201_reco_139_testkeys_v01.img
Where <path>/<to>/yd201_reco_139_testkeys_v01.img is the path you downloaded the image file to (e.g. ~/Download/yd201_reco_139_testkeys_v01.img)
On Windows:
copy the yd201_reco_139_testkeys_v01.img file to the folder with fastboot.exe (here assuming C:\android-sdk-windows\platform-tools, and D:\downloads as download location for the img)
* snippet below is fabricated, but you get the idea
Code:
D:\>C:
C:\>cd C:\android-sdk-windows\platform-tools
C:\android-sdk-windows\platform-tools>fastboot.exe devices
Should show a connected device in fastboot mode, then proceed:
Code:
C:\android-sdk-windows\platform-tools>copy D:\downloads\yd201_reco_139_testkeys_v01.img . [i]note the dot at the end[/i
C:\android-sdk-windows\platform-tools>fastboot.exe boot yd201_reco_139_testkeys_v01.img
Hopefully you see the screen go completely black after a few seconds, and recovery menu will appear. Like stock recovery, it will show an error (E:Cannot load volume /misc) but you can ignore that, along with the 'error' triangle icon that goes with it.
If booting fails with a signature error, the bootloader is probably not properly unlocked, try again.
Note that this recovery image could be flashed too (I haven't actually tried to flash yet), but if you're cautious (as we are in this post) you can just boot it every time you need it.
SuperSU flashing:
1) download Chainfire's SuperSU flashable zip from this page, filename is:UPDATE-SuperSU-v2.46.zip
2) Assuming you're still in custom recovery, otherwise boot into custom recovery again as outlined above
3) choose "apply update from ADB" from the menu (choose with volume up/down keys, confirm with power key). Recovery now waits for a file.
4) on the connected PC:
on Linux:
Code:
sdk/platform-tools$ adb sideload <path>/<to>/UPDATE-SuperSU-v2.46.zip
on Windows:
Code:
D:\>C:
C:\>cd C:\android-sdk-windows\platform-tools
C:\android-sdk-windows\platform-tools>copy D:\downloads\UPDATE-SuperSU-v2.46.zip .
C:\android-sdk-windows\platform-tools>adb.exe sideload UPDATE-SuperSU-v2.46.zip
5) on the phone you should see SuperSU installing.
6) reboot when done
7) if SuperSU app is not visible in launcher, download & install SuperSU from playstore.
To verify if rooting worked, start SuperSU. If that looks OK, start an app that requires root (like e.g. betterbatterystats) or use a simple checkroot app from the store. Reboot and check again if it persisted.
NOTE: you could also FLASH this image, replacing the stock recovery on the recovery partition permanently (until you flash again). Above we're just BOOTing it once, next time entering recovery in the standard way will just load the stock recovery from the recovery partition). You would use fastboot flash instead of fastboot boot above. Flashing is UNTESTED.
Problems & FAQ
Q: It doesn't work!!1!
A: Please provide plenty of detail about error messages, which step, what versions etc. Without providing any detail you'll look silly.
Q: I don't know how to <backup/adb/download/reboot/flash>
A: Please use the search button, xda forums have lots of info
Q: How can I tell if I'm in stock recovery or modded stock recovery? They look the same!
A: The Droid error icon with the triangle in the centre of the modded recovery screen has some white text (yd201_cr0.1), the stock one doesn't.
Future development
I hope that there are some devs out there willing to work on the YotaPhone 2 in the near future. I'll try to tinker a bit every now and then, but I cannot promise anything as I'm no expert. To enable proper development of custom ROMs and better recoveries (e.g. TWRP) it would be great if Yota Devices released their Kernel sourcecode for the kernel they use in their YotaPhone 2 ROMs. I know they have been asked to release sources before (and they should in order to comply with the GPL license), but so far without response.
Good news is that You Can Help! Please stimulate Yota to publish Kernel sourcecode for YotaPhone 2 through their support page (hint: choose 'sales' as category, otherwise you'll have to enter lots of details. Be polite!).
Info::
Mod by: SteadyQuad
Version: 0.1 based on YD stock recovery 5.0 1.39 EU
Thanks to: Yota Devices for a great device, Jeopardy for testing and suggestions, Chainfire for SuperSU
Created: 2015-06-10
Last Updated: 2015-06-20 (added warning about current inability to re-lock bootloader)
As SteadyQuad already mentioned, I can confirm that this method works.
Bye bye Google Newsstand! Goodbye Google Books!
(When uninstalling system apps Lollipop handles a bit differently from Kitkat, and I had to always restart the device after deleting.)
Thank you very much for your effort SteadyQuad.
Allelujah!
Thanks SteadyQuad for this great job! It works like a charm!
:good:
Anybody tried to install xposed module on rooted Yotaphone2? (alpha 4 modules)?
I think it little bit risky that's why I'm asking...
Or maybe somebody know how to make a full backup Yotaphone (like in CWM)?
Thanks in advance again for a really great job!
zencooler said:
Allelujah!
Thanks SteadyQuad for this great job! It works like a charm!
:good:
Anybody tried to install xposed module on rooted Yotaphone2? (alpha 4 modules)?
I think it little bit risky that's why I'm asking...
Or maybe somebody know how to make a full backup Yotaphone (like in CWM)?
Thanks in advance again for a really great job!
Click to expand...
Click to collapse
I haven't tried testing xposed yet, but am planning to sooner or later.
Running that custom recovery we do have root level access to everything, so it should be possible to create a backup from there with the help of a computer. Have to look into this.
the recovery download doesn't work.
EDIT : it worked on laptop
How about somebody can compile a TWRP recovery because Yotaphone has posted there SDK ?
So we can make Nandroid backup.
a question : if you can modify stock recovery,
can't you compile from TWRP source and yotaphone SDK a TWRP recovery for the yotaphone 2 users ?
just my 2 cents, i evenly willing to pay for it
Gojira-r32 said:
a question : if you can modify stock recovery,
can't you compile from TWRP source and yotaphone SDK a TWRP recovery for the yotaphone 2 users ?
just my 2 cents, i evenly willing to pay for it
Click to expand...
Click to collapse
I think if we all contribute to twrp and request them they might make us one
Sent from my YD201 using Tapatalk
Can the bootloader be re locked And can the root be removed for warranty purposes
Sent from my YD201 using Tapatalk
Yes
Fastboot oem lock
Gojira-r32 said:
Yes
Fastboot oem lock
Click to expand...
Click to collapse
If the recovery image is modified don't we flash back to stock before oem lock
Sent from my YD201 using Tapatalk
Good work. A pity Xposed framework isn't compatible yet.
Sent from my YD201 using XDA Free mobile app
dai75 said:
Good work. A pity Xposed framework isn't compatible yet.
Sent from my YD201 using XDA Free mobile app
Click to expand...
Click to collapse
Xposed framework isn't FULLY compatible, but many features already work. See SteadyQuad's thread here
adamo86 said:
Can the bootloader be re locked And can the root be removed for warranty purposes
Sent from my YD201 using Tapatalk
Click to expand...
Click to collapse
I haven't been able to re-lock it when I last tried (fastboot oem lock just hung). If anyone did succeed to lock, let us know! (Gojira-r32: did you actually execute the fastboot oem lock?)
I also failed to lock it back . I wanted to install the new update 1.44 that arrive in France but it failed at the recovery stage. E:Error in cache/update/yota....zip (status 7)
I did a wipe cache partition but not a wipe data as I don't want to lose all my settings. Anyone achieved to install the new Yota update version? And then root?
I just updated to latest update in UK. But I tried Kingo no success still.
Sent from my YD201 using Tapatalk
and the first post with flashing S%U tru modified recovery ?
is this firmware somewhere to download?
still not yet on yota FTP
Has anyone the stock recovery image? Maybe I'll achieve to get the OTA update after unrooting my YD201 with the original stock recovery firmware.
i am doing that right now, unroot, flash stock recovery, i have the OTA 1.1.44 pulled out of phone after download and will try to flash it
stock recovery, boot, sustem img, unrooted, everything tried
also got other build, fixed that.
now yotaphone is completly stock and get :
error in update zip "status 7"
so i think this update is no good, some faults in it, that's why we can't flash it yet, also chaged some things in OTA and resigned it etc... no good
Gojira-r32 said:
stock recovery, boot, sustem img, unrooted, everything tried
also got other build, fixed that.
now yotaphone is completly stock and get :
error in update zip "status 7"
so i think this update is no good, some faults in it, that's why we can't flash it yet, also chaged some things in OTA and resigned it etc... no good
Click to expand...
Click to collapse
Did you try to flash the OTA update via adb sideload in the modified recovery? I'm having the same problem.
Edit: I just tried to flash the update via adb sideload - no joy. I got the following error:
Package expects build fingerprint of YotaPhone/yotaphone2/yotaphone2:5.0/LRX21M/5.0.0-EU1.1.39:user/release-keys or Yotaphone/yotaphone2/yotaphone2:5.0/LRX21M/5.0.0-EU1.1.44:user/release-keys; this device has Yotaphone/yotaphone2/yotaphone:5.0/LRX21M/5.0
E:Error in /sideload/package.zip
(Status 7)
I also tried resigning the package with testkeys, but that didn't work either. Same error. So something has changed in the rooting process, because some people in the forum have managed to update normally, presumably on their nonrooted devices.

[RECOVERY] TWRP for Onn Android Tablets (unofficial) - 2019-11-30

TWRP Custom Recovery for the Onn Android Tablet series​
This is the first fully-featured custom recovery for Walmart's MediaTek-based Onn tablets: ONA19TB002, ONA19TB003 and ONA19TB007. TWRP needs no introduction. If you have come here, you probably have some idea of what it is and what it's used for. This TWRP build does not need the bootloader unlocked or VBMeta verification disabled, although it's recommended that you at least unlock the bootloader.
DISCLAIMER
Everything described in this thread is done at your own risk. No one else will be responsible for any data loss, corruption or damage of your device, including that which results from bugs in this software.
FEATURES
Decrypted data partition
All USB modes functional: MTP, ADB, Mass Storage, OTG, Charging
Fast boot time
Adoptable storage mounting
Firmware image backup and restore
Works under locked bootloader
Android 9 build fits within the 16MB recovery partition -- no compromises or partition resizing necessary
INSTALLATION METHOD 1
Download the recovery to your PC and unzip the image
Unlock the bootloader (skip if you have already done this)
Enable OEM Unlock in Developer Options in Android Settings
Boot into fastboot mode either by holding vol. up+power to power it on and selecting "Fastboot mode", or by running the 'adb reboot bootloader' command from within Android.
Install fastboot and appropriate drivers on your PC if you have not set those up
Unlock the bootloader with the command
Code:
fastboot flashing unlock
...and follow the instructions on the screen. This will wipe your data.
Flash the custom recovery with
Code:
fastboot flash recovery twrp-3.3.1-ONA19TB002.img
(use the right file name path for your device)
Reboot to recovery with
Code:
fastboot oem reboot-recovery
INSTALLATION METHOD 2
This assumes you are familiar with SP Flash Tool or can figure it out on your own
Download the recovery to your PC and unzip the image
Get the appropriate scatter file for your device. The scatter file may be found in the device's firmware under /system/data/misc.
Set up SPFT Download tab as Download Only. Load your scatter file.
Under the recovery line, double-click Location and open your TWRP image.
Click Download and connect your powered-off tablet to your PC. SPFT will automatically flash the recovery to the emmc and disconnect when finished.
INSTALLATION METHOD 3
Head over to Amazing Temp Root for MediaTek ARMv8, read the requirements and directions, and grab the latest mtk-su.
Open a root shell with mtk-su
Flash the (unzipped) recovery with the command:
Code:
dd bs=1048576 if=twrp-3.3.1-0-ONA19TB002.img of=/dev/block/by-name/recovery
(replace the if= file name with your appropriate recovery image path)
Exit root shell
START RECOVERY
Three methods:
On a powered off tablet, hold Vol. up+power for about 3 seconds. In the menu that appears, select "Recovery mode"
With Android ADB, use the command 'adb reboot recovery'
From Android root shell, use the command 'reboot recovery' or just use any root app with OS reboot features
NOTES
Kind of important: Make a backup of your Crypto Footer as soon as you can. This is the encryption key to your data partition. When accessed from TWRP, this key can get "upgraded" so that you will get locked out of Android. TWRP uses a hacky workaround that saves and restores the original footer on every /data decrypt. But that method is not what I would call 100% reliable.
Make sure you have a backup of the untouched stock system and vendor images. There are no official firmware packages available to download.
Only mount system/vendor partitions in read/write mode if you have unlocked the bootloader. It is recommended to choose to leave system read-only at the startup prompt unless you have a specific reason to modify it. If the bootloader is locked, then dm-verity is enforced.* So merely mounting it once in r/w will cause a boot loop.
It's currently not possible to install incremental OTA updates using this TWRP. Use the stock recovery to update the FW. That will only work if you have never mounted system/vendor in write mode.
DOWNLOAD (Nov. 30, 2019)
Current version: 3.3.1-1
ONA19TB002 - Onn 8" model
ONA19TB003 - Onn 10.1" model
ONA19TB007 - Onn 10.1" w/keyboard model
Source code
ONA19TB002 | ONA19TB003 | ONA19TB007
ACKNOWLEDGEMENTS
The team behind TWRP & OmniROM
@tek3195 for testing and feedback on the 8" model
Please post feedback since these are still pretty new and not exhaustively tested. Let me know if I should port it to other models in the series.
Reserved also
grabbing this one too cuz why not
Very nice! I'll download and test the 003 one soon.
I also have a 007 model to experiment with.
I tried about a dozen times to build TWRP and failed miserably LOL. Closest I got was one that would boot but the rotation was all messed up, USB wouldn't work, didn't mount some partitions... Yeah, it was a hot mess.
Do you happen to have sources available?
Hi @NFSP G35,
I'll have the source code soon. Most of the tricks involved patching bootable/recovery. So I need to commit those changes and include the proper patch set from my tree....
Amazing!! Gonna install and test 8" right now.
Has anyone tried a GSI on these tablets yet?
MishaalRahman said:
Has anyone tried a GSI on these tablets yet?
Click to expand...
Click to collapse
I do know @tek3195 , the Onn 8 thread starter, has tried many of them as well as others here, somewhere on that thread he listed his tests and opinion of several of them.
I'm pretty sure others on that thread have also tried GSI's.
MishaalRahman said:
Has anyone tried a GSI on these tablets yet?
Click to expand...
Click to collapse
I did try both Phhuson vanilla and also Liquid Remix (I'm keeping this one for now). I didn't flash them through twrp, but using fastboot via bootloader.
WoW! AwEsOmE! I cannot wait to try this! THANK YOU!!!!!!
Hey,
This is a neat thing to see for the Onn tablets. I have a question though. I own a device based on the mt8163, and am trying to help people with another device I don't own (the powkiddy x18 which also uses the mt8163). One of the things I wanted to do was to make a custom rom for the x18, since it's stock firmware is horrible. And of course, one of the first steps to custom roms is twrp. So I have a question for you that I hope you can answer for me. How did you make this build of twrp? I have seen no device trees for this device so I was kinda curious. If you can help me in any way, I'd be so grateful, and I'm sure the other people with the x18 would be grateful for help.
@diplomatic
Is there a different procedure for installing TWRP on a locked bootloader?
I can confirm that using SP Flash to load your TWRP.img will produce a bootloop when installing to a device with the BL locked. Reflashing the original recovery.img makes the problem go away. You mentioned in the OP that this TWRP will work on a locked BL so I thought I would share my case study with you in following the procedure you defined.
MY SINCERE GRATITUDE FOR YOUR EFFORTS IN PORTING THIS TO THE ONN!
You're welcome, @Spatry.... Can you describe how you ended up with a locked BL? Was it unlocked before? Have you ever tweaked vbmeta? Also, when you say bootloop, do you mean for Android or just for recovery? I'm not going to insist that it works under locked BL. I tested it once and it did boot up...
diplomatic said:
You're welcome, @Spatry.... Can you describe how you ended up with a locked BL? Was it unlocked before? Have you ever tweaked vbmeta? Also, when you say bootloop, do you mean for Android or just for recovery? I'm not going to insist that it works under locked BL. I tested it once and it did boot up...
Click to expand...
Click to collapse
Presently, I am running stock with Magisk patched BOOT on locked bootloader, stock vbmeta. The boot loop was at the ONN Android screen, I could not get it to even boot into recovery.
At one time I did run with the bootloader unlocked (with --disable-verification on stock vbmeta) and I ran Phusson's AOSP, Liquid Remix and Bliss. I found there was no benefit to me in running the other mods so I reverted back to stock courtesy of @CaffeinePizza and the bootloader re-locked to get rid of that annoying 5 second orange state.
In each instance, I always used SP Flash tools to load all .img files. I only used fastboot to install magisk_patched.img onto the stock installation. Unlocking the bootloader erases all data and I did not feel like reinstalling everything again, so I figured I would try to install TWRP per your instruction to see if it would work while the BL was still locked... Restoring the original recovery got rid of the bootloop. I do want to try your TWRP so I will try it with BL unlocked when I get some free time to do so.
Spatry said:
Presently, I am running stock with Magisk patched BOOT on locked bootloader, stock vbmeta. The boot loop was at the ONN Android screen, I could not get it to even boot into recovery.
Click to expand...
Click to collapse
This sounds like you might have flashed a wrong/corrupt image to recovery. It may have to do with AVB checks rather than bootloader lock. But those conditions might be interdependent somehow so I can't tell you for sure. The fact that you are able to boot a patched image on a locked BL says it doesn't care too much about verification. I can tell you for sure that any recovery image must have avb metadata, not necessarily the required hash, for both Android and recovery to boot. Can you try to unzip the image file and flash it over again?
Hmm, the situation with the bootloader lock sounds eerily similar to the Nabi SE. The latter also had a similar implementation where there's not much in the way of locking things down, other than an (easily circumvented) SP Flash Tool signature check and different preloader keys. And here's the real kicker: the nearly-identical Fisher Price Nabi also ran on the MT8163, so it makes me wonder if it's possible to boot Pie on it, or perhaps a GSI assuming that Treble can be tacked onto it.
Also, do you have the source repo to this TWRP port of yours?
If anyone here gave me an XDA ad-free subscription, thanks a lot! I didn't get a notification of who it was. Using this site is a lot more bearable now.
diplomatic said:
If anyone here gave me an XDA ad-free subscription, thanks a lot! I didn't get a notification of who it was. Using this site is a lot more bearable now.
Click to expand...
Click to collapse
Where do I find crypto footer to backup
diplomatic said:
If anyone here gave me an XDA ad-free subscription, thanks a lot! I didn't get a notification of who it was. Using this site is a lot more bearable now.
Click to expand...
Click to collapse
Kinda cool without the ads isn't it. I know I sent one about a week ago or so. I think everybody ought to send you one, you deserve it. THANKS and AWESOME work.

Categories

Resources