@echo off
color 0a
ECHO. 

rd /s /q backup > nul 2>&1

adb shell  "rm -rf /sdcard/backup "

adb shell "mkdir /sdcard/backup"

ECHO 正在备份 backup 分区，耐心等待......

adb shell "dd if=/dev/block/platform/hi_mci.1/by-name/backup    of=/sdcard/backup/backup3798mv100.img"

adb shell "dd if=/dev/block/platform/soc/by-name/backup    of=/sdcard/backup/backup.img"

ECHO 正在上传备份的固件，耐心等待......

adb pull -p  /sdcard/backup  backup

ECHO 备份完成，固件存放位置为工具根目录backup文件！！！

pause>NUL