chris41g

triangle

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