FORUMS

[Guide] How to install Magisk on MIUI and How to install GSI roms

69 posts
Thanks Meter: 15
 
By Ga_hap_la_chanh, Member on 5th January 2020, 02:23 PM
Post Reply Email Thread
Hello everyone, firstly, i'm not a dev. I'm just someone who really enjoying tweaking phones, Windows... So, in this post i'll show you how to install Magisk and GSI rom. Most of resources i took from 4PDA forum. Redmi 8A section on their forum is very active. My phone is Chinese variant (4-64), using MIUI 11 Xiaomi.eu rom / Havoc OS 3.1 GSI
Backup your data before doing anything!!!
Code:
#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.
 */
#1. Install TWRP

- 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:
Code:
adb shell dd if=/dev/block/by-name/boot of=/sdcard/boot.img
This'll pull your current boot image to sdcard
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 11.0.3.0. PCPMIXM_20191219: Here
GLOBAL 11.0.1.0. PCPMIXM_20191121: Here
INDIA 11.0.3.0 .PCPINXM_20191119: Here
INDIA 11.0.1.0 .PCPINXM_20191105: Here
XIAOMI.EU 11.0.4.0 .PCPCNXM: Here
XIAOMI.EU 11.0.7.0. 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:
Code:
fastboot flash vbmeta vbmeta.img 
fastboot reboot
Otherwise, you can flash vbmeta.img directly to vbmeta partition, no difference though.
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:
Code:
adb shell su -c setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
or using Terminal:
Code:
su
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
- Camera Recording: You can use 3rd camera apps if bug occurs.
- 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
Code:
locksettings.db-wal
locksettings.db-shm
locksettings.db
- Fix auto brightness, power consumtion... : copy treble-overlay-xiaomi-redmi8a.apk to /system/overlay then set permission 644, reboot.
- 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.
The Following 3 Users Say Thank You to Ga_hap_la_chanh For This Useful Post: [ View ] Gift Ga_hap_la_chanh Ad-Free
6th January 2020, 08:33 PM |#2  
arana1's Avatar
Senior Member
Thanks Meter: 36
 
More
I get an error
Quote:

C:\aaa\patcher>boot-patch.exe

Developer: YaAlex (yaalex.tk)
Thanks to:
acdev for zimage packer concept
And_PDA for AndImgTool
Igor Pavlov for 7zip
topjohnwu for magisk and all it's parts used here
Report any issues to t.me/yaalex3

UPDATER: Latest version is: 0.4

UPDATER: Current version is: 0.4
UPDATER: You have latest version!
INFO: Unpacking boot image....

ERROR: Can't find file: kernel.img
Press any key to continue . . .
Traceback (most recent call last):
File "C:\aaa\patcher\boot-patch.py", line 244, in <module>
File "C:\aaa\patcher\boot-patch.py", line 68, in die
NameError: global name 'quit' is not defined

7th January 2020, 05:17 AM |#3  
OP Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by arana1

I get an error

The boot image you pulled from your phone, is it 64mb? Did you follow the instruction correctly? I have tried patching boot image again and it worked fine.
7th January 2020, 01:42 PM |#4  
dmitrypershin2015's Avatar
Senior Member
Flag rechitsa
Thanks Meter: 68
 
Donate to Me
More
Quote:
Originally Posted by arana1

I get an error

I am fixing patched boot.img from different firmware on 4pd, but if you want I will do it for you. Just take a screenshot of the phone settings where the firmware version is indicated and post your boot.img

Отправлено с моего Redmi 8A через Tapatalk
The Following User Says Thank You to dmitrypershin2015 For This Useful Post: [ View ] Gift dmitrypershin2015 Ad-Free
8th January 2020, 02:09 AM |#5  
OP Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by dmitrypershin2015

I am fixing patched boot.img from different firmware on 4pd, but if you want I will do it for you. Just take a screenshot of the phone settings where the firmware version is indicated and post your boot.img

Отправлено с моего Redmi 8A через Tapatalk

Can i add your patched boot.img from your post on 4PDA to my thread? Thanks.
8th January 2020, 11:15 PM |#6  
dmitrypershin2015's Avatar
Senior Member
Flag rechitsa
Thanks Meter: 68
 
Donate to Me
More
Quote:
Originally Posted by Ga_hap_la_chanh

Can i add your patched boot.img from your post on 4PDA to my thread? Thanks.

of course yes
The Following User Says Thank You to dmitrypershin2015 For This Useful Post: [ View ] Gift dmitrypershin2015 Ad-Free
9th January 2020, 05:11 PM |#7  
Senior Member
Flag Caracas
Thanks Meter: 37
 
More
Quote:
Originally Posted by Ga_hap_la_chanh

Hello everyone, firstly, i'm not a dev. I'm just someone who really enjoying tweaking phones, Windows... So, in this post i'll show you how to install Magisk and GSI rom. Most of resources i took from 4PDA forum. Redmi 8A section on their forum is very active. My phone is Chinese variant (4-64), using MIUI 11 Xiaomi.eu rom.
Backup your data before doing anything!!!

Code:
#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.
 */
#1. Install TWRP

- 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:
Code:
adb shell dd if=/dev/block/by-name/boot of=/sdcard/boot.img
This'll pull your current boot image to sdcard
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 11.0.3.0. PCPMIXM_20191219: Here
GLOBAL 11.0.1.0. PCPMIXM_20191121: Here
INDIA 11.0.3.0 .PCPINXM_20191119: Here
INDIA 11.0.1.0 .PCPINXM_20191105: Here
XIAOMI.EU 11.0.4.0 .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)
3. Make a factory reset and flash your unpacked image to system partition using TWRP.
4. If you like Gapps, you can download Bitgapps or Opengapps (Arm) and flash (optional)
5. Flash Permissiver_v4.zip and Certification+Patch.zip
6. Go to Reboot and reboot to bootloader. Flash vbmeta using command:
Code:
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:
- Auto brightness
- Brightness Slider: Can be fixed using adb:
Code:
adb shell su -c setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
or using Terminal:
Code:
su
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
- Camera Recording: You can use 3rd camera apps if bug occurs.
- When set password (pattern, etc...), next time you enter password, password will be wrong. (some case), temp fix: boot to TWRP and remove some files in /data/system then reboot, password will be removed
Code:
locksettings.db-wal
locksettings.db-shm
locksettings.db
- Some rom specific bugs...

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.

Thanks!
10th January 2020, 04:27 AM |#8  
ways2's Avatar
Member
Thanks Meter: 15
 
More
Edit: was having problems at first and ended up in a bootloop but eventually got Magisk and Root working finally. Thanks a lot for your help!
Attached Thumbnails
Click image for larger version

Name:	https___i.imgur.com_BxUsRg2.jpg
Views:	580
Size:	63.8 KB
ID:	4922787   Click image for larger version

Name:	https___i.imgur.com_X9uGKrP.jpg
Views:	574
Size:	106.2 KB
ID:	4922789  
19th January 2020, 12:18 AM |#9  
marcachas's Avatar
Member
Thanks Meter: 13
 
Donate to Me
More
Hello everyone, I send you my best regards.
I comment. -
I have a global 8th redmi (olivelite), I unlocked the bootloader and continued to install the unofficial TWRP, but there is a problem, my touch screen does not work.
That's why I tried Orangefox and the touch panel worked without problems, I could erase everything except the micro SD, and continued to install Mi Globe 11.0.7, the most recent.

But at the time of finishing and restarting, restart only in recovery, no more, again and again.
Try once installed the rom my globe, flash twrp and force start by fastboor reboot, but it didn't work either.
Also install by fastboot, boot.img of the rom eu, of the global and also the patched by magysk and it didn't work either.
I am NOT looking for root, I am NOT looking for magysk, just install rom MY GLOBE clean, as in all my xiaomis, then I ask.

Has anyone been able to install Xiaomi.eu successfully on your device? With orangefox what was your process? With TWRP and the OTG, do you think I can start?

I would greatly appreciate your response. ):
20th January 2020, 03:30 AM |#10  
OP Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by marcachas

Hello everyone, I send you my best regards.
I comment. -
I have a global 8th redmi (olivelite), I unlocked the bootloader and continued to install the unofficial TWRP, but there is a problem, my touch screen does not work.
That's why I tried Orangefox and the touch panel worked without problems, I could erase everything except the micro SD, and continued to install Mi Globe 11.0.7, the most recent.

But at the time of finishing and restarting, restart only in recovery, no more, again and again.
Try once installed the rom my globe, flash twrp and force start by fastboor reboot, but it didn't work either.
Also install by fastboot, boot.img of the rom eu, of the global and also the patched by magysk and it didn't work either.
I am NOT looking for root, I am NOT looking for magysk, just install rom MY GLOBE clean, as in all my xiaomis, then I ask.

Has anyone been able to install Xiaomi.eu successfully on your device? With orangefox what was your process? With TWRP and the OTG, do you think I can start?

I would greatly appreciate your response. ):

Hi, have you try to wipe yet? Or try to wipe internal storage? I don't use miglobe but i'm using xiaomi.eu rom and this rom works great for me. And don't flash boot.img because each version is different.
20th January 2020, 07:24 AM |#11  
dmitrypershin2015's Avatar
Senior Member
Flag rechitsa
Thanks Meter: 68
 
Donate to Me
More
Quote:
Originally Posted by Ga_hap_la_chanh

Hi, have you try to wipe yet? Or try to wipe internal storage? I don't use miglobe but i'm using xiaomi.eu rom and this rom works great for me. And don't flash boot.img because each version is different.

Miui 11.0.7 is not global, it apparently flashed either Chinese, or xiaomi.eu .
I posted the patched boot.img for xiaomi.ue 11.0.7 on 4pda

Sorry for my bad english. I am not literate and in Russian )))
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes