1#!/bin/bash 2pause() 3{ 4echo "Press any key to quit:" 5read -n1 -s key 6exit 1 7} 8echo "start to unpack update.img..." 9if [ ! -d "output" ]; then 10 mkdir output 11fi 12if [ ! -f "update.img" ]; then 13 echo "Error:No found update.img!" 14 pause 15fi 16./rkImageMaker -unpack update.img output || pause 17./afptool -unpack output/firmware.img output || pause 18rm -f output/firmware.img 19rm -f output/boot.bin 20echo "Unpacking update.img OK." 21echo "Press any key to quit:" 22read -n1 -s key 23exit 0