Merge "Update shell and utilities docs for O."
This commit is contained in:
commit
1ca9852366
1 changed files with 27 additions and 18 deletions
|
|
@ -4,20 +4,25 @@ Android's shell and utilities
|
||||||
Since IceCreamSandwich Android has used
|
Since IceCreamSandwich Android has used
|
||||||
[mksh](https://www.mirbsd.org/mksh.htm) as its shell. Before then it used
|
[mksh](https://www.mirbsd.org/mksh.htm) as its shell. Before then it used
|
||||||
[ash](https://en.wikipedia.org/wiki/Almquist_shell) (which actually
|
[ash](https://en.wikipedia.org/wiki/Almquist_shell) (which actually
|
||||||
remained in the tree up to and including KitKat).
|
remained unused in the tree up to and including KitKat).
|
||||||
|
|
||||||
Initially Android had a very limited command-line provided by its
|
Initially Android had a very limited command-line provided by its own
|
||||||
own "toolbox" binary. These days almost everything is supplied by
|
"toolbox" binary. Since Marshmallow almost everything is supplied by
|
||||||
[toybox](http://landley.net/toybox/) instead.
|
[toybox](http://landley.net/toybox/) instead.
|
||||||
|
|
||||||
We started moving a few of the more important tools to full
|
We started moving a few of the more important tools to full
|
||||||
BSD implementations in JellyBean before we started in earnest in
|
BSD implementations in JellyBean, and continued this work in
|
||||||
Lollipop. Lollipop was a major break with the past in many ways (LP64
|
Lollipop. Lollipop was a major break with the past in many ways (LP64
|
||||||
support and the switch to ART both having lots of knock-on effects around
|
support and the switch to ART both having lots of knock-on effects around
|
||||||
the system), so although this was the beginning of the end of toolbox it
|
the system), so although this was the beginning of the end of toolbox it
|
||||||
(a) didn't stand out given all the other systems-level changes and (b)
|
(a) didn't stand out given all the other systems-level changes and (b)
|
||||||
in Marshmallow we changed direction and started the move to toybox.
|
in Marshmallow we changed direction and started the move to toybox.
|
||||||
|
|
||||||
|
Not everything is provided by toybox, though. We currently still use
|
||||||
|
the BSD dd and grep (because the toybox versions are still unfinished),
|
||||||
|
and for the bzip2 command-line tools we use the ones that are part of
|
||||||
|
the bzip2 distribution.
|
||||||
|
|
||||||
The lists below show what tools were provided and where they came from in
|
The lists below show what tools were provided and where they came from in
|
||||||
each release starting with Gingerbread. This doesn't tell the full story,
|
each release starting with Gingerbread. This doesn't tell the full story,
|
||||||
because the toolbox implementations did have bugs fixed and options added
|
because the toolbox implementations did have bugs fixed and options added
|
||||||
|
|
@ -25,6 +30,10 @@ over the years. Gingerbread's rm, for example, supported `-r`/`-R` but not
|
||||||
`-f`. But this gives you an idea of what was available in any given release,
|
`-f`. But this gives you an idea of what was available in any given release,
|
||||||
and how usable it was likely to be.
|
and how usable it was likely to be.
|
||||||
|
|
||||||
|
Also note that in any given release `toybox` probably contains more
|
||||||
|
commands than there are symlinks for in `/system/bin`. You can get the
|
||||||
|
full list for a release by running `toybox` directly.
|
||||||
|
|
||||||
|
|
||||||
Android 2.3 (Gingerbread)
|
Android 2.3 (Gingerbread)
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
@ -132,26 +141,26 @@ time timeout touch tr true truncate tty ulimit umount uname uniq unix2dos
|
||||||
uptime usleep vmstat wc which whoami xargs xxd yes
|
uptime usleep vmstat wc which whoami xargs xxd yes
|
||||||
|
|
||||||
|
|
||||||
Current AOSP
|
Android 8.0 (Oreo)
|
||||||
------------
|
------------------
|
||||||
|
|
||||||
BSD: dd grep
|
BSD: dd grep
|
||||||
|
|
||||||
bzip2: bzcat bzip2 bunzip2
|
bzip2: bzcat bzip2 bunzip2
|
||||||
|
|
||||||
toolbox: getevent gzip newfs\_msdos gunzip zcat
|
toolbox: getevent newfs\_msdos
|
||||||
|
|
||||||
toybox: acpi base64 basename blockdev cal cat chcon chgrp chmod chown
|
toybox: acpi base64 basename blockdev cal cat chcon chgrp chmod chown
|
||||||
chroot chrt cksum clear cmp comm cp cpio cut date df diff dirname dmesg
|
chroot chrt cksum clear cmp comm cp cpio cut date df diff dirname dmesg
|
||||||
dos2unix du echo env expand expr fallocate false file find flock free
|
dos2unix du echo env expand expr fallocate false file find flock free
|
||||||
getenforce getprop groups head hostname hwclock id ifconfig inotifyd
|
getenforce getprop groups gunzip gzip head hostname hwclock id ifconfig
|
||||||
insmod ionice iorenice kill killall ln load\_policy log logname losetup
|
inotifyd insmod ionice iorenice kill killall ln load\_policy log logname
|
||||||
ls lsmod lsof lsusb md5sum microcom mkdir mknod mkswap mktemp modinfo
|
losetup ls lsmod lsof lspci lsusb md5sum microcom mkdir mkfifo mknod
|
||||||
modprobe more mount mountpoint mv netstat nice nl nohup od paste patch
|
mkswap mktemp modinfo modprobe more mount mountpoint mv netstat nice
|
||||||
pgrep pidof pkill pmap printenv printf ps pwd readlink realpath renice
|
nl nohup od paste patch pgrep pidof pkill pmap printenv printf ps pwd
|
||||||
restorecon rm rmdir rmmod runcon sed sendevent seq setenforce setprop
|
readlink realpath renice restorecon rm rmdir rmmod runcon sed sendevent
|
||||||
setsid sha1sum sha224sum sha256sum sha384sum sha512sum sleep sort split
|
seq setenforce setprop setsid sha1sum sha224sum sha256sum sha384sum
|
||||||
start stat stop strings swapoff swapon sync sysctl tac tail tar taskset
|
sha512sum sleep sort split start stat stop strings swapoff swapon sync
|
||||||
tee time timeout top touch tr true truncate tty ulimit umount uname uniq
|
sysctl tac tail tar taskset tee time timeout top touch tr true truncate
|
||||||
unix2dos uptime usleep uudecode uuencode vmstat wc which whoami xargs
|
tty ulimit umount uname uniq unix2dos uptime usleep uudecode uuencode
|
||||||
xxd yes
|
vmstat wc which whoami xargs xxd yes zcat
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue