[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
- P A R T Y -

Android Partition Treblerizer

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

INTRODUCTION

This was my weekend project. The creation of a tool able to create and remove the vendor partition from TWRP, so a computer was not required. The idea came to me las weekend when I was travelling and I couldn't test some roms since I didn't had the right partition configuration and no computer on hand. So I created this TWRP flashable ZIP that can create and remove the Vendor partition from the system or userdata partitions without a computer and without wiping the files in the mother partition in the recommended configuration.

The tool will try to resize the mother partition without wiping it, both when creating and removing the vendor partition. Nonetheless it can be done only when the mother partition is ext4, only when the vendor partition is at the end of the mother partition, and when the mother partition is not encrypted. The recommended configuration is what you get when selecting the first choice in every option: splitting 512 MB from the end of the system partition. A reboot is required after patching the partition table since the kernel has to reload it before doing any other thing.

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 Axon 7 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:

1. Download the TWRP ZIP tool to your External SD card.

2. Boot to TWRP recovery, under Install, flash the 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.

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 / 800 MB

REMOVE THE VENDOR PARTITION:

Should a Vendor module already exists, Party 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

Party_v0.5_ARM_20180831.zip

SOURCES

C'mon, it is a script!!! the sources are inside the zip. Use them in your projects but don't forget to give credit to the source !!!

CREDITS

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

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