[Redmi 7A Guides, News, & Discussion] Deleted member 7210350:
Hello,

I finally managed to install a custom GSI Rom with TWRP and Magisk on my Redmi 7A. And I want to share a detailed guide for everyone who is struggling to do the same. Tested with MIUI 10.2.5.0 Global. Cannot guarantee for other versions.

WARNING:

You need to backup your data before installing. I am not responsible for any damage or loss that might occur. Proceed at your own risk.

Prerequisites:

- Your bootloader must be unlocked (https://en.miui.com/unlock/)

- GSI Rom of your choice. Only a64 A/B (arm32_binder64_ab). No other GSIs will do.

- ADB and Fastboot

- patched boot.img

- TWRP recovery

- vbmeta.img

- Magisk

- Permissiver_v4.zip

- Certification patch

- Treble Overlay file

- GApps (if needed)

Installation guide:

1. Download the files.

GSI Rom:

https://xdaforums.com/project-treble/trebleenabled-device-development

I installed Lineage OS 16 GSI (lineage-16.0-20191017-UNOFFICIAL-treble_a64_bvN). Everything works, except for auto-brightness.

https://xdaforums.com/project-trebl...i-lineageos-16-0-gsi-arm64-ab-how-to-t3908029

Minimal ADB and Fastboot

https://xdaforums.com/showthread.php?t=2317790

Patched boot img file

(You have to choose the correct file according to your system version!)

http://www.mediafire.com/folder/zx0167qqaknc3/Redmi_7a_patched_boot

TWRP recovery

https://www.mediafire.com/file/irntn5ccdiguuuu/TWRP-20191023-3.3.1.0-pine.img/file

vbmeta file

http://www.mediafire.com/file/bgpn9b87b4t8yye/vbmeta.img/file

Magisk

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

Permissiver

http://www.mediafire.com/file/61q8wln4y18ir5k/Permissiver_v4.zip/file

Certification Patch

http://www.mediafire.com/file/fboh2jocqak8cep/Certification_Patch.zip/file

Treble Overlay file (treble-overlay-xiaomi-redmi7a.apk)

http://www.mediafire.com/file/yc7vz3vg13mcrck/treble-overlay-xiaomi-redmi7a.apk/file

GApps (for Lineage OS 16 GSI choose 'ARM' & '9.0')

https://opengapps.org/

2. Unpack Minimal ADB and Fastboot to C:\ drive of your PC

3. Rename patched boot file to boot.img

4. Rename custom recovery file to recovery.img

5. Place boot.img, recovery.img, vbmeta.img in ADB folder

6. Turn off your phone.

7. Reboot phone to fastboot mode by holding Volume-down button while pressing On/Off-button. You know you are in fastboot mode when you see a cartoon bunny.

8. Connect the phone to your PC via USB.

9. On your PC open command prompt and nagivate to ADB folder, or open command prompt window directly from right-click menu in ADB folder; just right-click on empty space and choose 'Open command prompt here'

10. In command prompt, enter the following commands:

fastboot flash boot boot.img

fastboot flash vbmeta vbmeta.img

fastboot flash recovery recovery.img

11. Now reboot to recovery: Press Volume-Up button on your phone and enter the following in command prompt:

fastboot reboot

or just turn off the phone and reboot by holding Volume-Up and On/Off button (release On/Off when phone turns on, keep holding Volume-Up until you see screen of TWRP recovery)

12. Swipe to allow modifications. If TWRP asks for PIN, enter the PIN code you set for your unlock screen.

13. In TWRP choose Wipe > Advanced Wipe. Select 'Dalvik / ART cache', 'System', 'Data', 'Cache'. Then Swipe to Wipe.

14. Move the downloaded GSI file (*.img) to your phone. (Simply drag and drop in your PC's file manager to SD-card/memory of phone).

15. Flash the GSI Rom: In TWRP choose 'Install' > 'Install Image' and select the GSI. If you put the GSI on your external SD-card you first need to choose Select Storage > Micro SD card. After choosing the GSI file, at Select Partition to Flash Image choose System Image. Then Swipe to confirm Flash.

16. Reboot to Recovery

17. Move Magisk zip and Permissiver_v4.zip to your phone.

18. In TWRP choose Install. Select the Magisk zip-file on your phone and then Swipe to confirm flash.

19. Flash Permissiver_v4.zip the same way.

20. Flash GApps if needed

21. Flash Certification_Patch.zip.

22. Go back and choose Reboot > System

23. Fix big rounded corners on home screen:

Once you are in Android and in case you experience big ugly round corners around your home screen, put treble-overlay-xiaomi-redmi7a.apk in System > Overlay directory. You need a file manager with root access if you want to do this from within Android.

24. Fix brightness adjustment issue (no auto-brightness though):

Enable USB debugging in Developer Options menu. To make developer menu appear in Android, you need to tap 7 times on Android's 'build number'.

Now open command prompt from ADB folder on your PC while your phone is still connected via USB. Enter the following:

adb shell
su
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)

You need to allow adb shell to get root access or the command will throw an error. Your phone should show a confirmation dialog when entering the command. If it doesn't show the dialog, open Magisk Manager app and give root access for Shell in Superuser menu.

25. Enjoy!