Hi,
i wrote this patch to make adb enable this function.
You can compile it and replace the host adb tool.
usage:
adb push a b c d
Note: adb will push a b c to directory d,a, b,c can be file or directory.
--wangxingchao
2010/6/11 xingchao wang <[email protected]>
> Hi all,
>
> Is there any patch to suuport adb to push multile files/dirs to phone?
> ex:
> adb push a b c d
> note: push file a, b, c to dir d.
>
> Just like Linux Shell.
>
> --wang xingchao
>
> --
> A Linux Kernel Android Developer
>
--
A Linux Kernel Android Developer
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
Index: system/core/adb/commandline.c
===================================================================
--- system/core/adb/commandline.c (revision 67)
+++ system/core/adb/commandline.c (working copy)
@@ -1009,8 +1009,16 @@
}
if(!strcmp(argv[0], "push")) {
- if(argc != 3) return usage();
- return do_sync_push(argv[1], argv[2], 0 /* no verify APK */);
+ int pos = 1, ret;
+ if(argc < 3)
+ return usage();
+ while(pos < argc-1) {
+ ret = do_sync_push(argv[pos], argv[argc-1], 0 /*no verify APK
*/);
+ if (!ret)
+ break;
+ pos++;
+ }
+ return ret;
}
if(!strcmp(argv[0], "pull")) {