- Install Python protobuf and uefi_firmware-parser by executing
pip install --upgrade google-api-python-client uefi_firmware
in terminal - Download 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-master
folder - Open terminal in the same folder and execute
python3 extract_android_ota_payload.py payload.bin
- Execute
uefi-firmware-parser -b -e xbl.img
- Change directory to
volume-******/file-9e21fd93-9c72-4c15-8c4b-e77f1db2d792
- Execute
7z x -oextracted section0.guid
- Open UEFITool and open the file
section0
in folderextracted
- In a file manager, open
edk2-sdm845/sdm845Pkg/Binary
, duplicatedipper
folder and rename it to your device's codename - In UEFITool, expand
UEFI image
and the volume underneath - For 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
.depex
right clicking on DXE dependency - in case of file that ends with
.efi
right clicking on PE32 Image - clicking
Extract body
- deleting 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/sdm845Pkg
in a file manager - Duplicate
dipper.dsc
anddipper.fdf
and rename both to your device's codename - Open the
.dsc
file, replace values 1080 and 2248 with your device's display width and height and save - Open the
.fdf
file, replace every word "dipper" with your device's codename and save - Open
edk2-sdm845
and editbuild.sh
with a text editor - Locate 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.