[Discussion & Guide] OnePlus 5/5T now have unofficial Project Treble by MoKee

Search This thread

chenxingyu

Senior Member
Jun 15, 2010
98
312
Canton, China
xingrz.me
(My English isn't very practice. If you have any question reading this post, please feel free to ask. I'll try my best to express.)

## 0. Update: 2018/04/16

Some information I got today:

1. OnePlus is doing a repartition in OP5 Open Beta 8 / OP5T Open Beta 6 (or earlier, who knows). It'll split the 1.5GB "last_parti" partition into a 1.0GB "vendor" and a ~500MB "reserve3" partition while booting the system.
2. Yes, the repartition process was done in system, not during OTA in recovery.
3. The official vendor partition is still unused (not formatted). OnePlus will fill it in a future OTA, said their engineer.
4. I think it won't be conflicted with our "homemade" unofficial Treble. I just tested that the stock H2OS/OxygenOS can run on our homemade partition table.
5. It's very easy to undo the unofficial treble. I'll make an undo flashable zip later (through it's unnecessary in this time).
6. Of course, MoKee now (since 20180417) can run on the official partition table too.

==========

The MoKee ROM is now shipping unofficial Treble update for OnePlus 5/5T since 20180411. As the maintainer, I would like to share some information here.

## 1. How is this possible for OP5/5T?

Project Treble requires 2 keys: a standalone /vendor partition, and fully binderized HALs.

In fact, OnePlus have a 1.4GB unused, unformatted partition "sdf6" on OnePlus 3, 3T, 5 and 5T. This partition was possibly left by the ODM company, OPPO. OPPO R11/R11s series have a simular partition layout with OnePlus, and OPPO really did release an OTA update to enable Project Treble for their products.

The other key is binerized HALs. More specifically, the Camera HAL. The good news is, OnePlus recently released OP5 Open Beta 6 and OP5T Open Beta 4, with all fully binerized HALs, including the Camera HAL.

So as these 2 majar problems were solved. Project Treble is possible.

## 2. How did this come true?

To make Project Treble come true for OnePlus 5/5T, these should be done:

1. All vender-specific blobs should be moved to /vendor
2. Some blobs load config files from /system/etc. Just hex-edit them to load from /vendor/etc instead
3. Label and format that unused sdf6 partition as /vendor - this should be automatically done with an OTA script
4. The kernel should mount sdf6 as /vendor as well

## For users - How to enable Treble for OP5/5T?

The most easy way now is, flash the latest MoKee MK81.0 nightly build with latest TWRP (OP5: http://rom.mk/?device=cheeseburger, OP5T: http://rom.mk/?device=dumpling). The updater script will do the job automatically for you.

It's possible to make a flashable zip contains only the kernel and vendor image, without the MoKee system. But I'm busying on some other features. I'll do it later.

Tested fully works with Phh-treble system image, including:

- Audio
- Camera
- Phone & data
- Bluetooth & Wi-Fi
- Fingerprint

## For developers - How to ship Treblize update with my ROM?

(I'm organizing the patch list, I'll updte this section later)

## Can I flash non-Treble ROMs? How to "undo" this change?

You don't need to undo it, I think. For those non-Treble ROMs, including H2OS and OxygenOS, the /vendor partition is invisible. So you can flash back to any other ROMs at any time you want.
 

Attachments

  • 4b263fe4gy1fq5jjpxarmj20u01o0wi2.jpg
    4b263fe4gy1fq5jjpxarmj20u01o0wi2.jpg
    155.8 KB · Views: 7,284
  • 4b263fe4gy1fq5jjqyg63j20u01o0jzz.jpg
    4b263fe4gy1fq5jjqyg63j20u01o0jzz.jpg
    179.6 KB · Views: 7,257
Last edited:

SkandaH

XDA Portal Supporter
Jun 8, 2013
968
2,561
@chenxingyu If we flash Oxygen OS again on the treblized 5/5T, won't it again repartion the device again and create the sdf6 partition again? Just a doubt.

No, as the normal update packages don't touch that partition. On the other hand, there's no repartitioning involved - the type, filesystem and mount point of /sdf6 are changed.
 

praveen7682

Senior Member
Jan 14, 2012
988
334
Chennai
First of all appreciate your effort for bringing treble support for op5t.. am currently running xxx ROM and decrypted..questions I have is does blu_spark or codeworkx twrp support flashing system image..also if I flash mokee latest update then will it wipe all my internal storage data..also I read no_verity zip doesn't work so when we go back to other non-treble roms then format data is mandatory..am I right..
 

cubandanger05

Senior Member
Dec 22, 2009
504
156
Google Pixel 5
Had the same issue, downloading work on internet explorer on PC so maybe Safari on Mac? Give that a shot :)
Tried bunch of different browsers on my phone, desktop mode and all, but nothing, I'm going to have to try on my laptop tonight. Unless someone posts a mirror link.

Not working on the computer at work ?, getting frustrated ?.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 86
    (My English isn't very practice. If you have any question reading this post, please feel free to ask. I'll try my best to express.)

    ## 0. Update: 2018/04/16

    Some information I got today:

    1. OnePlus is doing a repartition in OP5 Open Beta 8 / OP5T Open Beta 6 (or earlier, who knows). It'll split the 1.5GB "last_parti" partition into a 1.0GB "vendor" and a ~500MB "reserve3" partition while booting the system.
    2. Yes, the repartition process was done in system, not during OTA in recovery.
    3. The official vendor partition is still unused (not formatted). OnePlus will fill it in a future OTA, said their engineer.
    4. I think it won't be conflicted with our "homemade" unofficial Treble. I just tested that the stock H2OS/OxygenOS can run on our homemade partition table.
    5. It's very easy to undo the unofficial treble. I'll make an undo flashable zip later (through it's unnecessary in this time).
    6. Of course, MoKee now (since 20180417) can run on the official partition table too.

    ==========

    The MoKee ROM is now shipping unofficial Treble update for OnePlus 5/5T since 20180411. As the maintainer, I would like to share some information here.

    ## 1. How is this possible for OP5/5T?

    Project Treble requires 2 keys: a standalone /vendor partition, and fully binderized HALs.

    In fact, OnePlus have a 1.4GB unused, unformatted partition "sdf6" on OnePlus 3, 3T, 5 and 5T. This partition was possibly left by the ODM company, OPPO. OPPO R11/R11s series have a simular partition layout with OnePlus, and OPPO really did release an OTA update to enable Project Treble for their products.

    The other key is binerized HALs. More specifically, the Camera HAL. The good news is, OnePlus recently released OP5 Open Beta 6 and OP5T Open Beta 4, with all fully binerized HALs, including the Camera HAL.

    So as these 2 majar problems were solved. Project Treble is possible.

    ## 2. How did this come true?

    To make Project Treble come true for OnePlus 5/5T, these should be done:

    1. All vender-specific blobs should be moved to /vendor
    2. Some blobs load config files from /system/etc. Just hex-edit them to load from /vendor/etc instead
    3. Label and format that unused sdf6 partition as /vendor - this should be automatically done with an OTA script
    4. The kernel should mount sdf6 as /vendor as well

    ## For users - How to enable Treble for OP5/5T?

    The most easy way now is, flash the latest MoKee MK81.0 nightly build with latest TWRP (OP5: http://rom.mk/?device=cheeseburger, OP5T: http://rom.mk/?device=dumpling). The updater script will do the job automatically for you.

    It's possible to make a flashable zip contains only the kernel and vendor image, without the MoKee system. But I'm busying on some other features. I'll do it later.

    Tested fully works with Phh-treble system image, including:

    - Audio
    - Camera
    - Phone & data
    - Bluetooth & Wi-Fi
    - Fingerprint

    ## For developers - How to ship Treblize update with my ROM?

    (I'm organizing the patch list, I'll updte this section later)

    ## Can I flash non-Treble ROMs? How to "undo" this change?

    You don't need to undo it, I think. For those non-Treble ROMs, including H2OS and OxygenOS, the /vendor partition is invisible. So you can flash back to any other ROMs at any time you want.
    6
    So I just want to chime in here...

    Simply Writing new data to /vendor and "binderizing" HALS does not make TREBLE compatibility. The HAL needs to translate calls expected by the ROM to calls expected by the binaries. IE: ROM "Take Picture" > HAL > Binary "Take Picture". The HAL should perform any translation of missing or mismatched parameters. So that the rom/apps do not have to be updated.
    WTF are you saying?
    Binderizing is litteraly doing what you just said
    5
    Damn, Oppo enabled Treble but 1+ didn't
    What a shame...
    4
    So, once we flash the Mokee ROM, will we then be able to flash the other treble ROMs like RR and Lineage?

    Of course.
    4
    What about OnePlus3
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone