Last active
September 25, 2018 12:47
-
-
Save felipebaltazar/e43b305322ab61657fb3cfb35b4e8b91 to your computer and use it in GitHub Desktop.
send a file to device on adb connection
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 | |
echo ===========Adb device push file script=========== | |
echo Author: Felipe Baltazar | |
echo Github:https://github.com/felipebaltazar | |
echo Creation Date: 25/09/2018 | |
echo. | |
echo. | |
echo ====================Status===================== | |
echo [%time%] Checking adb default path... | |
call CD D:\Android\android-sdk\platform-tools\ | |
echo. | |
if %ERRORLEVEL% == 0 goto :getpath | |
echo ====================Status===================== | |
echo [%time%] Error.. Exited with status: %errorlevel% | |
echo [%time%] ->You need abd to continue... | |
echo. | |
goto :endfail | |
:getpath | |
SET /P path=Please enter file full path to copy: | |
call CD %path% | |
if %ERRORLEVEL% == 0 goto :executeCopy | |
echo ====================Status===================== | |
echo [%time%] Error.. Exited with status: %errorlevel% | |
echo [%time%] ->File or filePath not found... | |
echo. | |
goto :endfail | |
:executeCopy | |
CD D:\Android\android-sdk\platform-tools\ | |
call adb -e push %path% /sdcard/ | |
if %ERRORLEVEL% == 0 goto :endofscript | |
echo ====================Status===================== | |
echo [%time%] Error.. Exited with status: %errorlevel% | |
echo [%time%] ->Error on copying file... | |
echo. | |
goto :endfail | |
:endfail | |
echo ====================Status===================== | |
echo [%time%] Status: Error! | |
:endofscript | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment