android 文件系统升级 boot.img

#!/system/bin/sh

recovery_DIR="recovery.img"
boot_DIR="boot.img"


if [ "$1" == "$boot_DIR" ];then
 echo "update boot img start"
        chmod 777 boot.img
 if [ ! -x "$boot_DIR" ]; then 
  echo " no boot img file "
  echo " update boot img err , shll exit."
  exit 0
   fi
      
 busybox dd if=boot.img of=/dev/block/mmcblk0p1; sync
       sync 
 echo "update boot img ok "
        exit 0
fi

if [ "$1" == "$recovery_DIR" ];then

 echo "update recover img start"
         chmod 777 recovery.img
 if [ ! -x "$recovery_DIR" ]; then 
  echo " no recovery.img file "
  echo " update recovery img err,shll exit."
  exit 0
 fi

 busybox dd if=recovery.img of=/dev/block/mmcblk0p2; sync
 echo "update recovery img ok "
 exit 0
fi 

echo "请输入 ./update-img-ok.sh  < recovery.img | boot.img >"
exit 0 

你可能感兴趣的:(imx6芯片相关)