教你从手机中提取system镜像制作线刷救砖包的简单方法
其实在制作刷机包的过程中,有时候没有官方或者第三方提供的救砖包(线刷),那怎么办?
常规的方法有两种:(此处为常规方法,回读的方式暂不说明)
1.卡刷包转线刷包
2.dd命令导出分区镜像(需要ROOT权限)
方法一:卡刷包转线刷包
正常的卡刷包解压打开有这样的文件:
其实很简单,参考教程:
卡刷包转线刷包工具,新增支持6.0以上
这样,就可以生成你想要的system.img镜像
方法二、dd命令导出分区镜像(需要ROOT权限)
假设没有官方卡刷包,你依然可以通过dd命令去导出,首先确保你的手机又ROOT权限或者刷了第三方recovery
首先,如果是有ROOT权限就在开机模式,如果刷了第三方recovery就进入到recovery模式
然后,确保这之前你打开了USB调试模式(recovery模式不用操作),并连接电脑
打开CMD命令行,输入:(/dev/block/platform/*/*/by-name实际路径可能有差别,自己手动cd查看一下准确路径)
- adb shell “ls -l /dev/block/platform/*/*/by-name”
查询分区路径为:
- lrwxrwxrwx root root 2014-01-01 09:42 DDR -> /dev/block/mmcblk0p19
- lrwxrwxrwx root root 2014-01-01 09:42 aboot -> /dev/block/mmcblk0p4
- lrwxrwxrwx root root 2014-01-01 09:42 abootbak -> /dev/block/mmcblk0p5
- lrwxrwxrwx root root 2014-01-01 09:42 boot -> /dev/block/mmcblk0p22
- lrwxrwxrwx root root 2014-01-01 09:42 cache -> /dev/block/mmcblk0p24
- lrwxrwxrwx root root 2014-01-01 09:42 config -> /dev/block/mmcblk0p28
- lrwxrwxrwx root root 2014-01-01 09:42 fsc -> /dev/block/mmcblk0p16
- lrwxrwxrwx root root 2014-01-01 09:42 fsg -> /dev/block/mmcblk0p20
- lrwxrwxrwx root root 2014-01-01 09:42 hyp -> /dev/block/mmcblk0p10
- lrwxrwxrwx root root 2014-01-01 09:42 hypbak -> /dev/block/mmcblk0p11
- lrwxrwxrwx root root 2014-01-01 09:42 keystore -> /dev/block/mmcblk0p27
- lrwxrwxrwx root root 2014-01-01 09:42 misc -> /dev/block/mmcblk0p15
- lrwxrwxrwx root root 2014-01-01 09:42 modem -> /dev/block/mmcblk0p1
- lrwxrwxrwx root root 2014-01-01 09:42 modemst1 -> /dev/block/mmcblk0p13
- lrwxrwxrwx root root 2014-01-01 09:42 modemst2 -> /dev/block/mmcblk0p14
- lrwxrwxrwx root root 2014-01-01 09:42 oem -> /dev/block/mmcblk0p29
- lrwxrwxrwx root root 2014-01-01 09:42 pad -> /dev/block/mmcblk0p12
- lrwxrwxrwx root root 2014-01-01 09:42 persist -> /dev/block/mmcblk0p25
- lrwxrwxrwx root root 2014-01-01 09:42 recovery -> /dev/block/mmcblk0p26
- lrwxrwxrwx root root 2014-01-01 09:42 rpm -> /dev/block/mmcblk0p6
- lrwxrwxrwx root root 2014-01-01 09:42 rpmbak -> /dev/block/mmcblk0p7
- lrwxrwxrwx root root 2014-01-01 09:42 sbl1 -> /dev/block/mmcblk0p2
- lrwxrwxrwx root root 2014-01-01 09:42 sbl1bak -> /dev/block/mmcblk0p3
- lrwxrwxrwx root root 2014-01-01 09:42 sec -> /dev/block/mmcblk0p21
- lrwxrwxrwx root root 2014-01-01 09:42 splash -> /dev/block/mmcblk0p18
- lrwxrwxrwx root root 2014-01-01 09:42 ssd -> /dev/block/mmcblk0p17
- lrwxrwxrwx root root 2014-01-01 09:42 system -> /dev/block/mmcblk0p23
- lrwxrwxrwx root root 2014-01-01 09:42 tz -> /dev/block/mmcblk0p8
- lrwxrwxrwx root root 2014-01-01 09:42 tzbak -> /dev/block/mmcblk0p9
- lrwxrwxrwx root root 2014-01-01 09:42 userdata -> /dev/block/mmcblk0p30
查询到system分区的分区路径为/dev/block/mmcblk0p23,如果你要导出system分区,命令行执行
开机状态:
- adb shell su -c “dd if=/dev/block/mmcblk0p23” of=/sdcard/system.img
recovery模式:
- adb shell “dd if=/dev/block/mmcblk0p23” of=/sdcard/system.img
最后,手机选择MTP模式,也就是只要电脑能识别你的内部存储,你就可以在手机里面拷贝出system.img镜像文件了