Overview
what is the difference between busybox and toybox? at this time, user perspective and aspect only, not diving into the deep detail.
ahhh, what is the busybox and toybox anyway?
busybox
BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find...okay
read here to get more intel.
Busybox predates Android, but has never shipped with Android due to the license.
toybox
but, toybox is toybox is a fresh from-scratch implementation under an android-compatible license.toybox is replacing busybox in Aboriginal Linux one command at a time.
let's put hands on them
busybox
let's just use docker,
docker search busybox
docker pull busybox
docker run -it <image id> /bin/sh
checking some statistics,
~ # ls -lt /bin/busybox
-rwxr-xr-x 398 root root 1132888 Sep 4 17:26 /bin/busybox
~ # busybox --list | wc
397 397 2731
of course that would be depending on configuration, but so far 395 commands available, and busybox itself is just 1,132,888byte binary which is pretty much compact enough.
toybox
no official docker is available now, so just get binary to go.
wget http://landley.net/toybox/bin/toybox-x86_64
chmod +x toybox-x86_64
ls -lt toybox-x86_64
-rwxr-xr-x 1 tomoyafujita tomoyafujita 596K 5月 30 10:47 toybox-x86_64*
./toybox-x86_64 echo hello world
hello world
./toybox-x86_64 --list | tr -s ' ' '\n' | wc
200 200 2585
the size of binary toybox is almost half of busybox, which is 596KB. but current supported command is also half of them, really statically reasonable.
Appendix