MiFlash authentication/anti-rollback - Xiaomi Mi A2 Lite Questions & Answers

Hi, I just received my Mi A2 Lite and I have some specific questions before I start trying risky stuff:
1- I read that to flash with MiFlash, I need an authorized account. Is this for specific situations or the MiFlash tool is completely unusable without autorization?
2- I also heard that some Xiaomi devices have anti-rollback protection that cannot be desactivated even with an unlocked bootloader. Is this also the case with our device or since it's with android one, the anti-rollback can be desactivated with unlocking the bootloader? So for example when the pie update is released, would it be possible to go back to Oreo?
3- Last and less important question: if I flash a treble ROM, will I brick my phone if I relock the bootloader?
Thank you in advance!

1. No. You can also use fastboot to flash.
2. As far as I know (and I may be wrong) - there is no rollback protection for Xiaomi Android One devices.
3. I haven't tried that - I assume you mean relocking the bootloader while the Treble ROM is installed? I'd assume you would be fine as you could just run fastboot to unlock again but you can try that out.

I used MiFlash with my A2 Lite to flash stock firmware and I don't have any Xiaomi account. I rollbacked from September (OTA) to July (FULL fastboot rom) and updated again to September via OTA without any problems.

Thank you for your answers
So I assume MiFlash always works for this device? It would be very usefull to have this extra option in case a hard brick happens and the fastboot is not accessible

Isn't MiFlash just a GUI for fastboot?

thorin0815 said:
Isn't MiFlash just a GUI for fastboot?
Click to expand...
Click to collapse
No, MiFlash controls the EDL. The EDL (Emergency Download Mode) is a Qualcomm feature that has a lower level and has more permissions and higher privileges. And if the device is hard bricked and can't boot on nor recovery Noé fastboot, there's a hardware way to boot into EDL (see here : https://www.google.dz/amp/s/www.magnetforensics.com/blog/qualcomm-phone-edl-mode/amp/ ). So that has nothing to do with fastboot and is more efficient in the case of a brick (as long as there's no problem with Xiaomi authentication
Edit : It also seems that the EDL isn't on the internal storage so even if we manage to completely mess up with the partitions, the EDL cannot be currupted (https://alephsecurity.com/2018/01/22/qualcomm-edl-1/)

Sorry for the double post

Related

Mi 5s firmware installed on Mi 5s PLUS hardware

Dear Developers,
I have quite outstanding problem, I think the only at the forum. I have purchased "Xiaomi Mi 5s Plus" 6/128Gb phone, but I have received "Mi 5s Plus" hardware with "Mi 5s" firmware installed (and fake chineese version in addition (Global Stable 8.0.10.0.0 MAGCNDH). Model number is shown like "Mi 5s", memory volume and CPU speed is as expected, but the battery shows 3100mAh instead of 3800mAh, and the most disappointing thing is that the camera is not working at all (when starting says "Camera Error: can't connect to camera. Try restarting your device" (of course, it doesn't help...). The Seller does not respond (purchased in China via AliExpress).
I think all the above mentioned issues are coming because the firmware does not correspond to the hardware.
So, finally after reading the local forums I have understood that I have to reinstall the firmware to official Global Stable version (8.0.1.0) or to chineese stable (???). There are 2 ways: unlocking the bootloader (it is locked unfortunately) and install via fastboot with MiFlash utility or with locked bootloader using the EDL mode using the same MiFlash. But there are a lot of cases on local forum (but nearly 2 month ago) that after reflash in EDL mode the device become a brick (boot-loop).
So, my questions are the following. What are your sugestions in which way to proceed faster and more safe? Which firmware is more safe to try first in my case: global or chineese? Because on local forum it is written that to use EDL mode I need official english-chineese version to be preinstalled. What do you think about it? For me is not fully clear what will happen in EDL mode? Will bootloader also be overwritten or not? If everything is overwritten then why there are so many bricks/bootloops happened after using this mode with fake chineese firmware?
I have already requested permission to unlock bootloader, but there is no respond from xiaomi since 3 days already... hopefully because of New Year holidays (but in China?... strange...).
Also I have prepared an engineering cable to have possibility to enter EDL mode in case of bricking/bootloop. But I need your suggestion how to get rid of possible problems in my special case.
Many thanks in advance!
Heya,
The easiest way would be to download the global ROM from http://en.miui.com/download-315.html and flash it in the phone settings (about phone, firmrware upgrade, menu, choose ROM). I had the exact same "fake" ROM and had no problems flashing the official one.
Cheers!
*Edit* also, if you use the the MIUI-suite program and download the "fastboot image", bootloader, recovery, system and sdcard will be wiped (just tried)... flashing from the phone settings chould wipe aswell but never checked.
faldo said:
Heya,
The easiest way would be to download the global ROM and flash it in the phone settings (about phone, firmrware upgrade, menu, choose ROM). I had the exact same "fake" ROM and had no problems flashing the official one.
Cheers!
*Edit* also, if you use the the MIUI-suite program and download the "fastboot image", bootloader, recovery, system and sdcard will be wiped (just tried)... flashing from the phone settings chould wipe aswell but never checked.
Click to expand...
Click to collapse
I have already tried to flash via about the phone with downloaded ROMs (recovery image), it says "cannot verify the package" and does not proceed... Looks like because bootloader is locked.
Mi PC Suite program cannot connect to phone at all. Tried different version, also chineese one.
And I tried different ROMs (stable global, stable chineese) - no result...
You are able to flash an official ROM with locked bootloader so it seems your phone actually thinks it's a Mi 5s, wich complicates things. Could you try downloading a Mi 5s official ROM and see if it still complains about verification?
The chineese version of Mi PC suit should work with Mi 5s plus but you have to put phone in fastbootmode for it to connect, volume down + power when whone is off.
If your phone has the wrong bootloader you might have to wait for BL unlock to force flash your the Mi 5s plus ROM.... or just flash twrp and flash whatever ROM you want
faldo said:
You are able to flash an official ROM with locked bootloader so it seems your phone actually thinks it's a Mi 5s, wich complicates things. Could you try downloading a Mi 5s official ROM and see if it still complains about verification?
The chineese version of Mi PC suit should work with Mi 5s plus but you have to put phone in fastbootmode for it to connect, volume down + power when whone is off.
If your phone has the wrong bootloader you might have to wait for BL unlock to force flash your the Mi 5s plus ROM.... or just flash twrp and flash whatever ROM you want
Click to expand...
Click to collapse
Good idea about "Mi 5s" global stable, thanks, will be interesting to try (a little bit later).
And I didn't know that Mi PC Suite should be connected in fastboot - another thank you!
By the moment I've got the unlocking approval, so I'm going to proceed in a way with unlocking of bootloader as more safe way by my opinion.
Many thanks for your help!

EDL mode through fastboot

Guys look what i found
https://forum.xda-developers.com/redmi-note-3/how-to/guide-reboot-to-edl-mode-fastboot-test-t3398718
Happy flashing
daca0 said:
Guys look what i found
https://forum.xda-developers.com/redmi-note-3/how-to/guide-reboot-to-edl-mode-fastboot-test-t3398718
Happy flashing
Click to expand...
Click to collapse
are you tried this method before? the thread for Kenzo
It could work with devices with unlocked bootloader but in this case we couldn´t need it; devices with unlocked bootloader can be flashed using MiFlash Tool/fastboot and eventually TWRP.
It doesn´t work in devices with locked bootloader.
Technically script sends device to EDL but like the bootloader it´s locked it refuses to boot in EDL mode and restarts in the system finally.
SubwayChamp said:
It could work with devices with unlocked bootloader but in this case we couldn´t need it; devices with unlocked bootloader can be flashed using MiFlash Tool/fastboot and eventually TWRP.
It doesn´t work in devices with locked bootloader.
Technically script sends device to EDL but like the bootloader it´s locked it refuses to boot in EDL mode and restarts in the system finally.
Click to expand...
Click to collapse
is it true EDL flashing more 'clean' than fasboot flashing method?
EriecTan said:
is it true EDL flashing more 'clean' than fasboot flashing method?
Click to expand...
Click to collapse
Sorry, What do you mean?
If you ask if through EDL it's a cleanest method, no, there's no difference with fastboot method that you can use using MiFlash Tool or using fastboot commands to flash partitions
SubwayChamp said:
Sorry, What do you mean?
If you ask if through EDL it's a cleanest method, no, there's no difference with fastboot method that you can use using MiFlash Tool or using fastboot commands to flash partitions
Click to expand...
Click to collapse
thanks mate for the answer!
Do not worked
Hi.
This treatment does not work for redmi note 6 pro.
In my opinion Google should make EDL mandatory on any and every phone. If I remember correctly EDL makes Snapdragon phones unbrickable. Though Xiaomi has been locking it off and using proprietory code to put authorization locks on it.
I'm guessing because it's a major vulnerability (on Kenzo, I think EDL meant you could throw any file at the phone) but the easy fix there is simply enforcing a hardcoded checksum for any incoming recovery file.
But really Google needs to make sure phones can be easily recovered by consumers from even the dodgiest bootloader flashes, botched flash memory situations, modem edits, mismatched firmware somehow flashing to the wrong phone and whatever other ways a phone can be messed up.

sofrbrick/bootloop

Hi all,
I am new to this forum, but have some experience with rooting and custom roms(oneplus one and samsung)
Now with the Mi Max 3, which was unlocked, i have flashed the recovery twrp-3.2.3-0-nitrogen.img, but I did not realize that
i had to reboot into this recovery from the fastboot mode.
so I endet up with a locked bootloader and bottloop and am not able to unlock the bootloader again.
I think my only solution is the test-point method and a EDL authorized account.
Some help would be greatly appreciated.
thanks
Henry
You don't have to boot into the bootloader from fastboot mode, you can press the power button and volume up button like on almost all other Android phones to boot into TWRP recovery. Sometimes it takes a few attempts to get right, but you should learn how to do it eventually.
Unfortunately it sounds like you had one of the dodgy re-sold Chinese models that had been re-flashed with Global firmware and it's locked your bootloader again on reboot.
Your only option is to use the official Miui Flash tool to boot into fastboot mode, flash the latest Global Developer ROM, and then sign in with your account and apply to unlock the bootloader again using the Miui unlock program. It may be instant but, they'll probably make you wait 720 hours, as the entire point of the program was to stop phones like yours being re-sold outside China.
At least you'll have a usable, non-bricked device though.
Thanks for your answer.
now I have opened the backcover (yes was much work ( I succeded without destroying something) and could apply the test point method to get into the lde mode.
Win10 shows it as qualcomxx at com 3
what is the best way now to awake it to life again? even without unlocking.
hi,
with the test point method I could flash the chinese rom, and the mi max 3 is awaken to life again!
The bootloader is still locked.
I have applied for unlocking, but have to wait some 15 days.
One tip: if the case is open, one can apply a little bit of silicon grease to the small pins on the side of the plastic frame
before closing it. Opening it again is much easier then.
One question: if I replace the recovery.img of the chinese rom with a TWRP image (renamed to recovery.img)
and flash that modified rom with the test point method, could this probaly work?
With a working TWRP one could install other roms without unlocking bootloader.
If yes, which TWRP would you apply?
Thanks
freedoc said:
Hi all,
I am new to this forum, but have some experience with rooting and custom roms(oneplus one and samsung)
Now with the Mi Max 3, which was unlocked, i have flashed the recovery twrp-3.2.3-0-nitrogen.img, but I did not realize that
i had to reboot into this recovery from the fastboot mode.
so I endet up with a locked bootloader and bottloop and am not able to unlock the bootloader again.
I think my only solution is the test-point method and a EDL authorized account.
Some help would be greatly appreciated.
thanks
Henry
Click to expand...
Click to collapse
Flashing a recovery should not lock your bootloader, so I don't know how you did it. Note, that if you are using Xiaomi's firmware tool, you should not forget about unticking the box to lock the bootloader. But I would suggest to stay away from that tool and go command line instead with fastboot.
If you can access fastboot, I'd recommend to flash an official fastboot tgz ROM of your choice. Official ROM should boot even with an unlocked bootloader and you may start all over again more carefully.
So I think you might be able to avoid using EDL mode at this stage.
probally I forgot to untick that box. The bootloader is locked and I have to wait 319 hours.
I have got to love the test point EDL method which is simple and effective, and gave me control over the device again.
If I flash again the chinese fastboot rom (in which I have changed the original recovery.img into TWRP.img, named recovery.img) via the EDL
will that give me an installt TWRP (still with locked bootloader, but possible to install custom roms) or will i have a brick again?
thanks
freedoc said:
probally I forgot to untick that box. The bootloader is locked and I have to wait 319 hours.
I have got to love the test point EDL method which is simple and effective, and gave me control over the device again.
If I flash again the chinese fastboot rom (in which I have changed the original recovery.img into TWRP.img, named recovery.img) via the EDL
will that give me an installt TWRP (still with locked bootloader, but possible to install custom roms) or will i have a brick again?
thanks
Click to expand...
Click to collapse
Only you can answer that question by trying it out. Are you sure you have to wait for the unlocking again? Double check that! As I know you also need a priviliged xiaomi account to be able to resurrect a device in EDL mode.

Question Bootloop to fastboot logo and back in lock state

Hi everybody,
yesterday I tried flashing the stock pocof3 rom back onto my phone, but since it got stuck in a bootloop at the fastboot logo. Showing the poco logo for a milisecond and then straight to fastboot..
(before this I flashed twrp and the arrowOS recovery and images a few time trying, without succes, to install this rom)
Last thing I did was flash via the mi-flash tool and did't see the "clean and lock" selection so it's also in lock state again.
I cant get adb to find the phone although the mi-flashtool is finding it.
anyone any tips?
I tried the vol up power trick, but this didn't help, keeps loading into fastboot
Did Mi Flash give an error message after trying to flash?
dreamytom said:
Did Mi Flash give an error message after trying to flash?
Click to expand...
Click to collapse
I dont recall giving an error, so i dont think so
now it is though, when trying to flash the firmware. error erasing boot_ab (failed: erase not allowed in lock state)
Kaayman said:
I dont recall giving an error, so i dont think so
now it is though, when trying to flash the firmware. error erasing boot_ab (failed: erase not allowed in lock state)
Click to expand...
Click to collapse
I'm not sure, but you may still be able to flash official ROMs.
But in "Configuration" make sure Erase is disabled
Kaayman said:
I dont recall giving an error, so i dont think so
now it is though, when trying to flash the firmware. error erasing boot_ab (failed: erase not allowed in lock state)
Click to expand...
Click to collapse
BAD NEWS... your Poco is bricked. You cannot flash ANYTHING using a PC when your bootloader is locked.
(I did same thing on a Mi11 5g last week and ended up selling it on eBay for spare & repairs
I tried sideload flash, miflash, copying update.zip to internal storage via ADB, and many other options - all without success).
- if your POCO is under warranty in your country (i.e. not a chinese import)... contact Xiaomi Support they can re-flash correct ROM
- Ask your local phone repair store... they *might* be able to flash original ROM back by using "Chimera" engineering software.
dreamytom said:
I'm not sure, but you may still be able to flash official ROMs.
But in "Configuration" make sure Erase is disabled
Click to expand...
Click to collapse
this doesn't seem to be an option. there is a checkbox with "erase all" but all are already unchecked
dezborders said:
BAD NEWS... your Poco is bricked. You cannot flash ANYTHING using a PC when your bootloader is locked.
(I did same thing on a Mi11 5g last week and ended up selling it on eBay for spare & repairs
I tried sideload flash, miflash, copying update.zip to internal storage via ADB, and many other options - all without success).
- if your POCO is under warranty in your country (i.e. not a chinese import)... contact Xiaomi Support they can re-flash correct ROM
- Ask your local phone repair store... they *might* be able to flash original ROM back by using "Chimera" engineering software.
Click to expand...
Click to collapse
This is what I feared already..
Kaayman said:
This is what I feared already..
Click to expand...
Click to collapse
- Bootloader was re-locked whilst a custom ROM was in the phone.
(MIUI with Locked bootloader will not boot up where ROM is not stock or does not match the region/product code).
You cannot apply for bootoader unlock because you cannot boot up into Android and request the unlock via Developer mode.
You cannot remotely (via PC cable) flash any ROM into a Xiaomi / POCO phone whilst botloader is locked.
You are in a chicken and egg situation.,,, but if you find a way to repair your phone, please let us know how you achieved it.
Good luck!
If the system hasn't booted up yet there is a chance that you will be able to unlock bootloader again. Try it.
mar.ur said:
If the system hasn't booted up yet there is a chance that you will be able to unlock bootloader again. Try it.
Click to expand...
Click to collapse
That's what I'm thinking too ...
Connect the phone to pc and do the bootloader unlock again via the mi unlock app - you don't need to apply again and stuff as long as you're able to recognise the phone inside app correctly
Rstment ^m^ said:
That's what I'm thinking too ...
Connect the phone to pc and do the bootloader unlock again via the mi unlock app - you don't need to apply again and stuff as long as you're able to recognise the phone inside app correctly
Click to expand...
Click to collapse
thanks everyone for all the replies!
tried unlocking it via the mi unlock tool (latest) but it says (in chinese) its locked by nr 123***456 by searching the phone - can't unlock
edit:
google lens translates:
X The phone has been locked by the account number 661****647 by searching the phone, Can't unlock
but it's not the nr. of my account..
dezborders said:
- Bootloader was re-locked whilst a custom ROM was in the phone.
(MIUI with Locked bootloader will not boot up where ROM is not stock or does not match the region/product code).
You cannot apply for bootoader unlock because you cannot boot up into Android and request the unlock via Developer mode.
You cannot remotely (via PC cable) flash any ROM into a Xiaomi / POCO phone whilst botloader is locked.
You are in a chicken and egg situation.,,, but if you find a way to repair your phone, please let us know how you achieved it.
Good luck!
Click to expand...
Click to collapse
Is it not even possible to flash Official ROMs?
Isn't there like a system that it checks the signature of the ROM and if it's a signed ROM it allows the flash? Or am I mistaken?
dreamytom said:
Is it not even possible to flash Official ROMs?
Isn't there like a system that it checks the signature of the ROM and if it's a signed ROM it allows the flash? Or am I mistaken?
Click to expand...
Click to collapse
Nope bootload locked = no 'remote' flashes via pc
Apparently there is an 'authenticated user' mode for Xiaomi engineers in MiFlaah and also an EDL Emergency Download Mode which you can trigger by shorting out 2 pins on the motherboard so bypass bootloader lock and flash any ROM
Neither were available options for me
dezborders said:
Nope bootload locked = no 'remote' flashes via pc
Apparently there is an 'authenticated user' mode for Xiaomi engineers in MiFlaah and also an EDL Emergency Download Mode which you can trigger by shorting out 2 pins on the motherboard so bypass bootloader lock and flash any ROM
Neither were available options for me
Click to expand...
Click to collapse
I also tried to simulate a local OTA by copying update.zip to internal storage using ADB push command and booting into recovery mode to flash ... But it doesn't work for me
dezborders said:
Nope bootload locked = no 'remote' flashes via pc
Apparently there is an 'authenticated user' mode for Xiaomi engineers in MiFlaah and also an EDL Emergency Download Mode which you can trigger by shorting out 2 pins on the motherboard so bypass bootloader lock and flash any ROM
Neither were available options for me
Click to expand...
Click to collapse
I'm now in the procedure to sent it back under warranty. any idea if this is possible and what the cost would be if not under warranty?
If all fails i'll try the shorting by pins, should be interesting
I think a warranty repair claim is your best bet ... I have never read anywhere that unlocking bootloader invalidates Xiaomi warranty (Unlike Samsung and so many other brands!)
If warranty repair is re refused try a few independent repair shops
Last resort is get the back cover off the phone and short out the EDL pins
Good luck!
Let us know if you manage to get your phone booting up again
See this thread (last post) for a possible workaround via a 3rd party recovery image to flash EU rom
[Solved] Stuck in fastboot with locked bootloader
HI there! After multiple problems with the custom ROMs I tested, I finally decided to go back to the stock ROM by downloading it from the official thread. I extracted the .tgz archive, run the "flash_all.bat" program, which failed by saying it...
forum.xda-developers.com
Kaayman said:
I'm now in the procedure to sent it back under warranty. any idea if this is possible and what the cost would be if not under warranty?
If all fails i'll try the shorting by pins, should be interesting
Click to expand...
Click to collapse
I once hardbricked (complete blackscreen, not even Fastboot reachable) a Poco F3.
I requested a replacement from Amazon and that worked.
I said a software update bricked it.
Of course having to do that is really bad, but I was scared of opening the back.
dezborders said:
See this thread (last post) for a possible workaround via a 3rd party recovery image to flash EU rom
Bootloop to fastboot logo and back in lock state
Hi everybody, yesterday I tried flashing the stock pocof3 rom back onto my phone, but since it got stuck in a bootloop at the fastboot logo. Showing the poco logo for a milisecond and then straight to fastboot.. (before this I flashed twrp and...
forum.xda-developers.com
Click to expand...
Click to collapse
You pasted the current thread, do you have the link to the thread you meant?
Kaayman said:
You pasted the current thread, do you have the link to the thread you meant?
Click to expand...
Click to collapse

Question Possible to flash any ROM to bricked and locked Mi11 Lite through fastboot ??

Hi everybody,
I recently tried to downgrade from 12.5.5.0 to 12.0.2.0 recovery version.
It was not a good idea since phone does not start any more and has a black screen no matter what I do.
But it can access fastboot mode...
My question:
Its locked unfortunately and I cannot access it anymore since it does not boot.
Is it possible to flash ANY Rom to it?
I tried it with several ROMs but Miflash tool always blocks the procedure since phone is locked...
Is there a ROM for the Mi 11 Lite 4G that is accepted by the MiFlash tool in locked state?
Pumukkl said:
Hi everybody,
I recently tried to downgrade from 12.5.5.0 to 12.0.2.0 recovery version.
It was not a good idea since phone does not start any more and has a black screen no matter what I do.
But it can access fastboot mode...
My question:
Its locked unfortunately and I cannot access it anymore since it does not boot.
Is it possible to flash ANY Rom to it?
I tried it with several ROMs but Miflash tool always blocks the procedure since phone is locked...
Is there a ROM for the Mi 11 Lite 4G that is accepted by the MiFlash tool in locked state?
Click to expand...
Click to collapse
The problem is not the ROM version to be accepted but your device itself, due to the locked status it refuses to accept any partition to be flashed.
This same principle doesn't matter in EDL mode, but XM11 (and most of, if not all, Xiaomi devices) require of an authorized account for Mi Flash tool.
If you at least did bind your Mi account and started the process to unlock bootloader, then you still can do this.
Did you fixed the problem? If yes, how?
mahbod.es.1996 said:
Did you fixed the problem? If yes, how?
Click to expand...
Click to collapse
@SubwayChamp already mentioned how one'd go about it:
- If the phone was bound to the owner's Mi account, starting a bootloader unlock process and if it is able to go forward, it could then be restored to a working state.
- Perhaps... sideloading a full recovery ROM if access to the stock recovery and Mi Assistant were an option, although just like with EDL, I'm guessing some sort of authorization takes place (it used to several years ago).
- Take the phone to a service center and plead one's case, they could be willing to flash the device with an official build, although if it were me I'd require proof of ownership at least.
- Resort to a 3rd party service / app that deals in auth. EDL flashes for money.
That's about it, these days there's not even a point in opening a device to access the test points.

Categories

Resources