FORUMS
Remove All Ads from XDA

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

509 posts
Thanks Meter: 586
 
By Exelios, Senior Member on 7th June 2018, 12:29 AM
Post Reply Email Thread
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.
The Following 44 Users Say Thank You to Exelios For This Useful Post: [ View ] Gift Exelios Ad-Free
 
 
7th June 2018, 12:52 AM |#2  
OP Senior Member
Flag Berlin
Thanks Meter: 586
 
More
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.

---------------------------------------------------------------------------------------------------------------------------------------------------
The Following 15 Users Say Thank You to Exelios For This Useful Post: [ View ] Gift Exelios Ad-Free
7th June 2018, 01:28 AM |#3  
joemossjr's Avatar
Senior Member
Flag Elizabethtown Kentucky
Thanks Meter: 1,684
 
More
So if its marking it as unbootable can't you fastboot --set-active=other to get back to a bootable state?
7th June 2018, 05:06 AM |#4  
samteeee's Avatar
Senior Member
Flag Brampton
Thanks Meter: 206
 
Donate to Me
More
@Exelios

Thank you for sharing.
7th June 2018, 05:39 AM |#5  
CertifiedBlyndGuy's Avatar
Retired Forum Moderator / Recognized Developer
Flag I can't see to tell where I am
Thanks Meter: 3,021
 
Donate to Me
More
Thread moved. Since this appears to be documentation rather than a physical product, this is the proper subforum.


Thank you!




-RJ
The Following 2 Users Say Thank You to CertifiedBlyndGuy For This Useful Post: [ View ]
7th June 2018, 08:10 AM |#6  
Senior Member
Flag Walsall
Thanks Meter: 981
 
More
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
7th June 2018, 08:16 AM |#7  
OP Senior Member
Flag Berlin
Thanks Meter: 586
 
More
Quote:
Originally Posted by joemossjr

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
7th June 2018, 08:29 AM |#8  
OP Senior Member
Flag Berlin
Thanks Meter: 586
 
More
Quote:
Originally Posted by CertifiedBlyndGuy

Thread moved. Since this appears to be documentation rather than a physical product, this is the proper subforum.


Thank you!




-RJ

An actual piece of software will be added by the end of the day.

Sent from my OnePlus 6 using XDA Labs
The Following User Says Thank You to Exelios For This Useful Post: [ View ] Gift Exelios Ad-Free
7th June 2018, 09:19 AM |#9  
Retired Recognized Developer
Stockholm
Thanks Meter: 3,465
 
More
Any more details of what you found?, i tried numerous bootloader verity combos, only system.img that boots is aosp v18.
7th June 2018, 09:49 AM |#10  
OP Senior Member
Flag Berlin
Thanks Meter: 586
 
More
Quote:
Originally Posted by DocRambone

Any more details of what you found?, i tried numerous bootloader verity combos, only system.img that boots is aosp v18.

Give it a day, phh is trying to implement fixes to the findings in a more elegant and easier way for the end user, this thread was more intended to share our findings with other devs.
The Following User Says Thank You to Exelios For This Useful Post: [ View ] Gift Exelios Ad-Free
7th June 2018, 10:51 AM |#11  
joemossjr's Avatar
Senior Member
Flag Elizabethtown Kentucky
Thanks Meter: 1,684
 
More
Quote:
Originally Posted by DocRambone

Any more details of what you found?, i tried numerous bootloader verity combos, only system.img that boots is aosp v18.

I've booted multiple roms comsic aosp aosip they boot just gotta get it right the first time
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes