Created
June 11, 2019 08:59
-
-
Save dineshmm23/872ad24370655475e41aac0faa0e0c25 to your computer and use it in GitHub Desktop.
Initilisation of Variables. Put your defualts in here. Change enableSetVariablesWarning to anything else to disable warning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Initilisation of Variables.. Put your defualts in here | |
:: Change enableSetVariablesWarning to anything else to | |
:: disable warning | |
set defaultIp="192.168.10.104" | |
set adbLoc="D:\Android_sdk\sdk\platform-tools" | |
set enableSetVariablesWarning="true" | |
set askForIP="false" | |
:: End of Initiation | |
if /I %enableSetVariablesWarning%=="true" GOTO COMMENT | |
GOTO ENDOFCOMMENTS | |
:COMMENT | |
@echo 01010101010101010101010101 CONFIG 01010101010101010101010101 | |
@echo Is This your first time using this bat? | |
@echo make sure that you have configured: | |
@echo defaultIp: %defaultIp% | |
@echo adbLoc: %adbLoc% | |
@echo askForIP: %askForIP% | |
@echo change "enableSetVariablesWarning" to anything other than | |
@echo true to disable this warning | |
@echo 01010101010101010101010101 CONFIG 01010101010101010101010101 | |
@echo. | |
:ENDOFCOMMENTS | |
@echo Make sure that the Android is connected | |
if /I %askForIP%=="true" GOTO GETIP | |
set ip=%defaultIp% | |
GOTO CONNECT | |
:GETIP | |
set ip="invalid" | |
set /p ip="Enter IP(default=192.168.10.104): " %=% | |
if /I %ip%=="invalid" GOTO SETIP | |
GOTO CONNECT | |
:SETIP | |
set ip=%defaultIp% | |
@echo Defaulting the ip to: %ip% | |
:CONNECT | |
set curr_dir=%cd% | |
chdir /D %adbLoc% | |
@echo Restarting adb | |
adb kill-server | |
adb tcpip 5555 | |
@echo Connecting to %ip% | |
adb connect %ip%:5555 | |
adb devices | |
chdir /D %curr_dir% | |
set /p ip="Press Enter to Exit" %=% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi guys , Help these gist to improve