[Treble-Enabled Device Guides, News, & Discussion] chenxingyu:
(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.