Bootloop and locked bootloader, how to restore data/unlock?

Cestis

New member
Jul 16, 2018
1
0
0
Hey. I tried to install an update for MIUI on my Mi4C and ended up getting into a bootloop with locked bootloader. I've never logged in into any Mi account on the device, and MiUnlock says that I cannot unlock it (tried both methods from "[Unlock BL] Mi Devices Bootloader Unlocking FAQ: Announcement, Troubleshoot, and Tips" thread on eu.miui.com, can't post URLs).

Is there any way to access my data, or unlock my device without data loss? Thank you!
 

k23m

Senior Member
Jan 3, 2016
862
454
93
Is there any way to access my data, or unlock my device without data loss? Thank you!
Hi, it's doable, but if you were on MIUI9+ it will be difficult. Basically you have to enter the EDL mode and flash a modified ROM. On an old MIUI you enter EDL with "fastboot oem edl" but on MIUI9+ with hardware test point method - please refer to:
https://www.smartphones.how/repair/edl-mode
and
https://www.arenaflashing.com/2017/12/test-point-xiaomi-mi4c.html
Try "fastboot oem edl" anyway.

When you're in EDL follow https://forum.xda-developers.com/mi-4c/general/guide-unlocking-mi4c-bl-verification-t3336779
but since you want to preserve your data you need to modify libra_images_6.1.7... a bit. Just delete the following line from "rawprogram0.xml"

Code:
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="userdata.img" label="userdata" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="0" sparse="true" start_byte_hex="0xc4000000" start_sector="6422528"/>
Also delete the "userdata.img" file before flashing. OK?
Then run the old MIUI, backup your data and then unlock.
 
Last edited:
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