♞ Vasu's Journal

Hibreak Pro Guide 4: Flashing the Android 15 GSI

Before proceeding, refer to my previous guide on upgrading the stock firmware for instructions on how to backup the UFS.

0. Pre-Requisites

  1. A GSI image downloaded on your machine: I used phhusson's Trebledroid android 15 build. Link here. Make sure to download the file and extract the .img file from the archive.
  2. vbmeta, vbmeta_system, vbmeta_vendor partitions from stock: Uploaded here
  3. Unlocked bootloader: Follow the guide here on how to unlock your bootloader. As part of this, you'd also end up setting up android platform tools on your machine for fastboot commands, which are also required for this.

1. Flashing the GSI

  1. Reboot your phone to the bootloader mode. This can be done by running the command adb reboot bootloader with your phone connected to your PC.
  2. Once in bootloader mode, verify that your device is detected by running the command fastboot devices.
  3. Run the command to wipe all the data on the phone: fastboot -w
  4. With the files downloaded in step 2 from Section 0, run the following commands from the root of the downloaded files:
fastboot flash vbmeta_a --disable-verity --disable-verification vbmeta.img
fastboot flash vbmeta_b --disable-verity --disable-verification vbmeta.img
fastboot flash vbmeta_system_a --disable-verity --disable-verification vbmeta_system.img
fastboot flash vbmeta_system_b --disable-verity --disable-verification vbmeta_system.img
fastboot flash vbmeta_vendor_a --disable-verity --disable-verification vbmeta_vendor.img
fastboot flash vbmeta_vendor_b --disable-verity --disable-verification vbmeta_vendor.img
  1. Following this, reboot the phone to fastbootd mode with the command fastboot reboot fastboot.
  2. With the phone now in fastbootd mode, run the following command to flash the GSI: fastboot flash system <path to GSI .img>
  3. Reboot your phone with simply fastboot reboot

2. Bonus- Brightness and Refresh Mode Tweaks

  1. On the first boot, the screen might be unresponsive, we need to disable HW display overlays. This can be done with the command: adb shell service call SurfaceFlinger 1008 i32 1. This can also be done by viewing your phone screen on your PC through vysor or scrcpy, navigating to Developer Options and checking the option for Disable HW overlays.
  2. Now, start adb as root with the command adb root and open the adb shell with adb shell.
  3. To set the global refresh mode, navigate to this directory: cd /sys/kernel/debug/eink_debug and run the command echo <eink_mode_code> > global_mode The available codes can be found from my post on Reddit here.
  4. To set the warm and cold backlight values, navigate to this directory: cd /sys/devices/platform/11d01000.i2c7/i2c-7/7-0036 and run the command echo <value> > lm3630a_cold_light for the cold light and echo <value> > lm3630a_warm_light for the warm light.