When I plug in my Android device to my computer it gets connected as a media device under MTP
mode. I can browse a bit of the folders on my device via my computer. I'm wondering how much of the device am I actually able to see? What sort of folders and content specifically is not visible over MTP? Does MTP have a corresponding set of file permissions associated with it?
1 Answer
MTP - an extension to PTP - is a client-server protocol, roughly like FTP. MTP client on PC sends operation requests (like GET_OBJECT, SEND_OBJECT, DELETE_OBJECT) to server running on Android device and gets responses back.
Unlike USB Mass Storage (UMS), MTP doesn't expose filesystem at all. Instead contents of shared external storage (/sdcard
- a subdirectory of /data/media/
- and physically external SD card) which are indexed in database of MediaStore
Content Provider are shown to PC. Everything else (including /data
, /system
, /vendor
and other filesystems) is not visible over MTP.
Since there's no filesystem level access, there're no filesystem permissions. Related details:
-
does rooting the Android make the filesystem more visible externally (like on a laptop)? Jan 10, 2022 at 22:50
-
2Rooting itself does not expose the filesystem over USB. But it gives you the power to do so by enabling UMS. Jan 10, 2022 at 22:55
-
1