Sign up ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

For using a shell commands through a terminal program, where can I find documentation or help or man pages for the commands as implemented in Android?

While it would be nice to have them on the device via man, PDF or web-based would be fine, too.

When I run "man" from terminal, I get an error and I haven't found a good source online.

share|improve this question

6 Answers 6

You may have a look at for a description of busybox and the commands provided by it. And trust me, if you are going to do work in the console, you probably want to use busybox.

share|improve this answer
it is to be noted that stock Android does not come with busybox, and instead uses toolbox. – Lie Ryan Aug 7 '11 at 12:12

Most of the terminal commands in android are the limited version of standard Linux/Unix/POSIX terminal commands, provided by the toolbox program. Notably absent from toolbox is the cp (file copy) command, you must use cat file1 > file2 instead. If you spend a lot of time in the shell, you may want to install busybox, which provides a richer set of standard POSIX commands.

There some bit about android shell here:

share|improve this answer

Since I stumbled over the same problem as you did I started to compile a list of useful commands in the Android Shell including examples. A German version is on my blog.

share|improve this answer

The majority of "standard" Android shell commands are found in /system/bin/ and the majority of those are symlinked to Toolbox, a bsd licensed set of applets, similar to busybox, but without the GPL-2 licensing ""issues"". Toolbox helps Google's need to remove dependence on GPL code, and is targeted to small size and specific Android tasks. It was not meant for end-user use.

There is no builtin manuals in stock android, and toolbox applets lack any documentation, from the commands, from toolbox itself, and online. They are very limited copies of what most users would consider the standard POSIX type tools. More similar to the BSD-Utils, so BSD Util flags are more likely to work and behavior is more similar to BSD-Utils than it is Posix. Even then, Toolbox applets lack many of those flags.

The closest thing to documentation is the source code. Which, like most of Android, available online. Here is the Froyo version of the Toolbox source:
Just find the version you need.

Keep in mind, different manufacturers might change the code. Samsung's Toolbox is different from Motorola's. Heck, Samsung Galaxy S Toolbox differs from Samsung Sidekick 4g (Galaxy S based). Manufacturers might add applets for their own use, or change the default for specific purposes. the restart applet in toolbox will work on the phone it came on, but the busybox restart applet will not, unless specifically patched. Time and Date are also different. There are others as well. So Toolbox isn't something you can completely replace with Busybox or the full GNU-Utils or whatever.

share|improve this answer

I would suggest starting an Android Virtual Device (AVD), connecting to it with adb, and running the Android shell command in question:

pdurbin@macbook ~$ cd /Applications/eclipse/android-sdk-mac_x86/platform-tools
pdurbin@macbook platform-tools$ ./adb -s emulator-5554 shell
# /system/bin/pm
usage: pm [list|path|install|uninstall]
       pm list packages [-f]
       pm list permission-groups
       pm list permissions [-g] [-f] [-d] [-u] [GROUP]
       pm list instrumentation [-f] [TARGET-PACKAGE]
       pm list features
       pm path PACKAGE
       pm install [-l] [-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATH
       pm uninstall [-k] PACKAGE
       pm enable PACKAGE_OR_COMPONENT
       pm disable PACKAGE_OR_COMPONENT
       pm setInstallLocation [0/auto] [1/internal] [2/external]

If anyone knows the flag to give Android shell commands to just print the usage screen, please let me know. I tried --help, -help, -h, --usage, etc.

Try to run ls /system/bin and see also

share|improve this answer

On older Android versions

On older Android versions, shell commands tend to be either:

  • Rewritten specifically for Android, and shipped as part of Toolbox. I'm not sure whether or not Toolbox is really documented anywhere.
  • Or copied from NetBSD. If so, then the command was recompiled for Android, and the command (but not its manual page) is shipped with Android.

Use type to tell you where a command is stored, and ls -l on the command to tell you whether it's a real binary or a symbolic link. If it's a symbolic link to Toolbox, then you'll know that the command is part of Toolbox.

A few commands, such as kill, are available both as a shell builtin (this is the version which will normally run) and in /system/bin (this version will normally never be run). type will tell you which version will run.

On Marshmallow and up

Android 6.0 "Marshmallow" and up ship with Toybox, and most of the most commonly used shell commands (cp, mv, ls, et cetera) tend to be Toybox toys. Toybox toys normally include built-in help; official manual pages are not included.

Still, Toybox doesn't include everything, and so not everything is provided by Toybox. For example, even on Android 6.0 "Marshmallow", fsck_msdos (which should only be used to check SD cards of 32 GB or less) appears to be taken from either FreeBSD or NetBSD. fsck_exfat (which can check most SD cards 64 GB or larger) is taken from elsewhere. I'm not sure where.

Your shell

On modern versions of Android, the shell is mksh, the MirBSD Korn shell. If mksh is running, then to find out your mksh version, enter:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.