I want to push some files of the same type (.img
) to the /sdcard
partition of the phone with a single command. But the wildcard does not work:
adb push *.img /sdcard/
Is there any way I can achieve that?
Copy the *. img files to an empty directory, then push the directory ( adb push /tmp/images /storage/sdcard0 ). adb will push all files in that directory to your designated location.
Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.
Copy the *.img
files to an empty directory, then push the directory (adb push /tmp/images /storage/sdcard0
). adb
will push all files in that directory to your designated location.
BTW, /sdcard
as a path has been obsolete for quite some time, so please make sure you use a destination that exists and is supported by your device. Most Android 2.x/3.x/4.0 devices use /mnt/sdcard
; Android 4.1 uses /storage/sdcard0
.
From my mind with echoing the file...
for i in *.img; do echo $i; adb push "$i" /sdcard/; done;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With