From d60281c8b2214fba428ac798cf37df6664598c3d Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sun, 10 Sep 2017 23:05:47 -0300 Subject: [PATCH] AK2: add DHTB signed image support - add built-in support for dhtbsign for Samsung/Spreadtrum board devices signature header (see: https://github.com/osm0sis/dhtbsign) --- tools/ak2-core.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 5f6c1c0..5c4cdd9 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -226,7 +226,11 @@ write_boot() { fi; fi; if [ "$(strings /tmp/anykernel/boot.img | grep SEANDROIDENFORCE )" ]; then - printf 'SEANDROIDENFORCE' >> /tmp/anykernel/boot-new.img; + printf 'SEANDROIDENFORCE' >> boot-new.img; + fi; + if [ -f "$bin/dhtbsign" ]; then + $bin/dhtbsign -i boot-new.img -o boot-new-signed.img; + mv -f boot-new-signed.img boot-new.img; fi; if [ -f "$bin/flash_erase" -a -f "$bin/nandwrite" ]; then $bin/flash_erase $block 0 0;