Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the contents of vold.fstab, or the syntax of the dev_mount line?

I am trying to understand some posts on how to accomplish various pieces of sd card magic on Android. These posts refer to /etc/vold.fstab and suggest modifying its contents with additional or changed dev_mount lines.

Okay, interesting, I think. And I try googling vold.fstab and dev_mount to learn more about them. Oddly, these terms only seem to exist in various forum posts about how to do magical things with sd cards for Android.

That is, I can't find any "official" man pages or documentation on what the vold.fstab file is supposed to contain, whether for instance it is a script, or a config file, whether dev_mount is a command or a specification, etc.

So as a very n00b Android developer,

  1. Where is the official documentation or man pages on vold.fstab?
  2. Apart from developer.android.com, where should I look for comprehensive documentation on Android
like image 208
Jerry Asher Avatar asked Dec 11 '12 03:12

Jerry Asher


2 Answers

I found this to be informative:

https://android.googlesource.com/platform/docs/source.android.com/+/android-4.2.1_r1.1/src/tech/storage/index.md

Specifically:

dev_mount <label> <mount_point> <partition> <sysfs_path> [flags]
  • label: Label for the volume.
  • mount_point: Filesystem path where the volume should be mounted.
  • partition: Partition number (1 based), or 'auto' for first usable partition.
  • sysfs_path: One or more sysfs paths to devices that can provide this mount point. Separated by spaces, and each must start with /.
  • flags: Optional comma separated list of flags, must not contain /. Possible values include nonremovable and encryptable.
like image 146
Greg Avatar answered Nov 17 '22 00:11

Greg


I never came across any documentation in general for vold.fstab and dev_mount. As far as I know and what I could gather from the code, vold.fstab is a file which is parsed word by word in volume manager daemon code to detect the mount point settings for a particular system.

Each vendor has its own specific vold.fstab file which is used by volume manager daemon. Mostly, Android middleware uses it to get the mount point path. Of external memory card for example.

like image 34
Aditya Swarup Avatar answered Nov 16 '22 22:11

Aditya Swarup