[TREBLE][DEV] Mistery solved, developer documentation for GSI on One Plus 6

Exelios

Senior Member
Jul 3, 2014
511
589
0
Berlin
So after 2 weeks of debugging and trying to figure out why Treble GSI were not booting, then booting only for some users the final answer has been found.

This bootloader is way too stateful.
So if you try directly with proper vbmeta & system.img, you won't notice anything, it will just work, that's why some people say it works.

If you try system first without doing vbmeta, then it will mark the slot as not bootable. Flashing vbmeta afterwards will NOT mark it as bootable.

it also requires the latest fastboot with --disable-verity and --disable-verification, don't know why yet exactly.

Now if you bootloop to mark it as bootable again, you need to flash the boot partition of the slot.
Even worse than that "fastboot boot" works only if current slot is not marked as not bootable, so any try to launch TWRP fails once your in this mode.

This same issue also applies to users trying to restore to stock sometimes.

This means that the One Plus 6 will require proper documentation on how to do things, and people will have to stick to it, see official instructions in post 2.

Now that we know what the exact cause is, and how to deal with it, let the development begin.


PS
Doesn't seem to be OP fault, just stock Qualcomm bootloader.

Credits to Phhusson and me for making this possible, providing phh a device, documenting the findings and all.
 
Last edited:

Exelios

Senior Member
Jul 3, 2014
511
589
0
Berlin
WARNING This is still ALPHA

OFFICIAL INSTRUCTIONS

Correct installation procedure of a GSI on the One Plus 6, determined together with @phhusson
Make sure you unlocked the bootloader and that you have the absolute latest ADB and Fastboot from Google, none of the minimal packages we know of will work!

Then in fastboot flash the following, WITHOUT rebooting in between! this needs to be done all in one go!

Code:
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
Use the STOCK boot image!

Then flash the GSI system image of your choice
Code:
fastboot flash system_a system.img
fastboot flash system_b system.img
Then flash STOCK vbmeta image with the specific commands!

Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
then just fastboot reboot or select start on the phone.


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

If the above fails and you get a bootloop you will have to repeat all the steps above.

---------------------------------------------------------------------------------------------------------------------------------------------------
 
Last edited:

rav101

Senior Member
Dec 1, 2013
2,333
1,272
183
Walsall
Great work man,

I had held off trying as I didn't know if it would work for me or not. Looking forward to trying this out!!!

Sent from my OnePlus6 using XDA Labs
 

Exelios

Senior Member
Jul 3, 2014
511
589
0
Berlin
So if its marking it as unbootable can't you fastboot --set-active=other to get back to a bootable state?
Yeah you can do that once, but to get your first slot back you will need to re flash boot also at some point.

And remember once you flash boot you need to root and TWRP again.

Sent from my OnePlus 6 using XDA Labs
 

Exelios

Senior Member
Jul 3, 2014
511
589
0
Berlin
What is the findings so far?
Other then what's in the OP there seems to be also something else causing issues, not sure yet what exactly it is

Nope, phh just gave me the wrong vbmeta.img, one needs to use stock vbmeta not a modified one omg
I feel like an idiot now :D

But LOS still doesn't boot, something regarding sensors, stuck on boot logo.
 
Last edited:
  • Like
Reactions: eminem5055

eminem5055

Senior Member
May 18, 2009
101
17
0
Other then what's in the OP there seems to be also something else causing issues, not sure yet what exactly it is

Nope, phh just gave me the wrong vbmeta.img, one needs to use stock vbmeta not a modified one omg
I feel like an idiot now :D

But LOS still doesn't boot, something regarding sensors, stuck on boot logo.
I couldn't get v19 of phh's AOSP to boot for the longest time until I tried this! Thanks man!! :D:good:
 

Exelios

Senior Member
Jul 3, 2014
511
589
0
Berlin
I have cleaned up the OP and added clear instructions in post 2.

Tho LOS still doesn't boot for now, but that's because of a bug specific to the GSI, not a bootloader issue.
 

Exelios

Senior Member
Jul 3, 2014
511
589
0
Berlin
Ok. Just PM me and I'll move the thread when it happens ;)
Might I ask to make this a sticky?

Because every developer needs to be aware of it, this doesn't affect just GSI, one can run in the same issue even if flashing TWRP or restoring to stock or anything.

And every user should know about the official way to do things on the One Plus 6, which is slightly different then all other phones.

Thanks