Download Android Apps Security
Transcript
166
CHAPTER 9: Publishing and Selling Your Apps
Listing 9-1. Adb Commands and Features
Android Debug Bridge version 1.0.29 -d
- directs command to the only connected USB device
returns an error if more than one USB device is
present.
-e
-s < serial number>
-p < product name or path>
devices
connect < host > [:<port>]
- directs command to the only running emulator.
returns an error if more than one emulator is running.
- directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
- simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
- list all connected devices
- connect to a device via TCP/IP
Port 5555 is used by default if no port number is
specified.
disconnect [<host > [:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is
specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices. device commands:
adb push < local > <remote>
adb pull < remote > [<local>]
adb sync [ <directory> ]
adb
adb
adb
adb
adb
adb
adb
it
- copy file/dir to device
- copy file/dir from device
- copy host- > device only if changed
(−l means list but don't copy)
(see 'adb help all')
shell
- run remote shell interactively
shell < command>
- run remote shell command
emu < command>
- run emulator console command
logcat [ <filter-spec> ] - View device log
forward < local > <remote > − forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid > (remote only)
jdwp
- list PIDs of processes hosting a JDWP transport
install [−l] [−r] [−s] < file > − push this package file to the device and install
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal
www.it-ebooks.info