2

When taking a screenshot of any app in my work profile, the picture is saved to my personal profile.

Is this the default/expected behaviour ?

2

I'm not sure if it is or it should be the default behavior, but it is expected behavior.

Screenshots are taken (through command-line or key combination or tile) and saved by System UI (com.android.systemui) package which is part of stock Android. When deciding where to save the screenshot file, the path is decided (using getExternalStoragePublicDirectory API up to Android 9 or MediaStore on Android 10+) based on the current User_ID (not UID), which is 0 for device owner (personal profile) and 10, 11, 12 .... for secondary users/profiles.

Since profiles are not completely isolated users but associated to a parent user, separate instances of only essential apps and packages are run under new User_ID. All display related things e.g. notifications, lock screen, status bar etc. in secondary profile are handled by primary user's System UI process which is running under User_ID 0 e.g. with UID 10500. So the screenshot is saved to primary profile's storage i.e. /storage/emulated/0/Pictures/Screenshots/.

However Multiple Users are more isolated than profiles and unlike latter, two users cannot share user interface. When you create and switch to a new user (not enabled on all ROMs by OEMs/developers), a separate instance of System UI app is run e.g. with UID 1010500. So the new user has a separate lock screen and doesn't share notifications with primary user. Likewise a screenshot is saved to /storage/emulated/10/Pictures/Screenshots/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.