This thread described the main steps to port a P Preview image into semi-GSI .This is only a reference that points out the key files you may need to deal with, but not a step to step guide.Also I can only lead you to make it boot,and I'm not promising anything.
Things you need to prepare:
1.An Android device with official / unofficial 8.1 Treble support and a PC.
2.P DP3 semi-GSI image(most OEM P are working with DP3)
3.A *Qualcomm OEM P Preview image you want to port.
4.Better have a recent Android kitchen.
*Seems that there's only Qualcomm based devices received official P Preview builds. I'm not sure if someone has early access to P images for Kirin processors (e.g. for Huawei Mate 10) or Exynos.
In theory ,P images can be ported between chipsets from the same vendor.(If anyone have these images feel free to share it)
Also you need to prepare for (in case)bricks,if something goes wrong.
So let's start.
Unpack P semiGSI and the ROM you want to port.
*the lib&lib64 below means there are to files you need to replace,one in lib and one in lib64 folder.
Replace /system/lib&lib64/libselinux.so from semiGSI to your port.
Look for a txt file start with ld.config in your /system/etc of port image, then replace it with /system/etc/ld.configs.txt from semiGSI.
Remove /system/etc/permissions/qti-permissions.jar
Modify /system/etc/prop.default to disable adb secure and enable all debug props for debugging.
Unpack /vendor from port, try to find out services added by OEM in manifest.xml.
The manifest can be in /vendor or /vendor/etc/vintf
Pick out all /vendor HALs related to services you found in manifest.
Basically they are located in:
/vendor/bin/hw
/vendor/etc/init
/vendor/lib&lib64/
/vendor/lib&lib64/hw
Also look for some additional files related to OEM rom.(framework, overlays etc.)
Then pack your /system into img.
Flash 8.1 vendor & P semi-GSI boot & vendor patches.
Flash your port.
Add all additional thing you found in vendor.
You need to modify your device's manifest.xml and add OEM related.
Flash FBE Disabler and permissiver to disable FBE and SELinux.
Format /data ,push adb keys into system for debug
& reboot.
If you're lucky then you can get into bootanimation.If not, try to check everything.
Use adb logcat >logcat.txt and get logs.
Open the log, search 'died' and you will get to lines near system crash. Here you need some ROM porting skills,try to find out what's going wrong.
Things you need to prepare:
1.An Android device with official / unofficial 8.1 Treble support and a PC.
2.P DP3 semi-GSI image(most OEM P are working with DP3)
3.A *Qualcomm OEM P Preview image you want to port.
4.Better have a recent Android kitchen.
*Seems that there's only Qualcomm based devices received official P Preview builds. I'm not sure if someone has early access to P images for Kirin processors (e.g. for Huawei Mate 10) or Exynos.
In theory ,P images can be ported between chipsets from the same vendor.(If anyone have these images feel free to share it)
Also you need to prepare for (in case)bricks,if something goes wrong.
So let's start.
Unpack P semiGSI and the ROM you want to port.
*the lib&lib64 below means there are to files you need to replace,one in lib and one in lib64 folder.
Replace /system/lib&lib64/libselinux.so from semiGSI to your port.
Look for a txt file start with ld.config in your /system/etc of port image, then replace it with /system/etc/ld.configs.txt from semiGSI.
Remove /system/etc/permissions/qti-permissions.jar
Modify /system/etc/prop.default to disable adb secure and enable all debug props for debugging.
Unpack /vendor from port, try to find out services added by OEM in manifest.xml.
The manifest can be in /vendor or /vendor/etc/vintf
Pick out all /vendor HALs related to services you found in manifest.
Basically they are located in:
/vendor/bin/hw
/vendor/etc/init
/vendor/lib&lib64/
/vendor/lib&lib64/hw
Also look for some additional files related to OEM rom.(framework, overlays etc.)
Then pack your /system into img.
Flash 8.1 vendor & P semi-GSI boot & vendor patches.
Flash your port.
Add all additional thing you found in vendor.
You need to modify your device's manifest.xml and add OEM related.
Flash FBE Disabler and permissiver to disable FBE and SELinux.
Format /data ,push adb keys into system for debug
& reboot.
If you're lucky then you can get into bootanimation.If not, try to check everything.
Use adb logcat >logcat.txt and get logs.
Open the log, search 'died' and you will get to lines near system crash. Here you need some ROM porting skills,try to find out what's going wrong.