I am running KitKat on a tablet with two users: primary (owner) and secondary. I need to access a file generated by an app of the secondary user.
When I plug the tablet into my (Ubuntu) desktop via USB, it mounts as a media device (MTP), and shows me the base folder for the currently active user. [1] But the file I want is elsewhere on the system, so I connected from the command line via adb shell
instead.
Connecting via ADB gives me access to deeper folders (/mnt
/proc
etc) but I couldn't find the file where I expected it [2], so I looked in /sdcard
anyway. To my surprise I recognised the contents as the base folder of the owner account, even though the currently active user is the secondary user.
This also tells me that, if I ever need to, I won't be able to access the base folder for the secondary user via adb shell
.
How can I access the tablet from adb shell
as the secondary user, rather than the primary (owner) user? (Being able to access the secondary user's files is good enough.)
[1] I'm not sure what the proper term here is. I mean the folder with Android, Download and Pictures, specific to a particular user.
[2] FWIW I am exporting an OPML file from Flym. Flym reports that the OPML export is generated at /storage/emulated/10/Flym_123456789.opml
but I can only get as far as /storage/emulated
- there is no subfolder called 10
, only legacy
which is the same as /sdcard
(the primary/owner's base folder, not the secondary user's base folder).