For every device that need "DHTB" string to boot
written in c
Tried and worked for gtexswifi ✅️
./appendheader -i [input file]
default output file name is boot.img
./appendheader -s [input file]
and you don't see red text
./appendheader -i [input file] -o [output file name]
for save input and output files (because why not)
# Patch image to include additional 512 Bytes Header found on SM-T280 devices
if [ "$(dd if=$BOOTIMAGE count=4 bs=1)" = "DHTB" ]; then
ui_print "- Found DHTB Header at 0x0000, expecting ANDR at 0x0200"
if [ "$(dd if=$BOOTIMAGE count=4 bs=1 skip=512)" = "ANDR" ]; then
ui_print "- Found ANDR Header at 0x0200, patching boot.img"
dd if=$BOOTIMAGE of=/sutmp/prefix.img count=8 bs=1
dd if=/dev/zero of=/sutmp/prefix-pad.img count=504 bs=1
cat /sutmp/prefix.img /sutmp/prefix-pad.img /sutmp/boot.img > /sutmp/patched.img
rm /sutmp/boot.img
mv /sutmp/patched.img /sutmp/boot.img
else
ui_print "- ANDR Header NOT found at 0x0200, boot.img may not work!"
fi
else
ui_print "- DHTB Header at 0x0000 NOT found, skipping step"
filicenced under GPL v3 licence
