I am trying to have an automatic batch file replace a file on my android device, it works when i type it in manualy but for some wierd reason it doesn't in the batch file.
Here is my code:
@echo off echo Do you want to change the file? echo 1)Yes set /p choice= if %choice%==1 goto :change :change cd c:/ cd Users cd Aidan cd Desktop cd My folder cd platform-tools adb devices adb shell < change_file.txt
Then i have a remote file to run the commands, this is needed to run multiple commands is adb shell from a batch file.
Here is my change_file.txt :
su cd storage cd sdcard0 rm test.txt cat > test.txt test test 12345 test
In the command window it shows that it executes the commands several times and all it does it delete the file not replace it with a new one.