android 使用dd升级bootimage镜像

1、查看分区表

 # ls -la dev/block/platform/soc.0/7824900.sdhci/by-name
boot分区如下

android 使用dd升级bootimage镜像_第1张图片

 

2、将需要替换的boot文件拷贝到系统中(如/storage/updateimage中)

执行#dd if=boot.img of=/dev/block/mmcblk0p20; sync

 

3、或者写成脚本升级,重启即升级成功

#!/system/bin/sh

boot_DIR="boot"

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
      
dd if=boot.img of=/dev/block/mmcblk0p20; sync
sync 
echo "update boot img ok "
    exit 0
fi

 

 参考:https://blog.csdn.net/jack_a8/article/details/52837573

 

你可能感兴趣的:(android 使用dd升级bootimage镜像)