diff --git a/test/se/vidstige/jadb/test/fakes/AdbResponder.java b/test/se/vidstige/jadb/test/fakes/AdbResponder.java index 84890a2..1884ae4 100644 --- a/test/se/vidstige/jadb/test/fakes/AdbResponder.java +++ b/test/se/vidstige/jadb/test/fakes/AdbResponder.java @@ -33,11 +33,18 @@ public class AdbResponder implements Runnable { String command = new String(buffer, Charset.forName("utf-8")); System.out.println("Command: " + command); - if ("host.devices".equals(command)) { + if ("host:version".equals(command)) { + output.write("OKAY"); + } + else if ("host:devices".equals(command)) { output.write("OKAY"); send(output, "X\tdevice\nY\tdevice"); } - output.write("FAIL"); + else + { + output.write("FAIL"); + } + output.flush(); } catch (IOException e) { } @@ -50,6 +57,5 @@ public class AdbResponder implements Runnable { public void send(OutputStreamWriter writer, String response) throws IOException { writer.write(getCommandLength(response)); writer.write(response); - writer.flush(); } } diff --git a/test/se/vidstige/jadb/test/fakes/AdbServer.java b/test/se/vidstige/jadb/test/fakes/AdbServer.java index f897fd3..c36350d 100644 --- a/test/se/vidstige/jadb/test/fakes/AdbServer.java +++ b/test/se/vidstige/jadb/test/fakes/AdbServer.java @@ -9,6 +9,7 @@ import java.net.ServerSocket; import java.net.Socket; import java.nio.charset.Charset; +// >set ANDROID_ADB_SERVER_PORT=15037 public class AdbServer implements Runnable { private int port = 15037;