Issuing shell commands

As mentioned in Chapter 1, Introducing Android Forensics, Android runs on a Linux kernel and so provides a way to access the shell. Using adb, you can access a shell to run several commands on an Android device. For those who are not familiar with Linux environment, Linux shell refers to a special program that allows you to interact with it by entering certain commands from the keyboard; the shell will execute the commands and display its output. More details about how things work on Linux environment have been provided under the Rooting Android device section in this chapter.

The adb shell command can be used to enter into a remote shell, as shown in the following command-line output. Once you enter the shell, you can execute most of the Linux commands:

adb shell
shell@android:/ $

After executing the command, observe that the shell prompt is displayed to the user where commands can be executed on the device. For instance, as shown in the following command line, the ls command can be used to view all of the files within a directory:

shell@android:/ $ ls
acct
adb_keys
bin
bugreports
cache
charger
config
d
data
default.prop
dev
etc
...

The following section explains some of the most widely used Linux commands that are very helpful while interacting with an Android device.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.93.222