Toybox
lastmod 2025-11-04created 2025-11-041 edits
An all-in-one Linux command-line tool
About
- A lightweight multi-call binary tool that combines a set of Linux commands into a single executable; an open-source utility developed as an alternative to BusyBox
- Just download and run a single executable (toybox-x86_64) to get basic commands such as echo, cp, mv, and cat from one binary
- Conforms to the POSIX-2008 and LSB 4.1 standards, emphasizing fast execution, a simple structure, and standards compliance
- The project's original core goal was to make Android a fully self-hosting environment, designed so that AOSP can be built on Android itself
- Google recognized this philosophy and integrated Toybox into AOSP, shipping it by default since Android Marshmallow in 2015
- BusyBox's GPLv2 license is incompatible with Android, but ToyBox was rewritten under a BSD license compatible with Android
- Aims to remove the dependency on GNU tools and provide a more transparent, reproducible build environment
- POSIX command set, compiler, C standard library, kernel
- This setup creates a reproducible base system, which can then be extended into a practical environment by adding an editor (vi), monitoring (top), shell history, and so on
- Create a root file system with make root, then run chroot
- Using qemu together with a cross compiler sets up a self-booting mini Linux environment