Skip to content

Instantly share code, notes, and snippets.

@daltonbr
Last active July 15, 2020 20:29
Show Gist options
  • Save daltonbr/09cda20de781677de5aa15d2409fa7f8 to your computer and use it in GitHub Desktop.
Save daltonbr/09cda20de781677de5aa15d2409fa7f8 to your computer and use it in GitHub Desktop.
adb commands
# adb docs
# https://developer.android.com/studio/command-line/adb
# check environment variables
# https://developer.android.com/studio/command-line/variables
$ adb devices
$ adb devices -l
# Connecting via WiFi
# while connected through USB
# Define the adb TCP/IP port to be used, type the command 'adb TCPIP 5555'.
# Ensure the port is not blocked by switch or firewall and the device IP
# can be reached from PC network. So possibly use port 3389 (rdp) or 443 (https).
$ adb tcpip <port>
# now we can disconnect the usb cable
adb connect <ip:port>
adb logcat
# If multiple devices are connected, for example USB,
# Emulator and TCP/IP, the adb command must specify the desired device.
$ adb devices -l
List of devices attached
UBV0218903000332 device product:EML-L29 model:EML_L29 device:HWEML transport_id:9
192.168.178.27:5555 device product:vr_monterey model:Quest device:monterey transport_id:8
# using shell
$ adb -s 192.168.178.27:5555 shell
$ adb -s UBV0218903000332 shell
# Use 'adb -d...' to execute against the only USB connected device.
# Use 'adb -e...' to connect to the only connection to an emulated device.
## Oculus Quest
$ adb logcat -s VrApi
# https://developer.oculus.com/documentation/native/android/mobile-logcat/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment