Android Debug Bridge version 1.0.20 -d e returns an error if more than one USB device is present. -e unning.

-s <serial number> ith -p <product name or path> - directs command to the only running emulator. returns an error if more than one emulator is r - directs command to the USB device or emulator w the given serial number - 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 - directs command to the only connected USB devic

devices device commands: adb push <local> <remote> adb pull <remote> <local> adb sync [ <directory> ] adb adb adb adb adb

adb adb l it )

- copy file/dir to device - copy file/dir from device - copy host->device only if changed (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] <file> - push this package file to the device and instal ('-l' means forward-lock the app) ('-r' means reinstall the app, keeping its data

adb uninstall [-k] <package> - remove this app package from the device ('-k' means keep the data and cache directories ) adb bugreport adb help adb version DATAOPTS: (no option) -w -d scripting: adb wait-for-device adb start-server - return all information from the device that should be included in a bug report. - show this help message - show version num - don't touch the data partition - wipe the data partition - flash the data partition - block until device is online - ensure that there is a server running

Common Use Some of the more common commands in adb are push.Run PPP over USB.If <directory> is not specified. only the corresponding partition is updated.txt /sdcard/test. dev:/dev/omap_csmi_tty1 [parameters] .remounts the /system partition on the device re networking: adb ppp <tty> [parameters] . both /system and /data partitions will be u pdated.txt Pull pulls a file from your Android device to your desktop computer: adb pull /sdcard/test. Note: you should not automatically start a PDP connection. shell. install. and logcat. Eg. <tty> refers to the tty for PPP stream.If it is "system" or "data".adb kill-server adb get-state adb get-product adb get-serialno adb status-window d device adb remount ad-write - kill the server if it is running prints: offline bootloader device prints: <product-id> prints: <serial-number> continuously print device status for a specifie . defaultroute debug dump local notty usepeerdns adb sync notes: adb sync [ <directory> ] <localdir> can be interpreted in several ways: . Push sends a file from your desktop computer to your Android device: adb push test.txt Shell lets you run an interactive shell (command prompt) on the Android device: adb shell Install lets you install an android APK file to your Android device: adb install myapp.txt test. remount.apk Remount remounts the /system partition as writable (or readonly if it is already writeable): adb remount Logcat lets you view the devices debug logs in real time (must press control+c t o exit): adb logcat . pull.Eg. .

Sign up to vote on this title
UsefulNot useful