[Toybox] Rename toybox and execute without install

Rob Landley rob at landley.net
Thu Feb 20 17:30:14 PST 2020


On 2/19/20 11:10 PM, darken wrote:
> 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?

ln -s $(which toybox) strawberry-toybox
./strawberry-toybox

> Background:
> Android 10+ only allows executing binaries that in read-only memory, so I have
> to package toybox as "toybox.so" which works, but Android 5/6/7 will only
> package the files if they are prepended by "lib", so the filename I'm trying to
> run is "libtoybox.so".

When toybox doesn't recognize the name, it'll dereference one level of symlinks
to try to find a name it does recognize.

Rob



More information about the Toybox mailing list