Backup img and restore img through adb
Because the work needs to make the mobile phone of the same model into the same system, I also found some ROM software, and I feel that it is faster than a few lines of commands. Simply put, it is to clone the system of A mobile phone to B mobile phone.
First of all, the system must first unlock the root, unlocking the root is not introduced here
#获取root权限
adb root
#重新挂载分区
adb remount
Check the partition, usually under /dev/block/platform, for example:
ls -al /dev/block/platform/msm_sdcc.1/by-name
Enter the adb shell and start backing up the partition
adb shell
backup root partition
dd if=/dev/block/mmcblk0p37 of=/sdcard/boot.img
Send it to the computer and mobile phone through the adb push pull command, please search for the usage method by yourself.
restore boot partition
dd of=/dev/block/mmcblk0p37 if=/sdcard/boot.img
restart the system
reboot boot