[Toybox] Still poking at shell corner cases...

enh enh at google.com
Mon Jul 1 13:18:12 PDT 2019


On Mon, Jul 1, 2019 at 1:11 PM Rob Landley <rob at landley.net> wrote:
>
> On 7/1/19 2:50 PM, enh wrote:
> > works for me as root. i think your copy & paste got mangled somewhere.
> > strace says the shell is opening files in /data/local/tmp/:
>
> No, just confirmed. It says /data/local/sho7qsuv.tmp.

is that your cwd?

> *shrug* Calling it via adb presumably works (haven't tried yet), the terminal
> app does not. I'm not sure how to install a terminal app with the permissions of
> adb. I think I'd have to root my phone.
>
> (I tried exporting TEMP=/tmp and it didn't change anything...)

there is no /tmp. you'll want /data/local/tmp. plus isn't TEMP a
Windows thing? don't you mean TMPDIR?

> The "help" pulldown for this terminal program pulled up
> https://jackpal.github.io/Android-Terminal-Emulator/help/index.html so maybe I'm
> using the wrong one? (First one that comes up in a play store search for
> terminal, 10M+ downloads. I thought they were all minor variants of the AOSP code?)

no idea. i just use adb shell... there's so little you can do from an
untrusted app.

> > newfstatat(AT_FDCWD, "/data/local/tmp", {st_mode=S_IFDIR|0771,
> > st_size=20480, ...}, 0) = 0
> > openat(AT_FDCWD, "/data/local/tmp/shcj1bft.tmp",
> > O_RDWR|O_CREAT|O_EXCL, 0600) = 3
>
> Next up after toysh and route: strace.

the longer we put off strace, the more likely mixed 32/64 systems are
dead and we can ignore all the hard parts of strace :-)

> Rob



More information about the Toybox mailing list