Lines Matching refs:buf

229     char buf[4096];
234 len = adb_read(fd, buf, 4096);
244 fwrite(buf, 1, len, stdout);
251 char* buf = (char*) malloc(BUFSIZE);
257 len = adb_read(inFd, buf, BUFSIZE);
270 adb_write(outFd, buf, len);
274 free(buf);
280 unsigned char buf[1024];
292 r = unix_read(fdi, buf, 1024);
300 switch(buf[n]) {
322 r = adb_write(fd, buf, r);
377 char buf[4096];
382 sprintf(buf,"%s:%d", service, sz);
383 fd = adb_connect(buf);
418 if(readx(fd, buf, 4)){
423 if(memcmp(buf, "OKAY", 4)) {
424 buf[4] = 0;
425 fprintf(stderr,"* error response '%s' *\n", buf);
608 static int send_shellcommand(transport_type transport, char* serial, char* buf)
613 fd = adb_connect(buf);
631 char buf[4096];
639 snprintf(buf, sizeof(buf),
646 strncat(buf, " -v long", sizeof(buf)-1);
656 strncat(buf, " ", sizeof(buf)-1);
657 strncat(buf, quoted, sizeof(buf)-1);
661 send_shellcommand(transport, serial, buf);
685 char buf[4096];
718 snprintf(buf, sizeof(buf), "backup");
720 strncat(buf, ":", sizeof(buf) - strlen(buf) - 1);
721 strncat(buf, argv[0], sizeof(buf) - strlen(buf) - 1);
724 D("backup. filename=%s buf=%s\n", filename, buf);
725 fd = adb_connect(buf);
911 char buf[4096];
1030 snprintf(buf, sizeof buf, "host:%s%s", argv[0], listopt);
1031 tmp = adb_query(buf);
1047 snprintf(buf, sizeof buf, "host:connect:%s", argv[1]);
1048 tmp = adb_query(buf);
1064 snprintf(buf, sizeof buf, "host:disconnect:%s", argv[1]);
1066 snprintf(buf, sizeof buf, "host:disconnect:");
1068 tmp = adb_query(buf);
1102 snprintf(buf, sizeof buf, "shell:%s", argv[1]);
1106 strcat(buf, " ");
1111 strcat(buf, "\"");
1112 strcat(buf, *argv++);
1114 strcat(buf, "\"");
1118 D("interactive shell loop. buff=%s\n", buf);
1119 fd = adb_connect(buf);
1206 format_host_command(buf, sizeof buf, service, ttype, serial);
1208 if (adb_command(buf)) {
1228 snprintf(buf, sizeof buf, "host-serial:%s:forward:%s;%s",serial, argv[1], argv[2]);
1230 snprintf(buf, sizeof buf, "host-usb:forward:%s;%s", argv[1], argv[2]);
1232 snprintf(buf, sizeof buf, "host-local:forward:%s;%s", argv[1], argv[2]);
1234 snprintf(buf, sizeof buf, "host:forward:%s;%s", argv[1], argv[2]);
1236 if(adb_command(buf)) {
1317 format_host_command(buf, sizeof buf, argv[0], ttype, serial);
1318 tmp = adb_query(buf);
1455 char buf[4096];
1457 snprintf(buf, sizeof(buf), "shell:pm");
1464 strncat(buf, " ", sizeof(buf)-1);
1465 strncat(buf, quoted, sizeof(buf)-1);
1469 send_shellcommand(transport, serial, buf);
1493 char buf[4096];
1496 snprintf(buf, sizeof(buf), "shell:rm ");
1498 strncat(buf, quoted, sizeof(buf)-1);
1501 send_shellcommand(transport, serial, buf);