FORUMS
Remove All Ads from XDA

[GUIDE] Update stock rooted/modified rom to last 6.0 Marshmallow w/o losing your data

493 posts
Thanks Meter: 470
 
By c3k, Senior Member on 10th March 2015, 10:02 AM
Post Reply Email Thread
Requirements:
  • you need to have a pc with adb working
  • a stock firmware on your device (any)
  • unlocked bootloader
  • a working backup just in case

Pro:
  • you will not lose your data / application

Cons:
  • you will lose all system modification (root, busybox, custom kernel...)
  • you'll take all the risk of operation (I've tested on my device)

Guide:
some file names changes depending on version so please complete the {version_here} placeholder with the file you download
* prepend "sudo" on command line if you are on a Linux machine
  1. download last version for your device here (if you want to root download the zip file in the section below to speed up the operations)
  2. extract
  3. extract image-{device_here}-{version_here}.zip in the same folder (no subdir)
  4. command line* (or reboot device with vol down pressed):
    Code:
    adb reboot bootloader
  5. command line*:
    Code:
    cd {your_path_here}
  6. command line*:
    Code:
    fastboot flash bootloader bootloader-{device_here}-{version_here}.img
  7. command line*:
    Code:
    fastboot reboot-bootloader
  8. command line*:
    Code:
    fastboot flash radio radio-{device_here}-{version_here}.img
  9. command line*:
    Code:
    fastboot flash system system.img
  10. command line*:
    Code:
    fastboot flash boot boot.img
  11. ONLY IF YOU FOUND A VENDOR.IMG IN THE ZIP command line*:
    Code:
    fastboot flash vendor vendor.img
  12. command line*:
    Code:
    fastboot flash cache cache.img
  13. command line*:
    Code:
    fastboot reboot

Now you have the lastest stock image and all your data.

Change recovery (TWRP) and root:
Note that we haven't flash the stock recovery, but during every boot of an unmodified system there's a script that do that (supersu usually deactive this behavior during install).
If you had TWRP installed and the SuperSU zip on your device, at the end of the above procedure you can boot directly from bootloader to recovery and go directly to last step:
The Following 187 Users Say Thank You to c3k For This Useful Post: [ View ] Gift c3k Ad-Free
 
 
10th March 2015, 10:24 AM |#2  
turydios's Avatar
Senior Member
Flag Vigo
Thanks Meter: 125
 
More
working fine for me, all correct, thanks
cimbrum
10th March 2015, 10:26 AM |#3  
Guest
Thanks Meter: 0
 
More
Just tried with flash_all.bat. I'm getting the message "Can not generate image". How can I solve this, please?
Attached Thumbnails
Click image for larger version

Name:	cannot_generate_image.png
Views:	11182
Size:	57.8 KB
ID:	3203249  
10th March 2015, 10:41 AM |#4  
Senior Member
Thanks Meter: 24
 
More
Thank you, works like a charm!
The Following User Says Thank You to Harmveenstra For This Useful Post: [ View ] Gift Harmveenstra Ad-Free
10th March 2015, 10:44 AM |#5  
chikess's Avatar
Senior Member
Thanks Meter: 65
 
More
Same here, cant flash system
The Following User Says Thank You to chikess For This Useful Post: [ View ] Gift chikess Ad-Free
10th March 2015, 10:54 AM |#6  
c3k's Avatar
OP Senior Member
Thanks Meter: 470
 
Donate to Me
More
There's not flash-all.bat in my steps (that delete you data!), can't give help about it sorry
The Following User Says Thank You to c3k For This Useful Post: [ View ] Gift c3k Ad-Free
10th March 2015, 10:59 AM |#7  
chikess's Avatar
Senior Member
Thanks Meter: 65
 
More
i've gone your way, but i tried also the flash-all.bat with the -w switch, didnt work.
10th March 2015, 11:01 AM |#8  
mertkan's Avatar
Senior Member
Flag Istanbul
Thanks Meter: 14
 
More
Tnx mate. Helped a lot
10th March 2015, 11:39 AM |#9  
Junior Member
Thanks Meter: 3
 
More
Cant flash the system.img manually. All the other img are working. I get this error message :

Code:
target reported max download size of 1073741824 bytes
error: cannot load 'system.img'
The old system.img from lrx22c works also.
Someone know whats going on?
10th March 2015, 11:54 AM |#10  
chikess's Avatar
Senior Member
Thanks Meter: 65
 
More
Quote:
Originally Posted by Sp0KI

Cant flash the system.img manually. All the other img are working. I get this error message :

Code:
target reported max download size of 1073741824 bytes
error: cannot load 'system.img'
The old system.img from lrx22c works also.
Someone know whats going on?

I think that all who has flashed the developer preview got an broken filesystem or the partitions missmatch.

Before i used the preview the -w update flag worked well to rebuild the partitions, now it didnt work anymore, tried all factory images don to 4.4
The Following User Says Thank You to chikess For This Useful Post: [ View ] Gift chikess Ad-Free
10th March 2015, 11:57 AM |#11  
ironia.'s Avatar
Senior Member
Thanks Meter: 85
 
More
Quote:
Originally Posted by c3k

Requirements:

  • you need to have a pc with adb working
  • a stock firmware on your device (any)
  • a working backup just in case



so if i have twrp, before i have to return stock 5.0.1??

or i flash directly 5.1 over twrp?


tnx
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes