[Device Reviews and Information] santosst:
How to Install or Upgrade Android 10 GSI custom ROMs on Chuwi Hi9 Air

How to Install or Upgrade Android 10 GSI custom ROMs on Chuwi Hi9 Air

Initial Considerations:

- I based this tutorial on the Android 9 equivalent one, developed by uncleabubear, and added some information I found about installing Android 10, mainly on phhusson GitHub. Credits for them and for all that have contributed.

- I don't know if there are unnecessary steps in this tutorial, but as it is, it works. If someone perceives something wrong, poorly explained or unnecessary, you can comment and I will change it.

- I am using Linux Mint 20 as my OS, and I have installed adb and fastboot from terminal ('sudo apt install adb fastboot'). This is the link for installing these tools on Windows.

- Just start this tutorial when you are sure of what you are doing. Don't forget to charge your tablet before you start!

- I am not responsible for anything that may occur on your tablet during or after your attempt to following this tutorial!

----------------------------------------------------------------------------

Tutorial for installing Android 10 GSI custom ROMs on Chuwi Hi9 Air.

METHOD 1 - Using fastboot

(I have tested with phh's AOSP v222, Havoc OS v3.7, and BLISS v223, all vanilla)

1- Backup all your data and everything important to you. ALL YOUR DATA WILL BE WIPED!

2- Use the SP flash tool to flash the stock ROM ('Download' tab, 'Firmware upgrade' option; click the 'Download' button and THEN plug the USB cable into the tablet). I used 'Update_20181122'. Unplug the USB cable when the check symbol appears on the PC screen.

3- Boot the tablet (it takes a long time) and set up it as new. It is not necessary to add passwords, Wifi connections, or a Google account for now.

4- Enable developer options (tap on the 'Build number' seven times at 'System -> About tablet'). Go back, enter in the 'Developer options' and enable 'OEM unlocking' and 'USB debugging'.

5- Go back, enter in 'Reset' and then in 'Factory data reset'. Tap on 'Reset Tablet' and confirm tapping on 'Erase everything'.

6- Chuwi logo will appear, and after the 'Erasing' screen will be shown for a little while. When the Chuwi logo appears again, long-press the button to power off the tablet to avoid the reconfiguration of the Oreo system.

7- Enter Fastboot mode (Power + Vol up buttons to enter boot mode menu, vol up to select 'Fastboot Mode' and vol down to enter). On the PC, open the terminal (Linux) or cmd (windows) and navigate to the folder where are the image files you will install.

8- Commands to run in Fastboot mode:

8a- 'fastboot oem unlock' to unlock the fastboot. Press vol up to confirm

8b- 'fastboot erase system' to format the System partition

8c- 'fastboot -u flash system NameOfROMFile.img' (Replace 'NameOfROMFile.img' with the correct file name).

8d- 'fastboot reboot' to reboot the tablet. Unplug the USB cable. The 'Orange State' message should appear together with the Chuwi logo.

8e- If the boot stuck at the Chuwi logo, long press the power button to power off the tablet and power on again. If that still doesn't work, try turning on the tablet by pressing the power button + vol up. In my case, the tablet entered the 'Erasing' screen, and after it booted.

9- The tablet will show the boot animation (and will be stuck on it!). Wait for some minutes and then long-press the power button to power off the tablet.

10- Use the SP flash tool to install TWRP ('Download' tab, 'Download Only' option; click the 'Download' button and THEN plug the USB cable into the tablet). I used 'twrp_3.2.2-0_Hi9Air'. Unplug the USB cable when the check symbol appears on the PC screen.

11- Enter Recovery mode (Power + Vol up buttons to enter boot mode menu, vol up to select 'Recovery Mode' and vol down to enter). Cancel any attempt to use a password or PIN. Swipe to allow modifications.

12- On the TWRP Recovery, Click 'Wipe' and 'Swipe to Factory Reset'. Press back twice and reboot to Recovery again. Swipe to allow modifications. Connect the tablet to your PC.

13- Click 'Mount' and check 'System'. Go back to the main screen again.

14- On your PC, open the terminal (Linux) or cmd (windows) and navigate to the folder where is the necessary patch for Android 10. Run the following commands:

14a- 'adb push ld.config.26.txt /system/etc/ld.config.26.txt'

14b- 'adb push ld.config.26.txt /system/lib/vndk-26/ld.config.26.txt'

14c- 'adb shell cp /system/lib/vndk-26/libstdc++.so /system/lib/vndk-sp-26/libstdc++.so'

14d- 'adb shell chcon -t system_lib_file /system/lib/vndk-sp-26/libstdc++.so'

NOTE: I made a small flashable zip file that does the necessary changes via TWRP. It is possible to replace steps 13 and 14 by installing the attached zip.

15- (Optional) Copy Magisk and Opengapps to your tablet and install them (I used 'Magisk-ef9d077c-phh.zip' and 'open_gapps-arm64-10.0-pico-20200731.zip'; the zip in this link should work fine too): 'Install' -> select the zip in your storage and 'Swipe to confirm flash'. Go back to the main screen of the TWRP Recovery.

NOTE: phh's quack-v222 and AndyYan's Lineage OS 17.1 are pre-rooted. If you don't want to use root or prefer Magisk, I recommend skipping this step for now; start the system only with the patch from steps 13 and 14, use securize button in Settings->Phh Treble Settings->Misc features and, after reboot, enter Recovery mode again, follow step 12 and then install Gapps and/or Magisk.

16- Reboot to system. During the boot process, the system should encrypt the Data partition and reboot again. Wait some minutes and voilà, your Hi9 Air is running Android 10! In my case, the tablet rebooted once again at the initial configuration screen. Wait it reboots again and be happy with your Hi9 Air!

METHOD 2 - Using SP flash tool (Thanks to @amg314 for the suggestion!)

1- Backup all your data and everything important to you. ALL YOUR DATA WILL BE WIPED!

2- Use the SP flash tool to flash the stock ROM ('Download' tab, 'Firmware upgrade' option; click the 'Download' button and THEN plug the USB cable to the tablet). I used 'Update_20181122'. Unplug the USB cable when the check symbol appears on the PC screen.

3- Boot the tablet (it takes a long time) and set up it as new. It is not necessary to add passwords, Wifi connections, or a Google account for now. It's basically only for ensuring that the fresh installation is ok.

4- Go to Settings, 'Reset' and then in 'Factory data reset'. Tap on 'Reset Tablet' and confirm tapping on 'Erase everything'.

5- Chuwi logo will appear, and after the 'Erasing' screen will be shown for a little while. When the Chuwi logo appears again, long-press the button to power off the tablet to avoid the reconfiguration of the Oreo system.

6- Use the SP flash tool to flash the new GSI; use the same scatter-loading file of the stock ROM, but change the option to 'Download only'; finally, uncheck all the partitions other than 'system' and put the path to your respective GSI system.img file in the location column; click the 'Download' button and THEN plug the USB cable to the tablet.

7- Also use the SP flash tool to install TWRP ('Download' tab, 'Download Only' option; click the 'Download' button and THEN plug the USB cable to the tablet). I used 'twrp_3.2.2-0_Hi9Air'. Unplug the USB cable when the check symbol appears on the PC screen.

8- Enter Recovery mode (Power + Vol up buttons to enter boot mode menu, vol up to select 'Recovery Mode' and vol down to enter). Cancel any attempt to use a password or PIN. Swipe to allow modifications. Connect the tablet to your PC.

9- Click 'Mount' and check 'System'. Go back to the main screen again.

10- On your PC, open the terminal (Linux) or cmd (windows) and navigate to the folder where is the necessary patch for Android 10. Run the following commands:

10a- 'adb push ld.config.26.txt /system/etc/ld.config.26.txt'

10b- 'adb push ld.config.26.txt /system/lib/vndk-26/ld.config.26.txt'

10c- 'adb shell cp /system/lib/vndk-26/libstdc++.so /system/lib/vndk-sp-26/libstdc++.so'

10d- 'adb shell chcon -t system_lib_file /system/lib/vndk-sp-26/libstdc++.so'

NOTE: I made a small flashable zip file that does the necessary changes via TWRP. It is possible to replace steps 9 and 10 by installing the attached zip.

11- Since we don't unlock fastboot, we will need to disable dm-verity to be able to boot into the new system. One option is to flash Magisk, so if the GSI you are installing is not pre-rooted and you want to use Magisk, go to the next step. If not, flash the dm-verity disabler zip file (you can download it here). Make sure that the zip name doesn't contain "forceencrypt" if you want to maintain the data encryption.

12- (Optional) Copy Magisk and Opengapps to your tablet and install them (I used 'Magisk-ef9d077c-phh.zip' and 'open_gapps-arm64-10.0-pico-20200731.zip'; the zip in this link should work fine too): 'Install' -> select the zip in your storage and 'Swipe to confirm flash'. Go back to the main screen of the TWRP Recovery.

NOTE: phh's quack-v222 and AndyYan's Lineage OS 17.1 are pre-rooted. If you don't want to use root or prefer Magisk, I recommend skipping this step for now; start the system only with the patch from steps 9 and 10, use the securize button in Settings->Phh Treble Settings->Misc features and, after reboot, enter Recovery mode, do a factory reset, reboot to recovery again and then install Gapps and/or Magisk.

13- Reboot to system. During the boot process, the system should encrypt the Data partition and reboot again. Wait some minutes and voilà, your Hi9 Air is running Android 10! In my case, the tablet rebooted once again at the initial configuration screen. Wait it reboots again and be happy with your Hi9 Air!

----------------------------------------------------------------------------

Tutorial for dirty upgrading GSI custom ROMs on Chuwi Hi9 Air through fastboot.

(I have tested Havoc OS upgrade from v3.7 to v3.8, with Magisk and Opengapps installed)

1- Backup all your data and everything important to you.

2- (Optional) Prepare an SD card or an OTG device (pen drive + micro USB adapter) to install Magisk and Opengapps zips (I suppose your Data partition is encrypted and it is not accessible from TWRP).

3- Enter Fastboot mode (if the tablet is powered on, use the advanced reboot menu. If it is powered off, press Power + Vol up buttons to enter boot mode menu, vol up to select 'Fastboot Mode' and vol down to enter). On the PC, open the terminal (Linux) or cmd (windows) and navigate to the folder where are the image file you will install.

4- Commands to run in Fastboot mode:

4a- 'fastboot erase system' to format the System partition

4b- 'fastboot -u flash system NameOfROMFile.img' (Replace 'NameOfROMFile.img' with the correct file name).

4c- 'fastboot reboot' to reboot the tablet. Unplug the USB cable.

5- The tablet will show the boot animation (and will be stuck on it!). Wait for some minutes and then long-press the power button to power off the tablet.

6- Enter Recovery mode (Power + Vol up buttons to enter boot mode menu, vol up to select 'Recovery Mode' and vol down to enter). Cancel any attempt to use a password or PIN. Swipe to allow modifications.

7- (Optional) Insert your OTG device and mount it in 'Mount' Section; if you are using an SD-card, mount it. Now you can reinstall Opengapps (I used the same file I have used during the fresh install): 'Install' -> select the zip in your storage and 'Swipe to confirm flash' (You will probably need to change the storage from the internal to the SD card or the OTG device). Go back to the main screen of the TWRP Recovery.

8- Click 'Mount' and check 'System'. Go back to the main screen again. Connect the tablet to your PC.

9- On your PC, open the terminal (Linux) or cmd (windows) and navigate to the folder where is the necessary patch for Android 10. Run the following commands:

9a- 'adb push ld.config.26.txt /system/etc/ld.config.26.txt'

9b- 'adb push ld.config.26.txt /system/lib/vndk-26/ld.config.26.txt'

9c- 'adb shell cp /system/lib/vndk-26/libstdc++.so /system/lib/vndk-sp-26/libstdc++.so'

9d- 'adb shell chcon -t system_lib_file /system/lib/vndk-sp-26/libstdc++.so'

NOTE: You can replace steps 8 and 9 by the installation of the attached zip.

10- Reboot to the system and enjoy!

Soon I want to test this tutorial with a more stable version of phhusson AOSP v11.0.