Created
April 27, 2020 03:41
-
-
Save GAM3RG33K/a69e8839f10bc25ddf465cd89e74e388 to your computer and use it in GitHub Desktop.
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 | |
:: ======= Script to restart the adb with new port(5050) and connect a fixed ip through it ======= | |
:: ======= Author: Harshvardhan Joshi ======= | |
:: ======= Date: 28-11-2019 ======= | |
:: set /A port=%1 | |
:: set client_ip=%2 | |
set /A port=5050 | |
set /p client_ip="Enter Mobile device's IP address: " | |
:: | |
:: if “%port%”==”” ( | |
:: set /p port="Enter Custom port value for adb server: " | |
:: ) | |
:: | |
:: if “%client_ip%”==”” ( | |
:: set /p client_ip="Enter Mobile device's IP address: " | |
:: ) | |
echo. | |
echo. | |
echo adb-server port: %port% | |
echo. | |
echo Mobile device IP: %client_ip% | |
echo. | |
echo restarting server with port :%port% | |
adb tcpip %port% | |
echo. | |
echo connecting to mobile device at : %client_ip% | |
adb connect %client_ip%:%port% | |
echo. | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment