• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

Exelios

Senior Member
Jul 3, 2014
512
590
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
512
590
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:

Exelios

Senior Member
Jul 3, 2014
512
590
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
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
512
590
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
512
590
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
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    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.
    17
    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.

    ---------------------------------------------------------------------------------------------------------------------------------------------------
    5
    So V20 of phh AOSP has been released and it contains several One Plus 6 specific fixes, such as:

    - [OnePlus6] Fixes backlight
    - [OnePlus6] Partial support for DnD slider
    - Fixes bug on some A/B devices where device would stop booting after several success

    Head over to the AOSP GSI thread for downloads
    https://forum.xda-developers.com/pr...-development/experimental-phh-treble-t3709659

    Lineage OS version is currently building, and will become available when it becomes available.
    4
    Bootlooping back to twrp at first, then another time into fastboot with no twrp even installed (Very weird behavior). I tried the RR and LOS builds for now. But v18 boots fine without any issues.

    Try without TWRP for now, this is all a big Alpha still so let's try to exclude external factors.
    There is also the bug that after 3 reboots you end up in EDL
    And LOS won't boot for now anyway because of a sensor infinite loop, being worked on.


    I would frankly advise everyone to just wait a day until we have time to polish all the small bugs we are aware of already.
    3
    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
    I can't really decide on that. That said, I'm discussing a documentation section for stuff like this.