[Redmi 7A Guides, News, & Discussion] extab:
Thanks! You gave me a new hope!

Thank you for pointing this out. Perhaps its been said many times, but never clearly enough; in particular post #70 mentions several roms that are arm64.

Following exactly the instructions from OP did not quite work for me. I made something like a hundred attempts; most of them ended with a bootloader loop or other error (like error in formatting data partition) that prevent from resuming the procedure - in such a case I recovered by reflashing the stock rom and started from scratch. It was

very frustrating, so here I share my experience in hope to save others some stress.

First, download everything you need. You need boot.img, recovery.img and vbmeta.img on your PC. You need Magisk-v19.3.zip,

Permissiver_v4.zip and <choosen_rom>.img on the SD card in your device (see below the section on which rom to choose and why none of them fully works). You also need your stock rom (fastboot version) from Xiaomi. I did not use the no-verity-encript-ysl.zip file.

To recover from bootloader loop:

================================

1. Connect your device with a cable to pc, go to the folder with unpacked stock rom and run the flash_all script. It takes about 10 minutes.

2. Wait until the device reboots to stock rom (another 5-10 minutes), connect to WiFi, activate your device. Skipping this step leads to a bootloader loop.

To flash a custom rom (to your unlocked and activated device):

===================================================

1. Reboot to bootloader.

Follow the steps 3-12 from OP. Note that skipping step 5 leads to a bootloader loop. Note also that these steps do not mention flashing gapps.

13. After your device reboots to system, run the magisk app to confirm that it does not work.

14. Reboot to recovery and flash magisk again.

15. Reboot to system and run magisk. Update magisk manager. Give root privileges to shell.

16. If necessary, fix the certification problem (see below).

17. Fix the brightness problem. Note that the command on OP is wrong (something bad happened while copy-pasting and it contains too many spaces: the should be no space between $ and bracket, and no spaces in the path /sys/.../max_brightness). The correct command is in post #69.

Which rom to choose and why none of them fully works

==============================================

As mentioned above, it must be arm32BINDER64 for A/B devices. Even if you know that your processor is arm64 and all possible tests confirm that your device is A-only.

I tried the following:

1. V119system-arm32_binder64-ab-ufOfficial-nosu.img

This rom comes with microG preinstalled, and is meant for people who do not want to share their sensitive data with google. Unfortunately I do use some google apps (mail, calendar, maps etc). I was not able to connect preinstalled play store with my google account. I do not remember the exact error, but I followed several methods to resolve the problem and they did not work.

2. dotOS-P-v3.1.1-treble_a64_ab-UNOFFICIAL-20190918-0616.img

This one comes without gapps. An attempt to flash (pico) gapps results in an error saying that there is not enough space in the system partition. An attempt to resize the partition lead to other errors.

3. Pixel experience (if I remember well, it was extracted from

PixelExperience_Plus-9.0-a64_ab.7z).

Bootloader loop

4. AOSP system-arm32_binder64-ab-vanilla-nosu.img

After flashing gapps (tried pico and micro) could not configure it. Play store is installed (it appears on the list of installed

applications), but I could not find a way to run it.

5. AOSP system-arm32_binder64-ab-gapps-su.img

After fixing the certification problem it seems to work. There is still some problem with preinstalled su and magisk. Occasionally after a reboot I get a notification that su needs an actualization, but I just ignore it. Still not tested too much, but I observe some problems e.g. with SMS history.

Fixing the certification problem

================================

During the configuration of your google account you may get a popup saying that my device is not certified. Then it popups every five seconds, making the device completely unsusable. Another thread suggests to install some app, but there is no need for this.

1. From your pc run the commands

$ adb shell
$ su
# sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"

2. Go (from your pc, not from the device) to [as a new user I am not allowed to post urls]

www dot google dot com/android/uncertified/

3. Copy the number obtained in the first step to the form

4. Wait

Immediately after the registration I was able to use the play store, but the popup kept popping up (not as often as in the beginning) for some time. After couple of hours (next morning) I noticed no more problems.