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 <image> /dev/zero > <block>` 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
This commit is contained in:
osm0sis committed 2019-06-02 15:44:49 -03:00
1 parent c8d087bbad
commit 24032c0732
1 file changed
+3
+3
View File
@@ -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;