diff --git a/Makefile.am b/Makefile.am
index a2e89c7..b2fcf4c 100644
--- a/Makefile.am
+++ b/Makefile.am
src/shared/crypto.h src/shared/crypto.c \
src/shared/ringbuf.h src/shared/ringbuf.c \
src/shared/tester.h src/shared/tester.c \
- src/shared/hciemu.h src/shared/hciemu.c \
src/shared/hci.h src/shared/hci.c \
src/shared/hfp.h src/shared/hfp.c \
src/shared/uhid.h src/shared/uhid.c \
diff --git a/Makefile.tools b/Makefile.tools
index 8f744fe..d901284 100644
--- a/Makefile.tools
+++ b/Makefile.tools
tools_3dsp_LDADD = src/libshared-mainloop.la
tools_mgmt_tester_SOURCES = tools/mgmt-tester.c monitor/bt.h \
+ emulator/hciemu.h emulator/hciemu.c \
emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c
src/libshared-glib.la @GLIB_LIBS@
tools_l2cap_tester_SOURCES = tools/l2cap-tester.c monitor/bt.h \
+ emulator/hciemu.h emulator/hciemu.c \
emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c
src/libshared-glib.la @GLIB_LIBS@
tools_rfcomm_tester_SOURCES = tools/rfcomm-tester.c monitor/bt.h \
+ emulator/hciemu.h emulator/hciemu.c \
emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c
src/libshared-glib.la @GLIB_LIBS@
tools_smp_tester_SOURCES = tools/smp-tester.c monitor/bt.h \
+ emulator/hciemu.h emulator/hciemu.c \
emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c
src/libshared-glib.la @GLIB_LIBS@
tools_gap_tester_SOURCES = tools/gap-tester.c monitor/bt.h \
+ emulator/hciemu.h emulator/hciemu.c \
emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c
@GLIB_LIBS@ @DBUS_LIBS@
tools_sco_tester_SOURCES = tools/sco-tester.c monitor/bt.h \
+ emulator/hciemu.h emulator/hciemu.c \
emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c
diff --git a/android/Makefile.am b/android/Makefile.am
index 214082c..3e292cf 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
noinst_PROGRAMS += android/android-tester
-android_android_tester_SOURCES = emulator/btdev.h emulator/btdev.c \
+android_android_tester_SOURCES = emulator/hciemu.h emulator/hciemu.c \
+ emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c \
monitor/rfcomm.h \
noinst_PROGRAMS += android/ipc-tester
-android_ipc_tester_SOURCES = emulator/btdev.h emulator/btdev.c \
+android_ipc_tester_SOURCES = emulator/hciemu.h emulator/hciemu.c \
+ emulator/btdev.h emulator/btdev.c \
emulator/bthost.h emulator/bthost.c \
emulator/smp.c \
android/hal-utils.h android/hal-utils.c \
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
index 5ca236a..bc30c86 100644
--- a/android/ipc-tester.c
+++ b/android/ipc-tester.c
#include "src/shared/tester.h"
#include "src/shared/mgmt.h"
-#include "src/shared/hciemu.h"
+#include "emulator/hciemu.h"
#include "hal-msg.h"
#include "ipc-common.h"
diff --git a/android/tester-main.h b/android/tester-main.h
index 8a816ba..6afc553 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
#include "lib/mgmt.h"
#include "src/shared/tester.h"
-#include "src/shared/hciemu.h"
#include "src/shared/mgmt.h"
#include "src/shared/queue.h"
+#include "emulator/hciemu.h"
#include <hardware/hardware.h>
#include <hardware/audio.h>
diff --git a/src/shared/hciemu.c b/emulator/hciemu.c
similarity index 99%
rename from src/shared/hciemu.c
rename to emulator/hciemu.c
index 3892fea..50285e4 100644
--- a/src/shared/hciemu.c
+++ b/emulator/hciemu.c
#include "emulator/bthost.h"
#include "src/shared/util.h"
#include "src/shared/queue.h"
-#include "src/shared/hciemu.h"
+#include "emulator/hciemu.h"
struct hciemu {
int ref_count;
diff --git a/src/shared/hciemu.h b/emulator/hciemu.h
similarity index 100%
rename from src/shared/hciemu.h
rename to emulator/hciemu.h
diff --git a/tools/gap-tester.c b/tools/gap-tester.c
index d788626..2a0be91 100644
--- a/tools/gap-tester.c
+++ b/tools/gap-tester.c
#include <gdbus.h>
#include "src/shared/tester.h"
-#include "src/shared/hciemu.h"
+#include "emulator/hciemu.h"
static DBusConnection *dbus_conn = NULL;
static GDBusClient *dbus_client = NULL;
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index b8b740c..cf0fa38 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
#include "monitor/bt.h"
#include "emulator/bthost.h"
+#include "emulator/hciemu.h"
#include "src/shared/tester.h"
#include "src/shared/mgmt.h"
-#include "src/shared/hciemu.h"
struct test_data {
const void *test_data;
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 912ba6e..7d34ffb 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
#include "monitor/bt.h"
#include "emulator/bthost.h"
+#include "emulator/hciemu.h"
#include "src/shared/util.h"
#include "src/shared/tester.h"
#include "src/shared/mgmt.h"
-#include "src/shared/hciemu.h"
struct test_data {
tester_data_func_t test_setup;
diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c
index 8be6e72..ba324be 100644
--- a/tools/rfcomm-tester.c
+++ b/tools/rfcomm-tester.c
#include "monitor/bt.h"
#include "emulator/bthost.h"
+#include "emulator/hciemu.h"
#include "src/shared/tester.h"
#include "src/shared/mgmt.h"
-#include "src/shared/hciemu.h"
struct test_data {
struct mgmt *mgmt;
diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index 1ad48db..d55d51a 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
#include "monitor/bt.h"
#include "emulator/bthost.h"
+#include "emulator/hciemu.h"
#include "src/shared/tester.h"
#include "src/shared/mgmt.h"
-#include "src/shared/hciemu.h"
struct test_data {
const void *test_data;
diff --git a/tools/smp-tester.c b/tools/smp-tester.c
index a53627e..6ad4cf1 100644
--- a/tools/smp-tester.c
+++ b/tools/smp-tester.c
#include "monitor/bt.h"
#include "emulator/bthost.h"
+#include "emulator/hciemu.h"
#include "src/shared/crypto.h"
#include "src/shared/tester.h"
#include "src/shared/mgmt.h"
-#include "src/shared/hciemu.h"
#define SMP_CID 0x0006