Author xdegaye
Recipients Alex.Willmer, larry, serhiy.storchaka, vstinner, xdegaye, yan12125
Date 2016-07-25.14:01:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469455270.44.0.253298532853.issue26944@psf.upfronthosting.co.za>
In-reply-to
Content
> Hum, does the id program supports -G on Android?

It does on Android 6.0 but prints the same result as 'id' (without -G) on previous Android versions.

Here is the output of the commands involved in the test for the root user on my archlinux box, the Android 5.0 emulator and the Android 6.0 emulator:

archlinux:
  [root@bilboquet default]# python
  ...
  >>> from posix import getegid, getgroups
  >>> getgroups()
  [0, 1, 2, 3, 4, 6, 10, 19]
  >>> getegid()
  0
  [root@bilboquet default]# id -G
  0 1 2 3 4 6 10 19

Android 5.0 (API level 21)
  root@generic_x86:/data/data/org.bitbucket.pyona # python
  ...
  >>> from posix import getegid, getgroups
  >>> getgroups()
  [1003, 1004, 1007, 1011, 1015, 1028, 3001, 3002, 3003, 3006]
  >>> getegid()
  0
  root@generic_x86:/data/data/org.bitbucket.pyona # id -G
  uid=0(root) gid=0(root) groups=1003(graphics),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)

Android 6.0 (API level 23)
  root@generic_x86:/data/data/org.bitbucket.pyona # python
  ...
  >>> from posix import getegid, getgroups
  >>> getgroups()
  [1004, 1007, 1011, 1015, 1028, 3001, 3002, 3003, 3006]
  >>> getegid()
  0
  root@generic_x86:/data/data/org.bitbucket.pyona # id -G
  1004 1007 1011 1015 1028 3001 3002 3003 3006
History
Date User Action Args
2016-07-25 14:01:10xdegayesetrecipients: + xdegaye, vstinner, larry, serhiy.storchaka, Alex.Willmer, yan12125
2016-07-25 14:01:10xdegayesetmessageid: <1469455270.44.0.253298532853.issue26944@psf.upfronthosting.co.za>
2016-07-25 14:01:10xdegayelinkissue26944 messages
2016-07-25 14:01:10xdegayecreate