The adb Command

There are several other debugging tools you can use from a command line (or tools window). The Android Debug Bridge (adb) command allows you to install, update, and remove applications. You can start a shell on the emulator or device, and from there you can run the subset of Linux commands that Android provides. For example, you can browse the file system, list processes, read the log, and even connect to SQLite databases and execute SQL commands. We covered the SQLite commands in Chapter 4. As an example, the following command (in a tools window) will create a shell on an emulator:

adb -e shell

Notice the -e to specify an emulator. You would use -d if you were connecting to a device. Within an emulator shell, you will have ...

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.