Skip to content

Instantly share code, notes, and snippets.

@masaru-ryumae
Created January 26, 2017 02:05
Show Gist options
  • Save masaru-ryumae/2a2b0356decfec16c79237b190632dec to your computer and use it in GitHub Desktop.
Save masaru-ryumae/2a2b0356decfec16c79237b190632dec to your computer and use it in GitHub Desktop.
#!/bin/bash
# To generalize the home directory path, run this script as follows:
# ./WirelessRouterFixed-8913-RC.sh ****** where *** is your home directory name
# ****** becomes $1 variable
export PATH=$PATH:/Users/$1/Library/Android/sdk/platform-tools
# Use this Batch file to wirelessly conenct to an Android Phone for code development
# This assumes that you have previously connected your phone to the router, and that you have
# locked in it's IP addresse (so the router assigns the same address each time).
# Edit the lines at the end of this batch file to match the IP addresses assigned to the phone.
#
# ***** For more help, go to www.YouTube.com/user/GEARSinc/playlists
#
echo Starting ADB
adb kill-server
echo Make sure the phone is connected to the Router.
echo Ensure that the IP matches this script
echo ALSO, make sure the phone is connected to the computer via USB
read -rsp $'Hit enter when phone has been plugged in and recognized:\n'
adb usb
sleep 10
adb tcpip 5555
sleep 5
# ----- Edit this line to have your Phones IP
adb connect 192.168.*.*
adb devices
#set /p ok= -- Unplug the phone and hit Enter to see the final connection.
read -rsp $'Unplug the phone and hit Enter to see the final connection.\n'
adb devices
sleep 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment