Xperia XZ, Xperia XZs. Xpeira XZ Premium
SODP team has done everything to Go treble on AOSP Pie. So if you want to go treble, you need only to do a little work.The key is to enable VNDK and provide a Vendor partition.
As is known to us, there are many partitions exist in our devices. But not all of them are necessary for AOSP. 300KB disk space is enough for our AOSP cache partiton, but sony give us more than 300MB. It's a waste of disk space. Besides, all of these devices I mentioned support Qnovo charging technology, there is a partition in our phone named Qnovo for this stock function. It about 10~30MB. But we don't need it on AOSP. So we can use these two partition to Go Treble.
I'll take Maple as an example. How to modify devices tree to support treble.
We need to add vndk modules config in device.mk. See picture.
For maple, we need to add partition table config in BoardConfig.mk..
Notice: Because Yoshino platform has 3 devices. XZ1 and XZ1C has a vendor partition. The partition table config is in devices's BoardConfig.mk. For tone and loire platform, all of their devices has the same partition table. Their partition table config is in platform devices tree's PlatformConfig.mk.
The cache and vendor partitions' size shoud depend on phone's actual size. You can use my config. I had set it smaller than actual size.
For maple, we need to modified fstab in Yoshino platform device tree, the path is: rootdir/vendor/etc/fstab_legacy.yoshino.
We need to modified selinux policy in Yoshino platform device tree, the path is: sepolicy_platform/file_contexts.
To avoid SELinux policy errors and fail to boot, we'd better set selinux=permissive in BoardConfig.mk or PlatformConfig.mk.
Notice: For tone and loire platform, you need to find the platform common config in the same floder, like msm8996-tone-common.dtsi, msm8952-loire-common.dtsi
You need to set right vendor path and status, just like configs of system and oem partition