Source: XDA
sudo pacman -S android-tools android-udev
You must use a Windows 10 computer.
Before you start, write down some information about your phone.
Go to Settings
-> About phone
-> All specs
.
Write down:
Or just take a picture ;-)
Settings
-> About phone
-> click 7 times on
-> MIUI version
until Developer options
are available. Settings
-> Additional settings
-> Developer options
-> enable OEM unlocking
-> click on Mi Unlock status
and Add account and device
-> copy id number under your avatar
Go to miui.com and click on unlock. Change language to english (footer). After logging in, you must create a new user for the forum if you have just created an account.
Connect your phone and let Windows install all necessary drivers.
Now turn your phone off and start it again with VOL DOWN + POWER BUTTON
and hold
it until FASTBOOT
is written. Connect your phone and let Windows install all the fastboot drivers for your phone (if not done in step 1).
Download Mi Unlock and extract the files to C:\unlock\
and start miflash_unlock
. Sign in and connect your phone again if necessary. Now click unlock button.
Problems (Unlock button greyd out)? Try that XDA.
Couldn't unlock - Please unlock XXX hours later? Wait XXX hours later.
Click on Unlock
-> Unlock anyway
-> Unlock anyway
Up to this point it is no longer necessary to use a Windows computer.
Go to Settings
-> About phone
-> click 7 times on
-> MIUI version
until Developer options
are available.
Go back to Settings
-> Additional settings
-> Developer options
-> enable USB debugging
.
This is a quick guide with the important info. Check the xda thread for the whole info!
Before you go any further make sure you're running Android 9!!! If you are on Android 10, you must first downgrade.
- Go to
Settings
->About phone
.
Download full factory build and extract the file. Or just the 2 files from xda.
Reboot your phone to fastboot mode
by holding VOL DOWN + POWER BUTTON
or run adb reboot bootloader
in your terminal.
Got to the images
folder and run the following commands:
fastboot flash preloader preloader_begonia.bin
fastboot flash lk lk.img
fastboot flash lk2 lk.img
You have 2 options to download your firmware:
I suggest the number 2. That way it's pretty sure you'll be using your firmware for your particular phone.
For that, got to:
Settings
-> About phone
-> System update
-> 3 dots (top right)
) -> Download latest package
File transfer
and go to the folder downloaded_rom
and copy the file to your computer.
This device uses Android Verified Boot (AVB)
This means that installing TWRP or swiping to allow system modifications will prevent you from being able to boot. To bypass AVB's boot prevention, you will have to disable it or install a custom ROM that ships with disabled AVB.To disable AVB via fastboot, grab the vbmeta image from the ROM you are on, and flash it with the following command:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
AVB should be now disabled on your device.
Click on your downloaded firmware and extract vbmeta.img
.
Reboot your phone to fastboot mode
by holding VOL DOWN + POWER BUTTON
or run adb reboot bootloader
in your terminal.
Copy both files vbmeta.img
and twrp-3.3.1-0-begonia.img
in one folder and run the following commands:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot flash recovery twrp-3.3.1-0-begonia.img
Restart your phone with fastboot reboot
and immediately press and hold VOL UP
until you reach the recovery mode or until you need to select the recovery mode.
You need to check whether the MIUI OTA you're installing contains Preloader
and LK
or not. If it does, remove it
manually. Another method could be to install the OTA and then flash the factory Preloader and LK image again via fastboot.
compability.zip
archiveMETA-INF
directory and locate updater-script
Delete lines such as:
assert(set_emmc_writable("/sys/block/mmcblk0boot1/force_ro"),
package_extract_file("preloader.img", "/dev/block/mmcblk0boot1"));
and
assert(set_emmc_writable("/sys/block/mmcblk0boot0/force_ro"),
package_extract_file("preloader.img", "/dev/block/mmcblk0boot0"));
Save the changes and now flash the build.
Do TWRP again.
Looking forward ;)
This version of the page was edited by Dan at 2020-04-06 12:53:21. View the most recent version.