1# Android's shell and utilities 2 3Since IceCreamSandwich Android has used 4[mksh](https://www.mirbsd.org/mksh.htm) as its shell. Before then it used 5[ash](https://en.wikipedia.org/wiki/Almquist_shell) (which actually 6remained unused in the tree up to and including KitKat). 7 8Initially Android had a very limited command-line provided by its own 9"toolbox" binary. Since Marshmallow almost everything is supplied by 10[toybox](http://landley.net/toybox/) instead. 11 12We started moving a few of the more important tools to full 13BSD implementations in JellyBean, and continued this work in 14Lollipop. Lollipop was a major break with the past in many ways (LP64 15support and the switch to ART both having lots of knock-on effects around 16the system), so although this was the beginning of the end of toolbox it 17(a) didn't stand out given all the other systems-level changes and (b) 18in Marshmallow we changed direction and started the move to toybox. 19 20Not everything is provided by toybox, though. For the bzip2 command-line tools 21we use the ones that are part of the bzip2 distribution. 22The awk added in Android P is the 23["one true" awk](https://github.com/onetrueawk/awk). 24The bc added in Android Q is 25[Gavin Howard's bc](https://github.com/gavinhoward/bc). 26 27The lists below show what tools were provided and where they came from in 28each release starting with Gingerbread. This doesn't tell the full story, 29because the toolbox implementations did have bugs fixed and options added 30over the years. Gingerbread's rm, for example, supported `-r`/`-R` but not 31`-f`. But this gives you an idea of what was available in any given release, 32and how usable it was likely to be. (**Bold** marks where we switched to toybox 33or first added something to toybox.) 34 35Also note that in any given release `toybox` probably contains more 36commands than there are symlinks for in `/system/bin`. You can get the 37full list for a release by running `toybox` directly. 38 39 40## Android 15 (API level 35, "Vanilla Ice Cream") 41 42BSD: fsck\_msdos newfs\_msdos 43 44bzip2: bzcat bzip2 bunzip2 45 46gavinhoward/bc: bc 47 48one-true-awk: awk 49 50toolbox: getevent getprop setprop start stop 51 52toybox ([0.8.11](https://landley.net/toybox/news.html#08-04-2024)-ish): 53[ acpi base64 basename blkdiscard blkid blockdev brctl cal cat chattr 54chcon chgrp chmod chown chroot chrt cksum clear cmp comm cp cpio cut 55date dd devmem df diff dirname dmesg dos2unix du echo egrep env expand 56expr fallocate false fgrep file find flock fmt free freeramdisk fsfreeze 57fsync getconf getenforce **getfattr** getopt **gpiodetect** **gpiofind** 58**gpioget** **gpioinfo** **gpioset** grep groups gunzip gzip head help hostname 59hwclock i2cdetect i2cdump i2cget i2cset **i2ctransfer** iconv id ifconfig 60inotifyd insmod install ionice iorenice iotop kill killall ln load\_policy 61log logger logname losetup ls lsattr lsmod lsof lspci lsusb makedevs 62md5sum **memeater** microcom mkdir mkfifo mknod mkswap mktemp modinfo modprobe 63more mount mountpoint mv nbd-client nc netcat netstat nice nl nohup 64nproc nsenter od partprobe paste patch pgrep pidof ping ping6 pivot\_root 65pkill pmap printenv printf prlimit ps pwd pwdx readelf readlink realpath 66renice restorecon rev rfkill rm rmdir rmmod rtcwake runcon sed sendevent 67seq setenforce **setfattr** setsid sha1sum sha224sum sha256sum sha384sum 68sha512sum sleep sort split stat strings stty swapoff swapon sync sysctl 69tac tail tar taskset tee test time timeout top touch tr traceroute 70traceroute6 true truncate tty tunctl uclampset ulimit umount uname 71uniq unix2dos unlink unshare uptime usleep uudecode uuencode uuidgen 72vconfig vi vmstat watch wc which whoami xargs xxd yes zcat 73 74Note: technically getfattr and setfattr were available in earlier versions, 75but the symlinks were missing until this release, so they were only available 76as `toybox getfattr` and `toybox setfattr` rather than directly. 77 78 79## Android 14 (API level 34, "Upside Down Cake") 80 81BSD: fsck\_msdos newfs\_msdos 82 83bzip2: bzcat bzip2 bunzip2 84 85gavinhoward/bc: bc 86 87one-true-awk: awk 88 89toolbox: getevent getprop setprop start stop 90 91toybox ([0.8.9](http://landley.net/toybox/#10-01-2023)-ish): 92[ acpi base64 basename blkdiscard blkid blockdev **brctl** cal cat chattr 93chcon chgrp chmod chown chroot chrt cksum clear cmp comm cp cpio cut 94date dd devmem df diff dirname dmesg dos2unix du echo egrep env expand 95expr fallocate false fgrep file find flock fmt free freeramdisk fsfreeze 96fsync getconf getenforce getfattr getopt grep groups gunzip gzip head 97help hostname hwclock i2cdetect i2cdump i2cget i2cset iconv id ifconfig 98inotifyd insmod install ionice iorenice iotop kill killall ln load\_policy 99log **logger** logname losetup ls lsattr lsmod lsof lspci lsusb makedevs 100md5sum microcom mkdir mkfifo mknod mkswap mktemp modinfo modprobe 101more mount mountpoint mv nbd-client nc netcat netstat nice nl nohup 102nproc nsenter od partprobe paste patch pgrep pidof ping ping6 pivot\_root 103pkill pmap printenv printf prlimit ps pwd pwdx readelf readlink realpath 104renice restorecon rev rfkill rm rmdir rmmod rtcwake runcon sed sendevent 105seq setenforce setfattr setsid sha1sum sha224sum sha256sum sha384sum 106sha512sum sleep sort split stat strings stty swapoff swapon sync sysctl 107tac tail tar taskset tee test time timeout top touch tr traceroute 108traceroute6 true truncate tty tunctl uclampset ulimit umount uname 109uniq unix2dos unlink unshare uptime usleep uudecode uuencode uuidgen 110vconfig vi vmstat watch wc which whoami xargs xxd yes zcat 111 112 113## Android 13 (33, "Tiramisu") 114 115BSD: fsck\_msdos newfs\_msdos 116 117bzip2: bzcat bzip2 bunzip2 118 119gavinhoward/bc: bc 120 121one-true-awk: awk 122 123toolbox: getevent getprop setprop start stop 124 125toybox ([0.8.6](http://landley.net/toybox/#30-11-2021)-ish): 126[ acpi base64 basename blkdiscard blkid blockdev cal cat chattr chcon 127chgrp chmod chown chroot chrt cksum clear cmp comm cp cpio cut date 128dd devmem df diff dirname dmesg dos2unix du echo egrep env expand 129expr fallocate false fgrep file find flock fmt free freeramdisk fsfreeze 130fsync getconf getenforce getfattr getopt grep groups gunzip gzip head 131help hostname hwclock i2cdetect i2cdump i2cget i2cset iconv id ifconfig 132inotifyd insmod install ionice iorenice iotop kill killall ln load\_policy 133log logname losetup ls lsattr lsmod lsof lspci lsusb makedevs md5sum 134microcom mkdir mkfifo mknod mkswap mktemp modinfo modprobe more mount 135mountpoint mv nbd-client nc netcat netstat nice nl nohup nproc nsenter 136od partprobe paste patch pgrep pidof ping ping6 pivot\_root pkill pmap 137printenv printf prlimit ps pwd pwdx readelf readlink realpath renice 138restorecon rev rfkill rm rmdir rmmod rtcwake runcon sed sendevent 139seq setenforce setfattr setsid sha1sum sha224sum sha256sum sha384sum 140sha512sum sleep sort split stat strings stty swapoff swapon sync sysctl 141tac tail tar taskset tee test time timeout top touch tr traceroute 142traceroute6 true truncate tty tunctl **uclampset** ulimit umount uname 143uniq unix2dos unlink unshare uptime usleep uudecode uuencode uuidgen 144vconfig vi vmstat watch wc which whoami xargs xxd yes zcat 145 146 147## Android 12 (31, "Snow Cone") 148 149BSD: fsck\_msdos newfs\_msdos 150 151bzip2: bzcat bzip2 bunzip2 152 153gavinhoward/bc: bc 154 155one-true-awk: awk 156 157toolbox: getevent getprop setprop start stop 158 159toybox ([0.8.4](http://landley.net/toybox/#24-10-2020)-ish): 160**[** acpi base64 basename **blkdiscard** blkid blockdev cal cat chattr chcon 161chgrp chmod chown chroot chrt cksum clear cmp comm cp cpio cut date 162dd devmem df diff dirname dmesg dos2unix du echo egrep env expand 163expr fallocate false fgrep file find flock fmt free freeramdisk fsfreeze 164fsync getconf getenforce getfattr getopt grep groups gunzip gzip head 165help hostname hwclock i2cdetect i2cdump i2cget i2cset iconv id ifconfig 166inotifyd insmod install ionice iorenice iotop kill killall ln load\_policy 167log logname losetup ls lsattr lsmod lsof lspci lsusb makedevs md5sum 168microcom mkdir mkfifo mknod mkswap mktemp modinfo modprobe more mount 169mountpoint mv nbd-client nc netcat netstat nice nl nohup nproc nsenter 170od partprobe paste patch pgrep pidof ping ping6 pivot\_root pkill pmap 171printenv printf prlimit ps pwd pwdx readelf readlink realpath renice 172restorecon rev rfkill rm rmdir rmmod **rtcwake** runcon sed sendevent 173seq setenforce setfattr setsid sha1sum sha224sum sha256sum sha384sum 174sha512sum sleep sort split stat strings stty swapoff swapon sync sysctl 175tac tail tar taskset tee **test** time timeout top touch tr traceroute 176traceroute6 true truncate tty tunctl ulimit umount uname uniq unix2dos 177unlink unshare uptime usleep uudecode uuencode uuidgen vconfig vi 178vmstat watch wc which whoami xargs xxd yes zcat 179 180 181## Android 11 (API level 30, "Red Velvet Cake") 182 183BSD: fsck\_msdos newfs\_msdos 184 185bzip2: bzcat bzip2 bunzip2 186 187gavinhoward/bc: bc 188 189one-true-awk: awk 190 191toolbox: getevent getprop setprop start stop 192 193toybox ([0.8.3](http://landley.net/toybox/#11-05-2020)-ish): 194acpi base64 basename blkid blockdev cal cat chattr chcon chgrp chmod 195chown chroot chrt cksum clear cmp comm cp cpio cut date dd **devmem** 196df diff dirname dmesg dos2unix du echo egrep env expand expr fallocate 197false fgrep file find flock fmt free freeramdisk fsfreeze **fsync** getconf 198getenforce getfattr **getopt** grep groups gunzip gzip head help hostname 199hwclock i2cdetect i2cdump i2cget i2cset iconv id ifconfig inotifyd 200insmod install ionice iorenice iotop kill killall ln load\_policy log 201logname losetup ls lsattr lsmod lsof lspci lsusb makedevs md5sum microcom 202mkdir mkfifo mknod mkswap mktemp modinfo modprobe more mount mountpoint 203mv nbd-client nc netcat netstat nice nl nohup nproc nsenter od partprobe 204paste patch pgrep pidof ping ping6 pivot\_root pkill pmap printenv 205printf prlimit ps pwd pwdx **readelf** readlink realpath renice restorecon 206rev rfkill rm rmdir rmmod runcon sed sendevent seq setenforce setfattr 207setsid sha1sum sha224sum sha256sum sha384sum sha512sum sleep sort 208split stat strings stty swapoff swapon sync sysctl tac tail tar taskset 209tee time timeout top touch tr traceroute traceroute6 true truncate 210tty tunctl ulimit umount uname uniq unix2dos unlink unshare uptime 211usleep uudecode uuencode uuidgen vconfig **vi** vmstat watch wc which 212whoami xargs xxd yes zcat 213 214 215## Android 10 (API level 29, "Quince Tart") 216 217BSD: grep fsck\_msdos newfs\_msdos 218 219bzip2: bzcat bzip2 bunzip2 220 221one-true-awk: awk 222 223toolbox: getevent getprop 224 225toybox ([0.8.0](http://landley.net/toybox/#08-02-2019)-ish): 226acpi base64 basename **bc** **blkid** blockdev cal cat **chattr** chcon chgrp 227chmod chown chroot chrt cksum clear cmp comm cp cpio cut date dd df 228diff dirname dmesg dos2unix du echo **egrep** env expand expr fallocate 229false **fgrep** file find flock fmt free **freeramdisk** **fsfreeze** **getconf** 230getenforce **getfattr** grep groups gunzip gzip head **help** hostname hwclock 231**i2cdetect** **i2cdump** **i2cget** **i2cset** **iconv** id ifconfig inotifyd insmod 232**install** ionice iorenice **iotop** kill killall ln load\_policy log logname 233losetup ls **lsattr** lsmod lsof lspci lsusb **makedevs** md5sum microcom 234mkdir mkfifo mknod mkswap mktemp modinfo modprobe more mount mountpoint 235mv **nbd-client** **nc** **netcat** netstat nice nl nohup **nproc** **nsenter** od **partprobe** 236paste patch pgrep pidof **ping** **ping6** **pivot\_root** pkill pmap printenv 237printf **prlimit** ps pwd **pwdx** readlink realpath renice restorecon **rev** 238**rfkill** rm rmdir rmmod runcon sed sendevent seq setenforce **setfattr** 239setprop setsid sha1sum sha224sum sha256sum sha384sum sha512sum sleep 240sort split start stat stop strings stty swapoff swapon sync sysctl 241tac tail tar taskset tee time timeout top touch tr **traceroute** **traceroute6** 242true truncate tty **tunctl** ulimit umount uname uniq unix2dos **unlink** 243**unshare** uptime usleep uudecode uuencode **uuidgen** **vconfig** vmstat **watch** 244wc which whoami xargs xxd yes zcat 245 246 247## Android 9.0 (API level 28, "Pie") 248 249BSD: dd grep 250 251bzip2: bzcat bzip2 bunzip2 252 253one-true-awk: awk 254 255toolbox: getevent getprop newfs\_msdos 256 257toybox ([0.7.6](http://landley.net/toybox/#24-02-2018)-ish): 258acpi base64 basename blockdev cal cat chcon chgrp chmod chown 259chroot chrt cksum clear cmp comm cp cpio cut date df diff dirname dmesg 260dos2unix du echo env expand expr fallocate false file find flock **fmt** free 261getenforce groups gunzip gzip head hostname hwclock id ifconfig inotifyd 262insmod ionice iorenice kill killall ln load\_policy log logname losetup ls 263lsmod lsof lspci lsusb md5sum microcom mkdir mkfifo mknod mkswap mktemp 264modinfo modprobe more mount mountpoint mv netstat nice nl nohup od paste 265patch pgrep pidof pkill pmap printenv printf ps pwd readlink realpath 266renice restorecon rm rmdir rmmod runcon sed sendevent seq setenforce 267setprop setsid sha1sum sha224sum sha256sum sha384sum sha512sum sleep 268sort split start stat stop strings **stty** swapoff swapon sync sysctl tac 269tail tar taskset tee time timeout top touch tr true truncate tty ulimit 270umount uname uniq unix2dos uptime usleep uudecode uuencode vmstat wc 271which whoami xargs xxd yes zcat 272 273 274## Android 8.0 (API level 26, "Oreo") 275 276BSD: dd grep 277 278bzip2: bzcat bzip2 bunzip2 279 280toolbox: getevent newfs\_msdos 281 282toybox ([0.7.3](http://landley.net/toybox/#21-02-2017)-ish): 283acpi base64 basename blockdev cal cat chcon chgrp chmod chown 284chroot chrt cksum clear cmp comm cp cpio cut date df **diff** dirname dmesg 285dos2unix du echo env expand expr fallocate false **file** find flock free 286getenforce getprop groups **gunzip** **gzip** head hostname hwclock id ifconfig 287inotifyd insmod ionice iorenice kill killall ln load\_policy **log** logname 288losetup ls lsmod lsof **lspci** lsusb md5sum **microcom** mkdir **mkfifo** mknod 289mkswap mktemp modinfo **modprobe** more mount mountpoint mv netstat nice 290nl nohup od paste patch pgrep pidof pkill pmap printenv printf **ps** pwd 291readlink realpath renice restorecon rm rmdir rmmod runcon sed **sendevent** 292seq setenforce setprop setsid sha1sum **sha224sum** **sha256sum** **sha384sum** 293**sha512sum** sleep sort split start stat stop strings swapoff swapon sync 294sysctl tac tail tar taskset tee time timeout **top** touch tr true truncate 295tty ulimit umount uname uniq unix2dos uptime usleep **uudecode** **uuencode** 296vmstat wc which whoami xargs xxd yes **zcat** 297 298 299## Android 7.0 (API level 24, "Nougat") 300 301BSD: dd grep 302 303toolbox: getevent iftop ioctl log nandread newfs\_msdos ps prlimit 304sendevent start stop top 305 306toybox ([0.7.0](http://landley.net/toybox/#02-02-2016)-ish): 307acpi **base64** basename blockdev bzcat cal cat chcon chgrp chmod 308chown chroot cksum clear comm cmp cp cpio cut date **df** dirname dmesg 309dos2unix **du** echo env expand expr fallocate false find **flock** free 310getenforce getprop groups head hostname hwclock id ifconfig inotifyd 311insmod **ionice** **iorenice** kill **killall** load\_policy ln logname losetup **ls** 312lsmod **lsof** lsusb md5sum mkdir mknod mkswap mktemp modinfo more *mount* 313mountpoint mv netstat nice nl nohup od paste patch pgrep pidof pkill 314pmap printenv printf pwd readlink realpath **renice** restorecon rm rmdir 315rmmod route runcon sed seq setenforce setprop setsid sha1sum sleep sort 316split stat strings swapoff swapon sync sysctl tac tail tar taskset tee 317time timeout touch tr true truncate **tty** **ulimit** umount uname uniq unix2dos 318**uptime** usleep vmstat wc which whoami xargs **xxd** yes 319 320 321## Android 6.0 (API level 23, "Marshmallow") 322 323BSD: dd du grep 324 325toolbox: df getevent iftop ioctl ionice log ls lsof mount nandread 326newfs\_msdos ps prlimit renice sendevent start stop top uptime watchprops 327 328toybox ([0.5.2](http://landley.net/toybox/#25-02-2015)-ish): 329acpi basename blockdev bzcat cal cat chcon chgrp chmod chown 330chroot cksum clear comm cmp cp cpio cut date dirname dmesg dos2unix echo 331env expand expr fallocate false find free getenforce getprop groups 332head hostname hwclock id ifconfig inotifyd insmod kill load\_policy ln 333logname losetup lsmod lsusb md5sum mkdir mknod mkswap mktemp modinfo 334more mountpoint mv netstat nice nl nohup od paste patch pgrep pidof 335pkill pmap printenv printf pwd readlink realpath restorecon rm rmdir 336rmmod route runcon sed seq setenforce setprop setsid sha1sum sleep sort 337split stat strings swapoff swapon sync sysctl tac tail tar taskset tee 338time timeout touch tr true truncate umount uname uniq unix2dos usleep 339vmstat wc which whoami xargs yes 340 341 342## Android 5.0 (API level 21, "Lollipop") 343 344BSD: cat chown cp dd du grep kill ln mv printenv rm rmdir sleep sync 345 346toolbox: chcon chmod clear cmp date df dmesg getenforce getevent getprop 347getsebool hd id ifconfig iftop insmod ioctl ionice load\_policy log ls 348lsmod lsof md5 mkdir mknod mkswap mount nandread netstat newfs\_msdos 349nohup notify ps readlink renice restorecon rmmod route runcon schedtop 350sendevent setenforce setprop setsebool smd start stop swapoff swapon 351top touch umount uptime vmstat watchprops wipe 352 353 354## Android 4.4 (API level 19, "KitKat") 355 356BSD: cat cp dd du grep newfs\_msdos 357 358toolbox: chcon chmod chown clear cmp date df dmesg getenforce getevent 359getprop getsebool hd id ifconfig iftop insmod ioctl ionice kill ln 360load\_policy log ls lsmod lsof md5 mkdir mkswap mount mv nandread netstat 361notify printenv ps readlink renice restorecon rm rmdir rmmod route runcon 362schedtop sendevent setconsole setenforce setprop setsebool sleep smd start 363stop swapoff swapon sync top touch umount uptime vmstat watchprops wipe 364 365 366## Android 4.1-4.3 (API level 16, "Jelly Bean") 367 368BSD: cat cp dd du grep newfs\_msdos 369 370toolbox: chcon chmod chown clear cmp date df dmesg getenforce getevent 371getprop getsebool hd id ifconfig iftop insmod ioctl ionice kill ln 372load\_policy log ls lsmod lsof md5 mkdir mount mv nandread netstat notify 373printenv ps reboot renice restorecon rm rmdir rmmod route runcon schedtop 374sendevent setconsole setenforce setprop setsebool sleep smd start stop 375sync top touch umount uptime vmstat watchprops wipe 376 377 378## Android 4.0 (API level 14, "Ice Cream Sandwich") 379 380BSD: cat dd newfs\_msdos 381 382toolbox: chmod chown cmp date df dmesg getevent getprop hd id ifconfig 383iftop insmod ioctl ionice kill ln log ls lsmod lsof mkdir mount mv 384nandread netstat notify printenv ps reboot renice rm rmdir rmmod route 385schedtop sendevent setconsole setprop sleep smd start stop sync top 386touch umount uptime vmstat watchprops wipe 387 388 389## Android 2.3 (API level 9, "Gingerbread") 390 391BSD: cat dd newfs\_msdos 392 393toolbox: chmod chown cmp date df dmesg getevent getprop hd id ifconfig 394iftop insmod ioctl ionice kill ln log ls lsmod lsof mkdir mount mv 395nandread netstat notify printenv ps reboot renice rm rmdir rmmod route 396schedtop sendevent setconsole setprop sleep smd start stop sync top 397umount uptime vmstat watchprops wipe 398