Merge change 21763 into donut
* changes: Enable adb forwarding and starting up of monkey server
This commit is contained in:
@@ -45,8 +45,8 @@ import javax.imageio.ImageIO;
|
|||||||
*/
|
*/
|
||||||
public class MonkeyRunner {
|
public class MonkeyRunner {
|
||||||
|
|
||||||
static String monkeyServer = null;
|
static String monkeyServer = "127.0.0.1";
|
||||||
static int monkeyPort;
|
static int monkeyPort = 1080;
|
||||||
static Socket monkeySocket = null;
|
static Socket monkeySocket = null;
|
||||||
|
|
||||||
static IDevice monkeyDevice;
|
static IDevice monkeyDevice;
|
||||||
@@ -62,7 +62,7 @@ public class MonkeyRunner {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
processOptions(args);
|
processOptions(args);
|
||||||
|
|
||||||
initAdbConnection();
|
initAdbConnection();
|
||||||
openMonkeyConnection();
|
openMonkeyConnection();
|
||||||
|
|
||||||
@@ -150,9 +150,13 @@ public class MonkeyRunner {
|
|||||||
monkeyDevice = devices[0];
|
monkeyDevice = devices[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
} finally {
|
monkeyDevice.createForward(monkeyPort, monkeyPort);
|
||||||
}
|
String command = "monkey --port " + monkeyPort;
|
||||||
|
monkeyDevice.executeShellCommand(command, new NullOutputReceiver());
|
||||||
|
|
||||||
|
} catch(IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user