Unroot and take OTA without wipe data [Tested & Working]

Search This thread

tys0n

Senior Member
Hi. I've been rooted with Magisk ever since I got this phone but now I got tired of having to wipe everything, every time I tried to take OTA.
I've tried unroot and flash stock boot.img, but that wasn't enough to take OTA. I've tried factory reset from within settings and not even that worked.
OTA still failed at step 3.

So this is what I finally did, and it worked.
DISCLAIMER
I AM NOT RESPONSIBLE FOR ANY LOSS OF DATA. IT SHOULD WORK FINE, BUT
IF YOU HAVE INVALUABLE PICS OF YOUR KITTEN, PLEASE MAKE A BACKUP TO BE SAFE

Uninstall any substratum overlays you have installed and unroot from within Magisk Manager.
Reboot your phone.
Unpack your current firmware in the same location where you have adb/fastboot and unzip the "XT-1941-flash_No-wipe.bat" to same directory.
Boot your phone to fastboot mode, plug the cable in, open cmd and drag the "XT-1941-flash_No-wipe.bat" in to the cmd window.
It will automaticly flash all files in the firmware, without wipe. Just wait for it to finish.
Reboot and take the OTA.
After that I booted TWRP and made a backup of boot.
Booted to system, installed Magisk Manager, renamed the backup to boot.img and patched it with Magisk Manager, then flashed it in TWRP. (fastboot works too)
Now I'm updated to PPKS29.68-16-21-3 without having to go through the painfull process of backing up and restoring all data.
 

Attachments

  • XT-1941-flash_No-wipe.zip
    482 bytes · Views: 771

cz134

New member
Feb 28, 2019
2
2
Been waiting for something like this. Thanks.

Tested on XT1941-4 DEEN RETEU PPKS29.68-16-21-2, update to PPKS29.68-16-21-3
Used script and update gone past step 3 and rebooted successfully.
 

vrezaei

New member
Jun 5, 2019
2
0
Thanks for your guide. Just two questions
1. What's the right fastboot command?
fastboot flash boot_a patched_boot.img
or
fastboot flash boot_b patched_boot.img
2. There is an extra file named "system.img_sparsechunk.9" in the stock firmware PPKS29.68-16-21-2, but there is no command for flashing this file in your .bat file. Is this not important?
 
Last edited:

tys0n

Senior Member
Thanks for your guide. Just two questions
1. What's the right fastboot command?
fastboot flash boot_a patched_boot.img
or
fastboot flash boot_b patched_boot.img
2. There is an extra file named "system.img_sparsechunk.9" in the stock firmware PPKS29.68-16-21-2, but there is no command for flashing this file in your .bat file. Is this not important?
Hmm that's strange. I just had a look at the PPKS29.68-16-21-2 but I don't have any.
View attachment 4782745

For the boot you can just use fastboot flash boot patched_boot.img
It will flash the active slot if you don't specify.
 
  • Like
Reactions: vrezaei

vrezaei

New member
Jun 5, 2019
2
0
Hmm that's strange. I just had a look at the PPKS29.68-16-21-2 but I don't have any.
View attachment 4782745

For the boot you can just use fastboot flash boot patched_boot.img
It will flash the active slot if you don't specify.
Sorry about my mistake ;)
My current and planing to update build numbers are PPKS29.68-16-36-2 & 3, respectively and the first one (my current stock firmware) contains system.img_sparsechunk.9 file. So, I think I must edit your .bat file and add the appropriate command for flashing this file.
 

tys0n

Senior Member
Sorry about my mistake ;)

My current and planing to update build numbers are PPKS29.68-16-36-2 & 3, respectively and the first one (my current stock firmware) contains system.img_sparsechunk.9 file. So, I think I must edit your .bat file and add the appropriate command for flashing this file.
Oh ok. I'll take another look when I get home, but yeah, you'll have to add the additional file if there is any.

Sent from motorola one.
 
Jan 17, 2014
13
0
Hi. I've been rooted with Magisk ever since I got this phone but now I got tired of having to wipe everything, every time I tried to take OTA.
I've tried unroot and flash stock boot.img, but that wasn't enough to take OTA. I've tried factory reset from within settings and not even that worked.
OTA still failed at step 3.

So this is what I finally did, and it worked.
DISCLAIMER
I AM NOT RESPONSIBLE FOR ANY LOSS OF DATA. IT SHOULD WORK FINE, BUT
IF YOU HAVE INVALUABLE PICS OF YOUR KITTEN, PLEASE MAKE A BACKUP TO BE SAFE

Uninstall any substratum overlays you have installed and unroot from within Magisk Manager.
Reboot your phone.
Unpack your current firmware in the same location where you have adb/fastboot and unzip the "XT-1941-flash_No-wipe.bat" to same directory.
Boot your phone to fastboot mode, plug the cable in, open cmd and drag the "XT-1941-flash_No-wipe.bat" in to the cmd window.
It will automaticly flash all files in the firmware, without wipe. Just wait for it to finish.
Reboot and take the OTA.
After that I booted TWRP and made a backup of boot.
Booted to system, installed Magisk Manager, renamed the backup to boot.img and patched it with Magisk Manager, then flashed it in TWRP. (fastboot works too)
Now I'm updated to PPKS29.68-16-21-3 without having to go through the painfull process of backing up and restoring all data.

I am new to this, could you please give us step by step process or a video will help, Thanks for the efforts
 
Thanks tys0n for sharing this! I've updated a few times using this way.
But from time to time Motorola is changing files or commands and I had allways to check, if the commands in the bat file match those of the servicefile.xml and to adapt it accordingly.
First I thought about to write a small 'servicefile2bat' converter tool - but since almost everything already exists, I did a search and found this one:
https://sourceforge.net/projects/flashfile2batchfile/
I've tested it with today's update to DEEN_QPKS30.54_22_7 and it works perfectly.
 
  • Like
Reactions: cesartorres

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Hi. I've been rooted with Magisk ever since I got this phone but now I got tired of having to wipe everything, every time I tried to take OTA.
    I've tried unroot and flash stock boot.img, but that wasn't enough to take OTA. I've tried factory reset from within settings and not even that worked.
    OTA still failed at step 3.

    So this is what I finally did, and it worked.
    DISCLAIMER
    I AM NOT RESPONSIBLE FOR ANY LOSS OF DATA. IT SHOULD WORK FINE, BUT
    IF YOU HAVE INVALUABLE PICS OF YOUR KITTEN, PLEASE MAKE A BACKUP TO BE SAFE

    Uninstall any substratum overlays you have installed and unroot from within Magisk Manager.
    Reboot your phone.
    Unpack your current firmware in the same location where you have adb/fastboot and unzip the "XT-1941-flash_No-wipe.bat" to same directory.
    Boot your phone to fastboot mode, plug the cable in, open cmd and drag the "XT-1941-flash_No-wipe.bat" in to the cmd window.
    It will automaticly flash all files in the firmware, without wipe. Just wait for it to finish.
    Reboot and take the OTA.
    After that I booted TWRP and made a backup of boot.
    Booted to system, installed Magisk Manager, renamed the backup to boot.img and patched it with Magisk Manager, then flashed it in TWRP. (fastboot works too)
    Now I'm updated to PPKS29.68-16-21-3 without having to go through the painfull process of backing up and restoring all data.
    2
    Been waiting for something like this. Thanks.

    Tested on XT1941-4 DEEN RETEU PPKS29.68-16-21-2, update to PPKS29.68-16-21-3
    Used script and update gone past step 3 and rebooted successfully.
    1
    Thanks for your guide. Just two questions
    1. What's the right fastboot command?
    fastboot flash boot_a patched_boot.img
    or
    fastboot flash boot_b patched_boot.img
    2. There is an extra file named "system.img_sparsechunk.9" in the stock firmware PPKS29.68-16-21-2, but there is no command for flashing this file in your .bat file. Is this not important?
    Hmm that's strange. I just had a look at the PPKS29.68-16-21-2 but I don't have any.
    View attachment 4782745

    For the boot you can just use fastboot flash boot patched_boot.img
    It will flash the active slot if you don't specify.
    1
    Thanks tys0n for sharing this! I've updated a few times using this way.
    But from time to time Motorola is changing files or commands and I had allways to check, if the commands in the bat file match those of the servicefile.xml and to adapt it accordingly.
    First I thought about to write a small 'servicefile2bat' converter tool - but since almost everything already exists, I did a search and found this one:
    https://sourceforge.net/projects/flashfile2batchfile/
    I've tested it with today's update to DEEN_QPKS30.54_22_7 and it works perfectly.