Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there any limitations in using "/proc/mounts" in android

I'm having a problem with devices that has an external storage (SD card) and internal data storage. Like in Samsung S3 device there are two kind of external storages the SD-card and the internal data storage. The Environment.getExternalStorageDirectory() API do not get both, I have searched the internet and fount that I can read the /proc/mountslike the question

How to get all the mount point information for android device?

My question is can I rely on the /proc/mounts filesystem on all devices and operating systems or there are any limitations? And is there any good documentation about this filesystem?

Thanks for helping.

like image 233
AnasBakez Avatar asked Jul 26 '12 11:07

AnasBakez


1 Answers

Look at /proc/self/mountinfo; it has all the information in /proc/mounts and more (e.g., for bind mounts it tells you the mounted path within the source filesystem).

like image 175
Sam Morris Avatar answered Nov 19 '22 07:11

Sam Morris