Backup your data before doing anything!!!
#include <std/disclaimer.h> /* * I am not responsible for bricked devices, dead SD cards, thermonuclear * war, or the current economic crisis caused by you following these * directions. YOU are choosing to make these modificiations, and * if you point your finger at me for messing up your device, I will * laugh at you. */
- First, you must unlock phone with Mi Unlock tool. Which can be download from http://en.miui.com/unlock/download_en.html The unlocking process normally will take about 14 days.
- After unlock the phone, flash twrp from @milankragujevic thread. https://forum.xda-developers.com/xia...ui-10-t4006827
Now you'll have a working twrp.
#2 Install Magisk
1. Download lastest Magisk Flashable Zip from @topjohnwu thread: https://forum.xda-developers.com/app...mless-t3473445
2. Download patcher tool (thanks to @YaAlex3): http://files.yaalex.tk/patcher.7z
3. Reboot the phone to TWRP, on the computer, open adb and type command:
adb shell dd if=/dev/block/by-name/boot of=/sdcard/boot.img
4. Unpack patcher.7z, copy boot.img to this folder. Open boot-patch.exe.
5. You'll have new_boot.img, flash this to boot partition using TWRP.
6. Flash Magisk you download at step 1
Caution: If bootloop happens, you may have to WIPE DATA.
7. Now you should have Magisk installed and working
If you can't patch the boot image file for some reasons, you can download here, choose the correct version, unzip and flash. If bootloop happens, wipe data in TWRP.
GLOBAL 18.104.22.168. PCPMIXM_20191219: Here
GLOBAL 22.214.171.124. PCPMIXM_20191121: Here
INDIA 126.96.36.199 .PCPINXM_20191119: Here
INDIA 188.8.131.52 .PCPINXM_20191105: Here
XIAOMI.EU 184.108.40.206 .PCPCNXM: Here
XIAOMI.EU 220.127.116.11. PCPCNXM: Here
#3 Install GSI Roms
Our phone is arm32binder64, so we'll download A64 A/B GSI rom to flash. In github of @phhusson, there is a list of GSI roms: https://github.com/phhusson/treble_e...%28GSI%29-list
After you choose a rom, we'll follow these steps to flash a GSI rom:
1. Unzip the rom you choose and you'll have image file (.img)
2. Copy to your phone, Flash Disable_Dm-Verity_ForceEncrypt_10.20.2019.zip to stay encrypted (optional, you can backup the /data but you can't setup password)
3. Make a factory reset and flash your unpacked image to system partition using TWRP or Orange Fox.
4. If you like Gapps, you can download Bitgapps or Opengapps (Arm) and flash (optional). But you must resize system partition first (advanced wipe -> repair or change file system -> resize system partition)
5. Flash Permissiver_v5.zip and Certification+Patch.zip
6. Go to Reboot and reboot to bootloader. Flash vbmeta using command:
fastboot flash vbmeta vbmeta.img fastboot reboot
7. Now your phone should be reboot.
After trying some GSI rom like Pixel, RR, Lineage OS, AOSP... There're some bug like:
- D2TW is present in phhusson setting but not working. Use Magisk module: magisk_force-d2tw.zip to fix
- Auto brightness
- Brightness Slider: Can be fixed using adb:
adb shell su -c setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
su setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
- When set password (pattern, etc...), next time you enter password, password will be wrong. (if you flash disable_dm... above), temp fix: boot to TWRP and remove some files in /data/system then reboot, password will be removed
locksettings.db-wal locksettings.db-shm locksettings.db
- Some rom specific bugs...
UPDATE: On Havoc OS 3.1 from ExpressLuke, all the bugs are fixed, if any still present, just follow instructions above.
That is. I don't know why our device development is so slow after 2 months... So i decided to write this post. My main language is Vietnamese so if there's a grammar error, feel free to comment below. Thanks.