I'm trying to find which partition is used for what, e.g. /boot
, /recovery
, /system
, from adb shell
. While this is trivial for partitions currently mounted (using the mount
or df
commands, see e.g. how to identify names of the partitions), this appears to be tricky when it comes to partitions not currently mounted (like /recovery
when booted in "user mode").
There's a tutorial at XDA, but it didn't work out for any of the devices I've tried:
cat /proc/mtd
: this is empty or non-existingcat /proc/emmc
: this is empty or non-existingcat /proc/dumchar_info
: non existing (MTK/MediaTek)ls -al /dev/block/platform/*/by-name
: either non-existing, or not having the wanted detailsparted
just yielded anError: Can't have a partition outside the disk!
on/dev/block/mmcblk1
(while simply missing the "name" column for/dev/block/mmcblk0
).
So I'm at a loss. I know there are apps like DiskInfo which can show those details, so there must be stored somewhere on the device. However, modifying the device (by installing an app) is not an option in my case.
So basically my question burns down to:
Where on the Android device is this information stored?
If possible, a generic approach is preferred. If not, a "try-and-err" of several approaches (if..elseif..fi
) would do as well.
For background: an example use would be "I want to retrieve the /boot
partition only" (get an image of it via dd
). It wouldn't do to first grab all partitions, and evaluate later – too time consuming, and too much data produced ;) – This already describes the intention: writing a little tool to retrieve a particular disk image.