// To get all the partition names:
root@dredd:/dev/block/platform/aml_sdio.0 # ls -l
lrwxrwxrwx root root 2023-05-15 15:28 boot -> /dev/block/boot
lrwxrwxrwx root root 2023-05-15 15:28 boot1 -> /dev/block/boot1
lrwxrwxrwx root root 2023-05-15 15:28 bootloader -> /dev/block/bootloader
drwxr-xr-x root root 2023-05-15 15:28 by-num
lrwxrwxrwx root root 2023-05-15 15:28 cache -> /dev/block/cache
lrwxrwxrwx root root 2023-05-15 15:28 data -> /dev/block/data
lrwxrwxrwx root root 2023-05-15 15:28 env -> /dev/block/env
lrwxrwxrwx root root 2023-05-15 15:28 logo -> /dev/block/logo
lrwxrwxrwx root root 2023-05-15 15:28 misc -> /dev/block/misc
lrwxrwxrwx root root 2023-05-15 15:28 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx root root 2023-05-15 15:28 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2023-05-15 15:28 mmcblk1 -> /dev/block/mmcblk1
lrwxrwxrwx root root 2023-05-15 15:28 mmcblk1boot0 -> /dev/block/mmcblk1boot0
lrwxrwxrwx root root 2023-05-15 15:28 mmcblk1boot1 -> /dev/block/mmcblk1boot1
lrwxrwxrwx root root 2023-05-15 15:28 panic -> /dev/block/panic
lrwxrwxrwx root root 2023-05-15 15:28 persist -> /dev/block/persist
lrwxrwxrwx root root 2023-05-15 15:28 recovery -> /dev/block/recovery
lrwxrwxrwx root root 2023-05-15 15:28 reserved -> /dev/block/reserved
lrwxrwxrwx root root 2023-05-15 15:28 system -> /dev/block/system
lrwxrwxrwx root root 2023-05-15 15:28 system1 -> /dev/block/system1
// To dump the system partition to a image file
root@dredd:dd if=/dev/block/system of=/storage/sdcard1/system.img
root@dredd:dd if=/dev/block/system of=/storage/sdcard1/system.img
1310720+0 records in
1310720+0 records out
671088640 bytes transferred in 419.644 secs (1599185 bytes/sec)
root@dredd:/dev/block/platform/aml_sdio.0 #
// Now you can use the USB Drive to copy the system image file to a computer
// And you can also view the content of the image. The following method is on mac os.
// To attach image file as disk partition
fengnz@mac:/Volumes/SONY_8M1/root > hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount system.img
/dev/disk6
// To mount the partition to a mount point
fengnz@mac:/Volumes/SONY_8M1/root > mkdir /Volumes/ext4
fengnz@mac:/Volumes/SONY_8M1/root > sudo mount -t fuse-ext2 /dev/disk6 /Volumes/ext4
fengnz@mac:/Volumes/SONY_8M1/root > sudo ext4fuse -o allow_other /dev/disk6 /Volumes/ext4/
// To detach the image
fengnz@mac:/Volumes/SONY_8M1/root > hdiutil detach disk6
"disk6" unmounted.
"disk6" ejected.
Feng
没有评论:
发表评论