Skip to content

Instantly share code, notes, and snippets.

@michaelskyf
Created May 28, 2022 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelskyf/078a8bd679925f7ea5d8a22fda3010c8 to your computer and use it in GitHub Desktop.
Save michaelskyf/078a8bd679925f7ea5d8a22fda3010c8 to your computer and use it in GitHub Desktop.
#!/bin/sh
./mkbootimg --kernel <your built Image.gz> \
--ramdisk <extracted ramdisk> \
--dtb <Android kernel source dir begonia-android-12.0/arch/arm64/boot/dts/mediatek/mt6785.dtb> \
--cmdline "bootopt=64S3,32N2,64N2 androidboot.selinux=permissive buildvariant=userdebug" \
--base 0x40078000 \
--kernel_offset 0x00008000 \
--ramdisk_offset 0x07c08000 \
--second_offset 0xbff88000 \
--tags_offset 0x0bc08000 \
--dtb_offset 0x0bc08000 \
--os_version "12.0.0" \
--os_patch_level "2021-12" \
--pagesize 2048 \
--header_version 2 \
--hashtype sha1 \
-o output.img && \
fastboot flash boot output.img && \
fastboot reboot && \
rm -f output.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment