Skip to content

Instantly share code, notes, and snippets.

@bbchriscesar
Created April 4, 2023 10:41
Show Gist options
  • Save bbchriscesar/34e197adf5f3d93ef61e29d4feade81c to your computer and use it in GitHub Desktop.
Save bbchriscesar/34e197adf5f3d93ef61e29d4feade81c to your computer and use it in GitHub Desktop.
This Windows batch script is designed to scan a directory for APK files and install them via ADB. The script was particularly helpful to me in a CI/CD setup.
@echo off
set "dir=C:\path\to\APK\files"
for /r "%dir%" %%i in (*.apk) do (
set "filename=%%~nxi"
goto install
)
echo No APK files found in %dir%
goto end
:install
adb install "%dir%\%filename%"
:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment