[SOLVED] Mi flash error (Length cannot be less than zero)

pourya_fa

Member
Jan 13, 2014
34
1
0
Hi everyone;

I'm on MIUI11 hybridOS now, and want to get back to the stock rom.

My bootloader is unlocked (by "fastboot oem unlock" command), the drivers are installed on my PC, I'm using mi flash tool 20191206 (i think it's the latest version), i copied mi flash on drive C, and there is no space in the directory of the rom, and i run mi flash as administrator;

but when i connect my phone (in the bootloader mode) to the computer, mi flash doesn't detect it and shows the error "Length cannot be less than zero. Parameter name: length"

Even i tried EDL mode, when in fastboot mode typed "fastboot oem edl", but after that the phone turns off and led light blinks and nothing happens and PC doesn't detect the phone, then i have to restart it by holding the power button.

Could anyone help me?

Thank you
 
Last edited:

pourya_fa

Member
Jan 13, 2014
34
1
0
Hi everyone;

I'm on MIUI11 hybridOS now, and want to get back to the stock rom.

My bootloader is unlocked (by "fastboot oem unlock" command), the drivers are installed on my PC, I'm using mi flash tool 20191206 (i think it's the latest version), i copied mi flash on drive C, and there is no space in the directory of the rom, and i run mi flash as administrator;

but when i connect my phone (in the bootloader mode) to the computer, mi flash doesn't detect it and shows the error "Length cannot be less than zero. Parameter name: length"

Even i tried EDL mode, when in fastboot mode typed "fastboot oem edl", but after that the phone turns off and led light blinks and nothing happens and PC doesn't detect the phone, then i have to restart it by holding the power button.

Could anyone help me?

Thank you

Pleaaaase! Anybody can help me??
 

pourya_fa

Member
Jan 13, 2014
34
1
0
The alternative way! (My solution :D)

Finally I found a way to flash my phone without Mi flash tool! :)
It's so simple,
You boot into fastboot mode and connect the phone to your PC, in the ROM folder (after extracting) there are some files in .bat format (flash_all.bat , flash_all_lock.bat , etc), you just need to double click the appropriate file to run and flash your phone! No need to Mi flash tool! :D
 
Last edited:

Os_Herdz

Senior Member
Jan 31, 2019
108
46
0
For fastboot oem edl , you need to have installed Qualcomm drivers, and if u are in miui is more safe edl mode, that is why mi flash don't flash the rom.