[Guide] Unlocking the Mi4c Bootloader without verification by Xiaomi

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,131
0
Bekasi
I had locked my Mi-4c device (CyanogenMod 13.0, TWRP 3.0.2 installed) using firmware update from V7.5.3.0.LXKCNDE for a research purpose. Next, of course my device failed to boot :D I have a modified V7.1.6.0.LXKCNCK fastboot image without boot.img, recovery.img, persist.img, system.img, cache.img, cust.img, userdata.img, gpt_main0.bin, and gpt_backup0.bin, modified rawprogram0.xml:
HTML:
<?xml version="1.0" ?>
<data>
  <!--NOTE: This is an ** Autogenerated file **-->
  <!--NOTE: Sector size is 512bytes-->
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sbl1.mbn" label="sbl1" num_partition_sectors="4096" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x4400" start_sector="34"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sbl1.mbn" label="sbl1bak" num_partition_sectors="4096" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x204400" start_sector="4130"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="rpm.mbn" label="rpm" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x404400" start_sector="8226"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="rpm.mbn" label="rpmbak" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x504400" start_sector="10274"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="tz.mbn" label="tz" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x604400" start_sector="12322"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="tz.mbn" label="tzbak" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x704400" start_sector="14370"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="ssd" num_partition_sectors="16" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="8.0" sparse="false" start_byte_hex="0x804400" start_sector="16418"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="hyp.mbn" label="hyp" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x806400" start_sector="16434"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="hyp.mbn" label="hypbak" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x906400" start_sector="18482"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="DDR" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0xa06400" start_sector="20530"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="emmc_appsboot.mbn" label="aboot" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0xb06400" start_sector="22578"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="emmc_appsboot.mbn" label="abootbak" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0xf06400" start_sector="30770"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="misc" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0x1306400" start_sector="38962"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="BTFM.bin" label="bluetooth" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x1706400" start_sector="47154"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="pmic.mbn" label="pmic" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x1806400" start_sector="49202"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="pmic.mbn" label="pmicbak" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x1826400" start_sector="49458"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="limits" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x1846400" start_sector="49714"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="apdp" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="256.0" sparse="false" start_byte_hex="0x1846800" start_sector="49716"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="msadp" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="256.0" sparse="false" start_byte_hex="0x1886800" start_sector="50228"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="dpo" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x18c6800" start_sector="50740"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="sdi.mbn" label="sdi" num_partition_sectors="192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="96.0" sparse="false" start_byte_hex="0x18c6c00" start_sector="50742"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="keystore" num_partition_sectors="1024" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x18dec00" start_sector="50934"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="devinfo" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x195ec00" start_sector="51958"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="config" num_partition_sectors="1024" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x195f000" start_sector="51960"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="sec" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x19df000" start_sector="52984"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="logo.img" label="logo" num_partition_sectors="32768" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="16384.0" sparse="false" start_byte_hex="0x1adf000" start_sector="55032"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk1" num_partition_sectors="43272" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="21636.0" sparse="false" start_byte_hex="0x2adf000" start_sector="87800"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="modemst1" num_partition_sectors="3072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1536.0" sparse="false" start_byte_hex="0x4000000" start_sector="131072"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="modemst2" num_partition_sectors="3072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1536.0" sparse="false" start_byte_hex="0x4180000" start_sector="134144"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="fsc" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1.0" sparse="false" start_byte_hex="0x4300000" start_sector="137216"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="bk2.img" label="bk2" num_partition_sectors="59390" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="29695.0" sparse="false" start_byte_hex="0x4300400" start_sector="137218"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk3" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x6000000" start_sector="196608"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="fsg" num_partition_sectors="3072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1536.0" sparse="false" start_byte_hex="0x8000000" start_sector="262144"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk4" num_partition_sectors="62464" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="31232.0" sparse="false" start_byte_hex="0x8180000" start_sector="265216"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="bk5" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0xa000000" start_sector="327680"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="NON-HLOS.bin" label="modem" num_partition_sectors="262144" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="131072.0" sparse="false" start_byte_hex="0xc000000" start_sector="393216"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="boot" num_partition_sectors="131072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x14000000" start_sector="655360"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="recovery" num_partition_sectors="131072" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x18000000" start_sector="786432"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="persist" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="true" start_byte_hex="0x1c000000" start_sector="917504"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="oops" num_partition_sectors="65536" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x1e000000" start_sector="983040"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="system" num_partition_sectors="3932160" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="1966080.0" sparse="true" start_byte_hex="0x20000000" start_sector="1048576"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="cache" num_partition_sectors="786432" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="393216.0" sparse="true" start_byte_hex="0x98000000" start_sector="4980736"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="cust" num_partition_sectors="655360" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="327680.0" sparse="true" start_byte_hex="0xb0000000" start_sector="5767168"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" 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"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="PrimaryGPT" num_partition_sectors="34" partofsingleimage="true" physical_partition_number="0" readbackverify="false" size_in_KB="17.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
  <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="" label="BackupGPT" num_partition_sectors="33" partofsingleimage="true" physical_partition_number="0" readbackverify="false" size_in_KB="16.5" sparse="false" start_byte_hex="(512*NUM_DISK_SECTORS)-16896." start_sector="NUM_DISK_SECTORS-33."/>
</data>
Step 2, 3, 4, 5, and my CyanogenMod back without any data loss. Thanks OP :good: Now I'm thinking to create an image to directly flash TWRP in step 4.
 

vuckiez

Senior Member
Mar 12, 2014
93
18
0
Yogyakarta
I bought some days ago a Mi4c from China and got it on Wednesday. It was sealed in the box.
There was official Xiaomi Chinese ROM Miui Version 7.0.4.0 on it.

Detail ROM Info:
Android Version: 5.1.1 LMY47V
MIUI version: MIUI 7.0.4.0 (LXKCNCI)

Baseband Version: BO.2.6.c1-0917_2242_1b116f0
Kernel Version: 3.10.49-perf-gd004f33-03702-g3a9396f


It just tested some fastboot stuff:
first of all edl boot mode didnt worked

Code:
sudo fastboot oem edl
...
FAILED (remote: unknown command)
finished. total time: 0.006s
then I just tried the unlock commandor fun and it worked:
Code:
sudo fastboot oem unlock
...
OKAY [  0.010s]
finished. total time: 0.010s
Code:
sudo fastboot device info
output before unlock
Code:
sudo fastboot oem device-info
...
(bootloader) 	Device tampered: false
(bootloader) 	Device unlocked: false
(bootloader) 	Charger screen enabled: false
(bootloader) 	Display panel:
and now after unlock
Code:
sudo fastboot oem device-info
...
(bootloader) 	Device tampered: false
(bootloader) 	Device unlocked: true
(bootloader) 	Charger screen enabled: false
(bootloader) 	Display panel:

Phone Charge should be 2016.2 . Thats the date labeld on the sticker on the box.
worked well on me :D
 

Wohee

Senior Member
Jul 9, 2011
179
96
0
Oklahoma City
Just got a Mi4c in the mail. Ordered last week and came with the latest Miui V7.3.2.0.0
Seems they no longer require that you need to apply for an unlock. I did not downgrade or use MiFlash or anything else, just regular fastboot.

All I did was type the same as @ThePeKo :

Code:
C:\adb>fastboot oem unlock
...
OKAY [  0.006s]
finished. total time: 0.007s

C:\adb>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.009s]
finished. total time: 0.010s

C:\adb>fastboot flash recovery twrp-3.0.2-0-libra-20160405.img
target reported max download size of 536870912 bytes
sending 'recovery' (32516 KB)...
OKAY [  0.719s]
writing 'recovery'...
OKAY [  0.199s]
finished. total time: 0.920s

C:\adb>fastboot oem device-info
...
(bootloader)    Device tampered: false
(bootloader)    Device unlocked: true
(bootloader)    Charger screen enabled: false
(bootloader)    Display panel:
OKAY [  0.048s]
finished. total time: 0.049s
 

isaqi_veras

Member
Oct 13, 2015
34
3
0
This evening I had the same problem like many of you and I just did not want to wait 2-3 weeks for the unlock code from Xiaomi. I went through a lot of threads and different forums to create this guide.

Requirements
- ADB up and running (I am an Android developer, so I have this installed already - unsure if you need specific ADB drivers for Xiaomi devices though)
- Xiaomi MI4c ;)
- MiFlash: http://bigota.d.miui.com/tools/MiPhone20151028.exe (via http://en.miui.com/a-234.html) - Install
- Mi4c Image: libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0.tgz - unpack until "images" directory is visible!
- [Optional] Mi4c Fastboot Image: miui_MI4c_6.1.21_d1d054460d_5.1.zip
- [Optional] Latest TWRP: http://forum.xda-developers.com/mi-4c/development/libra-twrp-3-0-t3315059
- [Optional] Latest build of CM 12.1: http://forum.xda-developers.com/mi-4c/development/cm12-1-build-cyanogenmod-12-1-device-t3291631

Step-by-step

Step 1 is optional: I was not sure, if I could use the "fastboot oem edl" command in a higher version of MIUI... feedback required. Thus following is a list of known Xiaomi ROMs which support this procedure:
If you are using one of the following ROM versions, you should be able to unlock the device easily with the provided guide. However, I have messages that the versions don't work with higher MIUI ROM versions.

CONFIRMED WORKING
V7.1.4.0.LXKCNCK
V6.1.21 (Download link above)
V6.3.24
V6.3.17
6.4.21
V6.4.14

Not confirmed (?)
None

Not working
None

  1. (Optional) Downgrade your Mi4c by flashing any image from the list above via the "Updater" app (use top right icon to select image).
  2. Reboot into fastboot mode (Power + Vol Down) until you see the MIUI rabbit and "FASTBOOT"
  3. Command: fastboot oem edl (this brings your device in a kind of emergency recovery state) -> the device does only show a black screen. Do the next step.
  4. Use MiFlash to flash 6.1.7 image (Browse -> select the "images" directory of the 6.1.7 package and start flashing)
  5. When completed, reboot the phone by holding the Power button long (~8s)
  6. Wait until 6.1.7 is completely loaded (this may take a while)
  7. Reboot into fastboot mode (Power + Vol Down)
  8. Command: fastboot oem unlock -> at this point you should have an unlocked bootloader
  9. Now optionally install TWRP and subsequently CM 12.1 and enjoy (see respective linkes in the requirements for a howto) - TWRP: fastboot flash recovery <twrp>.img


With this post, I want to say thank you to all the developers who take their time to port Cyanogen to exotic Android devices. You are heroes!
when I will try to downgrade says so "can not VERIFY update package" please help
 

aoleg

Senior Member
Jan 8, 2015
221
102
0
I installed the latest weekly from xiaomi.eu immediately after receiving my phone from China. Rebooted into fastboot, "fastboot oem device-info" returned "Device unlocked: false". Issued the "fastboot oem unlock" command, after which device-info returned "Device unlocked: true".
 

kdk_warhead

Member
Nov 9, 2008
6
0
0
Thank you for this tread. I took me a very long time to unlock the Mi4C.

One thing that really made this hard was the following line:
"- Mi4c Image: libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac7 0a0.tgz - unpack until "images" directory is visible!!"
The file name after download is "libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0.tar" (.tar instead of .tgz)"
And it contains one file:
"libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0".

I found Another "libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0.tgz" file with MD5: B09DAC70A04BC2C0E02161E31D630F67
I do not know if the file has the right MD5 but it worked.
I´m not allowed to post links...

I now have a unlocked phone :)
 

fiziator

Member
Sep 1, 2011
6
0
0
This evening I had the same problem like many of you and I just did not want to wait 2-3 weeks for the unlock code from Xiaomi. I went through a lot of threads and different forums to create this guide.

Requirements
- ADB up and running (I am an Android developer, so I have this installed already - unsure if you need specific ADB drivers for Xiaomi devices though)
- Xiaomi MI4c ;)
- MiFlash: http://bigota.d.miui.com/tools/MiPhone20151028.exe (via http://en.miui.com/a-234.html) - Install
- Mi4c Image: libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0.tgz - unpack until "images" directory is visible!
- [Optional] Mi4c Fastboot Image: miui_MI4c_6.1.21_d1d054460d_5.1.zip
- [Optional] Latest TWRP: http://forum.xda-developers.com/mi-4c/development/libra-twrp-3-0-t3315059
- [Optional] Latest build of CM 12.1: http://forum.xda-developers.com/mi-4c/development/cm12-1-build-cyanogenmod-12-1-device-t3291631

Step-by-step

Step 1 is optional: I was not sure, if I could use the "fastboot oem edl" command in a higher version of MIUI... feedback required. Thus following is a list of known Xiaomi ROMs which support this procedure:
If you are using one of the following ROM versions, you should be able to unlock the device easily with the provided guide. However, I have messages that the versions don't work with higher MIUI ROM versions.

CONFIRMED WORKING
V7.1.4.0.LXKCNCK
V6.1.21 (Download link above)
V6.3.24
V6.3.17
6.4.21
V6.4.14

Not confirmed (?)
None

Not working
None

  1. (Optional) Downgrade your Mi4c by flashing any image from the list above via the "Updater" app (use top right icon to select image).
  2. Reboot into fastboot mode (Power + Vol Down) until you see the MIUI rabbit and "FASTBOOT"
  3. Command: fastboot oem edl (this brings your device in a kind of emergency recovery state) -> the device does only show a black screen. Do the next step.
  4. Use MiFlash to flash 6.1.7 image (Browse -> select the "images" directory of the 6.1.7 package and start flashing)
  5. When completed, reboot the phone by holding the Power button long (~8s)
  6. Wait until 6.1.7 is completely loaded (this may take a while)
  7. Reboot into fastboot mode (Power + Vol Down)
  8. Command: fastboot oem unlock -> at this point you should have an unlocked bootloader
  9. Now optionally install TWRP and subsequently CM 12.1 and enjoy (see respective linkes in the requirements for a howto) - TWRP: fastboot flash recovery <twrp>.img


With this post, I want to say thank you to all the developers who take their time to port Cyanogen to exotic Android devices. You are heroes!
Thank you so much !!! I was stuck because of the booltloader, I wait for xiaomi but with a different account (my bad) so I had to wait another 10 days less or more. I upgrade to the latest miui 8 version and the steps 2 - 8 worked like a charm !!! Finally succeed to unlock the bootloaders !!!! happy happy !!!! Also instaled twrp 3 so I'm very happy :) :) Now it's time to install a custom rom with unlocked bootloader lime miui eu or a CM rom :)
 

dorayakikun

Member
Apr 7, 2010
12
0
0
I've successfully install 6.1.7, but when i run fastboot oem unlock, it will always return "argc is 2".
Have anyone faced this issue before ? Any idea would be appreciated.
Thank you

Edit :
Problem solved after use another fastboot (previously i am using fastboot from MiUnlock software).
 
Last edited:

PeterMarkoff

Senior Member
Jun 9, 2014
337
163
0
wont work, it says here was an error "The filename, directory name or volume label syntax is incorrect"
make sure it's in real directory without special characters and when flashing choose main Images folder, not subfolder

---------- Post added at 01:08 PM ---------- Previous post was at 01:05 PM ----------

when I will try to downgrade says so "can not VERIFY update package" please help
that step is completely unnecessary and should be removed from guide, official Updater won't allow you to downgrade, proceed further, worked for me
 

zengraviz

Senior Member
Mar 8, 2013
135
10
0
Surabaya
make sure it's in real directory without special characters and when flashing choose main Images folder, not subfolder

---------- Post added at 01:08 PM ---------- Previous post was at 01:05 PM ----------


that step is completely unnecessary and should be removed from guide, official Updater won't allow you to downgrade, proceed further, worked for me
nevermind, i already solved the problem by moving and rename it with zimple name to c:/libra
 

YiPing_Huang

Member
Aug 5, 2014
42
13
28
Followed steps everything went well untill running miflash i get the error:
The system cannot find the file specified.(0x80070002: Open serial port "\\.\COM10" failed.)

Help please I really need unlock this so i can install custom ENGLISH ROM
I also encountered this problem.
First make sure that you have the Qualcomm driver installed.
Then when in the oem edl mode,
if you open the device manager you will see a Qualcomm device with a yellow exclamation mark,
Right click then update driver software>browse my computer for driver software,
choose the one that eliminate the exclamation mark.
 

daks60

New member
Jul 8, 2013
2
0
0
After hours spent unlocking the phone regular way (granted permission by Xiaomi) I found your article.

Before starting unlocking, Qualcomm drivers need to be installed

I`m not sure if this was an issue but I enabled debugging mode on the phone.

In MiFlash advanced settings Fastboot script is wrong.
It should point to "flash_all.bat" located in folder where "libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac7 0a0.tgz" was extracted.
Something like "..\libra_images_6.1.7_20151221.0000.11_5.1_cn\flash_all.bat "
 

walhallaDE

Member
Aug 22, 2008
17
1
0
This evening I had the same problem like many of you and I just did not want to wait 2-3 weeks for the unlock code from Xiaomi. I went through a lot of threads and different forums to create this guide.

Requirements
- ADB up and running (I am an Android developer, so I have this installed already - unsure if you need specific ADB drivers for Xiaomi devices though)
- Xiaomi MI4c ;)
- MiFlash: http://bigota.d.miui.com/tools/MiPhone20151028.exe (via http://en.miui.com/a-234.html) - Install
- Mi4c Image: libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0.tgz - unpack until "images" directory is visible!
- [Optional] Mi4c Fastboot Image: miui_MI4c_6.1.21_d1d054460d_5.1.zip
- [Optional] Latest TWRP: http://forum.xda-developers.com/mi-4c/development/libra-twrp-3-0-t3315059
- [Optional] Latest build of CM 12.1: http://forum.xda-developers.com/mi-4c/development/cm12-1-build-cyanogenmod-12-1-device-t3291631

Step-by-step

Step 1 is optional: I was not sure, if I could use the "fastboot oem edl" command in a higher version of MIUI... feedback required. Thus following is a list of known Xiaomi ROMs which support this procedure:
If you are using one of the following ROM versions, you should be able to unlock the device easily with the provided guide. However, I have messages that the versions don't work with higher MIUI ROM versions.

CONFIRMED WORKING
V7.1.4.0.LXKCNCK
V6.1.21 (Download link above)
V6.3.24
V6.3.17
6.4.21
V6.4.14

Not confirmed (?)
None

Not working
None

  1. (Optional) Downgrade your Mi4c by flashing any image from the list above via the "Updater" app (use top right icon to select image).
  2. Reboot into fastboot mode (Power + Vol Down) until you see the MIUI rabbit and "FASTBOOT"
  3. Command: fastboot oem edl (this brings your device in a kind of emergency recovery state) -> the device does only show a black screen. Do the next step.
  4. Use MiFlash to flash 6.1.7 image (Browse -> select the "images" directory of the 6.1.7 package and start flashing)
  5. When completed, reboot the phone by holding the Power button long (~8s)
  6. Wait until 6.1.7 is completely loaded (this may take a while)
  7. Reboot into fastboot mode (Power + Vol Down)
  8. Command: fastboot oem unlock -> at this point you should have an unlocked bootloader
  9. Now optionally install TWRP and subsequently CM 12.1 and enjoy (see respective linkes in the requirements for a howto) - TWRP: fastboot flash recovery <twrp>.img


With this post, I want to say thank you to all the developers who take their time to port Cyanogen to exotic Android devices. You are heroes!
Hi,
does it work for the MI5 too? Did anyone try successful to unlock without the code?

Thanks Walhalla
 
  • Like
Reactions: pixule

anas_xrt

Member
Sep 20, 2005
16
1
0
Nice post and thanks for your effort and shared. I follow your instruction and it's work like charm.

Ps. Just to shared that you need 2 time extract the libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0.tgz then you will get libra_images_6.1.7_20151221.0000.11_5.1_cn_b09dac70a0 then extract again will have full flash file structure
 

zeus1406

New member
Jan 19, 2012
1
0
0
Please Help Me!!!

Please help me!
I do to Step 3, but miflash i get the error:
Not enough storage is available to complete this operation. (0x8007000e).
PC windows 7-64bit, Mi4c using Rom Dev 6.8.11 CN :eek:
 
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