[HOW-TO] Flash A/B Treble GSI ROMs without TWRP

Search This thread
Android devices can have different designs, so there is no generic command or set of instructions for flashing a GSI to apply to all devices. Specially for Xperias am i writing this Guides for You. So please read carefully...

1. Ensure that You have the following before You start:
  • Latest Fastboot Version (Or the used fastboot commands may not work)
  • A Method for disabling Android Verified Boot (Part of the Guide)
  • An unlocked Bootloader State (Official Instructions HERE)

To Start:
  • Download the Basic Package from Google: https://developer.android.com/topic/generic-system-image/releases
  • Download the AOSP Vendor Package from Sony: https://developer.sony.com/develop/open-devices/downloads/software-binaries
  • Open up the Zip Files and place the 3 included Images on Your fastboot destination
  • Boot Your Device into Fastboot:
    Code:
    Turn off Your Device and hold VolumeUP while connecting via USB to a PC or use ADB to reboot to fastboot
  • Disable the verified booting (AVB) by flashing vbmeta.img:
    Code:
    fastboot --disable-verification flash vbmeta vbmeta.img
  • Flash the Vendor to the Primary A Slot OEM:
    Code:
    fastboot flash oem_a nameofthesonyoemimage.img
  • Repeat to flash to the B Slot OEM
    Code:
    fastboot flash oem_b nameofthesonyoemimage.img
  • Flash the GSI to the Primary A Slot System:
    Code:
    fastboot flash system_a system.img
  • Repeat to flash to the B Slot System
    Code:
    fastboot flash system_b system.img
  • Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions):
    Code:
    fastboot -w
  • Reboot:
    Code:
    fastboot reboot


Additional:
  1. You can use any Android 9+ GSI out of the XDA Forum here: https://forum.xda-developers.com/project-treble/trebleenabled-device-development
  2. To get Magisk/Root; just patch Your actual Kernel with the Magisk Manager App and flash the Boot Image together with the GSI (Example below)
  3. Patched Boot Image for Xperia 5 Users: https://forum.xda-developers.com/xp...isk-v20-3-patched-boot-image-android-t4033547
 
Last edited:

charlatan01

Senior Member
Jan 10, 2008
976
204
Denver
Hoping to carry this on here, since I own the 1 not the 5 :) In order to de-google my life, I've decided that I am ready for GSI!

A few notes from my flashing weekend;

Following these instructions, from an unlocked Xperia 1 running stock rom, worked for the following;
ExpressLuke's Havoc 3.0
LineageOS 17.x

Interesting thing. These both install to system in 3 parts (when watching the flash to system.
Any other that I tried (installing in 2 parts) did not seem to work.. but then I am new at this. It's entirely possible that some of these failed because I didn't re-flash stock first.
I was also using a patched boot / kernel with a specific magisk version, which might have played a part. Failed are also (obviously) Pie. :confused:
Failed flashes were;
PPH Treble AOSP 9
Havoc 2.9 Official


So far, I've been blown away with Havoc. Of the tons of things I've run in the last 24, I've seen the following issues;
1) Call volume on handset doesn't seem to do anything. (Bluetooth works fine)
2) I had one reboot last evening. Since then solid as a rock.
3) Selection of notification sound for fastmail app didn't take right away

I haven't worked up the courage to try setting up twrp yet, so no recovery. I may give magisk a shot later tonight. I need to back this stuff up somehow!

Thanks to @Miustone for replying and making things easier, and @thatguy222 for the info he provided in the Xperia 5 thread!
 
Last edited:
Hoping to carry this on here, since I own the 1 not the 5 :) In order to de-google my life, I've decided that I am ready for GSI!

A few notes from my flashing weekend;

Following these instructions, from an unlocked Xperia 1 running stock rom, worked for the following;
ExpressLuke's Havoc 3.0
LineageOS 17.x

Interesting thing. These both install to system in 3 parts (when watching the flash to system.
Any other that I tried (installing in 2 parts) did not seem to work.. but then I am new at this. It's entirely possible that some of these failed because I didn't re-flash stock first.
I was also using a patched boot / kernel with a specific magisk version, which might have played a part. Failed are also (obviously) Pie. :confused:
Failed flashes were;
PPH Treble AOSP 9
Havoc 2.9 Official


So far, I've been blown away with Havoc. Of the tons of things I've run in the last 24, I've seen the following issues;
1) Call volume on handset doesn't seem to do anything. (Bluetooth works fine)
2) I had one reboot last evening. Since then solid as a rock.
3) Selection of notification sound for fastmail app didn't take right away

I haven't worked up the courage to try setting up twrp yet, so no recovery. I may give magisk a shot later tonight. I need to back this stuff up somehow!

Thanks to @Miustone for replying and making things easier, and @thatguy222 for the info he provided in the Xperia 5 thread!

Thanks for Your great Feedback! Glad i was able to help out :) Think i will add some stuff to the Guides soon. Wonder if i get Contributer Status now :silly:
 

Tabike

Member
Mar 27, 2020
12
1
Android devices can have different designs, so there is no generic command or set of instructions for flashing a GSI to apply to all devices. Check with the manufacturer of the Android device for explicit flashing instructions. Use the following steps as a general guideline:

1. Ensure that the Device has the following:
  • Treblized
  • A method for unlocking devices (so they can be flashed using fastboot)
  • A method for disabling verify boot (for example, vboot 1.0 or AVB)
  • An unlocked state to make it flashable via fastboot (To ensure that you have the latest version of fastboot, build it from the Android source tree.)
2. Disable verify boot.
3. Erase the current system partition, then flash the GSI to the system partition.
4. Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions).
5. Reboot the device.

To Start:
  • Download the Basic Package from Google: https://developer.android.com/topic/generic-system-image/releases
  • Open up the Zip File and place the 2 Images on Your fastboot destination
  • Boot Your Device into Fastboot:
    Code:
    Turn off Your Device and hold VolumeUP while connecting via USB to a PC
  • Disable verify boot (AVB) by flashing vbmeta.img:
    Code:
    fastboot --disable-verification flash vbmeta vbmeta.img
  • Erase and flash the GSI to the system partition:
    Code:
    fastboot erase system
    fastboot flash system system.img
  • Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions):
    Code:
    fastboot -w
  • Reboot:
    Code:
    fastboot reboot


Additional:
  1. You can use any Android 9+ GSI out of the XDA Forum here: https://forum.xda-developers.com/project-treble/trebleenabled-device-development
  2. To get Magisk/Root; just patch Your actual Kernel with the Magisk Manager App and flash the Boot Image together with the GSI (Example below)
  3. Patched Boot Image for Xperia 5 Users: https://forum.xda-developers.com/xp...isk-v20-3-patched-boot-image-android-t4033547

Please, try to install gcam in lineageos 17!
What happen with drm keys when you flash other roms? I love sound settings of sony ui and settings of display.
 
  • Like
Reactions: Sugarcube8th

charlatan01

Senior Member
Jan 10, 2008
976
204
Denver
I haven't been confident in the gcam build for the 1, but I'm quite pleased with open camera thus far.
The only DRM issue I'm aware of is widevine level dropping. I'm perfectly happy with my unlocked 1.
 

MeltdownSpectre

Retired Forum Moderator
Jan 12, 2013
2,958
2,565
Samsung Galaxy S22 Ultra
I haven't been confident in the gcam build for the 1, but I'm quite pleased with open camera thus far.
The only DRM issue I'm aware of is widevine level dropping. I'm perfectly happy with my unlocked 1.
Did you notice any degradation in photo / video quality on stock ROM with the bootloader unlocked?

I'm considering unlocking my X1, but I want to know if the consequences are as bad as they used to be a few years ago with the Z2 and Z3.
 

charlatan01

Senior Member
Jan 10, 2008
976
204
Denver
Did you notice any degradation in photo / video quality on stock ROM with the bootloader unlocked?

I'm considering unlocking my X1, but I want to know if the consequences are as bad as they used to be a few years ago with the Z2 and Z3.

As soon as I unlocked I went to a custom ROM, so I didn't test on stock. Sorry. I think there are some people in the ROM section that said pics looked good. They definitely confirmed there was no green or blue tint like there was with those other devices
 
Just finished flashing, thank you so much with the tutorial. At the -w step, it didn't seem to find the /userdata, and I tried to skip the part and just reboot. After what seems like a bootloop, it automatically rebooted to "Android Recovery" which I assume is a part of the gsi? It prompted me to wipe data and I did, and it booted!
 
  • Like
Reactions: sebmue

Chima2

Senior Member
Apr 25, 2012
164
34
Stein's Gate
So, a Generic System Image is just a generic version of Android? Essentially then, I could flash other ROMS - some of whom are listed in this thread (Havoc etc) and get a brand new experience? It doesn't say so here in the thread, but I'm guessing I need to unlock my bootloader - correct?
 
I'm building Overlays for the Xperia 1 & 5 if anyone is willed to grab me the FrameworksResCommon.apk overlay from your device in /vendor/overlay
I need to decompile it, so You can do it anyways if You are willed to. I also need the build fingerprint from the build prop. It should say anything like:
ro.vendor.build.fingerprint=Sony......

The next step for GSIs on our Xperias! I will also look into a GCam Mod for our Devices! Installing Ubuntu 20.04 now...
 
  • Like
Reactions: TrustAugustus
Can we use also Havoc OS 3.6 then bro and does it have bugs ?

Works just fine like the latest PHH AOSP Versions with passing SafetyNet. I recommend using My latest Guide here to use it. Things that don't Work yet are:
-VoLTE
-Always on Display
-Camera Button
-HDR 4K native Video Playback in Apps
I recommend using Open Camera with CameraAPI2 enabled in the settings since we don't have GCam. Otherwise it's fine to use...
 
Works just fine like the latest PHH AOSP Versions with passing SafetyNet. I recommend using My latest Guide here to use it. Things that don't Work yet are:
-VoLTE
-Always on Display
-Camera Button
-HDR 4K native Video Playback in Apps
I recommend using Open Camera with CameraAPI2 enabled in the settings since we don't have GCam. Otherwise it's fine to use...
@Miustone do you have telegram btw ? Sorry for OT
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Android devices can have different designs, so there is no generic command or set of instructions for flashing a GSI to apply to all devices. Specially for Xperias am i writing this Guides for You. So please read carefully...

    1. Ensure that You have the following before You start:
    • Latest Fastboot Version (Or the used fastboot commands may not work)
    • A Method for disabling Android Verified Boot (Part of the Guide)
    • An unlocked Bootloader State (Official Instructions HERE)

    To Start:
    • Download the Basic Package from Google: https://developer.android.com/topic/generic-system-image/releases
    • Download the AOSP Vendor Package from Sony: https://developer.sony.com/develop/open-devices/downloads/software-binaries
    • Open up the Zip Files and place the 3 included Images on Your fastboot destination
    • Boot Your Device into Fastboot:
      Code:
      Turn off Your Device and hold VolumeUP while connecting via USB to a PC or use ADB to reboot to fastboot
    • Disable the verified booting (AVB) by flashing vbmeta.img:
      Code:
      fastboot --disable-verification flash vbmeta vbmeta.img
    • Flash the Vendor to the Primary A Slot OEM:
      Code:
      fastboot flash oem_a nameofthesonyoemimage.img
    • Repeat to flash to the B Slot OEM
      Code:
      fastboot flash oem_b nameofthesonyoemimage.img
    • Flash the GSI to the Primary A Slot System:
      Code:
      fastboot flash system_a system.img
    • Repeat to flash to the B Slot System
      Code:
      fastboot flash system_b system.img
    • Wipe the user data and clear the data from other necessary partitions (for example, user data and system partitions):
      Code:
      fastboot -w
    • Reboot:
      Code:
      fastboot reboot


    Additional:
    1. You can use any Android 9+ GSI out of the XDA Forum here: https://forum.xda-developers.com/project-treble/trebleenabled-device-development
    2. To get Magisk/Root; just patch Your actual Kernel with the Magisk Manager App and flash the Boot Image together with the GSI (Example below)
    3. Patched Boot Image for Xperia 5 Users: https://forum.xda-developers.com/xp...isk-v20-3-patched-boot-image-android-t4033547
    3
    You could mention Treble support means "since XZ1" (unless hacks)
    3
    Hi, can I use Android 11 binary to flash A12 GSI? Very curious, thanks!
    Yes you can.
    3
    Can we use also Havoc OS 3.6 then bro and does it have bugs ?

    Works just fine like the latest PHH AOSP Versions with passing SafetyNet. I recommend using My latest Guide here to use it. Things that don't Work yet are:
    -VoLTE
    -Always on Display
    -Camera Button
    -HDR 4K native Video Playback in Apps
    I recommend using Open Camera with CameraAPI2 enabled in the settings since we don't have GCam. Otherwise it's fine to use...
    2
    Hoping to carry this on here, since I own the 1 not the 5 :) In order to de-google my life, I've decided that I am ready for GSI!

    A few notes from my flashing weekend;

    Following these instructions, from an unlocked Xperia 1 running stock rom, worked for the following;
    ExpressLuke's Havoc 3.0
    LineageOS 17.x

    Interesting thing. These both install to system in 3 parts (when watching the flash to system.
    Any other that I tried (installing in 2 parts) did not seem to work.. but then I am new at this. It's entirely possible that some of these failed because I didn't re-flash stock first.
    I was also using a patched boot / kernel with a specific magisk version, which might have played a part. Failed are also (obviously) Pie. :confused:
    Failed flashes were;
    PPH Treble AOSP 9
    Havoc 2.9 Official


    So far, I've been blown away with Havoc. Of the tons of things I've run in the last 24, I've seen the following issues;
    1) Call volume on handset doesn't seem to do anything. (Bluetooth works fine)
    2) I had one reboot last evening. Since then solid as a rock.
    3) Selection of notification sound for fastmail app didn't take right away

    I haven't worked up the courage to try setting up twrp yet, so no recovery. I may give magisk a shot later tonight. I need to back this stuff up somehow!

    Thanks to @Miustone for replying and making things easier, and @thatguy222 for the info he provided in the Xperia 5 thread!