How to get a list of users for the current device, even before Lollipop?

后端 未结 1 359
無奈伤痛
無奈伤痛 2021-01-26 11:05

Background

Since API 17 (Jelly Bean), it\'s possible for Android users to have multiple-users using the same device. In the beginning it was only for tablets, but on L

1条回答
  •  清歌不尽
    2021-01-26 11:41

    If you have root access, and Android doesn't change the directory structure again, you can enumerate the contents of /data/user/. Each subdirectory represents a user, and each second-level subdirectory represents an installed app, e.g. /data/user/0/com.example.maypp or /data/user/1/com.example.someotherapp.

    0 讨论(0)
提交回复
热议问题