[General Topics] ProgrammingPleb:
Android 10 GSI Installation Guide

Firstly, credit to the folks at 4PDA for giving a great guide on installing these GSIs.

PRECAUTION!

This guide is ONLY for Android 10 (Quack) GSIs.

Other Android versions not on 10 will most likely not work. Continue at your own discretion.

You will most like lose data if you don't do this right. Please make sure that you follow every step shown here to prevent that.

I am not responsible for the loss of data on your device! (and the warranty of your phone of course.)

Also, when you want to restore to stock ROM, there will also be a guide at the bottom of the post.

The kernel (and the fstab modification script by [MENTION=5540721]adeii[/MENTION]) I'm giving below will most likely break EMUI, so take note of this.

Requirements:

1. An unlocked bootloader, you can get this by paying MOS (Ministry of Solutions) $4, or using other methods since Huawei doesn't issue these anymore.

2. The GSI images, check the GSI links in the section below and download your preferred GSI. Take note that the GSIs not found in the section below can be searched on the Project Treble section of XDA Developers, but success is not guaranteed. I can try to help you if you are using other GSIs, but I cannot guarantee the success of me trying to fix any problem with said GSI.

3. OpenGApps, which is found here, make sure it's ARM64 and 10.0, the variant is up to you to decide.

4. Vendor Image, preferably 8.0.0.159

5. Permissive Kernel, you can get it from here

6. ExpressLuke GSI Magisk (phh variant), download it here, this is needed because someone on the 4PDA forums said it was for decrypting something for the GSI to read.

7. [MENTION=5540721]adeii[/MENTION]'s fstab modifier script, which is found here, so that doing stuff in TWRP would be much more better.

8. [MENTION=5540721]adeii[/MENTION]'s TWRP, I personally use this because it wipes (not format) /data without wiping the internal storage as well, but you can use this if you want it to wipe internal storage as well.

9. NFS Injector Magisk Module, which is here, this will help to not overuse the CPU and GPU (and other components) to reduce battery drain. (Seriously Android 10 drains the battery quite quickly if this isn't installed)

10. Some patience and brain power to follow the steps below.

11. A PC (or a Mac, up to you).

GSI Links:

AOSP by phhusson:

Download

Issues:

1. The stock SMS app will not give any notifications, even when an SMS is received. Use the

Messages

app by Google.

Pixel Experience Q by EM0B0Y at 4PDA forums:

Download

There has been no reported issues for this GSI, so beware of any coming your way.

Havoc OS 10 by developerluke:

Download

Issues:

1. The second SIM icon will always be empty (or invisible) although there is the phone is receiving network signal for said SIM.

2. Both icons will be empty (or invisible) when they're on H+. (The folks at 4PDA thanked Huawei for being a great vendor hahaha :laugh:)

3. Sometimes "System UI" (or the system itself) will not be responsive, so a reboot will restore it back to normal.

Lineage OS 17 by andyyan:

Download

Issues:

1. Sometimes "System UI" (or the system itself) will not be responsive, so a reboot will restore it back to normal.

These GSIs are from 4PDA forums!

I'm testing more GSIs since I have backed up my data so...

There are more Android 10 GSIs coming your way!

GSIs that are unable to be used:

1. Descendant X by Dil3mm4 (Size is too big for the /system partition to handle - 2.7GB)

UPDATE: This has a workaround of resizing system and userdata partitions. This goes into a bootloop however and I am figuring out what to do.

How to install?

1. Backup your data! Since we'll be doing a clean install, we'll need to format the /data partition since removing the encryption will make not unencrypt the files back, and will render them useless. If you're planning on doing this using TWRP, then move to the next step. If not, use your method of backing up your data.

2. Ensure that "OEM Unlock" is enabled by checking it in the developer settings. Search on Google on how to access Developer Settings if you don't know how.

3. Shutdown the device and power it on by pressing on power + volume down. This will put it in fastboot mode. Plug in your device to the PC (or Mac).

4. Download all the required files from the section above.

5. Extract the GSI archive file to get the .img file for the system.

6. Flash the TWRP image you chose and execute this:

fastboot flash recovery_ramdisk <name of TWRP image file>

These next two steps are for those backing up with TWRP! Move to step 9 if this does not apply to you.

7. Reboot to recovery by holding the power + volume up button. Let go when the Huawei logo shows up. This should boot you straight to TWRP. If it goes to eRecovery, shutdown and repeat. If it boots to recovery, retry step 6, then move to step 8.

8. If it asks for you to allow modifications, slide on the slider at the bottom of the screen. Then, go to "Backup", and uncheck any checked items. The mandatory ones you have to check is the "Data (excl. storage)" and the optional ones should be "System", "Kernel", "OEMinfo", "Boot_RamDisk" and "Vendor". On your computer, execute this command:

adb backup --twrp

This will initiate a backup on TWRP and move it to your PC. Make sure to keep it in a safe place. Reboot back to bootloader by going back to home screen and going to "Reboot", then "Bootloader".

Note that backing up the optional ones will make the process to revert to stock rom much more easier.

For those skipping these two steps, resume from here.

9. Execute this command to flash the system GSI image:

fastboot flash system <name of system GSI image file>

10. Reboot to recovery by holding the power + volume up button. Let go when the Huawei logo shows up. This should boot you straight to TWRP. If it goes to eRecovery, shutdown and repeat. If it boots to recovery, retry step 6, then move to step 11.

11. Mount the vendor partition on the Mount section of TWRP (Home Screen > Mount > Vendor).

12. Go to Terminal (Home Screen > Advanced > Terminal), then execute this command:

rm -r vendor/*

13. Flash the vendor image using an external media such as an external SD card or a USB-OTG pendrive, then using the "Flash Image" option.

14. Flash the fstab modification script using an external media such as an external SD card or a USB-OTG pendrive.

15. Go to the home screen, then "Wipe", then "Format Data". Type "yes" as follows and hit the blue button.

16. Reboot to recovery (Home Screen > Reboot > Recovery), then flash GApps using ADB sideload, an external SD card or a USB-OTG pendrive.

17. Reboot to system and do first time setup.

18. Profit!

How to go back to stock ROM?

If you backup the mandatory and optional ones as well through TWRP, then you should be able to execute this command (make sure backup.ab is present in the directory you're in):

adb restore

If not, don't worry! It's a little bit complicated, but is possible to do.

Here are the steps:

1. Reboot to recovery.

2. Go to Terminal (Home Screen > Advanced > Terminal), then execute this command:

rm -r vendor/*

3. Flash the vendor image using the internal storage, or an external media such as an external SD card or a USB-OTG pendrive, then using the "Flash Image" option.

4. Download the stock recovery_ramdisk here, then flashing it through fastboot, or TWRP using the method in step 3.

Fastboot command:

fastboot flash recovery_ramdisk <name of stock recovery_ramdisk image file>

5. Reboot to eRecovery by rebooting to system, then holding the volume up button (without holding the power button as well) at the warning screen after the Huawei logo. Let go when the Huawei logo shows up again.

6. Go to "Download latest version and recovery", then follow the instructions to connect to wifi and let it download and install stock rom again.

7. Once it goes back to stock ROM, reboot to bootloader by holding down power + volume down. Let go when the fastboot screen shows up.

8. Execute this command (you'll need the TWRP image file in the section above):

fastboot flash recovery_ramdisk <name of TWRP image file>

9. Reboot to recovery by holding the power + volume up button. Let go when the Huawei logo shows up. This should boot you straight to TWRP. If it goes to eRecovery, shutdown and repeat. If it boots to recovery, retry step 8, then move to step 10.

10. Execute this command (make sure backup.ab is present in the directory you're in):

adb restore

11. Reboot to bootloader (Home Screen > Reboot > Bootloader).

12. Reflash the stock recovery_ramdisk by executing this command:

fastboot flash recovery_ramdisk <name of stock recovery_ramdisk image file>

13. Then execute this command:

fastboot reboot

14. The phone should boot up to the condition before you installed the GSI. Have fun!

Damn, this is the lengthiest post I've ever made. Might need a break after this.