The legacy/
locations are always pointing to the data of the currently active user. Let me first point to a few related questions/answers explicitly dealing with those multi-user storage issues for some background:
- Why did /sdcard/ turn into /sdcard/0/ with 4.2?Why did /sdcard/ turn into /sdcard/0/ with 4.2?
- Confusing internal memory folder structureConfusing internal memory folder structure
So to find the files of the secondary user:
- list the sub-directories of
/data/media
and/storage/emulated
- restrict your search to sub-directories whose names are simply "numbers"
- the
0
candidates belong to the owner, higher numbers are of secondary users - external storage is something different:
/sdcard/0
points to the internal sdcard, while/sdcard/1
should be the external (if available). Similarly for storage attached via OTG
Remember you might need to be root to access data of a user other than the one currently active on the device.
Also see:
- Android Folder HierarchyAndroid Folder Hierarchy
- our tag-wikis for file-systemfile-system and filesfiles