[Mi 3 Android Development] gujiangjiang:
Create a vendor partition for cancro to flash a PT GSI IMAGE

This guide only suitable for MI4LTE and MI3W.

MI3TD don‘t support this method and ROM.

First we must thanks to the MkfsSion for his PT works on our MI4LTE.

https://github.com/MkfsSion/android_device_xiaomi_cancro

And thanks to the cjybyjk for his automatic treblizer tools.

https://github.com/cjybyjk/cancro_treblizer

Warning: this operation is highly experimental and may result in a serious risk of irreversibility​

Method 1 With cjybyjk's cancro_treblizer.(Recommend this method now)

1.Let MI4LTE to fastboot mode.

We can press Volume - and Power button to let it into fastboot mode.

2.Let flash the TWRP which support ProjectTreble.

We can use the command [fastboot flash recovery x.img]

Recovery:https://drive.google.com/file/d/1Fc0SK_xYdmkFi5CzR4Vq8QLqQFQ1ikWk/view?usp=sharing

3.Let reboot into the TWRP and flash the cancro_treblizer.zip in TWRP and reboot into the TWRP again when finished.

https://drive.google.com/file/d/14EkMX9VKiC3kbELwtBkxmAYupCmCxPf5/view?usp=sharing

4.Mount the Cache System and Vendor partition and Wipe this 3 partitions.

5.Then we can flash the zip rom from the AFH below.

https://www.androidfilehost.com/?fid=11410932744536984188

6.If you flash the pie gsi arm rom and you must flash this omx-disable patch to fix the boot for pie.

https://drive.google.com/file/d/19TUZiX0vHxIlc9f_6wF2uySI8HcW7xqy/view?usp=sharing

7.Now you can use the nice ProjectTreble ROM on our MI4LTE!

Method 2 With 9008 mode and Diskgenius.(Not recommend now)

1.Let MI4LTE to fastboot mode.

We can press Volume - and Power button to let it into fastboot mode.

2.Let MI4LTE to disk mode(9008 mode).

Open the "磁盘模式工具.rar" ,Unzip it and double click the "清除fastboot进磁盘操作.bat" when MI4LTE go to black screen it was succeeded into disk mode.

Disk Mode Tools:https://drive.google.com/file/d/12uFsjwB_t_XzBWz0aeVJue5zdPiPCc7c/view?usp=sharing

3.Download the DiskGenius Software from the website:

http://www.diskgenius.com/

4.Open the DiskGenius and you will find all the MI4LTE partition in it and we need to restore aboot partition.

aboot partition file:https://drive.google.com/file/d/1aYikwwQQdAsa_XM7cKqv2f49aYAMNybu/view?usp=sharing

5.Then we need to restore ProjectTreble partition table.(For 16GB Version Only)

ProjectTreble partition table file:https://drive.google.com/file/d/1Zg_htr9tSfUHqr04pdxlCyn_qANnwJlM/view?usp=sharing

6.Then we can reboot the MI4LTE into the fastboot mode again and flash the TWRP which support ProjectTreble.

We can use the command fastboot flash recovery x.img

Recovery:https://drive.google.com/file/d/1Y-67W1MfMchny6ljCxKpU1_vq-PdLkpV/view?usp=sharing

7.Press Volume + and Power button to go into the TWRP.

8.Mount the Cache System and Vendor partition and Wipe this 3 partitions.

9.Then we can flash the zip rom from the AFH below.

https://androidfilehost.com/?fid=3700668719832236822

10.Now you can use the nice ProjectTreble ROM on our MI4LTE!

Now our MI4LTE is not ARM64 device so we can only flash A-Only and ARM GSI IMAGE.

:D:D:D​

Update 2018-08-21

Phh have just released the Android 9.0 GSI IMAGE have include ARM and ARM64 so our cancro can flash Android 9.0 GSI IMAGE for experience.

https://xdaforums.com/project-treble/trebleenabled-device-development/aosp-9-0-phh-treble-t3831915

Update 2018-10-20

Fix App FC

Fix OMX

Fix GPS

Note:Pie PT GSI may need extra patch when you flash the pie gsi image with this pt package.

Cancro Rom Group

Group rules:

1.English only.(You can use the translator to communicate.)

2.Respect developers and administrators.

3. Please do not send spam.

4. Do not send stickers continuously.

Channel: [MENTION=2709641]cancro[/MENTION]rom

CN Group: [MENTION=2709641]cancro[/MENTION]group

https://t.me/micancro