Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/bin/sh
- FILE=/dev/block/mmcblk0boot0
- BASEADDR=`cat ${FILE} |hexdump |grep '0011 1234'|awk '{print $1}'`
- ADDR1=$(expr 4 + $((0x${BASEADDR})))
- ADDR2=$(expr 8 + $((0x${BASEADDR})))
- if [ ! -w $FILE ];then
- echo "Bootloader is Read Only"
- else
- if [ -z ${BASEADDR} ]; then
- echo "Base Address could not be read.."
- else
- echo "Base address for needed info is:"${BASEADDR}
- #echo -e \\x00 |dd count=1 bs=1 seek=$ADDR1 of=$FILE conv=notrunc
- #echo -e \\x02 |dd count=1 bs=1 seek=$ADDR2 of=$FILE conv=notrunc
- echo "Triangle and Count Reset..."
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment