Re: [Toybox] Rename toybox and execute without install

2020-02-21 Thread darken
> > No, but you can change the code in main.c function toy_find() currently > line 33. Awesome, I'll try that, thanks! On Fri, Feb 21, 2020 at 11:35 AM Rob Landley wrote: > On 2/21/20 1:56 AM, darken wrote: > > Thanks for the quick response Rob! > > > > n

[Toybox] Rename toybox and execute without install

2020-02-19 Thread darken
Good Morning, I'm trying to run toybox on Android with a different file name than "toybox". I see that I can append any suffix I'd like, e.g. "toybox.strawberry", but I can't prepend anything. "strawberry-toybox" doesn't work: toybox: Unknown command strawberry-toybox How can I achieve this?

Re: [Toybox] find applet arguments, quotations and wildcards

2018-02-08 Thread darken
he rm so that it can expand the $( ) > variable with the stdout of the rm. Singlequoted, no expansion occurs. > > > > > On 2/7/18, darken <dar...@darken.eu> wrote: > > I just noticed the following find applet behavior with regards to > > wildcards. > > I

[Toybox] find applet arguments, quotations and wildcards

2018-02-07 Thread darken
emulated/0 # find . -iname *droid ./Android sailfish:/storage/emulated/0 # /data/local/tmp/busybox-armv6l find . -iname *data find: unrecognized: sleep-data BusyBox v1.26.2 (2017-01-11 08:43:16 UTC) multi-call binary. darken@greendns:~/test$ find --version find (GNU findutils) 4.7.0-git darke

Re: [Toybox] Valid range for stat userID and groupID?

2017-05-14 Thread darken
ket on the AOSP bugtracker. 2017-05-14 21:54 GMT+02:00 Rob Landley <r...@landley.net>: > > > On 05/14/2017 02:16 PM, darken wrote: > >> which will try to read /etc/passwd and /etc/group which don't exist on > > android. > > > > And the

Re: [Toybox] Valid range for stat userID and groupID?

2017-05-14 Thread darken
b Landley <r...@landley.net>: > On 05/13/2017 12:00 PM, darken wrote: > >> are you building with bionic? glibc won't know what android does with > > > > I'm building against musl libc. > > which will try to read /etc/passwd and /etc/group which don't exist on &g

Re: [Toybox] Valid range for stat userID and groupID?

2017-05-13 Thread darken
Unfortunately the output is from devices I don't have access to, via automatic (anonymous) bug report. Am 13.05.2017 19:38 schrieb "Rob Landley" <r...@landley.net>: > On 05/13/2017 08:29 AM, darken wrote: > > I stumbled upon the following "stat -c > > "

Re: [Toybox] Valid range for stat userID and groupID?

2017-05-13 Thread darken
les 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 <dar...@darken.eu> wrote: > > I stumbled upon the foll

[Toybox] Valid range for stat userID and groupID?

2017-05-13 Thread darken
I stumbled upon the following "stat -c "%a:%F:%d:%i:%u:%g:%s:%B:%b:%Z:%N" output from a GT-N5110@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

Re: [Toybox] Stat output for %N

2017-05-13 Thread darken
> quotes is either GNU or toybox. > > On Fri, May 12, 2017 at 7:38 PM, darken <dar...@darken.eu> wrote: > > Using > > > >> stat -c "%a:%F:%d:%i:%u:%g:%s:%B:%b:%Z:%N", > > > > the output is usually like this: > > > >> > >> 77

[Toybox] Stat output for %N

2017-05-12 Thread darken
Using > stat -c "%a:%F:%d:%i:%u:%g:%s:%B:%b:%Z:%N", the output is usually like this: > 770:directory:24:5546467:0:9997:8192:512:24:1494593733:`/storage/emulated/0/Download' but on some devices the output is >

Re: [Toybox] Android O: XARGS - bad system call

2017-04-16 Thread darken
FYI (but I think you CCed yourself on the issue ticket right?) Copying the system toybox into my app makes it work. So it seems to be related to how the system toybox is build (NDK toolchain?) and my toybox is build (musl libc). ~Matthias 2017-04-15 13:52 GMT+02:00 darken <dar...@darken

Re: [Toybox] Android O: XARGS - bad system call

2017-04-13 Thread darken
me kind of SELinux issue? Preventing xargs from forking processes or something like that? Why would it work on the emulator though... 2017-04-13 18:29 GMT+02:00 enh <e...@google.com>: > works fine for me with the toybox that's actually part of O. strace? > > On Thu, Apr 13, 2017 at 6

[Toybox] Android O: XARGS - bad system call

2017-04-13 Thread darken
On a Pixel device running Android O, xarg doesn't seem to work. The commands were run from an normal user (non-system app) without root. V/Shell:Interactive: Input : SDMBOX=/data/user/0/eu. > thedarken.sdm/files/toybox_sdm > Toybox build i used: https://github.com/d4rken/toybox Just running the

Re: [Toybox] Stat, wrong blockcount for F2FS filesystems?

2017-04-08 Thread darken
s_getattr(struct vfsmount *mnt, >> struct dentry *dentry, struct kstat *stat) >> { >> struct inode *inode = dentry->d_inode; >> generic_fillattr(inode, stat); >> stat->blocks <<= 3; >> return 0; >> } >> >> so that's where the factor of

Re: [Toybox] Stat, wrong blockcount for F2FS filesystems?

2017-04-07 Thread darken
related... ~Matthias 2017-04-07 18:10 GMT+02:00 darken <dar...@darken.eu>: > I'm using stat to display filesize and allocated size in my Android app. > > I calculate the allocated size by multiplying the block count (%b) with > 512 Byte. > > I found out in https://github.c

[Toybox] Stat, wrong blockcount for F2FS filesystems?

2017-04-07 Thread darken
I'm using stat to display filesize and allocated size in my Android app. I calculate the allocated size by multiplying the block count (%b) with 512 Byte. I found out in https://github.com/landley/toybox/issues/41 that the blocksize for the blockcount calculation is hardcoded to 512. So this

[Toybox] Stat %Z - What are valid values?

2016-12-30 Thread darken
I've seen a value of "18446744072363093454" for stat %Z (seconds since epoch), for some files on a users device (Android 6.01). This seems suspiciously large and I'm wondering what the valid range for this value is. What range is valid for the filesystem to return and what value range can toybox

Re: [Toybox] [BUG] ls applet ignores options if CONFIG_LS_COLOR is not set

2016-12-07 Thread darken
Works for me. Thanks for the fix! 2016-12-08 6:09 GMT+01:00 Rob Landley <r...@landley.net>: > On 12/07/2016 10:52 PM, Rob Landley wrote: > > On 12/04/2016 10:29 PM, Rob Landley wrote: > >> On 12/04/2016 08:36 PM, darken wrote: > >>> If `CONFIG_LS_COLOR` is

[Toybox] [BUG] ls applet ignores options if CONFIG_LS_COLOR is not set

2016-12-04 Thread darken
If `CONFIG_LS_COLOR` is not set the `ls` applet doesn't take options and either ignores them or says `ls: Unknown option...`. Some testoutput: https://github.com/landley/toybox/issues/57 Seems to be caused by commit:

Re: [Toybox] [BUG] du applet prints wrong output for 2GB+ files

2016-09-30 Thread darken
, without obviously breaking > anything. a quick grep didn't show any obvious case where making > dirtree::extra larger would break anything, but rob will know > better... > > On Thu, Sep 29, 2016 at 11:37 AM, darken <dar...@darken.eu> wrote: > > Why isn't `TT.total` the iss

Re: [Toybox] [PATCH] chown/chgrp with unknown numeric ids

2016-08-20 Thread darken
ey.net>: > On 08/20/2016 06:01 AM, darken wrote: > > I was grinding through my todo list last night and fixed this, and > only > > just noticed replying to your message that you'd attached a patch. > > (Oops. Sorry.) > > > > > > :-|, well at

Re: [Toybox] [PATCH] chown/chgrp with unknown numeric ids

2016-08-20 Thread darken
<r...@landley.net>: > On 08/14/2016 12:54 PM, darken wrote: > > The issue is that chown/chgrp would error exit if it was passed an > > unknown numeric uid/gid. > > I was grinding through my todo list last night and fixed this, and only > just noticed replying to your mes

[Toybox] [PATCH] test applet, fix issues with the NOT operator

2016-08-14 Thread darken
Issue 1: If the "!" operator was not used in the `test` applets argument, `int not` was never initialized before using it in `toys.exitval ^= not`, According to a quick search the behavior of `not` is then undefined, which could lead to inconsistent results (e.g. unexpected result inversion).