summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2014-06-18 16:03:22 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-23 16:33:30 +0100
commit072294657bd3c6a9ac58cbb7351198a00c489613 (patch)
treead62a939a7deb426126d858147214a930f50a832 /include
parent2d2141145538d9d1879fc991d0ec669922b7ce1f (diff)
android_adb: add Android ADB backend
The Android adbd daemon running inside Android VMs on the emulator expect to be able to talk to a backend named "qemud:adb" (for historical reasons). The backend will carry out a handshake: 1. Listen for connections from the host adb server on adb_port = <5555 + (2 * emulator instance id)>. 2. Connect to the local adb server on port 5037 if it's available. 3. Listen for and accept the beginning of the handshake with the adbd daemon (adbd sends 'accept' over the write). 4. After the adb backend detects a connection on <adb_port>, it sends back an "ok" string to adbd. 5. The adb backend will not send any more data over the pipe until it recognizes a 'start' request, which means the adbd is ready to receive data from the host ADB server. Once the above process is complete, the adb backend will consume everything it receives on the socket connected on <adb_port> and send it over the adb pipe and will consume everything it receives over the adb pipe and send it on the socket connected on <adb_port>. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> [AJB: Bunch of clean-up/re-factoring to GIOChannel code] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/misc/android_pipe.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/misc/android_pipe.h b/include/hw/misc/android_pipe.h
index 3d1665c20..962f2e96b 100644
--- a/include/hw/misc/android_pipe.h
+++ b/include/hw/misc/android_pipe.h
@@ -221,5 +221,8 @@ extern void android_zero_pipe_init(void);
extern void android_pingpong_init(void);
extern void android_throttle_init(void);
extern void android_adb_dbg_backend_init(void);
+extern void android_adb_backend_init(void);
+
+extern bool adb_server_init(int port);
#endif /* _HW_ANDROID_PIPE_H */