Sunday, June 26, 2016

Android: User profile data location (root required)

To find users on a device:
adb shell pm list users

you should see something like this:
Users:
        UserInfo{0:Alice:13}
        UserInfo{11:Bob:10}


Bob's user ID is 11. His data files can be found at:
/mnt/shell/emulated/11

P.S. If you are using ES File Explorer, first install SuperSU, then enable Root Explorer within ES File Explorer. You should be prompted to grant root access to ES File Explorer.


Bonus:
To run an app as Bob for example:
adb shell am start --user 11 \ -n "com.example.myapp/com.example.myapp.testactivity" \ -a android.intent.action.MAIN -c android.intent.category.LAUNCHER


Ref:
Set up Managed Profiles | Android Developers

No comments: