diff --git a/include/hardware/qemu_pipe.h b/include/hardware/qemu_pipe.h
index 570af70..930228e 100644
--- a/include/hardware/qemu_pipe.h
+++ b/include/hardware/qemu_pipe.h
@@ -20,8 +20,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <hardware/qemud.h>
-#include <hardware/qemu_pipe.h>
 #include <pthread.h>  /* for pthread_once() */
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/include/hardware/qemud.h b/include/hardware/qemud.h
index 874a32f..5c39f9c 100644
--- a/include/hardware/qemud.h
+++ b/include/hardware/qemud.h
@@ -18,10 +18,12 @@
 #define ANDROID_INCLUDE_HARDWARE_QEMUD_H
 
 #include <cutils/sockets.h>
+#include "qemu_pipe.h"
 
 /* the following is helper code that is used by the QEMU-specific
  * hardware HAL modules to communicate with the emulator program
- * through the 'qemud' multiplexing daemon.
+ * through the 'qemud' multiplexing daemon, or through the qemud
+ * pipe.
  *
  * see the documentation comments for details in
  * development/emulator/qemud/qemud.c
@@ -64,30 +66,37 @@
     int  fd;
     int  namelen = strlen(name);
     char answer[2];
+    char pipe_name[256];
 
-    /* connect to qemud control socket */
-    fd = socket_local_client( "qemud",
-                              ANDROID_SOCKET_NAMESPACE_RESERVED,
-                              SOCK_STREAM );
+    /* First, try to connect to the pipe. */
+    snprintf(pipe_name, sizeof(pipe_name), "qemud:%s", name);
+    fd = qemu_pipe_open(pipe_name);
     if (fd < 0) {
-        D("no qemud control socket: %s", strerror(errno));
-        return -1;
-    }
+        D("QEMUD pipe is not available for %s: %s", name, strerror(errno));
+        /* If pipe is not available, connect to qemud control socket */
+        fd = socket_local_client( "qemud",
+                                  ANDROID_SOCKET_NAMESPACE_RESERVED,
+                                  SOCK_STREAM );
+        if (fd < 0) {
+            D("no qemud control socket: %s", strerror(errno));
+            return -1;
+        }
 
-    /* send service name to connect */
-    if (qemud_fd_write(fd, name, namelen) != namelen) {
-        D("can't send service name to qemud: %s",
-           strerror(errno));
-        close(fd);
-        return -1;
-    }
+        /* send service name to connect */
+        if (qemud_fd_write(fd, name, namelen) != namelen) {
+            D("can't send service name to qemud: %s",
+               strerror(errno));
+            close(fd);
+            return -1;
+        }
 
-    /* read answer from daemon */
-    if (qemud_fd_read(fd, answer, 2) != 2 ||
-        answer[0] != 'O' || answer[1] != 'K') {
-        D("cant' connect to %s service through qemud", name);
-        close(fd);
-        return -1;
+        /* read answer from daemon */
+        if (qemud_fd_read(fd, answer, 2) != 2 ||
+            answer[0] != 'O' || answer[1] != 'K') {
+            D("cant' connect to %s service through qemud", name);
+            close(fd);
+            return -1;
+        }
     }
     return fd;
 }
