[GUIDE] How to flash Treble roms on OnePlus 6

Search This thread

ProtoDeVNan0

Senior Member
Apr 3, 2013
1,410
6,044
HTC Sensation
Hey guys! So, as You know, OP6 has Treble, but when You flash GSI's on it, it will take You to EDL mode instead. Why? Well.. because of A/B and VBMETA partition. So... how do we fix it? It's actually pretty simple! Follow the guide and You will be able to boot GSI roms on Your OP6 :D

Note: Before You can flash any GSI, You have to unlock Your bootloader. To do that, simply type: fastboot oem unlock . Just remember that it will wipe Your data!

Important: Flash 5.1.6 or above before flashing v20. It looks like 5.1.6 fixed Treble problems. Files have been updated to: 5.1.7


Step 1: Download any GSI rom You want, in this guide I'll be using Phh Treble latest build: Phh Treble A/B v20 with GApps and SU
(Make sure to extract it before flashing. You can do that with 7zip)
Step 2: Download this zip. It contains stock VBMETA as well as stock boot image, just in case if Your device is rooted. Link: Treble OP6 Files 5.1.7
Step 3: Extract those files on Your desktop for example and open terminal/cmd in the same folder as Your files. (Before You can do that, You should download latest minimal ADB and Fastboot available here: ADB & Fastboot XDA Thread Link ) Now. Copy and paste those commands:


fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
This command will let You boot non OOS roms, like Phh Treble or any other Treble GSI.

fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
Those commands will flash stock non rooted boot image to both of Your boot partitions (Treble roms need slightly different root that's why we need to use stock boot image for now)

fastboot flash system_a system-arm64-ab-gapps-su.img
fastboot -w flash system_b system-arm64-ab-gapps-su.img
Okay, these commands will flash Phh GSI to both of Your partitions. The only difference is that second command will wipe Your data partition which is most likely required to have a bug free boot. So backup Your data before!

Aaand that's it! :victory: Enjoy Your new GSI rom.



Thanks to Dewang Rocker for making a tutorial video! Make sure to like and subscribe :)

And one more Thanks to @AxM2 for posting my guide on Github! :)
OnePlus 6 Treble Github Page



Q/A
Q: Does this method work for all GSI images?
Yes! It should work fine, as long as Your GSI supports A/B partitioning. Most Devs build A/B GSIs so no worries.
Q: Bugs?
Build v20:
Stock camera has problems with focus, but if You install OOS camera it works fine.
Notch is covering screen a little.
Q: I want to see some screenshots!


Credits:
Phhusson for Wonderful GSI!
FunkWizard for latest firmware!
@dylanneve1 for being an awesome friend and helping me with many of my projects.
OnePlus for OP6 and releasing updates that are actually useful! :)
James Muir for Pixel 2 Guide on Github.
Google for creating Treble for us.

 
Last edited:

Joyarup

Senior Member
Mar 5, 2014
318
137
26
Greater Noida
Looks promising! Anyone tried and confirm that the roms boot?

And what does wiping of data partition means? Will that wipe the internal storage too? or just the "data" (The apps and stuff).
 
Last edited:

ProtoDeVNan0

Senior Member
Apr 3, 2013
1,410
6,044
HTC Sensation
Looks promising! Anyone tried and confirm that the roms boot?

And what does wiping of data partition means? Will that wipe the internal storage too? or just the "data" (The apps and stuff).

It does boot, tried the guide 3 times already just to make sure that it works. And -w will wipe Your internal storage, not just apps. So make sure to backup everything. Or You can just wipe data in TWRP and then boot GSI. This way Your internal storage won't be deleted. But a full backup is always recommended! Even if You flash new fonts or something :eek:.
 
  • Like
Reactions: Joyarup

Joyarup

Senior Member
Mar 5, 2014
318
137
26
Greater Noida
It does boot, tried the guide 3 times already just to make sure that it works. And -w will wipe Your internal storage, not just apps. So make sure to backup everything. Or You can just wipe data in TWRP and then boot GSI. This way Your internal storage won't be deleted. But a full backup is always recommended! Even if You flash new fonts or something :eek:.

Alright thank you for clearing things, I will give it a try and will let you know!
Thank you for your work.
 

ProtoDeVNan0

Senior Member
Apr 3, 2013
1,410
6,044
HTC Sensation
any idea what treble rom/s that has the feature of stretching third party apps to use 18:9/19:9 aspect ratio or whatever instead of it being cropped?

No idea if any rom has settings for 18:9/19:9 displays. But there's also the notch that covers the screen. In OOS we can hide the notch, but in Treble roms the notch will cover some parts of the screen in all apps. YouTube should support 18:9/19:9 though. Maybe there is some app that can help with the notch? Or some Magisk module? I think that GravityBox should allow us to resize status bar so that apps won't be covered, but games hide the status bar so it will be useless in games. We might have to wait for Android P to take care of all the notch problems in GSIs.
 
  • Like
Reactions: Abaddon

Exelios

Senior Member
Jul 3, 2014
513
591
Berlin
No boot for me and phhusson, this guide does nothing different then what is mentioned already here as not working > https://xdaforums.com/oneplus-6/help/dev-oneplus-6-luck-treble-seeking-help-t3795202
Tested on a total of 3 devices, no boot on neither, tho Mishaal just told me he got a boot, so it most be something else somewhere we have not yet identified.

Until then I would put a big EXPERIMENTAL and DANGEROUS on this thread.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    Hey guys! So, as You know, OP6 has Treble, but when You flash GSI's on it, it will take You to EDL mode instead. Why? Well.. because of A/B and VBMETA partition. So... how do we fix it? It's actually pretty simple! Follow the guide and You will be able to boot GSI roms on Your OP6 :D

    Note: Before You can flash any GSI, You have to unlock Your bootloader. To do that, simply type: fastboot oem unlock . Just remember that it will wipe Your data!

    Important: Flash 5.1.6 or above before flashing v20. It looks like 5.1.6 fixed Treble problems. Files have been updated to: 5.1.7


    Step 1: Download any GSI rom You want, in this guide I'll be using Phh Treble latest build: Phh Treble A/B v20 with GApps and SU
    (Make sure to extract it before flashing. You can do that with 7zip)
    Step 2: Download this zip. It contains stock VBMETA as well as stock boot image, just in case if Your device is rooted. Link: Treble OP6 Files 5.1.7
    Step 3: Extract those files on Your desktop for example and open terminal/cmd in the same folder as Your files. (Before You can do that, You should download latest minimal ADB and Fastboot available here: ADB & Fastboot XDA Thread Link ) Now. Copy and paste those commands:


    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    This command will let You boot non OOS roms, like Phh Treble or any other Treble GSI.

    fastboot flash boot_a boot.img
    fastboot flash boot_b boot.img
    Those commands will flash stock non rooted boot image to both of Your boot partitions (Treble roms need slightly different root that's why we need to use stock boot image for now)

    fastboot flash system_a system-arm64-ab-gapps-su.img
    fastboot -w flash system_b system-arm64-ab-gapps-su.img
    Okay, these commands will flash Phh GSI to both of Your partitions. The only difference is that second command will wipe Your data partition which is most likely required to have a bug free boot. So backup Your data before!

    Aaand that's it! :victory: Enjoy Your new GSI rom.



    Thanks to Dewang Rocker for making a tutorial video! Make sure to like and subscribe :)

    And one more Thanks to @AxM2 for posting my guide on Github! :)
    OnePlus 6 Treble Github Page



    Q/A
    Q: Does this method work for all GSI images?
    Yes! It should work fine, as long as Your GSI supports A/B partitioning. Most Devs build A/B GSIs so no worries.
    Q: Bugs?
    Build v20:
    Stock camera has problems with focus, but if You install OOS camera it works fine.
    Notch is covering screen a little.
    Q: I want to see some screenshots!


    Credits:
    Phhusson for Wonderful GSI!
    FunkWizard for latest firmware!
    @dylanneve1 for being an awesome friend and helping me with many of my projects.
    OnePlus for OP6 and releasing updates that are actually useful! :)
    James Muir for Pixel 2 Guide on Github.
    Google for creating Treble for us.

    4
    Everyone who can't get some GSIs to boot. Our device is new so GSI Devs have to add support for our OP6. Otherwise some things will be buggy or just won't boot.

    If anyone is getting a fastboot bootloop then try to use

    fastboot --set-active=_a or _b and reboot.

    A/B is kinda weird and sometimes switching partitions helps.

    And if You guys want to try some rom, try Phh first. It's the one that works. Other roms might get stuck in a bootloop or just never boot at all.

    Don't worry guys, S9 took some time to get GSI support too. Just report those bugs to GSI Devs, send them proper logs and they will hopefully fix those bugs for us :).

    Example how to take logs:
    Run this command with terminal/cmd: adb logcat > log_gsi.txt
    (Remember to open that terminal on Your desktop so that the log file will be saved there)

    And then send it to a GSI Dev and tell them what bug You're experiencing.
    3
    Can confirm this works, our display tester Dylan Raga got the LineageOS GSI booting.
    3
    No boot for me and phhusson, this guide does nothing different then what is mentioned already here as not working > https://xdaforums.com/oneplus-6/help/dev-oneplus-6-luck-treble-seeking-help-t3795202
    Tested on a total of 3 devices, no boot on neither, tho Mishaal just told me he got a boot, so it most be something else somewhere we have not yet identified.

    Until then I would put a big EXPERIMENTAL and DANGEROUS on this thread.
    You tried to use modified vbmeta from Pixel. In my guide, I'm using stock OP6 vbmeta with some extra commands. And why would it be dangerous? We're not touching any bootloader partitions. Just the ones that all custom roms modify. So it's 100% safe.
    Can confirm this works, our display tester Dylan Raga got the LineageOS GSI booting.

    Happy to hear that it works for other people too! :D