It is just a reference for other developers, because I don't have much time to careful test and maintain it.
Warning: not recommend to try it unless u are sure know how to achieve the following condition, sorry for my bad English, but be careful. And more, /data will not mount under recovery after encryption(needed by android 6.0)
1. remove /sdcard partition(p15) and increase size of /data partition(p14). In theory just decrease size of /sdcard partition is also work, but I have not test.
2. format /data but leave 16384 Bytes spare area at the footer of partition.(manual specify block/sector count when mkfs)