~ubuntu-branches/ubuntu/trusty/android-tools/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/enable-emulator.patch

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-10-28 13:17:07 UTC
  • Revision ID: package-import@ubuntu.com-20131028131707-97dyr65a21avc4cl
Tags: 4.2.2+git20130218-3ubuntu17
* Patch adbd to provide commented out qemu_pipe launch path.
* Update android-tool-adbd.upstart job to launch adbd under qemu
  emulator.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: enable emulator check
 
2
Author: Dmitrijs Ledkovs <xnox@ubuntu.com>
 
3
 
 
4
--- android-tools-4.2.2+git20130218.orig/core/adbd/transport_local.c
 
5
+++ android-tools-4.2.2+git20130218/core/adbd/transport_local.c
 
6
@@ -309,15 +309,16 @@ void local_init(int port)
 
7
 #else
 
8
         /* For the adbd daemon in the system image we need to distinguish
 
9
          * between the device, and the emulator. */
 
10
-        char is_qemu[PROPERTY_VALUE_MAX];
 
11
+        //char is_qemu[PROPERTY_VALUE_MAX];
 
12
         //property_get("ro.kernel.qemu", is_qemu, "");
 
13
         //if (!strcmp(is_qemu, "1")) {
 
14
+        if (access("/dev/qemu_pipe", R_OK|W_OK) != -1) {
 
15
             /* Running inside the emulator: use QEMUD pipe as the transport. */
 
16
-        //    func = qemu_socket_thread;
 
17
-        //} else {
 
18
+            func = qemu_socket_thread;
 
19
+        } else {
 
20
             /* Running inside the device: use TCP socket as the transport. */
 
21
             func = server_socket_thread;
 
22
-            //}
 
23
+        }
 
24
 #endif // !ADB_HOST
 
25
     }
 
26