I'm trying to back up boot.img, recovery.img, and system.img on my Android phone. I've found several mentions of running this command:

cat proc/mtd

and then just using dd to copy the listed mount points. Seems straightforward enough. Unfortunately, the output of that command is just this single line:

dev:    size   erasesize  name

df also doesn't list the usual "Mounted On" column, just the filesystem. This is the output of df:

Filesystem             Size   Used   Free   Blksize
/dev                   234M    52K   234M   4096
/mnt/secure            234M     0K   234M   4096
/mnt/asec              234M     0K   234M   4096
/mnt/obb               234M     0K   234M   4096
/system                640M   459M   180M   4096
/data                    1G   406M   898M   4096
/cache                 369M     6M   363M   4096
/protect_f               8M     4M     4M   4096
/protect_s               8M     4M     4M   4096
/mnt/cd-rom              1M     1M     0K   2048
/storage/sdcard1         1G    24M     1G   16384
/storage/sdcard0         7G     2G     5G   32768
/mnt/secure/asec         7G     2G     5G   32768

Some details about my phone:

  • It's a BLU ADVANCE 4.0
  • Board is Mediatek MT6572
  • Android version is 4.2.2
  • Kernel version is 3.4.5
  • I do have root access

So, to reiterate my question - where are the partitions? How can I find them?

While I'm not necessarily averse to using programs other than the shell it seems like I really should be able to do this from there.

EDIT: I used dd on the various mmcblk files I found in /dev/block. Most of them I terminated prematurely as they were 100MiB+, but two (mmcblk0p2 and mmcblk0p3) came out to about 10MiB each which seems more probable for boot and recovery. The contents of these when mounted are:

  • a directory labelled lost+found (ext?)
  • a directory labelled md, the subcontents of which differ

In mmcblk0p2 the contents of md are:

  • Two files of unknown type, one 4B one 2.0KiB, labelled MPOD_000 and ST33A004 respectively

In mmcblk0p3 the contents of md are:

  • One file of unknown type, 2.0KiB, labelled ST33B004
  • Well, the boot and recovery partitions aren't mounted when Android is actually running. Do you have a /dev/block/platform directory? Usually you can get your mount points by looking in whatever subdirectory is in there (varies by chipset) and looking for the by-name directory within that. So, e.g. on my N5 it's /dev/block/platform/msm_sdcc.1/by-name. If I run ls -al there it shows where all the partitions map to. – eldarerathis Jun 5 '14 at 20:44
  • I had noticed that directory but unfortunately there's no by name option. There are a couple called mmcblk0boot0 and mmcblk0boot1 - one of them could be the boot one but it's tough to say which, if either. There is a /dev/BOOT and a /dev/recovery but BOOT gives an invalid argument error to dd and cat and /dev/recovery keeps going way longer than it should (I stopped it at 800MiB+, bigger than the system partition). – Dylan Jun 5 '14 at 21:17
  • Dylan, one typo: leading slash missing for cat /proc/mtd. Could that be the cause of the empty output? Also, df only lists partitions currently mounted (/recovery is only mounted when booted into, AFAIK). – Izzy Jun 5 '14 at 21:32
  • 2
    MTK devices usually have an item named 'recovery' under /dev. Have you tried dd-ing that? – dantis Jun 6 '14 at 8:30
  • 1
    Have you tried using the bs flag? Try something like dd if=/dev/recovery of=/sdcard/recovery.img bs=6291456c count=1 (from XDA) – dantis Jun 29 '14 at 11:51

as aureljared already mentioned, proper configured MTK devices populate their recovery and boot partitions in /dev/recovery and /dev/bootimg. Just dd from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.