$ cd ../
$ cat /backups/brain/
0050
Change Android Kernel Parameters (MAGISK)

Magisk is required:

1
2
3
4
/data/adb/magisk/magiskboot unpack -h /dev/block/by-name/boot_b
vi header
/data/adb/magisk/magiskboot repack  /dev/block/by-name/boot_b ../new_boot.img
dd if=../new_boot.img of=/dev/block/by-name/boot_b

Then you see how your image changed:

1
2
3
4
5
6
7
8
akita:/ # xxd -l 100 /dev/block/by-name/boot_b                                                                                                                
00000000: 414e 4452 4f49 4421 ea60 fc00 0000 0000  ANDROID!.`......
00000010: 0000 0000 3006 0000 0000 0000 0000 0000  ....0...........
00000020: 0000 0000 0000 0000 0400 0000 6b61 7361  ............kasa
00000030: 6e3d 6f6e 0000 0000 0000 0000 0000 0000  n=on............
00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000060: 0000 0000

Which is aligned with what the boot image contains:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Boot images contents

The Android boot images contain the following.

    init_boot image added for devices launching with Android 13
        Header version V4
        Generic ramdisk image

    Generic boot image
        Header version V3 or V4
            A boot_signature for GKI boot.img certification (v4 only). The certified GKI boot.img isn't signed for verified boot. OEMs must still sign the prebuilt boot.img with a device-specific AVB key.
            Generic cmdline (GENERIC_KERNEL_CMDLINE)
            GKI kernel

Taken from: https://xdaforums.com/t/guide-how-to-change-the-kernel-boot-parameter-for-the-android-kernel.4600821/

$ cd ../