手機 - Google Pixel 3a XL - Droidian - 如何打包、更新boot.img



#!/bin/bash
PAGE_SIZE=4096
BASE=0x00000000
DTB_OFFSET=0x1f00000
TAGS_OFFSET=0x00000100
SECOND_OFFSET=0x00f00000
KERNEL_OFFSET=0x00008000
RAMDISK_OFFSET=0x01000000
CMDLINE="console=ttyMSM0,115200n8 androidboot.console=ttyMSM0 printk.devkmsg=on msm_rtb.filter=0x237 ehci-hcd.park=3 service_locator.enable=1 firmware_class.path=/vendor/firmware datapart=/dev/mmcblk0p72 cgroup.memory=nokmem lpm_levels.sleep_disabled=1 apparmor=1 security=apparmor"

rm -rf boot_new.img
mkbootimg --kernel Image.lz4-dtb --ramdisk ramdisk --dtb dtb --cmdline "$CMDLINE" --base $BASE --kernel_offset $KERNEL_OFFSET --ramdisk_offset $RAMDISK_OFFSET --second_offset $SECOND_OFFSET --dtb_offset $DTB_OFFSET --pagesize $PAGE_SIZE -o boot_new.img