I've researched and I cant find anything. What I am missing?
It might not always be possible to transfer data between multiple users/profiles. It depends on the Device/Work Policy Controller app, installed by you or your IT admin.
Android device can be managed in two ways: fully managed (which is setup at the time of first use or after factory reset on a company owned device) and work profiles (which can be added or removed anytime without affecting primary profile on a personal device / BYOD). Both requires a profile owner app (MDM/DPC/EMM) installed and registered as an administrator. Fully-managed devices may further have work profiles and it provides more isolation and control on device-wide policies than the latter. See a comparison of both modes under Building DPC (1, 2, 3, 4) and Employing Managed Profiles (5) in Android documentation.
Multiple users can also be added if enabled in ROM by OEM/ROM developer. Being more isolated than profiles, interacting with users requires
INTERACT_ACROSS_USERS which is a permission with
signature|system protection level. So third party apps cannot use it at all.
Irrespective of if the secondary user is a human user or personal profile owner or work profile owner, the primary intention is data isolation. As defined here:
"A work profile securely isolates work apps and data from personal apps and data."
And as explained here, file sharing between device owner and work profile must only be through
intents (fired with content URIs), not file paths. But a profile owner may completely disallow data sharing (and IPC/
intents) between users/profiles. For instance see
Since Android 9
adb is also disallowed to access file belonging to secondary user/profile. For details see How to access multi-user storage in
adb shell on Android 9+?
However if the sharing is not disallowed, you'll see options to switch to other profiles (tabs in Share Sheet on Android 11+) when sharing files:
Shelter - a Free and Open-Source app (I've no affiliation) that leverages the "Work Profile" feature to provide an isolated space for cloning apps - acts as a content (media) provider and provides "File Shuttle" option which lets you access Work Profile files from Personal Profile through "Storage Access Framework":
You can also run a small
ftpserver for file sharing on either side, or sync to cloud storage, if not restricted by policy.
So it entirely depends on the profile creator's policy if file sharing is allowed or not, usually not desirable in a corporate environment. However following method may work in all situations:
The most widely used trick for file sharing among multiple users is
Android/obbdirectory which is shared among users to save storage space. Sharing was managed using bind-mounts in early days but then handling was added to FUSE/
sdcardfsinternally. However sharing is deprecated in Android 10 introducing mount option
So up to Android 9 you can use
obbdirectory for file sharing among users/profiles:
~# mkdir -p /storage/emulated/*/Android/obb; touch /sdcard/Android/obb/test_file ~# ls /storage/emulated/*/Android/obb/* /storage/emulated/obb/* /storage/emulated/0/Android/obb/test_file /storage/emulated/10/Android/obb/test_file /storage/emulated/obb/test_file
Use Total commander for Android or other 3rd party file manager where you are able to use "Share via.." and the app will save the files in new destination..
Eg. the steps:
- In work profile via internal "Files" app select the file and use "Share" option
- In Share dialog switch to "Personal profile" sharing options
- Select file manager app
- Select personal profile folder in file manager dialogue
- Viola the file is in personal folder..