Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
130 views
in Technique[技术] by (71.8m points)

android - ADB push multiple files with the same extension with a single command

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?

question from:https://stackoverflow.com/questions/12901240/adb-push-multiple-files-with-the-same-extension-with-a-single-command

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...