Android Application Security Testing Part-22: Android Debug Bridge (adb)
Android
Debug Bridge (adb)
Android
Debug Bridge (adb) is a versatile command-line tool that lets you communicate
with a device. The adb command facilitates a variety of device actions, such as
installing and debugging apps, and it provides access to a Unix shell that you
can use to run a variety of commands on a device. It is a client-server program
that includes three components:
·
A client : which sends commands. The
client runs on your development machine. You can invoke a client from a
command-line terminal by issuing an adb command.
·
A daemon (adb) : which runs commands on
a device. The daemon runs as a background process on each device.
·
A server : which manages communication
between the client and the daemon. The server runs as a background process on
your development machine
ADB - Useful
Commands
·
adb connect host[:port]
– Connect to a device over TCP/IP. If you do not specify a port, then the
default port, 5555, is used
·
adb devices – It Prints a list of all
attached emulator/device instances.
·
adb install– It is used to install an
apk file in to an Emulated/Connected Device
·
adb uninstall [-k] package –
Remove this app package from the device. Add the -k option to keep the data and
cache directories.
·
adb push – It is used to push some data
from local host(local) to Emulated Device(remote).
·
adb pull – It is used to fetch some
data from Emulated device(remote) to local host(local).
·
adb forward – Forwards socket
connections from a specified local port to a specified remote port on the
emulator/device instance.
·
adb shell – Adb provides a Unix shell
that you can use to run a variety of commands on an emulator or connected
device.
·
Logcat – Print log data to the screen
No comments