1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*
* =====================================================================================
*
* Filename: push.c
* Description: Push file to "/sdcard/" and the filename not be changed
* Version: 1.0
* Created: 2014/3/4 10:46:56
* Revision: none
* Compiler: gcc
* Author: Sumit.lc (), sulinke1133@gmail.com
*
* =====================================================================================
*/
#include <stdio.h>
#include <libgen.h>
int main ( int argc, char *argv[] )
{
char total[256]={0};
sprintf(total, "%s%s %s%s", "adb push ",argv[1],"/sdcard/",basename(argv[1]) );
printf ( "Waiting for device online...n" );
system("adb wait-for-device");
system(total);
return 0;
}
|