Starting the ADR-Server
Posted by brownm04 on 2012-04-28 20:05
Anything besides port 10737 is the incorrect port and the wrong connection. The problem is that the adr-server is never started and never opens the socket on 10737. If you're connecting to the general ports (5XXX ish range), you're only connecting to the general adb bridge and not the adr-server. Anything sent over this socket will likely not return anything. What we need to do is when we get a device in the capture tool we need to start the adr-server. From the ADRApplication.java file you can see the general idea,
This uses the IDevice for the emulator and executes a command. Further down, when connecting to the device, it calls
If you execute a similar idea just when the capture tool starts you should be able to start the adr-server, open the connection, then open the socket.
void RunADBCommand() throws Exception {
boolean[] result = new boolean[1];
if (currentDevice.isOnline()) {
currentDevice.executeShellCommand(adbCommand, new BooleanResultReader(result));
}
}
This uses the IDevice for the emulator and executes a command. Further down, when connecting to the device, it calls
adbCommand = "am startservice -n edu.umd.cs.guitar/.Server -e AUT " + MAIN_CLASS;
RunADBCommand();
If you execute a similar idea just when the capture tool starts you should be able to start the adr-server, open the connection, then open the socket.
Home / Developer API / Tour / Get a Project - Solutions for Bug & Issue Tracking, Collaboration Tools, Subversion Hosting, Git Hosting
Androidguitar is powered by Assembla.
6 Comments
By highvoltage81 on 2012-04-29 01:18
When we tried calling connect() right when the capture tool was initialized, an exception was thrown on the
line. Right now I put back the call to connect() in the start() method of ADRCapture (which initializes the capture tool, an instance of ADRCaptureFrame that takes in an IChimpDevice). This has been committed, and I will post a jar of this to assembla
By highvoltage81 on 2012-04-29 01:20
By highvoltage81 on 2012-04-29 01:22
By brownm04 on 2012-04-29 01:40
By matthew.green on 2012-04-29 01:47
By matthew.green on 2012-04-29 01:52