Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

GSI Installation

shoukolate edited this page Feb 18, 2021 · 1 revision

ATTENTION: Read flashing instructions before proceeding. Keep in mind this will delete your data, so keep local backups. This guide also assumes you have ADB and Fastboot already installed on your computer. If you're on Windows you can install minimal ADB and Fastboot. Or if you're on a Unix/Unix-like system you can download it from your package manager.

If you downloaded a zip file, follow the below given instructions:

  1. Ensure your bootloader is unlocked. Instructions for this can be found here.
  2. Reboot to fastboot. (Reboot your phone and hold down the volume down button)
  3. Flash the official Android 9 firmware provided by Xiaomi with stock or TWRP recovery (Make sure you are booted in Slot B before booting into recovery). Android 10 is not compatible
  4. Hold the volume down button after the device reboots automatically to boot in fastboot mode.
  5. Boot TWRP from fastboot using fastboot boot twrp-3.4.0-0-jasmine_sprout.img
  6. Go to Advanced, then ADB sideload and slide to proceed.
  7. Flash the kernel with adb sideload Kernel-SDM660_Halium-XXXXXXXX-XXXX.zip.
  8. Once it's done, run ADB Sideload again and flash the Halium ramdisk with adb sideload halium-ramdisk.zip.
  9. Finally go back, run ADB Sideload again and flash your Erfan's UBports GSI with adb sideload ubports_GSI_installer_vX.zip. Then reboot.

If you downloaded an img file, follow the below given instructions:

  1. Ensure your bootloader is unlocked. Instructions for this can be found here.
  2. Reboot to fastboot. (Reboot your phone and hold down the volume down button)
  3. Flash the official Android 9 firmware provided by Xiaomi with Xiaomi Flash Tool on Windows or flash_all.sh on Linux. If the script is stuck in the title on Linux, run it as root. Android 10 is not compatible
  4. Hold the volume down button after the device reboots automatically to boot in fastboot mode.
  5. Boot TWRP from fastboot using fastboot boot twrp-3.4.0-0-jasmine_sprout.img
  6. Tap on install button and then tap on install image and then last select the img file and at last flash it as boot.
  7. Once it's done, go back and tap on advanced button and then tap on ADB Sideload button and flash the Halium ramdisk with adb sideload halium-ramdisk.zip.
  8. Finally go back, run ADB Sideload again and flash your Erfan's UBports GSI with adb sideload ubports_GSI_installer_vX.zip. Then reboot.

If you get the following error: adb: pre-KitKat sideload connection failed: closed on Linux, run adb kill-server and then run sudo adb start-server

More Info:

https://github.com/ubports/porting-notes/wiki/Generic-system-image-(GSI)

Clone this wiki locally