Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

How to automate adb push commands?

OP WastedJoker

18th August 2014, 01:14 AM   |  #1  
WastedJoker's Avatar
OP Senior Member
Flag Durham
Thanks Meter: 75
641 posts
Join Date:Joined: Aug 2011

I want to run the following sequence of push commands:

adb push /sdcard/DCIM C:\Users\me\Downloads\adb\DCIM
adb push /sdcard/Download C:\Users\me\Downloads\adb\Download
adb push /sdcard/Pictures C:\Users\me\Downloads\adb\Pictures
adb push /sdcard/rcb2 C:\Users\me\Downloads\adb\rcb2
adb push /sdcard/Ringtones C:\Users\me\Downloads\adb\Ringtones
adb push /sdcard/SMSBackupRestore C:\Users\me\Downloads\adb\SMSBackupRestore
adb push /sdcard/Tasker C:\Users\me\Downloads\adb\Tasker
adb push /sdcard/TitaniumBackup C:\Users\me\Downloads\adb\TitaniumBackup
adb push /sdcard/WhatsApp C:\Users\me\Downloads\adb\WhatsApp

in a script format that I can use in a Tasker task.

What is the best way to achieve this to ensure all the commands are run in turn (with some form of wait function, I'd guess) and also notifies if any errors (or at least logs errors for me to check afterwards)?

Edit: Obviously if it is being run in Tasker it will be a push command, doh!
Last edited by WastedJoker; 18th August 2014 at 01:21 AM.
Post Reply Subscribe to Thread

adb, command, pull, script, wait
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes