Skip to content

Instantly share code, notes, and snippets.

@csytsma
Created March 9, 2015 18:12
Show Gist options
  • Save csytsma/851e87dcb4f569921da5 to your computer and use it in GitHub Desktop.
Save csytsma/851e87dcb4f569921da5 to your computer and use it in GitHub Desktop.
Connect ADB to the emulator. You'll need the IP from the emulator, as explained in the comments below. Ideally, it doesn't change.
#!/bin/bash
# This script connects Android Debug Bridge to the VirtualBox Android VM.
# To get IP address of VM, launch VM, go to Terminal and type 'netcfg'.
# The IP is next to the eth0 interface
# Author: Cory Sytsma
printf "Connecting to VirtualBox Android VM...\n"
# Ratio office WiFi
printf "Trying 192.168.21.199..."
/Users/csytsma/Library/Android/sdk/platform-tools/adb connect 192.168.21.199
# Home office Ethernet
printf "Trying 192.168.1.122..."
/Users/csytsma/Library/Android/sdk/platform-tools/adb connect 192.168.1.122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment