[Toybox] Valid range for stat userID and groupID?

darken darken at darken.eu
Sat May 13 10:00:44 PDT 2017


> are you building with bionic? glibc won't know what android does with

I'm building against musl libc. I couldn't get toybox with bionic (though
the last time i tried was a few month ago).

> glibc won't know what android does with uid/gid for apps.

Doesn't bionic/3rd party only make a difference when trying to resolve the
ids to names?

> (also, 4294967295 is -1.)

Hm, -1 is not a valid guid though right? They all have to be positive
ranging from 0 to X?

> i couldn't find any files on a Pixel XL where the built-in toybox
reported unusual uids or gids.

It's not very common, a few files, among a few devices out of thousands.
I never saw this in person either, just the occasional reports.

> as usual, not using Android's libc on an Android device is likely to lead
to confusing results.

I'll look into setting up a bionic toolchain again.
You don't happen to have an edition of "Crosscompiling toybox with bionic
for dummies" at hand :)?

2017-05-13 18:45 GMT+02:00 enh <enh at google.com>:

> are you building with bionic? glibc won't know what android does with
> uid/gid for apps. (also, 4294967295 is -1.)
>
> i couldn't find any files on a Pixel XL where the built-in toybox
> reported unusual uids or gids.
>
> as usual, not using Android's libc on an Android device is likely to
> lead to confusing results.
>
> On Sat, May 13, 2017 at 6:29 AM, darken <darken at darken.eu> wrote:
> > I stumbled upon the following "stat -c "%a:%F:%d:%i:%u:%g:%s:%B:%b:%
> Z:%N"
> > output from a GT-N5110 at 7.1.2
> >
> >> 5665:FIFO (named
> >> pipe):45836:456097:1171143868:4160815103:0:512:0:
> 18446744073709551615:`/data/user/0/de.andip71.boeffla_
> config_v2/app_webview/webview_data.lock'
> >
> > The a UID of "1171143868" and GUID of "4160815103" seems way too large.
> The
> > device in question is rooted and that specific file with sticky & suid
> bit
> > seems to be a bit special anyways, but I've also seen this from more
> vanilla
> > files like this from a SM-N9300 at 6.0.1:
> >
> >> 600:regular
> >> file:100d:116024:1001:4294967295:16384:4096:32:
> 1494489310:`/data/user/0/com.android.providers.telephony/opname.db'
> >
> > GUID of "4294967295" seems large too.
> >
> > Is it normal and I should expect these kind of values or is this some
> weird
> > root related stuff one should ignore or is it maybe a bug in toybox or
> the
> > Android kernel?
> >
> > ~Matthias
> >
> > _______________________________________________
> > Toybox mailing list
> > Toybox at lists.landley.net
> > http://lists.landley.net/listinfo.cgi/toybox-landley.net
> >
>
>
>
> --
> Elliott Hughes - http://who/enh - http://jessies.org/~enh/
> Android native code/tools questions? Mail me/drop by/add me as a reviewer.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170513/77707cb6/attachment-0003.htm>


More information about the Toybox mailing list