[Xiaomi Mi Note 2  ROMs, Kernels, Recoveries, & Oth] DarioRetr:
- T R E B L E Y -

Android Partition Treblerizer

A tool able to seamlessly create / remove the vendor partition from within TWRP​

INTRODUCTION

The creation of a tool able to create and remove the supplier partition from TWRP, so a computer was not required. So I created this flaming TWRP ZIP which can create and remove the vendor partition from the userdata system or partitions without a computer and without deleting the files in the mother partition in the recommended configuration.

In this way, our device can also have a treble just like a phone that came out of the factory with the vendor partition without touching the cust partition.

The tool will try to resize the mother partition without deleting it, either during the creation and removal of the supplier partition. However, this can only be done when the mother partition is ext4, only when the supplier partition is at the end of the mother partition and when the mother partition is not encrypted. The recommended configuration is the one that is obtained by selecting the first option in each option: subdividing 512 MB from the end of the system partition. A reboot is required after applying the patch to the partition table because the kernel needs to reload it before doing anything else.

REQUIREMENTS

Due to the use of a key detection binary, it is compatible only with ARM and ARM64 devices running TWRP. So far I have tested it in the Xiaomi Mi Note 2 but It should work in any compatible device. I made it this way so other legacy devices could transition to Treble ROMs + GSI, and Android Pie. Please let me know about other devices using this tool!!!!!

INSTALLATION

WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.

IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED.

!!! Whatever you do, it is at your own risk !!!

Either for creating or removing a vendor partition,, follow these steps:

A. Download Trebley_APT, Trebley_treble, Trebley_twrp.

1. Put Trebley_APT, Trebley_treble, Trebley_twrp to your External SD card.

2. Go to Install and flash the Trebley_APT ZIP file as any other ROM or MOD file to execute the tool.

3. Reboot to recovery again to ensure the changes are applied properly.

4. In some cases you will need to format the mother partition after adding or removing the vendor partition next to it.

5. Go to Install and select "Flash Image".

6. Flash the Trebley_twrp IMG file to recovery partition and reboot to recovery.

7. Wipe cache, dalvik-cache, system, vendor and data

8. Flash a Generic System Image in system partition (arm64, A only).

9. Reboot, and done.

CREATE A VENDOR PARTITION:

So far these are the available options:

Mother partition selection: system / userdata

Split position: Splitting from the end / start of the mother partition.

Vendor partition size: 512 / 915 MB

REMOVE THE VENDOR PARTITION:

Should a Vendor module already exists, Trebley offers to remove it, returning to a Non-Treble partition table. It will return the space to the mother partition, system or userdata. So, older non Treble ROMs could be flashed after the mandatory reboot.

DOWNLOAD

Trebley_APT_v1.0_ARM_20190215-signed.zip

Trebley_treble_scorpio-20190215-0521-signed.zip

Trebley-twrp-3.2.3-0-scorpio-custom.img

SOURCES

All rights reserved to the project: Party and its creator [MENTION=319057]Oki[/MENTION]).

CREDITS

[MENTION=4275152]someone755[/MENTION] for the keycheck binary

[MENTION=6037748]Zackptg5[/MENTION] for the V4A install script that inspired my version.

[MENTION=319057]Oki[/MENTION] for the base script.

[MENTION=5736124]Psy_Man[/MENTION] for the kernel and for supporting.