wipe /system and Reboot
write GSI system.img with FlashTool or fastboot command.
adb shell
rm /vendor/lib/hw/keystore*
rm /vendor/lib64/hw/keystore*
echo debug.stagefright.ccodec=0 >> /system/system/build.prop
And you could write more files with ADB root.
TWRP was not working for my...