From 24032c07328cd2ed9b7c2e57d63d351d52425cf0 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sun, 2 Jun 2019 15:44:49 -0300 Subject: [PATCH] AK3: allow workaround for dtbo devices with cat /dev/zero issues - some device recoveries (e.g. TWRP for wahoo) seem to have issues with the new `cat /dev/zero > ` method of flashing, so allow setting customdd="bs=1048576" shell variable in anykernel.sh to work around this by reverting back to dd wipe+flash for dtbo as it does with boot --- tools/ak3-core.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 20fdac2..e7bb456 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -345,6 +345,9 @@ flash_dtbo() { if [ -f "$bin/flash_erase" -a -f "$bin/nandwrite" ]; then $bin/flash_erase $dtboblock 0 0; $bin/nandwrite -p $dtboblock $dtbo; + elif [ "$customdd" ]; then + dd if=/dev/zero of=$dtboblock 2>/dev/null; + dd if=$dtbo of=$dtboblock; else cat $dtbo /dev/zero > $dtboblock 2>/dev/null; fi;