[Q] Root stock 4.2.2 without lost apps & data? - Nexus 7 Q&A, Help & Troubleshooting

I have been reading through previous threads but I cannot find anything that specifically answers the question I have.
I had stock Android 4.2.1 (which was rooted) and now that it has updated to version 4.2.2 I am unrooted (even though upon boot it still displays the unlocked padlock but I assume that is something different).
So my question is, is it possible to root my current stock 4.2.2 and keep all of my apps and data? or is the only solution to wipe it all and start again if I want root access?
As a side note and to anyone who is reading this if you are currently rooted install this https://play.google.com/store/apps/details?id=org.projectvoodoo.otarootkeeper&hl=en and hopefully that should be the end of having to worry about losing root but in hindsight it is obviously to late for myself.
Thank you very much to anyone who can help me!

You didn't read enough threads.
The bootloader has been replaced, but is still unlocked.
The OTA also overwrote your custom recovery with a new stock recovery, but that's only a temporary issue - read on.
Because the new bootloader is also unlocked, that means that you can re-install a custom recovery just the same way you did it originally (with fastboot or a toolkit which also uses fastboot), but without the unlocking step (which wipes everything).
After you have a custom recovery in place you are free to do whatever you want - you could just reinstall a minimal SuperSU/Superuser overflash. This leaves everything unmolested, and you have root back.
Note that the superuser software is still on your tab; it has been temporarily disabled because the 'su' binary got its' permissions reset by the OTA install. Without doing a new over flash you could simply perform (with the custom recovery booted)
adb shell mount /system
adb shell chmod 6755 /system/xbin/su /system/bin/su
adb shell ls -l /system/xbin/su /system/bin/su
(it's one or the other of those locations depending on whether you are using SuperSU or Superuser; in any event you should see "swxs-xr-x" if you have the correct setuid/setgid permissions set)
good luck

The unlocked padlock means you're bootloader is unlocked, which is fine.
Yes it is possible, I suggest reading the stickies which explain how to do this. Basically, you'll need to flash a custom recovery via fastboot, then download a SuperSU flashable zip file (or Superuser) to flash in the custom recovery, and that's all.
Beaten by bftb0.

Thank you both very much for your responses!

Related

[Q] 4.1.2 & SuperSU Survival mode

I have N7 running 4.1.1, it's rooted (supersu) and unlocked (cwm).
I received a notification for 4.1.2, should I try enable "Survival mode" through SuperSU and let it upgrade? or do I need to load stock image (loose all of my stuff)
OTA won't successfully update if you are not running a fully stock device.
i.e stock ROM, kernel, recovery
Also bootloader should be locked and device should be unrooted.
You can backup apps using titanium backup or something similar.
a1exus said:
I have N7 running 4.1.1, it's rooted (supersu) and unlocked (cwm).
I received a notification for 4.1.2, should I try enable "Survival mode" through SuperSU and let it upgrade? or do I need to load stock image (loose all of my stuff)
Click to expand...
Click to collapse
If you have not modified the /system partition or the kernel, you will be able to run the OTA from ClockworkMod. As far as "losing root" is concerned, the issue is that the permissions get reset by the OTA update - the binary is still there. You can fix this yourself following these steps:
Download the JZO54K-from-JRO03D OTA update and copy it to your sdcard
Install the OTA update via CWM.
If it succeeds, leave the device in recovery mode and connect to the device via adb:
Code:
> adb shell
Once you've connected to the device issue the following commands:
Code:
# chown root:root /system/xbin/su
# chmod 6755 /system/xbin/su
If using Superuser, the su binary lives in /system/bin instead.
If you don't feel like learning, you could always use a toolkit :silly:
protip: dont use toolkits.
What if you have changed something?
comminus said:
If you have not modified the /system partition or the kernel, you will be able to run the OTA from ClockworkMod. As far as "losing root" is concerned, the issue is that the permissions get reset by the OTA update - the binary is still there. You can fix this yourself following these steps:
Click to expand...
Click to collapse
So I have deleted one or another pre-included apps I wasn't using. How does one do a 4.1.2 upgrade in such cases?
stickplayer said:
So I have deleted one or another pre-included apps I wasn't using. How does one do a 4.1.2 upgrade in such cases?
Click to expand...
Click to collapse
Same here. I had to use the update linked in post below.
http://forum.xda-developers.com/showpost.php?p=32752631&postcount=20

[Q] Why no su access after it's rooted?

I rooted my Nexus 7 a few days ago and was able to replace bootanimation. But now I want to replace my new version of bootanimation using Root Explorer, I found I have no super user access (the terminal prompt does not change from $ to # when I type su at the adb shell). The /system is mounted as r/o. I also have the busybox and supersu zip files on the sdcard. Can anyone please tell me what happen here and help me back to su mode? Thanks in advance!!
KJTseng said:
I rooted my Nexus 7 a few days ago and was able to replace bootanimation. But now I want to replace my new version of bootanimation using Root Explorer, I found I have no super user access (the terminal prompt does not change from $ to # when I type su at the adb shell). The /system is mounted as r/o. I also have the busybox and supersu zip files on the sdcard. Can anyone please tell me what happen here and help me back to su mode? Thanks in advance!!
Click to expand...
Click to collapse
I can't see any reason why you'd become unrooted unless you either replace the system partition (via an update or rom change or fastboot flash or whatever) or delete the binary yourself. If you didn't do either of those it could be either a problem with supersu, a problem with the binary, or a problem with your kernel. Try putting the root binary (su) back on the phone and trying again, and if that fails try using SuperUser instead of Supersu. If neither work you may need to do a factory reset and try again.
did you upgrade to 4.1.2? You must have lost root during the process. Just re-root it. I used the toolkit.
cooljais said:
did you upgrade to 4.1.2? You must have lost root during the process. Just re-root it. I used the toolkit.
Click to expand...
Click to collapse
oh, yes!!!! I just upgraded a couple of days ago from JRO03D to JZO54K. THANK YOU!!
I tried re-rooting again (w/o flashing custom recovery) after I upgrade Nexus Root Toolkit to v1.5.4 t support 4.1.2, But get stuck at the message "waiting for your device to finish booting back up." Nexus 7 is at the TWRP mode and can't get out of it. So I reboot to bootloader mode and eventually the toolkit tells me to run SuperSU and Busybox. Still doesn't work since I still don't have super user access. What shall I do next? I know there are still few more steps after the TWRP.

[Q] After rooted for a month suddenly unrooted

I rooted my Nexus 10 using the Google_Nexus_10_ToolKit_v1.3.0. When I did this I used SuperSU as my super user app.
After being successfully rooted for over a month my device is no longer rooted.
When I try to open SuperSU I get this message:
"There is no SU binary installed, and SuperSU cannot install it.
This is a problem!"
I no longer can run applications that require root access.
I tried installing Superuser and did the fix associated with that but it failed as well.
I haven't done anything to my device except for root it. Why would it all of a sudden become unrooted?
I still have the unlock icon on my boot screen.
Can anyone help?
Did you apply the 4.2.2 OTA update that came out recently? Updates will often unroot the device by removing suid from the su binary.
Easy enough to fix with an unlocked bootloader,new enough versions of Clockwork Mod recovery will check and fix it for you, or you can use adb with any of them to chmod u+s the su binary.
Edit: or use TWRP, was thinking of the Galaxy Nexus.
derobert said:
Did you apply the 4.2.2 OTA update that came out recently? Updates will often unroot the device by removing suid from the su binary.
Easy enough to fix with an unlocked bootloader,new enough versions of Clockwork Mod recovery will check and fix it for you, or you can use adb with any of them to chmod u+s the su binary.
Edit: or use TWRP, was thinking of the Galaxy Nexus.
Click to expand...
Click to collapse
Yes. I think this problem happened right after the 4.2.2 OTA update.
I am not able to get into my recovery. When I try I just get a picture of a dead alien with a red triangle.
Do you happen to know the exact adb commands to perform this? I've tried search but I could not find anything.
Thank you for your help.
Skullpuck said:
I am not able to get into my recovery. When I try I just get a picture of a dead alien with a red triangle.
Click to expand...
Click to collapse
That's stock recovery. You need to use fastboot to re-flash just your recovery.
The adb command is something like "chmod u+s /system/bin/su", from the recovery (where you'll have a root shell in adb).
Or you could just install the superuser zip file from your recovery, once you've got the recovery running again.
derobert said:
That's stock recovery. You need to use fastboot to re-flash just your recovery.
The adb command is something like "chmod u+s /system/bin/su", from the recovery (where you'll have a root shell in adb).
Or you could just install the superuser zip file from your recovery, once you've got the recovery running again.
Click to expand...
Click to collapse
I tried accessing fastboot but the Nexus Root Toolkit says I do not have a fastboot enabled device.
I tried running your command but nothing happened.
Do you have any other suggestions?
You could try installing the recovery through the Goomanager app. Once installed select menu and install recovery script.
Sent from my Nexus 10 using Tapatalk HD
this happened to me also.. but my nexus 10 is more than a month rooted.. from out of nowhere it suddenly becomes unrooted, caused by an unkown reason.. it didn't made any notification/alets or any dialog box when it suddenly becomes unrooted.. i noticed it when i used sb game hacker.. it says that the device is not rooted.. anyway i'll find a way to root it again this weekend..

[Q] Root lost with OTA update

So the title pretty much says it all. I don't need root very much. Just for fixing the bluetooth with my Nyko Playad. http://forum.xda-developers.com/showthread.php?t=2138911
Anyway I installed the OTA 4.2.2 update and then I discovered my root wasn't working anymore. I have relocked my bootloader since rooting the first time and I know that if I root again I will lose all my apps will be deleted.
Last time I rooted I use the Nexus 7 toolkit to backup my apps. But certain apps like Need for Speed most wanted didn't backup. So when I restored my backed up apps some of them never appeared again and I lost all my progress.
If I re-root how can I be sure that all my apps will be backed up completely with all their data backed up as well?
Buy the paid-version of SuperUser, and you wouldn't have this problem...
Just sayin.....
Look up carbon in the play store. It will allow you to backup user apps+ data to your PC (if you get the paid version i believe it can sync up to google drive or dropbox to name a few) if you are not rooted. That way you can keep your games positions and apps data, unlock and root, then restore via carbon.
You didn't need to re-lock the boot loader to gain root back. (But now you DO.)
For OTAs that replace the recovery partition, you really only need two steps to gain back root:
- flash a custom recovery (need unlocked boot loader for this) into the recovery partition
- restore the setuid/setgid permission bits on the "su" binary, e.g. with the custom recovery running:
Code:
adb shell mount /system
adb shell chmod 6755 /system/xbin/su /system/bin/su
Alternately (instead of the step above) you could just re-flash a SuperSU/Superuser root kit, or use a "rootkeeper" app.
Any way you slice it it's not much work.
BTW - there will certainly be more OTAs - it's a Nexus device after all.
Thank you everybody.
I will definitely be purchasing the paid version of SuperUser so that I can keep my root after OTA updates.
I'm currently using carbon to back everything up. Then I will unlock, root, and relock. I keep my bootloader locked for security.
Ota rootkeeper will work too, but yes, you will always lose root after an update. How easy you regain it is up to your configuration.

ADB Sideload SuperSU on encrpyted phone

According to the following post, I should be able to gain root on my encrypted phone.
wgspoelstra said:
Yes, decryption is broken right now. On all versions of TWRP available, that support Oxygen OS 3.x.x, decryption is non-functional.
I have a workaround for flashing zips with an encrypted phone:
Boot into recovery, flash SuperSU over ADB Sideload, reboot phone.
You now have working root. Any zips you want to flash, place them in /system/media folder.
I use Root Explorer for this. When you boot back into recovery, mount /system and navigate to /system/media folder.
This way you can still flash all zips you want without decryption.
Click to expand...
Click to collapse
But I am having issues. Most notably, ADB does not recognize my phone unless I connect while in the OS or in stock recovery. If I connect while using any custom recovery (I've tried Hybrid and a few versions of TWRP), ADB does not list my phone when I run ADB devices. It's also very wonky trying to get stock recovery back on my phone afterwards, but that's a different issue.
While attempting to flash SuperSU when using stock recovery, the command sends the file and the phone begins the "update". It runs for about a second and then I get a "Installation Failed" message on my phone's screen. I've tried many different versions of SuperSU.
My current setup is the latest OOS (3.0.2) and stock recovery. The device is encrypted. My bootloader is unlocked, but I do not have root.
Could someone please help me out here? I have to have encryption on the phone for my work, but I really want to have root as well. Being able to customize my phone is why I went with OnePlus, but it's not proving to be any better than my Samsung Galaxy S4!!! Please help!

Categories

Resources