小米手机 adb shell 用户 组 相关命令和输出记录

cas:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:shell:s0
cas:/ $ groups
input log adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats readproc uhid
cas:/ $ id -Gn
input log adb sdcard_rw sdcard_r net_bt_admin net_bt inet net_bw_stats readproc uhid
cas:/ $ id -G
1004 1007 1011 1015 1028 3001 3002 3003 3006 3009 3011
cas:/ $ id -gn
shell
cas:/ $ whoami
shell

 

groups 等价于 id -Gn,不显示主组只显示附加组

  • -G 或 --groups  显示用户所属附加群组的ID。

 

posted @ 2024-02-12 21:36  hrdom  阅读(65)  评论(0编辑  收藏  举报