1, 获取支持多少用户
pm get-max-user
2,用户相关的am pm指令
We can use pm command to add/remove user also.
pm create-user [--profileOf USER_ID] [--managed] [--restricted] [--ephemeral] [--guest] USER_NAME
pm remove-user USER_ID
pm get-max-users
How to switch user.
It is implemented in ActivityManagerService.switchUser method.
We can use "am switch-user" also.
am switch-user <USER_ID>
am start-user <USER_ID>
am unlock-user <USER_ID> [TOKEN_HEX]
am stop-user [-w] [-f] <USER_ID>
3,应用安装到指定user上
adb install --user <user_id> XXX.apk