yashsingh1/xdaforums huggingface dataset:
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
It is a very different device and the TWRP doesn't have the app sgdisk elf file. I will take note of it. I will need to include a static version of this tool in future releases. Nonetheless I need to see the partition structure of that device. Could you please open the TWRP terminal and type this command

ls /dev/block -Rl > /sdcard/structure.log

(assuming /sdcard is the internal storage) and post the structure.log file in pastebin.com or hastebin.com ?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
Ty, here is the structure log

https://hastebin.com/bexirevena.sql
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Hellsbend:
It's working nice on Axon7, thank you very much for this tool.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Zobat:
sql?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] runninghamster:
Hi, I need some help.

So whilst I was trying to use the PARTY tool, it showed up an error in twrp saying "vendor partition already exists /dev/block.."

But when I go into the wipe and advanced wipe, it doesn't show the vendor partition there.

I'm using twrp 3.2.1-8 treble and its not showing vendor partition, even if its there.

I cannot flash experimental ROMs because of this and really needed help. Thank you!

I don't have any data on the phone, as I recently just wiped it. I don't mind wiping and installing edl packages and the sort, but I don't know what to do.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
what do you mean
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Charmandrigo:
considering this tool may work on more arm android devices I think there should be an article about PARTY in the general android development forums :b
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] RedWave31:
In TWRP, click MOUNT, then VENDOR.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
I don't see the symbolic links in the ls -Rl. Have you set the long option for ls? I need it to see the ufs structure. Actually this is the only folder I need in detail for your other device:

ls - Rl /dev/block/platform/soc/7824900.sdhci/by-name

By the way, what TWRP version are you using?

The TWRP version you use is not relevant at all for the partitioning. could you please type this in your twrp terminal and tell me the output?

ls -als /dev/block/bootdevice/by-name/vendor

It is still in alpha state. It works well in the Axon 7, but I need to add static versions of the partitioning and format tools to be ready for more devices. It is planned, maybe this weekend. I am too busy at work during the week.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
Hope this is the correct one

https://hastebin.com/anipacinad.js

https://hastebin.com/exugocokaw.pl
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] runninghamster:
Thanks guys, but it seems wiping all the data and reflashing twrp did the job. Thanks for all the help though!
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
That's perfect. I know now the problems. I hope I could make a real generic app with that info. No time til this weekend.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
Updated PARTY tool to v0.2

## Change Log

### v0.2 - 2018.8.26

* Major code restructuration

* support for ARM devices with a single logical disk

* Added static versions of the tools

### v0.1 - 2018.8.18

* First functional release for the Axon 7

[MENTION=4929843]messi2050[/MENTION], now this should work in your other device. I hope so.

Should you find any problem, just pastebin the file /cache/Party.log
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
thx for the new update :o, it still fails though

https://hastebin.com/omeqofasav.coffeescript
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
Arrrgg! Stupid error. I know what is going on. I will try to have a working version ASAP. The way I get the disk from the partition doesn't work well for your device. I did not see it last time..
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
I hope it's not a problem with twrp itself xD
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
No. It is the way I get the disk node from the partition node. Trimming the numbers at the end works great for the axon 7, but not for your device. Thanks for this beta testing! I will fix it for sure.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
I did several assumptions taking into account the fs node structure and naming convention of the Axon 7. I have already solved the problem with the code converting the partition label to the corresponding fs node. I have also solved the problem getting the disk from the provided label (just substitute $1 for any of the partition labels: system, userdata, vendor, recovery,...). Before I was doing:

readlink /dev/block/bootdevice/by-name/$1 | sed -e's/[0-9]//g'

Now it is generic:

readlink `find /dev/block/platform/ -name $1 | rev | sed -e's:[0-9]*::' -e's:p::I' | rev

I am reviewing other sections affected by those incorrect initial assumptions. I need to know if your other device is compatible with the sgdisk tool provided inside the PARTY v0.2 zip. Could you please test that executable file with this command and return the output?

sgdisk --print /dev/block/mmcblk0

I believe it is going to work.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
Thanks for taking the time to work on adding support for a device you don't have.., i know how much development is time consuming so i really appreciate it :highfive:, sgdisk tool works, here is the output

https://hastebin.com/kapawitucu.sql
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
Could you please test this new release in TWRP?

Party_v0.3_ARM_20180829.zip

please do also a sgdisk --print /dev/block/mmcblk0 before and after the creation of the vendor partition and send the output to me, just for checking the sector boundaries alignment. In the Axon 7 it is only 8KB and in your device is a massive 512KB.

Now everything should work as expected. All the fs nodes are now calculated properly, in the simulation works fine.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
Now i get this (system/userdata resize is not available so a format is required) i didn't go further as i didn't want to format but i will give it a try soon.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
Yes, that was normal. PARTY 0.3 had integrated support for the general case for devices with a single logical disk. Version 0.4 will have also the feature of hot resize without losing information if the mother partition uses etx4 filesystem in systems with a single logical disk.

UPDATE: OK, Party_v0.4_ARM_20180829.zip is ready for you to test. This one will try to hot resize if it is able to do it safely.

Could you please provide the debug file /cache/Party.log ? That would help a lot on debugging further problem and integrate new features.

regards
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] messi2050:
https://www.hastebin.com/senakejuxo.coffeescript

for some reason resizing system/userdata caused those partitions to stop work and i was never able to mount it again till i removed the vendor partition.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Guido83:
I am currently running nfounds latest havocOS and I would like to switch to the vendor partition taken from system instead of nfounds solution to run the havoc GSI. What is the cleaest way doing it?

Can I use this tool to change my vendor partition and can I just flash an GSI afterwards?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Predatorhaze:
How i create vendor with this? i cnt install vendor normal with nfound guide.vendor never show up but install goes succesfull
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
I cant see the debug info, for some reason your link is empty. Could you mount and access the vendor partition from within TWRP? The PARTY tool should leave your vendor partition mounted and formatted as ext4. The ext4 filesystem of mother partition is checked and resized and it should be 100% consistent. It would help having the debug info. After the process, and from TWRP you could do a e2fsck on the mother partition (system or userdata). That could provide some clues on what is happening.

Well, since djkuz/NFound partition was taking 800MB from the beginning of the original userdata partition, removing that partition will wipe all your data, including the internal storage, so you'll need to do a backup. The rest is very straightforward, you have to run the tool twice. The first one for removing the vendor partition and return to the original stock partition table without the vendor partition. And a second run to create a 512MB vendor partition at the end of the system partition. It is fast and clean. You do not even need to reflash the ROM, you will probably only need to reformat the data partition from within TWRP. I'll try to integrate this last extra step in future revisions of the tool.

Vendor partition is there using the EDL installer from NFound. Some TWRP versions do not show the vendor partition, but it is there, otherwise 'the Treble ROMs can't be flashed. NFound partitioning is only compatible with his ROMs, if you want maximum compatibility, then use LOS16 partitioning, this is creating 512 MB Vendor partition at the end of the system partition. This configuration is compatible with NFound's ROMs and LOS16 ROMs, and it is the future. PARTY tool can flash and remove both vendor configurations.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] [armitage]:
I got nothing really to add or ask here, but just wanted to say... You're doing a great job [MENTION=319057]Oki[/MENTION]. Your work and dedication is really appreciated. Thank you :)
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Guido83:
Thank you, that was exactly the way I have done in the meantime before you answered and it went well.

Actually there is only one thing which is not clear for me.

If I want to flash GSIs, is it essential using nfounds trebele 1.1 zip or is there any way I could use the vendor files of ordenkriegers LOS?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
You can try flashing any Treble ROM. At this time we have for the Axon 7 the Treble version of LOS15.1 (2018.08.10), LOS16, latest Treble versions from NFound and his special Treble Pie ROM 1.1. After that, just flash the GSI of your choice. Some GSI won't boot at all, other would require some patches to make them Semi-GSI (sGSI). Everything is experimental at this point so any feedback and investigation at this point will help the community.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Guido83:
Ah now I see, thank you for explanation.

In this case I can say that HavocOS GSI (Pie) is able to boot with nFound Treble 1.1 bit not with LOS16 (2018-08-21) vendor files
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] amphi66:
Is a trial of the NitrogenOS by [MENTION=1965130]raystef[/MENTION]f66 on your list of experiments? I would really like to see a clear path to installation. Thanks.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Guido83:
I guess NitrogenOS is using nFounds files as well, as in OP is this statement:

2. Install the treble v1.1 from NFound
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] amphi66:
Per [MENTION=319057]Oki[/MENTION] s response above:

" if you want maximum compatibility, then use LOS16 partitioning, this is creating 512 MB Vendor partition at the end of the system partition. This configuration is compatible with NFound's ROMs and LOS16 ROMs, and it is the future. PARTY tool can flash and remove both vendor configurations."

I understood that the LOS partitioning (the same as his) would allow "universal" ROMs/GSIs to be installed
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
I have been thinking in backgrund about your issue. It is clear that your bootloader and ROM are not ready for the change, however you can try following the route djkuz/NFound did in the Axon 7 scene that would be:

1. Create a vendor partition taking space from the begining or end if the userdata partition.

2. That will require a full reformat of the userdata partition from within TWRP. That will leave an untouched system partition and a slightly smaller userdata.

3. Then you will be able to flash custom roms without any issue.

This configuration will help on creating a Treblerized ROM by moving all the vendor specific files to the vendor partition. You will need also to hexedit the vendor blobs and replace the /system/ string by /vendor/ among other modifications. I am sure you are more skilled than me on device tree/vendor/kernel modifications.

The other problem you can face is the bootloader. If it checks for the proper partition table (I haven't seen it before) then you'll need to modify the binary, which will be a very demanding task.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Guido83:
That's correct. The partitioning itself (size and from where sthe partition is taken) is one thing, but the files on the vendor partition is another.

The files are kind of phone drivers which are responsible for functionality of the Hardware (camera, sound etc.)
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
That's correct.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] ttkian:
If I remember correctly, when vendor partition was first introduced on LOS 15.1, Nfound said that his method will be compatible to his roms, LOS roms, and stock. So, Oki, is there a change in the way vendor partition is made on LOS 16.0 that made Nfound vendor partition is no longer compatible? On the thread, I think someone said it perfectly work good with Nfound's partition. Or, did I misunderstand what you said?

I am currently on Nfound's original vendor partition (the 800mb one) and haven't flashed LOS 16.0 as yet. So, I don't know if it would work.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Druboo666:
There is no LOS 16.1 to begin with.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] ttkian:
Sorry, it should be 16.0. I will edit it. I am currently on the latest AEX treble.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
The Vendor partition was first introduced by [MENTION=6330152]djkuz[/MENTION]. Creating a vendor partition would add the opportunity of modifying a non treble oreo ROM to convert it to a Treble ROM. He tried splitting some portion from the end of the userdata partition. He realized that under this configuration the EDL packages would complicate a lot due to the existence of 64 and 128 GB Axon 7 models. This is why the userdata was the last partition, this way both models, 64 and 128GB, share all but the userdata partition configuration. So he changed it to the beginning of the data partition. This way it would be possible to create easy EDL packages retaining the compatibility with both models. The EDL packages in my Oreo Guide for Newbies use that configuration.
[MENTION=5492451]NFound[/MENTION] thought that 800MB was enough and the first roms from him were compatible ONLY with that configuration. I was experimenting with splitting vendor from the system partition, but his ROMs were not compatible with my experimental configuration. For a while his roms were ONLY compatible with this configuration, splitting vendor from the beginning of the data partition using an EDL package to modify the data partition and then manually ext4 formatting the vendor partition from within TWRP.

Then [MENTION=4911249]Unjustified Dev[/MENTION] released his 2018.08.10 release of his LOS15.1. He used the experimental configuration I was experimenting before, splitting 512MB from the end of the system partition. We never communicated about this but I believe it was the logical way of splitting vendor from. At the end the system portion of the modified rom is smaller since many files are moved from /system to /vendor.

NFound finally saw the benefits of this system configuration and his latests roms were compatible with both configurations.

The benefit of the first configuration was that since system wasn't modified, any user was able to flash back and forth from non treble to treble configurations, but required an EDL package (not now with the PARTY tool) and losing all the data and internal process during he transition.

The other configuration using the system doesn't require to wipe the data partition, but requires the use of the party tool to return back to a non-treble rom, wich now it is not a problem, but before required another EDL flash.

Bottom line: the first configuration helped while we transitioned from non-treble to treble, and gave us time to develop the tools, kernels, device trees, vendor blobs, etc. But now with the PARTY tool there is no benefit on having that old splitting method. The future is clearly using the system partition, splitting 512MB (too much from my point of view since vendor files take less than 300MB) from the end of the partition. This way PARTY modifies the partition table, reduces the size of the system partition without affecting the system files, and formats the vendor partition, leaving everything ready to flash any Treble ROM zip from TWRP.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jrotaetxe:
Hi, Oki. Thank you for the tool

A quick question...

Would a TWRP backup restore to a new "repartitioned" vendor partition without issues?. To be clear, from 800 MB old NFound's to new 512 "universal"....

Regards
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
Yes, you can backup the affected partitions vendor and data partitions along with the internal storage. Then remove the old vendor configuration ( 800MB at the beginning of the data partition) and create the new one (512MB at the begining of the system partition). After that you can restore your vendor, data and internal storage.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] vic_singh:
How do I know if it was flashed successfully?
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
You can see it in TWRP 3.2.1-8, flash any treble rom or simply read the PARTY tool at the end. It reports if it was done successfully, and when a problem was found.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
New PARTY v0.5 2018.08.31

## Change Log

### v0.5 - 2018.8.31

* Provides size information for relevant partitions and status for vendor partition.

* Estructures created for future integration into TWRP as a script.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
I can see part of the problem. The program tries to resize the system partition to the new size. before using the resize2fs utility, it is required to do an e2fsck on the same partition. The fs check returns this:

~# e2fsck -y -f /dev/block/mmcblk0p62
e2fsck 1.43.3 (04-Sep-2016)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system: 4540/216000 files (0.1% non-contiguous), 407337/863232 blocks

But the resize2fs command returns:

~# resize2fs /dev/block/mmcblk0p62 5857280
resize2fs 1.43.3 (04-Sep-2016)
Please run 'e2fsck -f /dev/block/mmcblk0p62' first.

Resize is asking for a check, but the check was already done, and the minimum size for system is larger than the projected new size so actually I cant see where is the problem with the resize.

You can try different options:

1: use the end if the userdata partition

2: without rebooting recovery, formatting userdata again.

3: Reboot to see wheter TWRP or the system is working.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] jrotaetxe:
Have had success in my repartitioning using your tool. The process is pretty clear, but have faced a couple of "panic" moments I would like to share, to benefit others that could enter in the same situation.

1.- After deleting old vendor and creating the new one, restarting TWRP I had an orgy of red messages from TWRP, being unable to mount/find partitions. To clear that I had to reboot "dm-verity enforcing" to clear the messages. Would be great if able to integrate those enforcings in the rebooting to TWRP process.... Less heart stress....

2.- After having the /vendor partition in the proper place and size, I tried to plain restore my previous backup, that was unsucsessful. Had to format data to clear that situation.

Then the restore to the new partition run without issues.

Thank you agan. Is a very nice tool.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] privatedoodle:
Just a quick word of warning: don't flash this from your internal storage! If you do, it'll turn your internal storage into a 512MB partition. You'll have to wipe and format with TWRP to get it back to normal.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Predatorhaze:
Vendor is installed but it doesnt show in mount.I have tried party zip to delete vendor and flash vendor again but still it doesnt show.I cant continue now installing GSI.What should i do?

i flashed twrp again and now it shows vendor partition but i cant mount it

/sbin/e2fsck -fp error 16

now i flashed party zip and it says there no vendor partition

but in mount it shows vendor partition

Got it fixed.I just just party zip to create new vendor partition.I did a reboot to twrp and i am able to mount vendor
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] dantedakilla:
Are you using NFound's Treble TWRP? I think that's the only TWRP that shows you the vendor partition.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
The partition is 52GB in size, the filesystem is only 512MB since there is no partprobe static binary for ARM. The solution is easy. You can just wipe and reformat the data partition from within TWRP or hot resize the to fit all the partitio space by opening the terminal from within TWRP and executing:

resize2fs /dev/block/bootdevice/by-name/userdata
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] amaury48:
I am running AsopExtended 5.8 treble with NFounds treble partition. To properly convert to Party 512 partition I must backup my rom, delete NFounds partition, reboot to TWRP, create the Party partition, then reboot again to TWRP to verify vendor partition. Then what do I do to return my data and rom ? Restore my backup? (All partitions?)
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
1. Backup your vendor, data and internal storage

2. Run PARTY to delete the 800MB vendor next to the data partition

3. Run PARTY again to create a 512MB vendor at the end of the system partition.

4. Restore data, vendor and internal storage.

If you find a 512MB data filesystem after step 2, then run the command in the terminal I wrote several posts before to expand the filesystem to fit the partition. This is a problem of kernel not able to reload the partition table.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
Treble PARTY will be integrated in the upcoming TWRP 3.2.3-0L - Labs Mod in its lite version. I am just testing all the tools myself. This TWRP mod will integrate also other interesting tools.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] beastobadness:
I think it is about time that I carried out the conversion of the 800MB vendor partition to the 512MB. I am using AEX 5.8 and it just makes sense to be future safe.
[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Sebastian505:
[MENTION=319057]Oki[/MENTION] after flashing the zip the vendor folder files will be on the new vendor partition ??

---------- Post added at 07:35 PM ---------- Previous post was at 07:32 PM ----------

and if i use it on klte the device will be treble supported and be able to install trebles roms ???