Omni minimal device tree for Razer Phone 2

Setup

  1. Head to https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-8.1 and set up your minimal tree
  2. Add this to .repo/local_manifests/cheryl2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
        <project path="device/razer/cheryl2" name="thecubed/android_device_razer_cheryl2" remote="github" revision="android-8.1" />
        <project path="kernel/razer_sdm845" name="thecubed/android_kernel_razer_sdm845" remote="github" revision="android-8.1" />
</manifest>
  1. Run repo sync to check it out.

Building

. build/envsetup.sh
lunch omni_cheryl2-eng
# if using minimal omni tree -- IMPORTANT!
export ALLOW_MISSING_DEPENDENCIES=true
# to fix razer kernel not having latest DTC scripts (also important)
export DTC_EXT=$(pwd)/prebuilts/misc/linux-x86/dtc/dtc

# to get a kernel image in $OUT/obj/KERNEL_OBJ/arch/arm64/boot/Image.gz-dtb
mka kernel

# OPTIONAL: to get a boot.img
mka recoveryimage

Notes

Acknowledgements

Special thanks to: