Android Debug Bridge adb

Android Debug Bridge is a tool that enables you to manipulate the Android emulator or device. In the previous section we used the Android Debug Bridge to install the sample application in the emulator. It has a useful set of commands that you can execute to do a variety of tasks, including copy files, run shell commands, and install or uninstall applications using Android Debug Bridge. The Android Debug Bridge commands require a device or emulator in a connected state. If there's no device or emulator and you attempt to run a command, you will get a message indicating that no device is present. After you have connected an emulator or device, you can start issuing the necessary commands to perform tasks on the emulator or device.

For example you can run the adb shell command to open a command shell to the Linux operating system of Android (see Figure 11.14). This enables you to run Linux shell commands on the Android emulator or device.

Cg Command Protrpt ■

• Kit. IWI

*

C:MJsersNPrasanna>adb shell # Is -1

drwxrwxrwt

root

root

2009-02-04

16

34 sql ite_stnit Journals

drwxrwx---

s ystem

cache

Vy' 'V ;■ ■ • 1

lfi

3,:"

cache

d---------

system

system

-:;y , ,i

16

sdeard

lrwxrwxrwx

root

root

2009-02-04

U

34

etc -> /system/etc

-rwxr-x---•

root

root

98260

1970-01-01

X

ne

init

-ruuxr-x—■ ■»

root

root

1564

1970-01-01

00

Rv:

init.goldfish.rc

-rwxr-x---

root

root

8630

1970-01-01

C3

iJC

init.rc

drwxrivx--x

s ystem

s ystem

2008-09-22

20

44

data

drwxr-xr-x

root

root

2008-09-22

20

41

system

drwxr-xr-x

root

root

1970-01-01

sys

dr-xr-xr-x

root

root

1970-01-01

00

00

proc

drwxr-x----

root

root

1970-01-01

00

00

sbin

-rw-p--r--

root

root

93

1970-01-01

C'3

IX'

default.prop

druix------

root

root

1970-01-01

00

00

root

It _

root

root

2009-02-04

16

34

dev

Running Linux shell commands through adb.

0 0

Post a comment