If you download or apply this solution before 2019.07.17.16:20(GMT+9)
you NEED to revert stock partition or new partition layout
and download recovery image and flash again
Here is treble-enabled twrp recovery and GPT binary required for repartition
This process is ready to support the android treble, and additional work(modify kernel, create and organize vendor stuff) is required to use the android treble rom
You no need to repartition to use android treble
Chaged partiton layout
SYSTEM 1920MB > 2200MB, 2400MB (for future)
CUST 320MB > 400MB
How to repartition(increase system partition size)
If you resize the partition table, device data will be corrupted.
You MUST backup data partition before repartition!!!
Also COPY to all backup image, media file(photo, music, etc) into other device(PC, USB STICK)
1.Reboot into fastboot mode
2.fastboot flash partition gpt_both0.bin
System 1920mb, cust 320mb
System 2200mb, cust 400mb
System 2400mb, cust 400mb
I recommend resizing the system partition capacity to 2400mb.
3.Reboot into twrp recovery
4.Wipe vendor, cache partition in wipe menu
5.Format data partiton(format data) in wipe menu
6.Copy backup image into device
7.Restore backup image(data)
GPT Binary
TWRP Recovery
For developer
I decided to use cust partition as vendor, because is other xiaomi device is doing the same way.
If we store vendor stuff to vendor(cust) partition, it saves system partitition size
To support treble, add this code in kernel source
arch/arm/boot/dts/qcom/msm8992.dtsi
Next we need to organize vendor stuff
Since i don't have much time to make it, other developer participation is needed
you NEED to revert stock partition or new partition layout
and download recovery image and flash again
Here is treble-enabled twrp recovery and GPT binary required for repartition
This process is ready to support the android treble, and additional work(modify kernel, create and organize vendor stuff) is required to use the android treble rom
You no need to repartition to use android treble
Chaged partiton layout
SYSTEM 1920MB > 2200MB, 2400MB (for future)
CUST 320MB > 400MB
How to repartition(increase system partition size)
If you resize the partition table, device data will be corrupted.
You MUST backup data partition before repartition!!!
Also COPY to all backup image, media file(photo, music, etc) into other device(PC, USB STICK)
1.Reboot into fastboot mode
2.fastboot flash partition gpt_both0.bin
System 1920mb, cust 320mb
System 2200mb, cust 400mb
System 2400mb, cust 400mb
I recommend resizing the system partition capacity to 2400mb.
3.Reboot into twrp recovery
4.Wipe vendor, cache partition in wipe menu
5.Format data partiton(format data) in wipe menu
6.Copy backup image into device
7.Restore backup image(data)
GPT Binary
TWRP Recovery
For developer
I decided to use cust partition as vendor, because is other xiaomi device is doing the same way.
If we store vendor stuff to vendor(cust) partition, it saves system partitition size
To support treble, add this code in kernel source
arch/arm/boot/dts/qcom/msm8992.dtsi
Code:
firmware: firmware {
android {
compatible = "android,firmware";
fstab {
compatible = "android,fstab";
system {
compatible = "android,system";
dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/system";
type = "ext4";
mnt_flags = "ro,barrier=1,discard";
fsmgr_flags = "wait";
status = "ok";
};
vendor {
compatible = "android,vendor";
dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/cust";
type = "ext4";
mnt_flags = "ro,barrier=1,discard";
fsmgr_flags = "wait";
status = "ok";
};
};
};
};
Since i don't have much time to make it, other developer participation is needed
Last edited: