[GUIDE] Save User Data using MiFlash Tool by removing fastboot oem lock on batch file

Search This thread

juliankreuzph

Member
Oct 19, 2017
6
7
This is for Stock Rom users that wants to update through fastboot images (May and onwards) and save user data.

If your bootloader is unlocked and want to save user data, just use this simple trick just remove the command

fastboot %* oem lock || @ECHO "lock error" & exit /B 1 on flash_all_except_storage.bat file.

I highly recommend Notepad++ to edit the batch file.

82TjofH.png


We need to remove that command because locking the bootloader will also wipe user data on May fastboot images and onwards.

Go to your MiFlash Tool and then select the fastboot images, then select Save User Data Option from MiFlash Tool.

Flash it right away.
 
Last edited:

Gurkirat_Singh

Senior Member
Mar 25, 2015
253
24
@juliankreuzph Will this keep all the data i.e user data and storage data like in older versions of Mi Flash or only the user data i.e. system settings and delete the storage data i.e internal storage as mentioned in newer versions of Mi Flash?
 

ranjodhricky

Senior Member
Sep 21, 2013
221
30
Amritsar
i have just downgraded to oreo by removing "oem lock" line and "userdata" line from flash script when i flashed old oreo 9.5.9.0 my encryption code not not working it shows wrong pattern then i flashed oreo 9.6.8.0 then my encryption code working again. i didn't loose my data. thanks
 

pihpih95

Senior Member
Aug 23, 2016
223
18
Kuala Terengganu
No wonder my internal storage wiped when i return to stock from from los16 official just now, i do tick save user data and flashing latest stock rom ...now it cant update normally for September security patch anyone has any idea why? No root no oem unlock yet
EDIT: i had to clean flash, saving user data wont do anything good. I think i can update the system without error anymore probably..didnot yet coz using edxposed right noe
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    This is for Stock Rom users that wants to update through fastboot images (May and onwards) and save user data.

    If your bootloader is unlocked and want to save user data, just use this simple trick just remove the command

    fastboot %* oem lock || @ECHO "lock error" & exit /B 1 on flash_all_except_storage.bat file.

    I highly recommend Notepad++ to edit the batch file.

    82TjofH.png


    We need to remove that command because locking the bootloader will also wipe user data on May fastboot images and onwards.

    Go to your MiFlash Tool and then select the fastboot images, then select Save User Data Option from MiFlash Tool.

    Flash it right away.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone