Skip to content

Instantly share code, notes, and snippets.

@jsramraj
Last active April 26, 2021 10:25
Show Gist options
  • Select an option

  • Save jsramraj/64398f156a06da3d5e57f95df854b3f4 to your computer and use it in GitHub Desktop.

Select an option

Save jsramraj/64398f156a06da3d5e57f95df854b3f4 to your computer and use it in GitHub Desktop.
ADB Commands

Process Id by app name

adb shell ps | grep appName adb shell pidof com.myCompany.myApp

Logcat by packagename

adb logcat --pid=14029

Tell the adb daemon to use TCP rather than USB

adb tcpip 5555

Tell the daemon to use the USB back

adb usb

Find the ip address of a connected device

adb shell ip -f inet addr show wlan0

Connect to a device wirelessly

adb connect 192.168.0.101:5555

Disconnect a wireless connection to a device

adb disconnect 192.168.0.101:5555

Delete a folder

adb shell rm -rf sdcard/myAppFolder

Copy a folder from the device to the machine

adb pull sdcard/myAppFolder

Push a file from computer to the device

adb push /Users/ramaraj/Downloads/logs/test.config sdcard/myAppFolder/test.config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment