Loading adb/client/commandline.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -1712,14 +1712,21 @@ int adb_commandline(int argc, const char** argv) { } printf("List of devices attached\n"); return adb_query_command(query); } else if (!strcmp(argv[0], "transport-id")) { TransportId transport_id; std::string error; unique_fd fd(adb_connect(&transport_id, "host:features", &error, true)); if (fd == -1) { error_exit("%s", error.c_str()); } else if (!strcmp(argv[0], "connect")) { printf("%" PRIu64 "\n", transport_id); return 0; } else if (!strcmp(argv[0], "connect")) { if (argc != 2) error_exit("usage: adb connect HOST[:PORT]"); std::string query = android::base::StringPrintf("host:connect:%s", argv[1]); return adb_query_command(query); } else if (!strcmp(argv[0], "disconnect")) { } else if (!strcmp(argv[0], "disconnect")) { if (argc > 2) error_exit("usage: adb disconnect [HOST[:PORT]]"); std::string query = android::base::StringPrintf("host:disconnect:%s", Loading adb/coverage/gen_coverage.sh +14 −10 Original line number Diff line number Diff line Loading @@ -17,10 +17,10 @@ LOCAL_SERIAL=$(adb shell getprop ro.serialno) # Check that we can connect to it. adb disconnect adb tcpip $REMOTE_PORT # TODO: Add `adb transport-id` and wait-for-offline on it. sleep 5 TRANSPORT_ID=$(adb transport-id) adb tcpip $REMOTE_PORT adb -t $TRANSPORT_ID wait-for-disconnect adb connect $REMOTE Loading @@ -32,13 +32,16 @@ if [[ "$LOCAL_SERIAL" != "$REMOTE_FETCHED_SERIAL" ]]; then fi # Back to USB, and make sure adbd is root. adb -s $REMOTE usb adb disconnect $REMOTE adb wait-for-device root adb root adb wait-for-device usb adb wait-for-device # TODO: Add `adb transport-id` and wait-for-offline on it. sleep 5 TRANSPORT_ID=$(adb transport-id) adb usb adb -t $TRANSPORT_ID wait-for-disconnect adb wait-for-device Loading @@ -61,10 +64,9 @@ adb shell logcat -c -G128M adb shell setprop persist.adb.trace_mask 1 ### Run test_device.py over USB. TRANSPORT_ID=$(adb transport-id) adb shell killall adbd # TODO: Add `adb transport-id` and wait-for-offline on it. sleep 5 adb -t $TRANSPORT_ID wait-for-disconnect adb wait-for-device shell rm -rf "/data/misc/trace/*" /data/local/tmp/adb_coverage/ "$OUTPUT_DIR"/../test_device.py Loading @@ -80,8 +82,10 @@ echo Waiting for adbd to finish dumping traces sleep 5 # Restart adbd in tcp mode. TRANSPORT_ID=$(adb transport-id) adb tcpip $REMOTE_PORT sleep 5 adb -t $TRANSPORT_ID wait-for-disconnect adb connect $REMOTE adb -s $REMOTE wait-for-device Loading Loading
adb/client/commandline.cpp +11 −4 Original line number Diff line number Diff line Loading @@ -1712,14 +1712,21 @@ int adb_commandline(int argc, const char** argv) { } printf("List of devices attached\n"); return adb_query_command(query); } else if (!strcmp(argv[0], "transport-id")) { TransportId transport_id; std::string error; unique_fd fd(adb_connect(&transport_id, "host:features", &error, true)); if (fd == -1) { error_exit("%s", error.c_str()); } else if (!strcmp(argv[0], "connect")) { printf("%" PRIu64 "\n", transport_id); return 0; } else if (!strcmp(argv[0], "connect")) { if (argc != 2) error_exit("usage: adb connect HOST[:PORT]"); std::string query = android::base::StringPrintf("host:connect:%s", argv[1]); return adb_query_command(query); } else if (!strcmp(argv[0], "disconnect")) { } else if (!strcmp(argv[0], "disconnect")) { if (argc > 2) error_exit("usage: adb disconnect [HOST[:PORT]]"); std::string query = android::base::StringPrintf("host:disconnect:%s", Loading
adb/coverage/gen_coverage.sh +14 −10 Original line number Diff line number Diff line Loading @@ -17,10 +17,10 @@ LOCAL_SERIAL=$(adb shell getprop ro.serialno) # Check that we can connect to it. adb disconnect adb tcpip $REMOTE_PORT # TODO: Add `adb transport-id` and wait-for-offline on it. sleep 5 TRANSPORT_ID=$(adb transport-id) adb tcpip $REMOTE_PORT adb -t $TRANSPORT_ID wait-for-disconnect adb connect $REMOTE Loading @@ -32,13 +32,16 @@ if [[ "$LOCAL_SERIAL" != "$REMOTE_FETCHED_SERIAL" ]]; then fi # Back to USB, and make sure adbd is root. adb -s $REMOTE usb adb disconnect $REMOTE adb wait-for-device root adb root adb wait-for-device usb adb wait-for-device # TODO: Add `adb transport-id` and wait-for-offline on it. sleep 5 TRANSPORT_ID=$(adb transport-id) adb usb adb -t $TRANSPORT_ID wait-for-disconnect adb wait-for-device Loading @@ -61,10 +64,9 @@ adb shell logcat -c -G128M adb shell setprop persist.adb.trace_mask 1 ### Run test_device.py over USB. TRANSPORT_ID=$(adb transport-id) adb shell killall adbd # TODO: Add `adb transport-id` and wait-for-offline on it. sleep 5 adb -t $TRANSPORT_ID wait-for-disconnect adb wait-for-device shell rm -rf "/data/misc/trace/*" /data/local/tmp/adb_coverage/ "$OUTPUT_DIR"/../test_device.py Loading @@ -80,8 +82,10 @@ echo Waiting for adbd to finish dumping traces sleep 5 # Restart adbd in tcp mode. TRANSPORT_ID=$(adb transport-id) adb tcpip $REMOTE_PORT sleep 5 adb -t $TRANSPORT_ID wait-for-disconnect adb connect $REMOTE adb -s $REMOTE wait-for-device Loading