Android Tutorials - Herong's Tutorial Examples - v3.05, by Herong Yang
What Is the Bourne Shell?
This section provides a quick introduction of the Bourne shell which is the default shell on the Android system, which is based on the Linux system, which is based on Unix system.
The Bourne shell is a Unix shell introduced by Stephen Bourne in 1977. The Bourne shell replaced the Thompson shell and became the default shell of Unix systems. Bourne shell is also the default shell for the Android system, which is based on the Linux system, which is based on the Unix system.
The Bourne shell is a command-line interpreter that provides a traditional user interface for the Unix-based operating systems. Users direct the operation of the computer by entering commands as text for a command line interpreter to execute or by creating text scripts of one or more such commands.
The Bourne shell has the following main features:
The Bourne shell is the default shell supported on Android systems. You can invoke it remotely using the Android Debugging Bridge (abd) tool your connected desktop computer as descripted in "Android Debug Bridge (adb) Tool" chapter.
If you have "adb" installed as part of the Android SDK Platform Tools of Android Studio package, the "adb" program file is located in the "platform-tools" sub-directory. You can include "platform-tools" in the PATH environment variable, so you can run the "adb" command without specifying the path name. For example, this is what I did on macOS computer:
herong$ export PATH=$PATH:~/Applications/platform-tools/ herong$ adb devices List of devices attached 10.0.0.150:5555 device herong$ adb shell milan:/ $ uname -a Linux 4.19.191+ #1 SMP PREEMPT Tue Apr 25 04:32:44 CDT 2023 aarch64 milan:/ $ exit
If you are using a Windows computer, setting up the PATH environment variable is slightly different:
herong> set PATH=%PATH%;\local\platform-tools herong> adb devices List of devices attached emulator-5554 offline herong> adb shell df Filesystem Size Used Free Blksize /dev 242.9M 24.0K 242.8M 4096 /sys/fs/cgroup 242.9M 12.0K 242.9M 4096 /mnt/asec 242.9M 0.0K 242.9M 4096 /mnt/obb 242.9M 0.0K 242.9M 4096
See next tutorials on using the "adb shell" interface to run Bourne shell built-in commands and some commonly used Android system commands.
Table of Contents