Skip to content

Instantly share code, notes, and snippets.

@WitherOrNot
Created February 4, 2020 00:58
Show Gist options
  • Save WitherOrNot/f2d8fbdcbaf454dba9acbdd815c33993 to your computer and use it in GitHub Desktop.
Save WitherOrNot/f2d8fbdcbaf454dba9acbdd815c33993 to your computer and use it in GitHub Desktop.
Augmented ADB Shell for remote Android management
@echo off
cls
:a
for /f "delims=" %%i in ('adb shell pwd') do set pwd=%%i
title adbshell- %pwd%
set /p com="adbshell- %pwd% $ "
echo %com% >com.txt
goto b
:c
adb shell "%com%"
if "%com%"=="clear" (cls)
goto a
:b
findstr "pull" com.txt >nul
if "%ERRORLEVEL%" == "0" (adb %com% && goto a)
findstr "push" com.txt >nul
if "%ERRORLEVEL%" == "0" (adb %com% && goto a)
findstr "logcat" com.txt >nul
if "%ERRORLEVEL%" == "0" (adb %com% && goto a)
findstr "install" com.txt >nul
if "%ERRORLEVEL%" == "0" (adb %com% && goto a)
findstr "uninstall" com.txt >nul
if "%ERRORLEVEL%" == "0" (adb %com% && goto a)
goto c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment