To get the list of all the users
adb shell dumpsys user
// or
adb shell pm list users
Create new user
adb shell pm create-user User_Name
To switch between users
adb shell am switch-user User_ID
For example - Specify which user to run as
adb install --user 10 -r '/the/apk/path/debug.apk'
adb shell am start --user 10 -n the.package.name/.MainActivity
网友评论