[Q] Can i update android with root without lost anything?

Search This thread

arktay

Senior Member
Aug 21, 2012
319
170
Napoli
Hi, I have a question. Nexus 4 Stock Android 4.4.2 rooted with Nexus Root Toolkit. When i will update to android 4.5 (?) or any future android version, can i do it via OTA without lost anything? I have to unroot the device?
 

myepicyear

Senior Member
Feb 20, 2011
205
91
Tampa, FL (ugh..)
Hi, I have a question. Nexus 4 Stock Android 4.4.2 rooted with Nexus Root Toolkit. When i will update to android 4.5 (?) or any future android version, can i do it via OTA without lost anything? I have to unroot the device?

You do not have to unroot the device - however, if you can do it easily, it's never a bad idea, really. If you have SuperSU, just go the settings menu and select "Full Unroot".

Just having root access is not where the overall conflict arises in OTA updates though..

If you have removed -- not disabled, which is fine -- any system application at all, (using a file-explorer or Titanium Backup-like utility, etc..) it basically always fails... without fail, lol. If you have installed any ROMs/kernels/mods which replace or alter system binaries, you are almost certain to run into issues as well.

The stock recovery thing is debatable. I can't confirm nor deny that it's a problem. I do know that recent versions of TWRP have fixed their OTA updater script to be nearly (or even completely) compatible with Google's OTA zip packages. It appears to go through the update process exactly as Google's stock recovery image would. Just have the latest TWRP version available for your device if you're going to do it

I can tell you that personally, I have no problems updating as a root user -- because I do not modify the system partition, it's apps, or it's files - with the exception of installing SU binaries, or other small things

If you use root for simple things, you'll be fine. However, if you tinker with kernels/basebands/binaries/utilities that are beyond your level of experience, you're bound to have issues. If you must modify your device, try to learn adb/fastboot. Toolkits have their place somewhere in the community, but, procedurally, problems are not as easy to anticipate when compared to the process of manually typing commands.

Since Jellybean, vanilla Android is really solid, and I've almost consistently used stock Android since that time. I use root permission for basic apps like Terminal Emulator, ES File-Explorer, and Titanium Backup (I don't uninstall system apps with it though!). Ever since I stopped hacking my devices so deeply, the update process (not to mention the overall OS experience) is stable for me. It's definitely never a disaster anymore.

Hope some of that helps. I rambled... just a bit. :)
 
Last edited:

arktay

Senior Member
Aug 21, 2012
319
170
Napoli
You do not have to unroot the device - however, if you can do it easily, it's never a bad idea, really. If you have SuperSU, just go the settings menu and select "Full Unroot".

Just having root access is not where the overall conflict arises in OTA updates though..

If you have removed -- not disabled, which is fine -- any system application at all, (using a file-explorer or Titanium Backup-like utility, etc..) it basically always fails... without fail, lol. If you have installed any ROMs/kernels/mods which replace or alter system binaries, you are almost certain to run into issues as well.

The stock recovery thing is debatable. I can't confirm nor deny that it's a problem. I do know that recent versions of TWRP have fixed their OTA updater script to be nearly (or even completely) compatible with Google's OTA zip packages. It appears to go through the update process exactly as Google's stock recovery image would. Just have the latest TWRP version available for your device if you're going to do it

I can tell you that personally, I have no problems updating as a root user -- because I do not modify the system partition, it's apps, or it's files - with the exception of installing SU binaries, or other small things

If you use root for simple things, you'll be fine. However, if you tinker with kernels/basebands/binaries/utilities that are beyond your level of experience, you're bound to have issues. If you must modify your device, try to learn adb/fastboot. Toolkits have their place somewhere in the community, but, procedurally, problems are not as easy to anticipate when compared to the process of manually typing commands.

Since Jellybean, vanilla Android is really solid, and I've almost consistently used stock Android since that time. I use root permission for basic apps like Terminal Emulator, ES File-Explorer, and Titanium Backup (I don't uninstall system apps with it though!). Ever since I stopped hacking my devices so deeply, the update process (not to mention the overall OS experience) is stable for me. It's definitely never a disaster anymore.

Hope some of that helps. I rambled... just a bit. :)

Ok, i changed the kernel, so before an update i have to reflash stock kernel and stock recovery, do the update, and after reflash CWM recovery and the kernel?
 

myepicyear

Senior Member
Feb 20, 2011
205
91
Tampa, FL (ugh..)
Ok, i changed the kernel, so before an update i have to reflash stock kernel and stock recovery, do the update, and after reflash CWM recovery and the kernel?

Since you flashed over the stock kernel - which has likely altered the original vendor binary files by replacing or removing some of them - I would add the step of fastboot formatting (don't just wipe it) the /system partition and fastboot (re)flashing the system.img for your current android version -- it's important not to flash the newer/newest image. All important settings and user data are unaffected by rewriting the system.img, so reformatting and reflashing should return all system binaries (and any other modified files) to normal. It should correct any potential update problems that could be caused by a custom kernel.
So with that extra step in mind, here's a vague template for how I'd go about this whole procedure.

1) Do a full unroot if you can. Sometimes problems can arise, and it's easy enough to reflash a root zip right after updating anyway. If this step creates too much work for you, remember--it's not required, I'm only encouraging it for the sake of a clean and consistent system.
2) Download the factory image of your current Android version.Again, make sure you don't download the latest version - the one you want to receive an OTA update for.
3) Extract the factory image tar into a folder. Once extracted, go in that folder, and extract the zip inside ("image-occam-xxxxxx.zip") to wherever you choose. This zip contains the boot, recovery, userdata, and system images. You want boot, recovery, and system.
4a)Format/erase those partitions with:
Code:
fastboot erase boot
Code:
fastboot erase recovery
Code:
fastboot format system
4b)Flash the images from the zip you extracted in the factory image:
Code:
fastboot flash boot "boot.img"
Code:
fastboot flash recovery "recovery.img"
Code:
fastboot flash system "system.img"
5) Reboot into OS, and see if anything is broken/force closing. If not, you should be ready to accept the OTA update being offered.
6) After you successfully update, you can reflash custom kernel and recovery at your own discretion. Custom kernels will always put OTAs at risk for failure.

I can explain this stuff better later, if you still have issues. Just doing a bunch of things at once right now.
 

arktay

Senior Member
Aug 21, 2012
319
170
Napoli
Since you flashed over the stock kernel - which has likely altered the original vendor binary files by replacing or removing some of them - I would add the step of fastboot formatting (don't just wipe it) the /system partition and fastboot (re)flashing the system.img for your current android version -- it's important not to flash the newer/newest image. All important settings and user data are unaffected by rewriting the system.img, so reformatting and reflashing should return all system binaries (and any other modified files) to normal. It should correct any potential update problems that could be caused by a custom kernel.
So with that extra step in mind, here's a vague template for how I'd go about this whole procedure.

1) Do a full unroot if you can. Sometimes problems can arise, and it's easy enough to reflash a root zip right after updating anyway. If this step creates too much work for you, remember--it's not required, I'm only encouraging it for the sake of a clean and consistent system.
2) Download the factory image of your current Android version.Again, make sure you don't download the latest version - the one you want to receive an OTA update for.
3) Extract the factory image tar into a folder. Once extracted, go in that folder, and extract the zip inside ("image-occam-xxxxxx.zip") to wherever you choose. This zip contains the boot, recovery, userdata, and system images. You want boot, recovery, and system.
4a)Format/erase those partitions with:
Code:
fastboot erase boot
Code:
fastboot erase recovery
Code:
fastboot format system
4b)Flash the images from the zip you extracted in the factory image:
Code:
fastboot flash boot "boot.img"
Code:
fastboot flash recovery "recovery.img"
Code:
fastboot flash system "system.img"
5) Reboot into OS, and see if anything is broken/force closing. If not, you should be ready to accept the OTA update being offered.
6) After you successfully update, you can reflash custom kernel and recovery at your own discretion. Custom kernels will always put OTAs at risk for failure.

I can explain this stuff better later, if you still have issues. Just doing a bunch of things at once right now.

Ok, thanks =) I'll remembeber this guide for future updates :3 But, when i erase boot, recovery and format system i lost all my file, like a wipe data/ factory reset by the CWM?
 
Last edited:

myepicyear

Senior Member
Feb 20, 2011
205
91
Tampa, FL (ugh..)
I already have the last version of android, i'm asking for future updates (Android 4.5 (?)).

Okay, then yes - recovery, boot and system can all be safely fastboot erased. A custom recovery might do these things differently, so always verify what it will be wiping/formatting.
If you're in fastboot, the thing you never want to do is wipe/format the userdata partition. That's where everything important is. Everything else is basically replaceable.
 

arktay

Senior Member
Aug 21, 2012
319
170
Napoli
Okay, then yes - recovery, boot and system can all be safely fastboot erased. A custom recovery might do these things differently, so always verify what it will be wiping/formatting.
If you're in fastboot, the thing you never want to do is wipe/format the userdata partition. That's where everything important is. Everything else is basically replaceable.

Tell me if this steps are correct. I think that in a few days google will release android 4.4.3
1. Back to stock kernel (I can do this with Nexus Root Toolkit)
2. UnRoot the device (Always with NRT or via SuperSU)
3. Via Fastboot: Erase boot, Flash bot, Erase system, Flash system, Erase recovery, Flash recovery
4. Reboot
5. Root again

Doing this steps i shouldn't lose anything, sure?
 
Last edited:

RASTAVIPER

Senior Member
May 2, 2011
3,798
834
Tell me if this steps are correct. I think that in a few days google will release android 4.4.3
1. Back to stock kernel (I can do this with Nexus Root Toolkit)
2. UnRoot the device (Always with NRT or via SuperSU)
3. Via Fastboot: Erase boot, Flash bot, Erase system, Flash system, Erase recovery, Flash recovery
4. Reboot
5. Root again

Doing this steps i shouldn't lose anything, sure?

No reason to erase boot, system and recovery.
You can keep even custom recovery and just flash manually boot, system and radio.

Sent from my NookColor using Tapatalk