I have a fully functional and previously tested official boot.img for my device.
But when I tried to unpack it and repack it again(with no modifications whatsoever), the kernel fails to start as usual.
I get a "Kernel is not seandroid enforcing" text on the top left of my screen when I try to boot the new kernel and the device seems to be stuck showing the logo.
I'm using the bootimg-tools located here: https://github.com/pbatard/bootimg-tools
Here's how I'm unpacking it:
$ ./unmkbootimg -i stock/boot.img
kernel written to 'kernel' (11273048 bytes)
ramdisk written to 'ramdisk.cpio.gz' (2856269 bytes)
To rebuild this boot image, you can use the command:
mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --second_offset 0x00f00000 --tags_offset 0x00000100 --cmdline 'console=ttyS1,115200n8' --kernel kernel --ramdisk ramdisk.cpio.gz -o stock/boot.img
I'm using the same exact command in the unpack command to re-pack it:
$ ./mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --second_offset 0x00f00000 --tags_offset 0x00000100 --cmdline 'console=ttyS1,115200n8' --kernel kernel --ramdisk ramdisk.cpio.gz -o stock/boot.img
I have no idea whats the issue here, I'm not even sure if this is the correct way to make a zImage bootable.
Any help would be greatly appreciated.
Thank you.