Merge "Update shell and utilities docs for O." am: 1ca9852366
am: 80c5a9bb77
am: 07f2b44588
Change-Id: Icc71d97a972e849fa054ce441ad1d7652b638632
This commit is contained in:
commit
0fa1eff6bc
1 changed files with 27 additions and 18 deletions
|
@ -4,20 +4,25 @@ Android's shell and utilities
|
|||
Since IceCreamSandwich Android has 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
|
||||
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
|
||||
own "toolbox" binary. These days almost everything is supplied by
|
||||
Initially Android had a very limited command-line provided by its own
|
||||
"toolbox" binary. Since Marshmallow almost everything is supplied by
|
||||
[toybox](http://landley.net/toybox/) instead.
|
||||
|
||||
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
|
||||
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
|
||||
(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.
|
||||
|
||||
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
|
||||
each release starting with Gingerbread. This doesn't tell the full story,
|
||||
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,
|
||||
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)
|
||||
-------------------------
|
||||
|
@ -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
|
||||
|
||||
|
||||
Current AOSP
|
||||
------------
|
||||
Android 8.0 (Oreo)
|
||||
------------------
|
||||
|
||||
BSD: dd grep
|
||||
|
||||
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
|
||||
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
|
||||
getenforce getprop groups head hostname hwclock id ifconfig inotifyd
|
||||
insmod ionice iorenice kill killall ln load\_policy log logname losetup
|
||||
ls lsmod lsof lsusb md5sum microcom mkdir mknod mkswap mktemp modinfo
|
||||
modprobe more mount mountpoint mv netstat nice nl nohup od paste patch
|
||||
pgrep pidof pkill pmap printenv printf ps pwd readlink realpath renice
|
||||
restorecon rm rmdir rmmod runcon sed sendevent seq setenforce setprop
|
||||
setsid sha1sum sha224sum sha256sum sha384sum sha512sum sleep sort split
|
||||
start stat stop strings swapoff swapon sync sysctl tac tail tar taskset
|
||||
tee time timeout top touch tr true truncate tty ulimit umount uname uniq
|
||||
unix2dos uptime usleep uudecode uuencode vmstat wc which whoami xargs
|
||||
xxd yes
|
||||
getenforce getprop groups gunzip gzip head hostname hwclock id ifconfig
|
||||
inotifyd insmod ionice iorenice kill killall ln load\_policy log logname
|
||||
losetup ls lsmod lsof lspci lsusb md5sum microcom mkdir mkfifo mknod
|
||||
mkswap mktemp modinfo modprobe more mount mountpoint mv netstat nice
|
||||
nl nohup od paste patch pgrep pidof pkill pmap printenv printf ps pwd
|
||||
readlink realpath renice restorecon rm rmdir rmmod runcon sed sendevent
|
||||
seq setenforce setprop setsid sha1sum sha224sum sha256sum sha384sum
|
||||
sha512sum sleep sort split start stat stop strings swapoff swapon sync
|
||||
sysctl tac tail tar taskset tee time timeout top touch tr true truncate
|
||||
tty ulimit umount uname uniq unix2dos uptime usleep uudecode uuencode
|
||||
vmstat wc which whoami xargs xxd yes zcat
|
||||
|
|
Loading…
Reference in a new issue