Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,807,045 Members 38,209 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
darkalex97
Old
#1  
darkalex97's Avatar
Member - OP
Thanks Meter 0
Posts: 48
Join Date: Aug 2012
Location: Napoli
Default [Q] Can i update android with root without lost anything?

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?
 
DrFredPhD
Old
#2  
Senior Member
Thanks Meter 40
Posts: 298
Join Date: Oct 2010
You won't be able to use any future OTA updates without flashing stock recovery again.
 
darkalex97
Old
#3  
darkalex97's Avatar
Member - OP
Thanks Meter 0
Posts: 48
Join Date: Aug 2012
Location: Napoli
Quote:
Originally Posted by DrFredPhD View Post
You won't be able to use any future OTA updates without flashing stock recovery again.
When i flash it i lost ant files or root access? How i can flash it?
 
meZQureshi
Old
#4  
meZQureshi's Avatar
Senior Member
Thanks Meter 26
Posts: 172
Join Date: Jan 2012
You won't lose your data or root access by Flashing Stock recovery.
 
myepicyear
Old
(Last edited by myepicyear; 28th February 2014 at 04:45 AM.)
#5  
myepicyear's Avatar
Senior Member
Thanks Meter 92
Posts: 197
Join Date: Feb 2011
Location: Tampa, FL (ugh..)
Quote:
Originally Posted by darkalex97 View Post
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.
 
darkalex97
Old
#6  
darkalex97's Avatar
Member - OP
Thanks Meter 0
Posts: 48
Join Date: Aug 2012
Location: Napoli
Quote:
Originally Posted by myepicyear View Post
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
Old
#7  
myepicyear's Avatar
Senior Member
Thanks Meter 92
Posts: 197
Join Date: Feb 2011
Location: Tampa, FL (ugh..)
Quote:
Originally Posted by darkalex97 View Post
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.
 
darkalex97
Old
(Last edited by darkalex97; 1st March 2014 at 09:13 PM.)
#8  
darkalex97's Avatar
Member - OP
Thanks Meter 0
Posts: 48
Join Date: Aug 2012
Location: Napoli
Quote:
Originally Posted by myepicyear View Post
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?
 
myepicyear
Old
#9  
myepicyear's Avatar
Senior Member
Thanks Meter 92
Posts: 197
Join Date: Feb 2011
Location: Tampa, FL (ugh..)
Quote:
Originally Posted by darkalex97 View Post
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?
Are you asking if you will lose all your files, or are you saying you that you already tried it and lost them? Userdata is where all your personal stuff resides.
 
darkalex97
Old
#10  
darkalex97's Avatar
Member - OP
Thanks Meter 0
Posts: 48
Join Date: Aug 2012
Location: Napoli
Quote:
Originally Posted by myepicyear View Post
Are you asking if you will lose all your files, or are you saying you that you already tried it and lost them? Userdata is where all your personal stuff resides.
I already have the last version of android, i'm asking for future updates (Android 4.5 (?)).

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes