I own a rooted Samsung Galaxy S Relay 4G running stock Android 4.1.2.
If you have Android 6.0 "Marshmallow" or better, then you have Toybox. This is a package of command-line tools, handy for advanced users who sometimes use a terminal emulator. Unfortunately, Android 4.1.2 does not include Toybox. Instead, it includes some other tools which aren't as nice to use.
Sometimes I use the terminal emulator written by Jack Palevich; other times I use adb shell
from a laptop.
Would it make more sense to install Toybox to my system partition, or to my data partition? Both partitions have far more than enough free space.
When a command is provided both by Android and by Toybox, I want the Toybox version to win. On Linux, I might install Toybox to
/home/unforgettableid/bin
or/usr/local
or/opt
. Could you please suggest a sensible place for me to install Toybox (and its large collection of symlinks) on my phone?
[Edit: I wonder what the various BusyBox installers do. Also, I wonder how Android sets the PATH environment variable. As well, I also wonder whether or not there's a way for me to change that variable and to make my change persist across reboots. Finally, I wonder whether or not putting the Toybox tools first in my PATH would be likely to break things in non-obvious ways.]
Possibly related: "Android Folder Hierarchy".