[GUIDE]*How to install a Generic System Image (GSI) on your HTC U12+

Romano2K

Senior Member
Feb 25, 2007
97
8
0
Paris
Hi!

I've had trouble installing a GSI on my HTC U12+, but AOSP GSI maintainer phhusson helped me, so I'm sharing a quick tutorial.

1. Download and extract Android SDK Platform Tools
2. Download the GSI of your choice (ARM64, AB variant), and move it inside platform tools folder (I've only tested AOSP 10.0)

3. Download and extract the HTC RUU Decryption and Extraction Tool
4. Download the RUU for your device and move it inside HTC-RUU_Decrypt_Tool_XXX folder
5. Follow instructions from the RUU Decryption Tool thread to decrypt and extract the RUU, with all default settings
6. Move the vbmeta.img file you've just extracted (it's inside HTC-RUU_Decrypt_Tool_XXX/OUT_XXX/firmware) to the platform tools folder

6. Unlock bootloader
7. Restore stock firmware with microSD method or factory reset if you already have stock firmware
8. Reboot in bootloader
9. From a computer, launch a terminal, change directory to the platform tools folder, then execute "fastboot erase system"
10. Then execute "fastboot flash system <your_gsi.img>"
11. Execute "fastboot reboot bootloader"
12. Execute "fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification" (WARNING : According to 5m4r7ph0n36uru, you can't flash vbmeta via fastboot if your device isn't S-OFF, you have to use TWRP, but I don't know how, so ask someone who knows! I will update my tutorial once I see instructions.)
13. Execute "fastboot reboot"

It should boot the GSI!

On first boot it may ask for a previous decryption password and complain about a corrupt data partition. You can erase it (you will lose what was inside).

If you have bugs or issues with the GSI, there may be workarounds here: https://github.com/phhusson/treble_experimentations/wiki/HTC-U12-Plus

Enjoy your GSI on your HTC U12+! :)
 
Last edited:

GaetanoS.89

Senior Member
Mar 15, 2016
427
83
28
Hi!

I've had trouble installing a GSI on my HTC U12+, but AOSP GSI maintainer phhusson helped me, so I'm sharing a quick tutorial.

1. Download and extract Android SDK Platform Tools
2. Download the GSI of your choice (ARM64, AB variant), and move it inside platform tools folder (I've only tested AOSP 10.0)

3. Download and extract the HTC RUU Decryption and Extraction Tool
4. Download the RUU for your device and move it inside HTC-RUU_Decrypt_Tool_XXX folder
5. Follow instructions from the RUU Decryption Tool thread to decrypt and extract the RUU, with all default settings
6. Move the vbmeta.img file you've just extracted (it's inside HTC-RUU_Decrypt_Tool_XXX/OUT_XXX/firmware) to the platform tools folder

6. Unlock bootloader
7. Restore stock firmware with microSD method or factory reset if you already have stock firmware
8. Reboot in bootloader
9. From a computer, launch a terminal, change directory to the platform tools folder, then execute "fastboot erase system"
10. Then execute "fastboot flash system <your_gsi.img>"
11. Execute "fastboot reboot bootloader"
12. Execute "fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification"
13. Execute "fastboot reboot"

It should boot the GSI!

On first boot it may ask for a previous decryption password and complain about a corrupt data partition. You can erase it (you will lose what was inside).

If you have bugs or issues with the GSI, there may be workarounds here: https://github.com/phhusson/treble_experimentations/wiki/HTC-U12-Plus

Enjoy your GSI on your HTC U12+! :)

Hello, which GSI did you tried from the list? If you tried more then one, which is the one that runs better?

Thank you :)
 

mientus25

Member
Mar 21, 2019
16
1
3
i have problem with this line fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification
My fastboot say C:\adb\fastboot.exe: unknown option -- disable-verity How to fix this?

Edit: My htc is dead, power button dont work, does not respond to the charger and PC.
 
Last edited:

Romano2K

Senior Member
Feb 25, 2007
97
8
0
Paris
i have problem with this line fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification
My fastboot say C:\adb\fastboot.exe: unknown option -- disable-verity How to fix this?

Edit: My htc is dead, power button dont work, does not respond to the charger and PC.
Hi mientus25! I'm sorry if you bricked your smartphone trying to flash it. I think the --disable-verity option not working was a matter of platform tools (adb) version.
 

xreeman

New member
Jan 14, 2020
1
0
0
fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification doesn't working
it says: not allowed in production device
bootloader:unlocked
 

5m4r7ph0n36uru

Senior Member
Apr 23, 2014
3,800
3,472
253
MD5: 91497e1b11f2262d0d8ff0aa7a164f3b
fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification doesn't working
it says: not allowed in production device
bootloader:unlocked
If on 2.55.401.1 try flashing this vbmeta. It already has verity and verification disabled, pulled from an S-OFF device allowing the above flashing commands. It flashed fine on my U12+ and I've been able to boot PE 10 GSI afterwards without any problems.
@Romano2K feel free to add it to the OP.
 

Attachments

Last edited:

GaetanoS.89

Senior Member
Mar 15, 2016
427
83
28
If on 2.55.401.1 try flashing this vbmeta. It already has verity and verification disabled, pulled from an S-OFF device allowing the above flashing commands. It flashed fine on my U12+ and I've been able to boot PE 10 GSI afterwards without any problems.

@Romano2K feel free to add it to the OP.

Hello, can I may ask you if I can send you a PM? I have an HTC u12+ and I would like to install and Android 10 GSI and I would like a step by step help to do it. Can you please also tell me which bugs are you facing with it? Thank you very much
 

5m4r7ph0n36uru

Senior Member
Apr 23, 2014
3,800
3,472
253
MD5: 91497e1b11f2262d0d8ff0aa7a164f3b
Hello, can I may ask you if I can send you a PM? I have an HTC u12+ and I would like to install and Android 10 GSI and I would like a step by step help to do it. Can you please also tell me which bugs are you facing with it? Thank you very much
No help by PM. I cannot do this for professional reasons. And also for personal reasons not to give individual support.
 

5m4r7ph0n36uru

Senior Member
Apr 23, 2014
3,800
3,472
253
MD5: 91497e1b11f2262d0d8ff0aa7a164f3b
All right, would you please write a message over with all the steps here? Thank you
Starting from a Stock ROM, Bootloader Unlocked, I took the following steps to flash and boot an Android 10 GSI to my HTC U12+:
  1. Go to Settings > System and perform a factory reset
  2. Reboot in the Bootloader by
    Code:
    adb reboot bootloader
  3. Delete the system and data partition by
    Code:
    fastboot erase data
    and
    Code:
    fastboot erase system
  4. Flash the nonverity vbmeta image via
    Code:
    fastboot flash vbmeta nameofvbmeta.img
    (the vbmeta image must be in the fastboot folder on your computer)
  5. Flash the GSI via
    Code:
    fastboot flasch system nameofgsi.img
    (the GSI must be in the fastboot folder on your computer)
  6. Reboots the HTC U12+ into Download Mode and perform another Factory Reset
  7. Reboot and enjoy
  8. If /data still can't be read, do another Factory Reset from settings menu
 
  • Like
Reactions: GaetanoS.89

5m4r7ph0n36uru

Senior Member
Apr 23, 2014
3,800
3,472
253
MD5: 91497e1b11f2262d0d8ff0aa7a164f3b
It may work for GSIs with a fixed verity status. Thus it doesn't work for some Android 10 GSIs without flashing a noverity vbmeta as. Thus I decided long ago, to never recommend such tools, and not to help people who used one, as those using such tools most of the time didn't even care learn the basics of adb and fastboot. I can't remember anyone, who used a tool, who's ever been fully capable to identify potential problems and errors, let alone how to solve them. And the latter is the baseline to start modding a device.

Sent from my Pixel 4 XL using XDA Labs
 
Last edited:
  • Like
Reactions: Justin2003

GaetanoS.89

Senior Member
Mar 15, 2016
427
83
28
Starting from a Stock ROM, Bootloader Unlocked, I took the following steps to flash and boot an Android 10 GSI to my HTC U12+:
Go to Settings > System and perform a factory reset
Reboot in the Bootloader by
Delete the system and data partition by and
Flash the nonverity vbmeta image via (the vbmeta image must be in the fastboot folder on your computer)
Flash the GSI via (the GSI must be in the fastboot folder on your computer)
Reboots the HTC U12+ into Download Mode and perform another Factory Reset
Reboot and enjoy
If /data still can't be read, do another Factory Reset from settings menu
Hello,

I have unlocked the bootloader yesterday, and I was having a look to your steps, and I noticed you are not using TWRP. Are you doing everything by CMD right?
 

GaetanoS.89

Senior Member
Mar 15, 2016
427
83
28
Hi!

I've had trouble installing a GSI on my HTC U12+, but AOSP GSI maintainer phhusson helped me, so I'm sharing a quick tutorial.

1. Download and extract Android SDK Platform Tools
2. Download the GSI of your choice (ARM64, AB variant), and move it inside platform tools folder (I've only tested AOSP 10.0)

3. Download and extract the HTC RUU Decryption and Extraction Tool
4. Download the RUU for your device and move it inside HTC-RUU_Decrypt_Tool_XXX folder
5. Follow instructions from the RUU Decryption Tool thread to decrypt and extract the RUU, with all default settings
6. Move the vbmeta.img file you've just extracted (it's inside HTC-RUU_Decrypt_Tool_XXX/OUT_XXX/firmware) to the platform tools folder

6. Unlock bootloader
7. Restore stock firmware with microSD method or factory reset if you already have stock firmware
8. Reboot in bootloader
9. From a computer, launch a terminal, change directory to the platform tools folder, then execute "fastboot erase system"
10. Then execute "fastboot flash system <your_gsi.img>"
11. Execute "fastboot reboot bootloader"
12. Execute "fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification"
13. Execute "fastboot reboot"

It should boot the GSI!

On first boot it may ask for a previous decryption password and complain about a corrupt data partition. You can erase it (you will lose what was inside).

If you have bugs or issues with the GSI, there may be workarounds here: https://github.com/phhusson/treble_experimentations/wiki/HTC-U12-Plus

Enjoy your GSI on your HTC U12+! :)

Hello I am trying to follow all the steps on the guode, but when I have to flash the vbmeta file from Bootloader Mode I am getting this:
C:\Users\User\Desktop\ADB2>fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB) OKAY [ 0.004s]
Writing 'vbmeta' FAILED (remote: 'Not allowed on PRODUCTION device')
fastboot: error: Command failed

If I try to install the vbmeta from Download Mode I am getting this error
 

Attachments

5m4r7ph0n36uru

Senior Member
Apr 23, 2014
3,800
3,472
253
MD5: 91497e1b11f2262d0d8ff0aa7a164f3b
Hello,

I have unlocked the bootloader yesterday, and I was having a look to your steps, and I noticed you are not using TWRP. Are you doing everything by CMD right?
Yes I'm doing everything from CMD indeed. Always do so, as long as it is possible.
@Romano2K vbmeta can't be flashed via fastboot on S-On/production devices. It has to be flashed as update.zip from TWRP. It should be mentioned anywhere.
 
Last edited:

GaetanoS.89

Senior Member
Mar 15, 2016
427
83
28
Yes I'm doing everything from CMD indeed. Always do so, as long as it is possible.
@Romano2K vbmeta can't be flashed via fastboot on S-On/production devices. It has to be flashed as update.zip from TWRP. It should be mentioned anywhere.
So how do I have to proceed??

9. From a computer, launch a terminal, change directory to the platform tools folder, then execute "fastboot erase system"
10. Then execute "fastboot flash system <your_gsi.img>"
11. Execute "fastboot reboot bootloader"
And after?
 

5m4r7ph0n36uru

Senior Member
Apr 23, 2014
3,800
3,472
253
MD5: 91497e1b11f2262d0d8ff0aa7a164f3b
So how do I have to proceed??

9. From a computer, launch a terminal, change directory to the platform tools folder, then execute "fastboot erase system"
10. Then execute "fastboot flash system <your_gsi.img>"
11. Execute "fastboot reboot bootloader"
And after?
Which software version are you running!?

Sent from my Pixel 4 XL using XDA Labs