yashsingh1/xdaforums huggingface dataset:
[ZTE Axon 7 Guides, News, & Discussion] pelelademadera:
Internal storage... Stock flash files dont flash internal storage, so any modification in that filesystem size wont affect any rom.

Its sda9 in my device, 52.4gb... And is the last in sda device, so reducing it and adding a new one, the only thing yhat do is add sda10, no partition name fproblem, no order in partitions problem... I think its the best way to move..

Can someone share qpst files? I can try to make it in my phone

Enviado desde mi ZTE Axon 7 mediante Tapatalk
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
https://xdaforums.com/axon-7/development/axon-7-edl-tool-flash-backup-restore-t3750759

In this post there is full edl firmware, which contain all the necessary files.

But keep in mind these files (in the partition table files) there is no information about the userdata partition. To get actual data about the userdata partition you need to read the partition table from the phone (use my EDL TOOL - backup - all)

Also, do not forget that our phone uses UFS memory. The userdata partition is located in the lun0
[ZTE Axon 7 Guides, News, & Discussion] pelelademadera:
probably that info is in gpt.bin

is the only partition not listed in xml files, so If we can read that gpt.bin, maybe its possible.

My main reazon to edit /data and not any other system partition is that, we can recover the phone with qpst if partition table is edited cause it will not write anything over userdata.

but I really dont know almost anything about programing android, partition tables its more simple for me....

the way I think is possible is editing gpt.bin, and adding another line on the xml so the programer will add a new partition, It can be used as trebble and only touch the user storage... 1gb dont kill anyone
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Well, here's what you can do and try:

1. Use the my EDL TOOL to backup all the partitions (except userdata) - the menu backup - all.

EDL TOOL will read from the phone gpt (gpt_main0.bin and gpt_backup0.bin ..... gpt_main5.bin and gpt_backup5.bin)

2. Еdit gpt_main0.bin and gpt_backup0.bin, reduce the userdata partition and add a new partition

3.Use EDL TOOL to restore from backup, replacing in it with the edited gpt_main0.bin and gpt_backup0.bin

4. Erase (factory reset from recovery) the userdata partition
[ZTE Axon 7 Guides, News, & Discussion] OrdenKrieger:
I like what you're trying to get started here. Keep it up guys.
[ZTE Axon 7 Guides, News, & Discussion] KevinX8:
I copied a random apk to be sure, it's definitely 1GB not 1mb,zte just wasted a lot of space
[ZTE Axon 7 Guides, News, & Discussion] KevinX8:
If we use it as /vendor the files already there should not need to be over written, the Bluetooth module should still be able to access the files it needs while the system treats the partition as a vendor one
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
i'll believe it when i see it. Not rushing anyone though
[ZTE Axon 7 Guides, News, & Discussion] JTruj1ll0923:
I'm pretty sure that is just saying 1024 kb (1.024 mb) is taken up, not that is how big the partition is. Otherwise [MENTION=5168296]KevinX8[/MENTION] wouldn't have been able to copy ≈33 mb over...
[ZTE Axon 7 Guides, News, & Discussion] JTruj1ll0923:
Also my own test:
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
you just did not understand the information that I provided.

carefully look.

/bt_firmware is not separate physical partition
[ZTE Axon 7 Guides, News, & Discussion] OrdenKrieger:
That wont work. This partition "/dev/block/bootdevice/by-name/bluetooth" is already mounted in the fstab under the name "bt_firmware". https://github.com/OrdenKrieger/android_device_zte_axon7/blob/oreo-mr1/rootdir/etc/fstab.qcom#L18 You wont be able to double mount them and if you just mount it as "vendor", bluetooth will crash all over the place since it requires this firmware files.
[ZTE Axon 7 Guides, News, & Discussion] KevinX8:
Hmm I also checked via cat and it says the same, the files don't disappear after reboot so where are they being stored and why is it being reported as 1GB?

Hmmmmm find another useless partition then :D.

Anyways considering the update going to be released by zte is running aosp for some mysterious reason (sure not many people liked mifavor but xiaomi still use MIUI and everyone hates that), and everyone using it must sign an NDA, I have feeling it might even feature treble you never know :)
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
you think they'll repartition over an update?
[ZTE Axon 7 Guides, News, & Discussion] KevinX8:
It wouldn't be the first time this happened, essential phone did it, let's just wait and see, the release day is supposedly this month
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
wrong. essential phone shipped with an unused vendor partition because they knew beforehand about treble
[ZTE Axon 7 Guides, News, & Discussion] JTruj1ll0923:
You're right, my bad. Back to not using that :)
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Well I guess this would be the last gasp of hope then...

Did anyone volunteer on that already?
[ZTE Axon 7 Guides, News, & Discussion] AnonVendetta:
From what I'm reading so far, /bt_firmware is 1GB but the actual firmware files are only using a few MB. I know that Android uses the GPT partition table (as opposed to MBR), much like how you can boot a PC OS in UEFI mode on a GPT disk. Does Project Treble need a separate physical partition that can be cannibalized as /vendor? Or maybe it's enough to just symbolic link /vendor to somewhere on the internal storage that isnt a part of/within /system (which is currently the case)? ZTE can also push an official update that repartitions the phone, as a last nod to the A7 before unofficially handing off future support to LineageOS as the successor. But that is risky. /data can also be used, but I would much rather not give up any of that space.

Is it an either/or scenario (i.e. if /bt_firmware is repurposed as /vendor then it cant also be used for Bluetooth)? I dont see why a space cant be used for both. The loss of BT functionality would be major for me.

Am I missing something? Am hoping for a technical explanation from someone that is knowledgable and competent with Android (dev, maybe).
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Is there still anyone willing to try this? [MENTION=5403000]pelelademadera[/MENTION] maybe?

Or can we assume that this topic is dead?
[ZTE Axon 7 Guides, News, & Discussion] Verequies:
I use Linux now as my main OS, and feel pretty confident messing around with this side of stuff, so I wouldn't mind trying it, as long as someone can reassure me I could revive my phone somehow if it went south.
[ZTE Axon 7 Guides, News, & Discussion] nfsmw_gr:
Well, there are a lot of edl mode recovery guides so I guess you should be covered.

Take a good look before proceeding just to be safe man ;)
[ZTE Axon 7 Guides, News, & Discussion] pelelademadera:
I dont think that procedure is complete, but I have not time in this moment to do dis until I finish with my exams...

Enviado desde mi ZTE Axon 7 mediante Tapatalk
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Thanks pal,

Best wishes for your exams!

I'm also way to busy in these days and can't afford to play around with my daily runner right now...

Hopefully someone else has time and guts to tinker a little on his device,

[MENTION=5403000]pelelademadera[/MENTION] maybe you could write the complete necessary steps to take for anyone interested?
[ZTE Axon 7 Guides, News, & Discussion] pelelademadera:
Thanks sr. When I have news I post here

Enviado desde mi ZTE Axon 7 mediante Tapatalk
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Just a reminder:

As the situation about future ZTE updates is getting worse Project Treble becomes more important.

Still looking out for some folks with guts and abilities to try the described procedure above... Maybe its giving us a Treble partition... But one could also end up with a bricked device
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Just another reminder... just see my previous post above this.

Maybe volunteers come forward to test the procedure... Would be great looking at the current situation
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Just another reminder...
[ZTE Axon 7 Guides, News, & Discussion] rzarectha:
instead of spamming "reminders", maybe you'd like to try do this for yourself, rather than trying to put pressure on someone else to risk their device.

if you have an axon 7, there's nothing stopping you from trying that on your phone.

let us know how it turned out

regards
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Well, I would try it myself but really just haven't the time to do it for now... (First device I did partition stuff on it was back on the HTC Diamond... before Android got released ;) )

Then I was only reminding once a week because I didn't want to spam here... If that's to much for you guys I can reduce it to a monthly reminder. But as you saw just some days ago someone reopend a thread from last year about Treble because he didn't find this one... So just trying to help folks that maybe don't know about a solution that possibly could work for our device.

I believe it would be a pity for the Axon7 community on XDA to forget about a possible way to get Project Treble on our device, that's my purpose of my weekly reminders. If you still feel offended of it just tell me again and I'll stop it... Or thank me and I'll continue.

Have a nice day!
[ZTE Axon 7 Guides, News, & Discussion] Diceroll:
How in depth would this be and what would it take? Mine is just laying around as backup since I got my Pixel 2 XL.
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
I guess [MENTION=6330152]djkuz[/MENTION] could guide you better? If you do this and it works, we got treble. pretty big deal
[ZTE Axon 7 Guides, News, & Discussion] Diceroll:
Yeah, I would want to talk with him and see what his full thoughts are on this too, as he said he has tried this on another device and it failed. I don't see myself returning to the Axon 7 though.
[ZTE Axon 7 Guides, News, & Discussion] taufikthexfader:
Can someone with free time and Linux OS try this method?

https://xdaforums.com/project-trebl.../tool-capire-le-treble-terble-vendor-t3774629
[ZTE Axon 7 Guides, News, & Discussion] Dodgexander:
If I understand the link correctly you need a trebalized ROM and if you don't have one then you need to know what to copy from the system partition of a non trebalized ROM.

Given our phone has an abundance of code that people can't even port from stock to aosp ROMs then I doubt any of this will be possible unless ZTE happen to make their images treble compatible.

Or am I completely wrong?
[ZTE Axon 7 Guides, News, & Discussion] nfsmw_gr:
If you read correctly it says this works on non trebble roms as well.

The thing is who has enough balls to try it haha.
[ZTE Axon 7 Guides, News, & Discussion] TheGreatB:
It's only for Treble devices without vendor partition, unfortunately :( He says so on page 2.
[ZTE Axon 7 Guides, News, & Discussion] Dodgexander:
I did read that, but to work on none treble ROMs you have to know what to carry over and that's not going to be possible with the axon. Not unless ZTE provide treble support themselves.. there are far too many complications when it comes to the blobs on this phone.
[ZTE Axon 7 Guides, News, & Discussion] nfsmw_gr:
I've actually built RessurectionRemix myself to experiment and for personal use on this phone, blobs were fairly easy to set up.

If the process is similar this shouldn't be hard.

If its different then...well I can't answee that. ?

Either way I'm not experienced enough, nor have a second phone in case I mess this one up.

I just hope someone gives it a go lol.
[ZTE Axon 7 Guides, News, & Discussion] Dodgexander:
Basically you need a solid base and the fundamentals to create that base so everything works in the future. I hope it's possible too but when we don't even have things ported correctly to custom ROMs I'm not holding my breath.
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Well now with the leaked Oreo update things could change, let's see... it needs some bravehearted volunteers to try repartion first, then - if it worked - some talented devs to continue
[ZTE Axon 7 Guides, News, & Discussion] samo_lego:
Wow guys, I read all the stuff going on here and I must say that I haven't understood much (I don't know anything with experimenting and developing things for Android), but I think I got the point :).

Keep it up, hopefully ZTE will push out the update and save you the hard work!
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
ZTE would not do something like this... Only Asus did it, and Asus was not hit by an US import ban as far as i can tell

That said, ZTE actually did fix Camera2 on the U
[ZTE Axon 7 Guides, News, & Discussion] nfsmw_gr:
That's what I was gonna say, it's a long shot but ZTE fixed the camera, so it *could* happen.
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Well fixing a faulty camera api is something...

And adding a voluntarily provided feature (Project Treble) that needs deep and sensitive system changes is something completely different...

So don't hope for miracles...

Only realistic approach I see is to wait for someone willing to risk re-partition with the steps provided above...
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Here's what I managed to get:

Before reducing the userdata partition

After reducing the userdata partition and adding the vendor partition

But the partition sda10 (vendor) did not appear :D Need to edit kernel
[ZTE Axon 7 Guides, News, & Discussion] _phk_:
Did you add new partition into fstab?
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Yes, but no result...

Probably new physical partition must be described somewhere else...
[ZTE Axon 7 Guides, News, & Discussion] Druboo666:
need to change that in kernel defconfig.here is some old example how this was done cant tell about new device but this device was re-partitioned to run nougat

https://github.com/LegacyXperia/and...-13.0/arch/arm/configs/lx_haida_defconfig#L88
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Success
[ZTE Axon 7 Guides, News, & Discussion] nfsmw_gr:
Wow!!

That means we *could* use treble now?
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
I think yes.

For "the project treble" you needed a separate physical partition for the vendor - you got it. The next step from developers :D
[ZTE Axon 7 Guides, News, & Discussion] KwesiJnr:
Thanks a lot for trying it, bro. :good:
[ZTE Axon 7 Guides, News, & Discussion] Gachmuret:
Thanks a lot [MENTION=6330152]djkuz[/MENTION]

Could you provide a step by step guide for what exactly we have to do to achieve thia additional partition?

Now that we have a way ro re-partition internal storage I hope [MENTION=4911249]Unjustified Dev[/MENTION] [MENTION=5027381]OrdenKrieger[/MENTION] [MENTION=5492451]NFound[/MENTION] [MENTION=7790189]Kranoner[/MENTION] [MENTION=6977124]Skrem339[/MENTION] [MENTION=5334294]raystef66[/MENTION] or any of our device devs has the abilities and finds time to make "project treble" available for our device.
[ZTE Axon 7 Guides, News, & Discussion] nfsmw_gr:
Well if that happens android updates should be a lot easier and faster than the current progress.
[ZTE Axon 7 Guides, News, & Discussion] _phk_:
wow, is that CONFIG_CMDLINE really built static into the kernel for android?

In Linux it is set dynamically via grub.
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Instraction for adding new vendor partition after userdata partition

Warning !!! All data from the phone internal storage will be deleted (photos, music, videos, etc...) !!! Do a backup of all your data!!!

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

Add new "vendor" partition

1. Install MiFlash

2. Download and unpack packege for MiFlash with new gpt: for 128GB - View attachment AXON7_GPT_128GB_ADD_VENDOR_4GB.zip, for 64GB - View attachment AXON7_GPT_64GB_ADD_VENDOR_4GB.zip

3. Flash the packege via MiFlash

4. Reboot the phone and boot into recovery

5. Wipe data/factory reset to reformat userdata partition (i`m using original recovery)

6. Reboot to system

Restore original GPT

1. Install MiFlash

2. Download and unpack packege for MiFlash with original gpt View attachment AXON7_GPT_ORIGINAL.zip

3. Flash the packege via MiFlash

4. Reboot the phone and boot into recovery

5. Wipe data/factory reset to reformat userdata partition (i`m using original recovery)

6. Reboot to system

PS: I can not test a new GPT on a phone model with 128GB
[ZTE Axon 7 Guides, News, & Discussion] _phk_:
[MENTION=6330152]djkuz[/MENTION]: great work.

What is the final goal of treble? I thought it would be possible to have a generic system image for several smartphones, each with its own trebe partition. But after all I read the partition layout is compiled statically into the kernel, so this seems impossible now.
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Instraction for adding new vendor partition before userdata partition

Warning !!! All data from the phone internal storage will be deleted (photos, music, videos, etc...) !!! Do a backup of all your data!!!

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

For both phone model 64GB and 128GB

Add new "vendor" partition

1. Install MiFlash

2. Download and unpack packege for MiFlash with new gpt View attachment AXON7_GPT_ADD_VENDOR_4GB.zip

3. Flash the packege via MiFlash

4. Reboot the phone and boot into recovery

5. Wipe data/factory reset to reformat userdata partition (i`m using original recovery)

6. Reboot to system

Restore original GPT

1. Install MiFlash

2. Download and unpack packege for MiFlash with original gpt View attachment AXON7_GPT_ORIGINAL.zip

3. Flash the packege via MiFlash

4. Reboot the phone and boot into recovery

5. Wipe data/factory reset to reformat userdata partition (i`m using original recovery)

6. Reboot to system
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Now devs should make firmware with support treble ;)

Сheck the work of a new "vendor" partition
[ZTE Axon 7 Guides, News, & Discussion] Druboo666:
why adding you name to vendor:eek:

that may conflict with getting treble support as generic /vendor partition is required for treble
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
:D:D:D

!!! No need to worry !!!

I just checked on my phone that the new partition is normally mounted after repartition GPT ;)
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
Is it possible to also get A/B update scheme with this method? Also, would this get overwritten if you flash stock via MiFlash?

Nice work! This is worthy of an article [MENTION=4344846]a.cid[/MENTION]
[ZTE Axon 7 Guides, News, & Discussion] Soyunamortz:
Lets not get picky .... And see what they can get out of these amazing work
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
Repartition of memory can be done without problems, but I'm not sure whot our fastboot supports this commands:

fastboot set_active a
fastboot set_active b

And yes, if you flash stock via MiFlash the new GPT will be replaced by the original one, and vendor partition will be lost...

We need to remake the firmwares for edl.

I think it's wrong to rewrite the GPT every time (all our firmwares for edl do this). We need only one firmware (for a deep unbrick) that will return the original GPT. All else firmwares for edl should be without rewriting GPT.
[ZTE Axon 7 Guides, News, & Discussion] samo_lego:
At first, thanks [MENTION=6330152]djkuz[/MENTION]!

(idk how will that sound sry I am still noob at all this stuff)

I'm using RR Oreo on my Axon 7 which wasn't made for treble, will flashing this file via MiFlash corrupt anything?
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
It makes zero sense as of now, just don't install it until devs actually implement treble
[ZTE Axon 7 Guides, News, & Discussion] samo_lego:
Ok, yeah, that's smart enough ;), thanks.
[ZTE Axon 7 Guides, News, & Discussion] RUNNERX:
Using treble GSI is still in early stages. I switched from the axon to the razer and GSIs are a pain to flash, you have to wipe everything except external sd card because of forced encryption. And you do that everytime you flash a rom. Plus just like the axon with different audio DACs the razer audio is not working right because of a different audio setup. But with the oneplus 6 having treble it looks like more devs are working on it.
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
I just checked emmc_appsboot.mbn and found that fastboot from oficial beta V1.3.0B01 Oreo and V2.1.0B12 Oreo

support this commands !!!

;)
[ZTE Axon 7 Guides, News, & Discussion] KevinX8:
For AB to work two system partitions need to exist, the fastboot probably has these commands because they are implemented upstream. You should edit your GPT to include another system partition of the same size as the original
[ZTE Axon 7 Guides, News, & Discussion] djkuz:
I know it! And as a rule not only the system partition ;)

[B][U]Partitions of the first bootloader (Slot "a")[/U][/B]
/dev/block/bootdevice/by-name/aboot_a
/dev/block/bootdevice/by-name/apdp_a
/dev/block/bootdevice/by-name/fastboot_a
/dev/block/bootdevice/by-name/cmnlib32_a
/dev/block/bootdevice/by-name/cmnlib64_a
/dev/block/bootdevice/by-name/devcfg_a
/dev/block/bootdevice/by-name/hyp_a
/dev/block/bootdevice/by-name/keymaster_a
/dev/block/bootdevice/by-name/msadp_a
/dev/block/bootdevice/by-name/pmic_a
/dev/block/bootdevice/by-name/rpm_a
/dev/block/bootdevice/by-name/tz_a
/dev/block/bootdevice/by-name/xbl_a

[B][U]Partitions of the second bootloader (Slot "b")[/U][/B]
/dev/block/bootdevice/by-name/aboot_b
/dev/block/bootdevice/by-name/apdp_b
/dev/block/bootdevice/by-name/fastboot_b
/dev/block/bootdevice/by-name/cmnlib32_b
/dev/block/bootdevice/by-name/cmnlib64_b
/dev/block/bootdevice/by-name/devcfg_b
/dev/block/bootdevice/by-name/hyp_b
/dev/block/bootdevice/by-name/keymaster_b
/dev/block/bootdevice/by-name/msadp_b
/dev/block/bootdevice/by-name/pmic_b
/dev/block/bootdevice/by-name/rpm_b
/dev/block/bootdevice/by-name/tz_b
/dev/block/bootdevice/by-name/xbl_b

[B][U]Partitions of the both modem (Slot "a" and Slot "b" )[/U][/B]
/dev/block/bootdevice/by-name/modem_a
/dev/block/bootdevice/by-name/modem_b

[B][U]Partitions of the both boot (Slot "a" and Slot "b" )[/U][/B]
/dev/block/bootdevice/by-name/boot_a
/dev/block/bootdevice/by-name/boot_b

[B][U]Partitions of the both vendor (Slot "a" and Slot "b" )[/U][/B]
/dev/block/bootdevice/by-name/vendor_a
/dev/block/bootdevice/by-name/vendor_b

[B][U]Partitions of the both system (Slot "a" and Slot "b" )[/U][/B]
/dev/block/bootdevice/by-name/system_a
/dev/block/bootdevice/by-name/system_b

The remaining partition, not listed in the table, are presented in one copy because they are not needed to be divided.

As I already wrote - there is no problem to edit the GPT ;)

PS: fastboot from Nougat firmware not support command: set_active

Sizes:

system_a = system_b = system / 2 (because there will be a separate vendor partition)

PS: no need recovery and cache partition
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
How much space do the blobs take? About 1 GB?

Also, is it simple to get the blobs and put them in vendor (i.e. you can get them from the Oreo betas or source code) or is it more complex than that?

That's all, I'll stop bothering you ?
[ZTE Axon 7 Guides, News, & Discussion] Cat In Boots:
Very good news! Hope our developers will be interested in Treble.

FYI. Currently here CosmicDan is developing MIUI 9 for Treble A/B devices. If he will succeed and ours developers also, we will be able to get MIUI.
[ZTE Axon 7 Guides, News, & Discussion] shpitz461:
That's why I use Mixplorer's built-in FTP server to transfer files, much faster than even using USB cable straight to the PC.
[ZTE Axon 7 Guides, News, & Discussion] Choose an username...:
I talked to one of the editors here at xda some time ago and they said they'll make an article as soon as anything usable comes out of this. Just a heads-up
[ZTE Axon 7 Guides, News, & Discussion] bkores:
The latest AEX has binderized HALs. Will those work if they are put into /vendor or am I missing something?