Finding fstab on Android
When porting a new device, you need to figure out the mounting points for the various partitions on your phone. Maybe you need them to back up existing system files for dissection later, maybe you need to experimentally flash a build to a partition.
Except, since it’s classic Android, there is no simple /etc/fstab
file waiting for you. Fear not! There are lots of ways to find out what your partition info is.
First, we need to find out the partition info. Run this:
adb shell cat /proc/partitions
A list of partitions should come up.
OK, pretty helpful, except that the partition names are something like mmcblk0p10
. How am I supposed to know which partition corresponds to the standard Android partition scheme?
Well, the next command should show you that:
adb shell ls -al /dev/block/platform/<manufacturer specific>/by-name
But wait! What is manufacturer specific?
Go into your phone, make sure it’s rooted, and fire up a root explorer. Browse to /dev/block/platform
. In here, you should find the folder, named something like dw_mmc
or mmc
or something along those lines.
So, the command would be something like this:
adb shell ls -al /dev/block/platform/mmc/by-name
Thanks to the original poster on XDA for the information!