ls -l on Android device

Tom Spear speeddymon at gmail.com
Sun Jan 24 10:46:26 UTC 2010


On Wed, Jan 13, 2010 at 12:15 AM, Tom Spear <speeddymon at gmail.com> wrote:
> Ok. I'll try it this weekend. I don't think I'll have time before then
> unfortunately. :-(
>
> Thanks
>
> Tom

I was finally able to get this done. I had to comment the pw_gecos
call to get it to compile:

[tom at Speeddy testapp]$ agcc -o test test.c
test.c: In function 'dump':
test.c:15: error: 'struct passwd' has no member named 'pw_gecos'

But once I did that, it compiled fine, output is below:

[tom at Speeddy testapp]$ adb shell
# /system/bin/test 2000 shell
pw_name:shell
pw_passwd:(null)
pw_uid:2000
pw_gid:2000
pw_dir:/
pw_shell:/system/bin/sh

pw_name:shell
pw_passwd:(null)
pw_uid:2000
pw_gid:2000
pw_dir:/
pw_shell:/system/bin/sh

# /system/bin/test 0 root
pw_name:root
pw_passwd:(null)
pw_uid:0
pw_gid:0
pw_dir:/
pw_shell:/system/bin/sh

pw_name:root
pw_passwd:(null)
pw_uid:0
pw_gid:0
pw_dir:/
pw_shell:/system/bin/sh


It looks like it all works fine, so I am unsure why the calls don't
return the name associated with the uid/gid.

Thanks

Tom


More information about the busybox mailing list