edk2-sdm845 Porting Guide¶
Install Python protobuf and uefi_firmware-parser by executing
pip install --upgrade google-api-python-client uefi_firmwarein terminalDownload extract_android_ota_payload and extract the folder inside the archive anywhere
Download any OTA update for your phone
Extract payload.bin to
extract_android_ota_payload-masterfolderOpen terminal in the same folder and execute
python3 extract_android_ota_payload.py payload.binExecute
uefi-firmware-parser -b -e xbl.imgChange directory to
volume-******/file-9e21fd93-9c72-4c15-8c4b-e77f1db2d792Execute
7z x -oextracted section0.guidOpen UEFITool and open the file
section0in folderextractedIn a file manager, open
edk2-sdm845/sdm845Pkg/Binary, duplicatedipperfolder and rename it to your device’s codenameIn UEFITool, expand
UEFI imageand the volume underneathFor each file in your device’s folder replace it with UEFITool by:
expanding the DXE Driver in UEFITool with the same name as the file you are replacing
in case of file that ends with
.depexright clicking on DXE dependencyin case of file that ends with
.efiright clicking on PE32 Imageclicking
Extract bodydeleting the original file
saving the one you are extracting and naming it same as the deleted one
In case a part (ex. DXE Dependency) is missing in UEFITool, just delete that file
Open
edk2-sdm845/sdm845Pkgin a file managerDuplicate
dipper.dscanddipper.fdfand rename both to your device’s codenameOpen the
.dscfile, replace values 1080 and 2248 with your device’s display width and height and saveOpen the
.fdffile, replace every word “dipper” with your device’s codename and saveOpen
edk2-sdm845and editbuild.shwith a text editorLocate device list at the top, add your device’s codename and save
You can now build as usual.
Make sure to message the Discord or Telegram group in case you are stuck somewhere and if your port is successful, send edk2-sdm845/sdm845Pkg/Binary/devicename folder and .dsc and .fdf files.