adbd
daemon runs on the device and the adb
client starts a background server to multiplex commands sent to the connected device.6100
to emulator/device port 7100
adb connect
command allows using adb
over Wi-Fi. It requires the host and the device connected to the same Wi-Fi network.adb tcpip 5555
' command. Now find the IP address of the device from Settings -> About -> Status -> IP address. Now you can use adb connect command to use ADB over Wi-Fi.adb install
command pushes an Android application (.apk) from host to an emulator or the device.adb shell pm list packages
command prints all packages installed on the device/emulator.adb shell pm path
command is used to prints the path to the APK of the given package.adb push
command is used to upload or push or copy a file from the host (computer) to an emulator or the device.adb shell rm
command is used to remove files or directories.object
:= { link | addr | addrlabel | route | rule | neigh | ntable |tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |netns | l2tp }optoins
:= { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |-f[amily] { inet | inet6 | ipx | dnet | link } |-l[oops] { maximum-addr-flush-attempts } |-o[neline] | -t[imestamp] | -b[atch] [filename] |-rc[vbuf] [size]}adb shell screencap
command takes a screenshot of the device’s display.adb shell screenrecord
command records the device’s screen. It requires the device to be running on Android 4.4 (API level 19) or higher.adb root
command is used to restarts the adbd daemon with root permissions.fastboot reboot
command reboots the device to normal or standard mode. Used to exit the fastboot mode or boot loader mode.fastboot reboot recovery
command boots the device into Recovery Mode.fastboot oem unlock
command unlocks bootloader on the device.fastboot flash recovery
command is used to flash the recovery image to the device.adb
command. Other Android tools such as the ADT plugin and DDMS also create adb clients.<sdk>/tools/android
<sdk>
is the path to the tools directory. For example, if the Android SDK is located on the desktop, then you have to type into the terminal window:/Users/MyName/Desktop/android-sdk-mac_86/tools/android
platform-tools
subdirectory.adb devices
List of devices attached
XXXXXXXXXXXX device
-p
is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path.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)-l
means forward-lock the app-r
means reinstall the app, keeping its data-s
means install on SD card instead of internal storage-k
means keep the data and cache directories)<tty>
refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters]
– Eg. defaultroute debug dump local notty usepeerdns