Rename bt_bdaddr_t into RawAddress (3/3)

Test: compilation test
Change-Id: I4571721a0c6165a66450ee157a53d8d15bfc45d0
diff --git a/bta/ag/bta_ag_act.cc b/bta/ag/bta_ag_act.cc
index ec5261c..ff4cb87 100644
--- a/bta/ag/bta_ag_act.cc
+++ b/bta/ag/bta_ag_act.cc
@@ -181,7 +181,7 @@
  *
  ******************************************************************************/
 void bta_ag_start_open(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data) {
-  bt_bdaddr_t pending_bd_addr;
+  RawAddress pending_bd_addr;
 
   /* store parameters */
   if (p_data) {
@@ -501,7 +501,7 @@
   uint16_t lcid;
   int i;
   tBTA_AG_SCB *ag_scb, *other_scb;
-  bt_bdaddr_t dev_addr;
+  RawAddress dev_addr;
   int status;
 
   /* set role */
diff --git a/bta/ag/bta_ag_api.cc b/bta/ag/bta_ag_api.cc
index f88ce9a..4c0e285 100644
--- a/bta/ag/bta_ag_api.cc
+++ b/bta/ag/bta_ag_api.cc
@@ -155,7 +155,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_AgOpen(uint16_t handle, const bt_bdaddr_t& bd_addr, tBTA_SEC sec_mask,
+void BTA_AgOpen(uint16_t handle, const RawAddress& bd_addr, tBTA_SEC sec_mask,
                 tBTA_SERVICE_MASK services) {
   tBTA_AG_API_OPEN* p_buf =
       (tBTA_AG_API_OPEN*)osi_malloc(sizeof(tBTA_AG_API_OPEN));
diff --git a/bta/ag/bta_ag_int.h b/bta/ag/bta_ag_int.h
index dbe26dd..3ebf369 100644
--- a/bta/ag/bta_ag_int.h
+++ b/bta/ag/bta_ag_int.h
@@ -154,7 +154,7 @@
 /* data type for BTA_AG_API_OPEN_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_SERVICE_MASK services;
   tBTA_SEC sec_mask;
 } tBTA_AG_API_OPEN;
@@ -225,7 +225,7 @@
   char clip[BTA_AG_AT_MAX_LEN + 1];     /* number string used for CLIP */
   uint16_t serv_handle[BTA_AG_NUM_IDX]; /* RFCOMM server handles */
   tBTA_AG_AT_CB at_cb;                  /* AT command interpreter */
-  bt_bdaddr_t peer_addr;                /* peer bd address */
+  RawAddress peer_addr;                 /* peer bd address */
   tSDP_DISCOVERY_DB* p_disc_db;         /* pointer to discovery database */
   tBTA_SERVICE_MASK reg_services;       /* services specified in register API */
   tBTA_SERVICE_MASK open_services;      /* services specified in open API */
@@ -323,7 +323,7 @@
 extern uint16_t bta_ag_scb_to_idx(tBTA_AG_SCB* p_scb);
 extern tBTA_AG_SCB* bta_ag_scb_by_idx(uint16_t idx);
 extern uint8_t bta_ag_service_to_idx(tBTA_SERVICE_MASK services);
-extern uint16_t bta_ag_idx_by_bdaddr(const bt_bdaddr_t* peer_addr);
+extern uint16_t bta_ag_idx_by_bdaddr(const RawAddress* peer_addr);
 extern bool bta_ag_other_scb_open(tBTA_AG_SCB* p_curr_scb);
 extern bool bta_ag_scb_open(tBTA_AG_SCB* p_curr_scb);
 extern tBTA_AG_SCB* bta_ag_get_other_idle_scb(tBTA_AG_SCB* p_curr_scb);
@@ -331,8 +331,7 @@
                               tBTA_AG_DATA* p_data);
 extern bool bta_ag_hdl_event(BT_HDR* p_msg);
 extern void bta_ag_collision_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                                   uint8_t app_id,
-                                   const bt_bdaddr_t* peer_addr);
+                                   uint8_t app_id, const RawAddress* peer_addr);
 extern void bta_ag_resume_open(tBTA_AG_SCB* p_scb);
 
 /* SDP functions */
diff --git a/bta/ag/bta_ag_main.cc b/bta/ag/bta_ag_main.cc
index d36c072..ae38817 100644
--- a/bta/ag/bta_ag_main.cc
+++ b/bta/ag/bta_ag_main.cc
@@ -393,7 +393,7 @@
  * Returns          Index of SCB or zero if none found.
  *
  ******************************************************************************/
-uint16_t bta_ag_idx_by_bdaddr(const bt_bdaddr_t* peer_addr) {
+uint16_t bta_ag_idx_by_bdaddr(const RawAddress* peer_addr) {
   tBTA_AG_SCB* p_scb = &bta_ag_cb.scb[0];
   uint16_t i;
 
@@ -512,7 +512,7 @@
  ******************************************************************************/
 void bta_ag_collision_cback(UNUSED_ATTR tBTA_SYS_CONN_STATUS status, uint8_t id,
                             UNUSED_ATTR uint8_t app_id,
-                            const bt_bdaddr_t* peer_addr) {
+                            const RawAddress* peer_addr) {
   uint16_t handle;
   tBTA_AG_SCB* p_scb;
 
diff --git a/bta/ar/bta_ar.cc b/bta/ar/bta_ar.cc
index 6b6e822..3b93e97 100644
--- a/bta/ar/bta_ar.cc
+++ b/bta/ar/bta_ar.cc
@@ -73,7 +73,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_ar_avdt_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_ar_avdt_cback(uint8_t handle, const RawAddress* bd_addr,
                               uint8_t event, tAVDT_CTRL* p_data) {
   /* route the AVDT registration callback to av or avk */
   if (bta_ar_cb.p_av_conn_cback)
@@ -153,7 +153,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const bt_bdaddr_t& bd_addr) {
+void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const RawAddress& bd_addr) {
   uint8_t event = BTA_AR_AVDT_CONN_EVT;
   tAVDT_CTRL data;
 
diff --git a/bta/av/bta_av_aact.cc b/bta/av/bta_av_aact.cc
index 7a8d049..d8eb192 100644
--- a/bta/av/bta_av_aact.cc
+++ b/bta/av/bta_av_aact.cc
@@ -201,24 +201,24 @@
     0                          /* AVDT_DELAY_REPORT_CFM_EVT */
 };
 
-static void bta_av_stream0_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream0_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data);
-static void bta_av_stream1_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream1_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data);
 #if BTA_AV_NUM_STRS > 2
-static void bta_av_stream2_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream2_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data);
 #endif
 #if BTA_AV_NUM_STRS > 3
-static void bta_av_stream3_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream3_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data);
 #endif
 #if BTA_AV_NUM_STRS > 4
-static void bta_av_stream4_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream4_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data);
 #endif
 #if BTA_AV_NUM_STRS > 5
-static void bta_av_stream5_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream5_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data);
 #endif
 /* the array of callback functions to receive events from AVDT control channel
@@ -291,7 +291,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_av_save_addr(tBTA_AV_SCB* p_scb, const bt_bdaddr_t& b) {
+static void bta_av_save_addr(tBTA_AV_SCB* p_scb, const RawAddress& b) {
   APPL_TRACE_DEBUG("%s: r:%d, s:%d", __func__, p_scb->recfg_sup,
                    p_scb->suspend_sup);
   if (p_scb->peer_addr != b) {
@@ -416,7 +416,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_av_proc_stream_evt(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_proc_stream_evt(uint8_t handle, const RawAddress* bd_addr,
                                    uint8_t event, tAVDT_CTRL* p_data,
                                    int index) {
   uint16_t sec_len = 0;
@@ -601,7 +601,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_av_stream0_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream0_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data) {
   APPL_TRACE_VERBOSE("%s: avdt_handle: %d event=0x%x", __func__, handle, event);
   bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 0);
@@ -616,7 +616,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_av_stream1_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream1_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data) {
   APPL_TRACE_EVENT("%s: avdt_handle: %d event=0x%x", __func__, handle, event);
   bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 1);
@@ -632,7 +632,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_av_stream2_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream2_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data) {
   APPL_TRACE_EVENT("%s: avdt_handle: %d event=0x%x", __func__, handle, event);
   bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 2);
@@ -649,7 +649,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_av_stream3_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream3_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data) {
   APPL_TRACE_EVENT("%s: avdt_handle: %d event=0x%x", __func__, handle, event);
   bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 3);
@@ -666,7 +666,7 @@
  *
  ******************************************************************************/
 #if BTA_AV_NUM_STRS > 4
-static void bta_av_stream4_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream4_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data) {
   APPL_TRACE_EVENT("%s: avdt_handle: %d event=0x%x", __func__, handle, event);
   bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 4);
@@ -683,7 +683,7 @@
  *
  ******************************************************************************/
 #if BTA_AV_NUM_STRS > 5
-static void bta_av_stream5_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+static void bta_av_stream5_cback(uint8_t handle, const RawAddress* bd_addr,
                                  uint8_t event, tAVDT_CTRL* p_data) {
   APPL_TRACE_EVENT("%s: avdt_handle: %d event=0x%x", __func__, handle, event);
   bta_av_proc_stream_evt(handle, bd_addr, event, p_data, 5);
@@ -2748,7 +2748,7 @@
     if (btif_storage_get_stored_remote_name(p_scb->peer_addr, remote_name)) {
       if (interop_match_name(INTEROP_DISABLE_AVDTP_RECONFIGURE, remote_name) ||
           interop_match_addr(INTEROP_DISABLE_AVDTP_RECONFIGURE,
-                             (const bt_bdaddr_t*)&p_scb->peer_addr)) {
+                             (const RawAddress*)&p_scb->peer_addr)) {
         VLOG(1) << __func__ << ": disable AVDTP RECONFIGURE: interop matched "
                                "name "
                 << remote_name << " address " << p_scb->peer_addr;
diff --git a/bta/av/bta_av_act.cc b/bta/av/bta_av_act.cc
index 63ed337..2bdedbc 100644
--- a/bta/av/bta_av_act.cc
+++ b/bta/av/bta_av_act.cc
@@ -206,7 +206,7 @@
  ******************************************************************************/
 static void bta_av_rc_ctrl_cback(uint8_t handle, uint8_t event,
                                  UNUSED_ATTR uint16_t result,
-                                 const bt_bdaddr_t* peer_addr) {
+                                 const RawAddress* peer_addr) {
   uint16_t msg_event = 0;
 
   APPL_TRACE_EVENT("%s handle: %d event=0x%x", __func__, handle, event);
@@ -306,7 +306,7 @@
 uint8_t bta_av_rc_create(tBTA_AV_CB* p_cb, uint8_t role, uint8_t shdl,
                          uint8_t lidx) {
   tAVRC_CONN_CB ccb;
-  bt_bdaddr_t bda = bd_addr_any;
+  RawAddress bda = bd_addr_any;
   uint8_t status = BTA_AV_RC_ROLE_ACP;
   tBTA_AV_SCB* p_scb = p_cb->p_scb[shdl - 1];
   int i;
@@ -437,7 +437,7 @@
  * Returns          NULL, if not found.
  *
  ******************************************************************************/
-tBTA_AV_LCB* bta_av_find_lcb(const bt_bdaddr_t& addr, uint8_t op) {
+tBTA_AV_LCB* bta_av_find_lcb(const RawAddress& addr, uint8_t op) {
   tBTA_AV_CB* p_cb = &bta_av_cb;
   int xx;
   uint8_t mask;
@@ -1979,7 +1979,7 @@
                           ATTR_ID_SUPPORTED_FEATURES};
   uint8_t hdi;
   tBTA_AV_SCB* p_scb;
-  bt_bdaddr_t* p_addr = NULL;
+  RawAddress* p_addr = NULL;
   uint8_t rc_handle;
 
   APPL_TRACE_DEBUG("bta_av_rc_disc 0x%x, %d", disc, bta_av_cb.disc);
diff --git a/bta/av/bta_av_api.cc b/bta/av/bta_av_api.cc
index 728ba43..82ed10c 100644
--- a/bta/av/bta_av_api.cc
+++ b/bta/av/bta_av_api.cc
@@ -151,7 +151,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_AvOpen(const bt_bdaddr_t& bd_addr, tBTA_AV_HNDL handle, bool use_rc,
+void BTA_AvOpen(const RawAddress& bd_addr, tBTA_AV_HNDL handle, bool use_rc,
                 tBTA_SEC sec_mask, uint16_t uuid) {
   tBTA_AV_API_OPEN* p_buf =
       (tBTA_AV_API_OPEN*)osi_malloc(sizeof(tBTA_AV_API_OPEN));
@@ -194,7 +194,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_AvDisconnect(const bt_bdaddr_t& bd_addr) {
+void BTA_AvDisconnect(const RawAddress& bd_addr) {
   tBTA_AV_API_DISCNT* p_buf =
       (tBTA_AV_API_DISCNT*)osi_malloc(sizeof(tBTA_AV_API_DISCNT));
 
diff --git a/bta/av/bta_av_int.h b/bta/av/bta_av_int.h
index ef64eb6..c145759 100644
--- a/bta/av/bta_av_int.h
+++ b/bta/av/bta_av_int.h
@@ -161,7 +161,7 @@
                                 tAVDT_CFG* p_cfg);
 typedef void (*tBTA_AV_CO_DISC_RES)(tBTA_AV_HNDL hndl, uint8_t num_seps,
                                     uint8_t num_snk, uint8_t num_src,
-                                    const bt_bdaddr_t& addr,
+                                    const RawAddress& addr,
                                     uint16_t uuid_local);
 typedef tA2DP_STATUS (*tBTA_AV_CO_GETCFG)(tBTA_AV_HNDL hndl,
                                           uint8_t* p_codec_info,
@@ -170,7 +170,7 @@
                                           uint8_t* p_protect_info);
 typedef void (*tBTA_AV_CO_SETCFG)(tBTA_AV_HNDL hndl,
                                   const uint8_t* p_codec_info, uint8_t seid,
-                                  const bt_bdaddr_t& addr, uint8_t num_protect,
+                                  const RawAddress& addr, uint8_t num_protect,
                                   const uint8_t* p_protect_info,
                                   uint8_t t_local_sep, uint8_t avdt_handle);
 typedef void (*tBTA_AV_CO_OPEN)(tBTA_AV_HNDL hndl, uint16_t mtu);
@@ -225,7 +225,7 @@
 /* data type for BTA_AV_API_OPEN_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool use_rc;
   tBTA_SEC sec_mask;
   tBTA_AV_RS_RES switch_res;
@@ -243,7 +243,7 @@
 /* data type for BTA_AV_API_DISCONNECT_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tBTA_AV_API_DISCNT;
 
 /* data type for BTA_AV_API_PROTECT_REQ_EVT */
@@ -317,7 +317,7 @@
   BT_HDR hdr;
   tAVDT_CFG cfg;   /* configuration/capabilities parameters */
   tAVDT_CTRL msg;  /* AVDTP callback message parameters */
-  bt_bdaddr_t bd_addr; /* bd address */
+  RawAddress bd_addr; /* bd address */
   uint8_t handle;
   uint8_t avdt_event;
   bool initiator; /* true, if local device initiates the SUSPEND */
@@ -335,14 +335,14 @@
 /* data type for BTA_AV_AVRC_OPEN_EVT, BTA_AV_AVRC_CLOSE_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   uint8_t handle;
 } tBTA_AV_RC_CONN_CHG;
 
 /* data type for BTA_AV_CONN_CHG_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   bool is_up;
 } tBTA_AV_CONN_CHG;
 
@@ -454,7 +454,7 @@
   tAVDT_SEP_INFO sep_info[BTA_AV_NUM_SEPS]; /* stream discovery results */
   tAVDT_CFG cfg;                            /* local SEP configuration */
   alarm_t* avrc_ct_timer;                   /* delay timer for AVRC CT */
-  bt_bdaddr_t peer_addr;                    /* peer BD address */
+  RawAddress peer_addr;                     /* peer BD address */
   uint16_t l2c_cid;                         /* L2CAP channel ID */
   uint16_t stream_mtu;                      /* MTU of stream */
   uint16_t avdt_version;      /* the avdt version of peer device */
@@ -523,7 +523,7 @@
 
 /* type for AV ACL Link control block */
 typedef struct {
-  bt_bdaddr_t addr; /* peer BD address */
+  RawAddress addr;  /* peer BD address */
   uint8_t conn_msk; /* handle mask of connected stream handle */
   uint8_t lidx;     /* index + 1 */
 } tBTA_AV_LCB;
@@ -596,7 +596,7 @@
 extern bool bta_av_chk_start(tBTA_AV_SCB* p_scb);
 extern void bta_av_restore_switch(void);
 extern uint16_t bta_av_chk_mtu(tBTA_AV_SCB* p_scb, uint16_t mtu);
-extern void bta_av_conn_cback(uint8_t handle, const bt_bdaddr_t* bd_addr,
+extern void bta_av_conn_cback(uint8_t handle, const RawAddress* bd_addr,
                               uint8_t event, tAVDT_CTRL* p_data);
 extern uint8_t bta_av_rc_create(tBTA_AV_CB* p_cb, uint8_t role, uint8_t shdl,
                                 uint8_t lidx);
@@ -606,7 +606,7 @@
 extern void bta_av_set_scb_sst_init(tBTA_AV_SCB* p_scb);
 extern bool bta_av_is_scb_init(tBTA_AV_SCB* p_scb);
 extern void bta_av_set_scb_sst_incoming(tBTA_AV_SCB* p_scb);
-extern tBTA_AV_LCB* bta_av_find_lcb(const bt_bdaddr_t& addr, uint8_t op);
+extern tBTA_AV_LCB* bta_av_find_lcb(const RawAddress& addr, uint8_t op);
 
 /* main functions */
 extern void bta_av_api_deregister(tBTA_AV_DATA* p_data);
diff --git a/bta/av/bta_av_main.cc b/bta/av/bta_av_main.cc
index d85957b..b53ef6f 100644
--- a/bta/av/bta_av_main.cc
+++ b/bta/av/bta_av_main.cc
@@ -167,9 +167,9 @@
 static void bta_av_api_to_ssm(tBTA_AV_DATA* p_data);
 
 static void bta_av_sco_chg_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                                 uint8_t app_id, const bt_bdaddr_t* peer_addr);
+                                 uint8_t app_id, const RawAddress* peer_addr);
 static void bta_av_sys_rs_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                                uint8_t app_id, const bt_bdaddr_t* peer_addr);
+                                uint8_t app_id, const RawAddress* peer_addr);
 
 /* action functions */
 const tBTA_AV_NSM_ACT bta_av_nsm_act[] = {
@@ -255,7 +255,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static tBTA_AV_SCB* bta_av_addr_to_scb(const bt_bdaddr_t& bd_addr) {
+static tBTA_AV_SCB* bta_av_addr_to_scb(const RawAddress& bd_addr) {
   tBTA_AV_SCB* p_scb = NULL;
   int xx;
 
@@ -343,7 +343,7 @@
 
 /*******************************************************************************
  ******************************************************************************/
-void bta_av_conn_cback(UNUSED_ATTR uint8_t handle, const bt_bdaddr_t* bd_addr,
+void bta_av_conn_cback(UNUSED_ATTR uint8_t handle, const RawAddress* bd_addr,
                        uint8_t event, tAVDT_CTRL* p_data) {
   uint16_t evt = 0;
   tBTA_AV_SCB* p_scb = NULL;
@@ -834,7 +834,7 @@
  ******************************************************************************/
 static void bta_av_sys_rs_cback(UNUSED_ATTR tBTA_SYS_CONN_STATUS status,
                                 uint8_t id, uint8_t app_id,
-                                const bt_bdaddr_t* peer_addr) {
+                                const RawAddress* peer_addr) {
   int i;
   tBTA_AV_SCB* p_scb = NULL;
   uint8_t cur_role;
@@ -912,7 +912,7 @@
  ******************************************************************************/
 static void bta_av_sco_chg_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
                                  UNUSED_ATTR uint8_t app_id,
-                                 UNUSED_ATTR const bt_bdaddr_t* peer_addr) {
+                                 UNUSED_ATTR const RawAddress* peer_addr) {
   tBTA_AV_SCB* p_scb;
   int i;
   tBTA_AV_API_STOP stop;
diff --git a/bta/dm/bta_dm_act.cc b/bta/dm/bta_dm_act.cc
index e85753c..3388df6 100644
--- a/bta/dm/bta_dm_act.cc
+++ b/bta/dm/bta_dm_act.cc
@@ -55,31 +55,31 @@
 static void bta_dm_inq_results_cb(tBTM_INQ_RESULTS* p_inq, uint8_t* p_eir,
                                   uint16_t eir_len);
 static void bta_dm_inq_cmpl_cb(void* p_result);
-static void bta_dm_service_search_remname_cback(const bt_bdaddr_t& bd_addr,
+static void bta_dm_service_search_remname_cback(const RawAddress& bd_addr,
                                                 DEV_CLASS dc, BD_NAME bd_name);
 static void bta_dm_remname_cback(tBTM_REMOTE_DEV_NAME* p_remote_name);
-static void bta_dm_find_services(const bt_bdaddr_t& bd_addr);
+static void bta_dm_find_services(const RawAddress& bd_addr);
 static void bta_dm_discover_next_device(void);
 static void bta_dm_sdp_callback(uint16_t sdp_status);
-static uint8_t bta_dm_authorize_cback(const bt_bdaddr_t& bd_addr,
+static uint8_t bta_dm_authorize_cback(const RawAddress& bd_addr,
                                       DEV_CLASS dev_class, BD_NAME bd_name,
                                       uint8_t* service_name, uint8_t service_id,
                                       bool is_originator);
-static uint8_t bta_dm_pin_cback(const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class,
+static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                 BD_NAME bd_name, bool min_16_digit);
-static uint8_t bta_dm_new_link_key_cback(const bt_bdaddr_t& bd_addr,
+static uint8_t bta_dm_new_link_key_cback(const RawAddress& bd_addr,
                                          DEV_CLASS dev_class, BD_NAME bd_name,
                                          LINK_KEY key, uint8_t key_type);
-static uint8_t bta_dm_authentication_complete_cback(const bt_bdaddr_t& bd_addr,
+static uint8_t bta_dm_authentication_complete_cback(const RawAddress& bd_addr,
                                                     DEV_CLASS dev_class,
                                                     BD_NAME bd_name,
                                                     int result);
-static void bta_dm_local_name_cback(const bt_bdaddr_t& bd_addr);
+static void bta_dm_local_name_cback(const RawAddress& bd_addr);
 static bool bta_dm_check_av(uint16_t event);
 static void bta_dm_bl_change_cback(tBTM_BL_EVENT_DATA* p_data);
 
 static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                                uint8_t app_id, const bt_bdaddr_t* peer_addr);
+                                uint8_t app_id, const RawAddress* peer_addr);
 
 /* Extended Inquiry Response */
 #if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
@@ -95,25 +95,25 @@
 static void bta_dm_search_timer_cback(void* data);
 static void bta_dm_disable_conn_down_timer_cback(void* data);
 static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                            uint8_t app_id, const bt_bdaddr_t* peer_addr);
+                            uint8_t app_id, const RawAddress* peer_addr);
 static void bta_dm_adjust_roles(bool delay_role_switch);
 static char* bta_dm_get_remname(void);
 static void bta_dm_bond_cancel_complete_cback(tBTM_STATUS result);
 
-static bool bta_dm_read_remote_device_name(const bt_bdaddr_t& bd_addr,
+static bool bta_dm_read_remote_device_name(const RawAddress& bd_addr,
                                            tBT_TRANSPORT transport);
-static void bta_dm_discover_device(const bt_bdaddr_t& remote_bd_addr);
+static void bta_dm_discover_device(const RawAddress& remote_bd_addr);
 
 static void bta_dm_sys_hw_cback(tBTA_SYS_HW_EVT status);
 static void bta_dm_disable_search_and_disc(void);
 
-static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const bt_bdaddr_t& bda,
+static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
                                     tBTM_LE_EVT_DATA* p_data);
 static void bta_dm_ble_id_key_cback(uint8_t key_type,
                                     tBTM_BLE_LOCAL_KEYS* p_key);
 static void bta_dm_gattc_register(void);
-static void btm_dm_start_gatt_discovery(const bt_bdaddr_t& bd_addr);
-static void bta_dm_cancel_gatt_discovery(const bt_bdaddr_t& bd_addr);
+static void btm_dm_start_gatt_discovery(const RawAddress& bd_addr);
+static void bta_dm_cancel_gatt_discovery(const RawAddress& bd_addr);
 static void bta_dm_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC* p_data);
 extern tBTA_DM_CONTRL_STATE bta_dm_pm_obtain_controller_state(void);
 
@@ -146,8 +146,8 @@
 #define BTA_DM_SWITCH_DELAY_TIMER_MS 500
 #endif
 
-static void bta_dm_reset_sec_dev_pending(const bt_bdaddr_t& remote_bd_addr);
-static void bta_dm_remove_sec_dev_entry(const bt_bdaddr_t& remote_bd_addr);
+static void bta_dm_reset_sec_dev_pending(const RawAddress& remote_bd_addr);
+static void bta_dm_remove_sec_dev_entry(const RawAddress& remote_bd_addr);
 static void bta_dm_observe_results_cb(tBTM_INQ_RESULTS* p_inq, uint8_t* p_eir,
                                       uint16_t eir_len);
 static void bta_dm_observe_cmpl_cb(void* p_result);
@@ -659,7 +659,7 @@
  * Description      Removes device, Disconnects ACL link if required.
  ***
  ******************************************************************************/
-void bta_dm_process_remove_device(const bt_bdaddr_t& bd_addr) {
+void bta_dm_process_remove_device(const RawAddress& bd_addr) {
   /* need to remove all pending background connection before unpair */
   BTA_GATTC_CancelOpen(0, bd_addr, false);
 
@@ -690,7 +690,7 @@
   bool continue_delete_other_dev = false;
   if (p_dev == NULL) return;
 
-  bt_bdaddr_t other_address = p_dev->bd_addr;
+  RawAddress other_address = p_dev->bd_addr;
 
   /* If ACL exists for the device in the remove_bond message*/
   bool continue_delete_dev = false;
@@ -989,7 +989,7 @@
  *
  ******************************************************************************/
 static void bta_dm_policy_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                                uint8_t app_id, const bt_bdaddr_t* peer_addr) {
+                                uint8_t app_id, const RawAddress* peer_addr) {
   tBTA_DM_PEER_DEVICE* p_dev = NULL;
   uint16_t policy = app_id;
   uint32_t mask = (uint32_t)(1 << id);
@@ -1352,7 +1352,7 @@
  * Returns          true if started to get remote name
  *
  ******************************************************************************/
-static bool bta_dm_read_remote_device_name(const bt_bdaddr_t& bd_addr,
+static bool bta_dm_read_remote_device_name(const RawAddress& bd_addr,
                                            tBT_TRANSPORT transport) {
   tBTM_STATUS btm_status;
 
@@ -1912,7 +1912,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_find_services(const bt_bdaddr_t& bd_addr) {
+static void bta_dm_find_services(const RawAddress& bd_addr) {
   tSDP_UUID uuid;
 
   memset(&uuid, 0, sizeof(tSDP_UUID));
@@ -2062,7 +2062,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_discover_device(const bt_bdaddr_t& remote_bd_addr) {
+static void bta_dm_discover_device(const RawAddress& remote_bd_addr) {
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
   if (bta_dm_search_cb.transport == BTA_TRANSPORT_UNKNOWN) {
     tBT_DEVICE_TYPE dev_type;
@@ -2286,7 +2286,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_service_search_remname_cback(const bt_bdaddr_t& bd_addr,
+static void bta_dm_service_search_remname_cback(const RawAddress& bd_addr,
                                                 UNUSED_ATTR DEV_CLASS dc,
                                                 BD_NAME bd_name) {
   tBTM_REMOTE_DEV_NAME rem_name;
@@ -2369,7 +2369,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static uint8_t bta_dm_authorize_cback(const bt_bdaddr_t& bd_addr,
+static uint8_t bta_dm_authorize_cback(const RawAddress& bd_addr,
                                       DEV_CLASS dev_class, BD_NAME bd_name,
                                       UNUSED_ATTR uint8_t* service_name,
                                       uint8_t service_id,
@@ -2476,7 +2476,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static uint8_t bta_dm_pin_cback(const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class,
+static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                 BD_NAME bd_name, bool min_16_digit) {
   tBTA_DM_SEC sec_event;
 
@@ -2514,7 +2514,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static uint8_t bta_dm_new_link_key_cback(const bt_bdaddr_t& bd_addr,
+static uint8_t bta_dm_new_link_key_cback(const RawAddress& bd_addr,
                                          UNUSED_ATTR DEV_CLASS dev_class,
                                          BD_NAME bd_name, LINK_KEY key,
                                          uint8_t key_type) {
@@ -2569,8 +2569,8 @@
  *
  ******************************************************************************/
 static uint8_t bta_dm_authentication_complete_cback(
-    const bt_bdaddr_t& bd_addr, UNUSED_ATTR DEV_CLASS dev_class,
-    BD_NAME bd_name, int result) {
+    const RawAddress& bd_addr, UNUSED_ATTR DEV_CLASS dev_class, BD_NAME bd_name,
+    int result) {
   tBTA_DM_SEC sec_event;
 
   if (result != BTM_SUCCESS) {
@@ -2768,7 +2768,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_local_name_cback(UNUSED_ATTR const bt_bdaddr_t& p_name) {
+static void bta_dm_local_name_cback(UNUSED_ATTR const RawAddress& p_name) {
   tBTA_DM_SEC sec_event;
 
   sec_event.enable.status = BTA_SUCCESS;
@@ -2909,7 +2909,7 @@
   uint8_t* p;
   tBTA_DM_SEC conn;
   bool is_new = p_data->acl_change.is_new;
-  const bt_bdaddr_t& p_bda = p_data->acl_change.bd_addr;
+  const RawAddress& p_bda = p_data->acl_change.bd_addr;
   bool need_policy_change = false;
   bool issue_unpair_cb = false;
 
@@ -3143,7 +3143,7 @@
  *
  ******************************************************************************/
 static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                            uint8_t app_id, const bt_bdaddr_t* peer_addr) {
+                            uint8_t app_id, const RawAddress* peer_addr) {
   uint8_t j;
   tBTA_PREF_ROLES role;
   tBTA_DM_PEER_DEVICE* p_dev;
@@ -3220,7 +3220,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_reset_sec_dev_pending(const bt_bdaddr_t& remote_bd_addr) {
+static void bta_dm_reset_sec_dev_pending(const RawAddress& remote_bd_addr) {
   for (size_t i = 0; i < bta_dm_cb.device_list.count; i++) {
     if (bta_dm_cb.device_list.peer_device[i].peer_bdaddr == remote_bd_addr) {
       bta_dm_cb.device_list.peer_device[i].remove_dev_pending = false;
@@ -3242,7 +3242,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_remove_sec_dev_entry(const bt_bdaddr_t& remote_bd_addr) {
+static void bta_dm_remove_sec_dev_entry(const RawAddress& remote_bd_addr) {
   if (BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_LE) ||
       BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_BR_EDR)) {
     APPL_TRACE_DEBUG(
@@ -3809,7 +3809,7 @@
  * Returns         None
  *
  ******************************************************************************/
-void bta_dm_encrypt_cback(const bt_bdaddr_t* bd_addr, tBT_TRANSPORT transport,
+void bta_dm_encrypt_cback(const RawAddress* bd_addr, tBT_TRANSPORT transport,
                           UNUSED_ATTR void* p_ref_data, tBTM_STATUS result) {
   tBTA_STATUS bta_status = BTA_SUCCESS;
   tBTA_DM_ENCRYPT_CBACK* p_callback = NULL;
@@ -3893,7 +3893,7 @@
   }
 }
 
-bool bta_dm_check_if_only_hd_connected(const bt_bdaddr_t& peer_addr) {
+bool bta_dm_check_if_only_hd_connected(const RawAddress& peer_addr) {
   APPL_TRACE_DEBUG("%s: count(%d)", __func__, bta_dm_conn_srvcs.count);
 
   for (uint8_t j = 0; j < bta_dm_conn_srvcs.count; j++) {
@@ -3991,7 +3991,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const bt_bdaddr_t& bda,
+static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
                                     tBTM_LE_EVT_DATA* p_data) {
   tBTM_STATUS status = BTM_SUCCESS;
   tBTA_DM_SEC sec_event;
@@ -4601,7 +4601,7 @@
  * Parameters:
  *
  ******************************************************************************/
-void btm_dm_start_gatt_discovery(const bt_bdaddr_t& bd_addr) {
+void btm_dm_start_gatt_discovery(const RawAddress& bd_addr) {
   bta_dm_search_cb.gatt_disc_active = true;
 
   /* connection is already open */
@@ -4630,7 +4630,7 @@
  * Parameters:
  *
  ******************************************************************************/
-static void bta_dm_cancel_gatt_discovery(const bt_bdaddr_t& bd_addr) {
+static void bta_dm_cancel_gatt_discovery(const RawAddress& bd_addr) {
   if (bta_dm_search_cb.conn_id == BTA_GATT_INVALID_CONN_ID) {
     BTA_GATTC_CancelOpen(bta_dm_search_cb.client_if, bd_addr, true);
   }
diff --git a/bta/dm/bta_dm_api.cc b/bta/dm/bta_dm_api.cc
index 8bc69e1..c06de60 100644
--- a/bta/dm/bta_dm_api.cc
+++ b/bta/dm/bta_dm_api.cc
@@ -235,7 +235,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmDiscover(const bt_bdaddr_t& bd_addr, tBTA_SERVICE_MASK services,
+void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_SERVICE_MASK services,
                     tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search) {
   tBTA_DM_API_DISCOVER* p_msg =
       (tBTA_DM_API_DISCOVER*)osi_calloc(sizeof(tBTA_DM_API_DISCOVER));
@@ -260,7 +260,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmDiscoverUUID(const bt_bdaddr_t& bd_addr, tSDP_UUID* uuid,
+void BTA_DmDiscoverUUID(const RawAddress& bd_addr, tSDP_UUID* uuid,
                         tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search) {
   tBTA_DM_API_DISCOVER* p_msg =
       (tBTA_DM_API_DISCOVER*)osi_malloc(sizeof(tBTA_DM_API_DISCOVER));
@@ -290,7 +290,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBond(const bt_bdaddr_t& bd_addr) {
+void BTA_DmBond(const RawAddress& bd_addr) {
   tBTA_DM_API_BOND* p_msg =
       (tBTA_DM_API_BOND*)osi_malloc(sizeof(tBTA_DM_API_BOND));
 
@@ -312,7 +312,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBondByTransport(const bt_bdaddr_t& bd_addr,
+void BTA_DmBondByTransport(const RawAddress& bd_addr,
                            tBTA_TRANSPORT transport) {
   tBTA_DM_API_BOND* p_msg =
       (tBTA_DM_API_BOND*)osi_malloc(sizeof(tBTA_DM_API_BOND));
@@ -335,7 +335,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBondCancel(const bt_bdaddr_t& bd_addr) {
+void BTA_DmBondCancel(const RawAddress& bd_addr) {
   tBTA_DM_API_BOND_CANCEL* p_msg =
       (tBTA_DM_API_BOND_CANCEL*)osi_malloc(sizeof(tBTA_DM_API_BOND_CANCEL));
 
@@ -356,7 +356,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmPinReply(const bt_bdaddr_t& bd_addr, bool accept, uint8_t pin_len,
+void BTA_DmPinReply(const RawAddress& bd_addr, bool accept, uint8_t pin_len,
                     uint8_t* p_pin)
 
 {
@@ -405,7 +405,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmConfirm(const bt_bdaddr_t& bd_addr, bool accept) {
+void BTA_DmConfirm(const RawAddress& bd_addr, bool accept) {
   tBTA_DM_API_CONFIRM* p_msg =
       (tBTA_DM_API_CONFIRM*)osi_malloc(sizeof(tBTA_DM_API_CONFIRM));
 
@@ -427,7 +427,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmAddDevice(const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class,
+void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                      LINK_KEY link_key, tBTA_SERVICE_MASK trusted_mask,
                      bool is_trusted, uint8_t key_type, tBTA_IO_CAP io_cap,
                      uint8_t pin_length) {
@@ -471,7 +471,7 @@
  * Returns          void
  *
  ******************************************************************************/
-tBTA_STATUS BTA_DmRemoveDevice(const bt_bdaddr_t& bd_addr) {
+tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr) {
   tBTA_DM_API_REMOVE_DEVICE* p_msg =
       (tBTA_DM_API_REMOVE_DEVICE*)osi_calloc(sizeof(tBTA_DM_API_REMOVE_DEVICE));
 
@@ -537,7 +537,7 @@
  * Returns          0 if the device is NOT connected.
  *
  ******************************************************************************/
-uint16_t BTA_DmGetConnectionState(const bt_bdaddr_t& bd_addr) {
+uint16_t BTA_DmGetConnectionState(const RawAddress& bd_addr) {
   tBTA_DM_PEER_DEVICE* p_dev = bta_dm_find_peer_device(bd_addr);
   return (p_dev && p_dev->conn_state == BTA_DM_CONNECTED);
 }
@@ -613,7 +613,7 @@
  *                  BTA_FAIL if operation failed.
  *
  ******************************************************************************/
-void BTA_DmAddBleKey(const bt_bdaddr_t& bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
+void BTA_DmAddBleKey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
                      tBTA_LE_KEY_TYPE key_type) {
   tBTA_DM_API_ADD_BLEKEY* p_msg =
       (tBTA_DM_API_ADD_BLEKEY*)osi_calloc(sizeof(tBTA_DM_API_ADD_BLEKEY));
@@ -641,7 +641,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmAddBleDevice(const bt_bdaddr_t& bd_addr, tBLE_ADDR_TYPE addr_type,
+void BTA_DmAddBleDevice(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                         tBT_DEVICE_TYPE dev_type) {
   tBTA_DM_API_ADD_BLE_DEVICE* p_msg = (tBTA_DM_API_ADD_BLE_DEVICE*)osi_calloc(
       sizeof(tBTA_DM_API_ADD_BLE_DEVICE));
@@ -668,7 +668,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBlePasskeyReply(const bt_bdaddr_t& bd_addr, bool accept,
+void BTA_DmBlePasskeyReply(const RawAddress& bd_addr, bool accept,
                            uint32_t passkey) {
   tBTA_DM_API_PASSKEY_REPLY* p_msg =
       (tBTA_DM_API_PASSKEY_REPLY*)osi_calloc(sizeof(tBTA_DM_API_PASSKEY_REPLY));
@@ -695,7 +695,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBleConfirmReply(const bt_bdaddr_t& bd_addr, bool accept) {
+void BTA_DmBleConfirmReply(const RawAddress& bd_addr, bool accept) {
   tBTA_DM_API_CONFIRM* p_msg =
       (tBTA_DM_API_CONFIRM*)osi_calloc(sizeof(tBTA_DM_API_CONFIRM));
 
@@ -718,7 +718,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBleSecurityGrant(const bt_bdaddr_t& bd_addr,
+void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
                             tBTA_DM_BLE_SEC_GRANT res) {
   tBTA_DM_API_BLE_SEC_GRANT* p_msg =
       (tBTA_DM_API_BLE_SEC_GRANT*)osi_calloc(sizeof(tBTA_DM_API_BLE_SEC_GRANT));
@@ -749,7 +749,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmSetBlePrefConnParams(const bt_bdaddr_t& bd_addr,
+void BTA_DmSetBlePrefConnParams(const RawAddress& bd_addr,
                                 uint16_t min_conn_int, uint16_t max_conn_int,
                                 uint16_t slave_latency,
                                 uint16_t supervision_tout) {
@@ -810,7 +810,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_discover_send_msg(const bt_bdaddr_t& bd_addr,
+static void bta_dm_discover_send_msg(const RawAddress& bd_addr,
                                      tBTA_SERVICE_MASK_EXT* p_services,
                                      tBTA_DM_SEARCH_CBACK* p_cback,
                                      bool sdp_search,
@@ -855,7 +855,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmDiscoverByTransport(const bt_bdaddr_t& bd_addr,
+void BTA_DmDiscoverByTransport(const RawAddress& bd_addr,
                                tBTA_SERVICE_MASK_EXT* p_services,
                                tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search,
                                tBTA_TRANSPORT transport) {
@@ -877,7 +877,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmDiscoverExt(const bt_bdaddr_t& bd_addr,
+void BTA_DmDiscoverExt(const RawAddress& bd_addr,
                        tBTA_SERVICE_MASK_EXT* p_services,
                        tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search) {
   bta_dm_discover_send_msg(bd_addr, p_services, p_cback, sdp_search,
@@ -950,9 +950,9 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBleUpdateConnectionParam(const bt_bdaddr_t& bd_addr,
-                                    uint16_t min_int, uint16_t max_int,
-                                    uint16_t latency, uint16_t timeout) {
+void BTA_DmBleUpdateConnectionParam(const RawAddress& bd_addr, uint16_t min_int,
+                                    uint16_t max_int, uint16_t latency,
+                                    uint16_t timeout) {
   tBTA_DM_API_UPDATE_CONN_PARAM* p_msg =
       (tBTA_DM_API_UPDATE_CONN_PARAM*)osi_calloc(
           sizeof(tBTA_DM_API_UPDATE_CONN_PARAM));
@@ -1033,7 +1033,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmBleUpdateConnectionParams(const bt_bdaddr_t& bd_addr,
+void BTA_DmBleUpdateConnectionParams(const RawAddress& bd_addr,
                                      uint16_t min_int, uint16_t max_int,
                                      uint16_t latency, uint16_t timeout) {
   tBTA_DM_API_UPDATE_CONN_PARAM* p_msg =
@@ -1060,7 +1060,7 @@
  *
  *
  ******************************************************************************/
-void BTA_DmBleSetDataLength(const bt_bdaddr_t& remote_device,
+void BTA_DmBleSetDataLength(const RawAddress& remote_device,
                             uint16_t tx_data_length) {
   tBTA_DM_API_BLE_SET_DATA_LENGTH* p_msg =
       (tBTA_DM_API_BLE_SET_DATA_LENGTH*)osi_malloc(
@@ -1095,7 +1095,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmSetEncryption(const bt_bdaddr_t& bd_addr, tBTA_TRANSPORT transport,
+void BTA_DmSetEncryption(const RawAddress& bd_addr, tBTA_TRANSPORT transport,
                          tBTA_DM_ENCRYPT_CBACK* p_callback,
                          tBTA_DM_BLE_SEC_ACT sec_act) {
   tBTA_DM_API_SET_ENCRYPTION* p_msg = (tBTA_DM_API_SET_ENCRYPTION*)osi_calloc(
@@ -1125,7 +1125,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_DmCloseACL(const bt_bdaddr_t& bd_addr, bool remove_dev,
+void BTA_DmCloseACL(const RawAddress& bd_addr, bool remove_dev,
                     tBTA_TRANSPORT transport) {
   tBTA_DM_API_REMOVE_ACL* p_msg =
       (tBTA_DM_API_REMOVE_ACL*)osi_calloc(sizeof(tBTA_DM_API_REMOVE_ACL));
diff --git a/bta/dm/bta_dm_ci.cc b/bta/dm/bta_dm_ci.cc
index 64e18e7..7ff9da2 100644
--- a/bta/dm/bta_dm_ci.cc
+++ b/bta/dm/bta_dm_ci.cc
@@ -40,7 +40,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_dm_ci_io_req(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP io_cap,
+void bta_dm_ci_io_req(const RawAddress& bd_addr, tBTA_IO_CAP io_cap,
                       tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req)
 
 {
@@ -67,7 +67,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_dm_ci_rmt_oob(bool accept, const bt_bdaddr_t& bd_addr, BT_OCTET16 c,
+void bta_dm_ci_rmt_oob(bool accept, const RawAddress& bd_addr, BT_OCTET16 c,
                        BT_OCTET16 r) {
   tBTA_DM_CI_RMT_OOB* p_msg =
       (tBTA_DM_CI_RMT_OOB*)osi_malloc(sizeof(tBTA_DM_CI_RMT_OOB));
diff --git a/bta/dm/bta_dm_int.h b/bta/dm/bta_dm_int.h
index b410eb6..12a4074 100644
--- a/bta/dm/bta_dm_int.h
+++ b/bta/dm/bta_dm_int.h
@@ -157,7 +157,7 @@
 /* data type for BTA_DM_API_DISCOVER_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_SERVICE_MASK services;
   tBTA_DM_SEARCH_CBACK* p_cback;
   bool sdp_search;
@@ -170,7 +170,7 @@
 /* data type for BTA_DM_API_DI_DISC_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_DISCOVERY_DB* p_sdp_db;
   uint32_t len;
   tBTA_DM_SEARCH_CBACK* p_cback;
@@ -179,21 +179,21 @@
 /* data type for BTA_DM_API_BOND_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_TRANSPORT transport;
 } tBTA_DM_API_BOND;
 
 /* data type for BTA_DM_API_BOND_CANCEL_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_TRANSPORT transport;
 } tBTA_DM_API_BOND_CANCEL;
 
 /* data type for BTA_DM_API_PIN_REPLY_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool accept;
   uint8_t pin_len;
   uint8_t p_pin[PIN_CODE_LEN];
@@ -205,14 +205,14 @@
 /* data type for BTA_DM_API_CONFIRM_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool accept;
 } tBTA_DM_API_CONFIRM;
 
 /* data type for BTA_DM_CI_IO_REQ_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_IO_CAP io_cap;
   tBTA_OOB_DATA oob_data;
   tBTA_AUTH_REQ auth_req;
@@ -221,7 +221,7 @@
 /* data type for BTA_DM_CI_RMT_OOB_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   BT_OCTET16 c;
   BT_OCTET16 r;
   bool accept;
@@ -259,7 +259,7 @@
   uint8_t busy_level_flags;
   bool is_new;
   uint8_t new_role;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t hci_status;
   uint16_t handle;
   tBT_TRANSPORT transport;
@@ -268,7 +268,7 @@
 /* data type for BTA_DM_PM_BTM_STATUS_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTM_PM_STATUS status;
   uint16_t value;
   uint8_t hci_status;
@@ -278,14 +278,14 @@
 /* data type for BTA_DM_PM_TIMER_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_DM_PM_ACTION pm_request;
 } tBTA_DM_PM_TIMER;
 
 /* data type for BTA_DM_API_ADD_DEVICE_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   DEV_CLASS dc;
   LINK_KEY link_key;
   tBTA_SERVICE_MASK tm;
@@ -303,7 +303,7 @@
 /* data type for BTA_DM_API_REMOVE_ACL_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tBTA_DM_API_REMOVE_DEVICE;
 
 /* data type for BTA_DM_API_EXECUTE_CBACK_EVT */
@@ -319,12 +319,12 @@
   tBTA_TRANSPORT transport;
   tBTA_DM_ENCRYPT_CBACK* p_callback;
   tBTA_DM_BLE_SEC_ACT sec_act;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tBTA_DM_API_SET_ENCRYPTION;
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_LE_KEY_VALUE blekey;
   tBTA_LE_KEY_TYPE key_type;
 
@@ -332,7 +332,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBT_DEVICE_TYPE dev_type;
   tBLE_ADDR_TYPE addr_type;
 
@@ -340,21 +340,21 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool accept;
   uint32_t passkey;
 } tBTA_DM_API_PASSKEY_REPLY;
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_DM_BLE_SEC_GRANT res;
 } tBTA_DM_API_BLE_SEC_GRANT;
 
 /* set prefered BLE connection parameters for a device */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t peer_bda;
+  RawAddress peer_bda;
   uint16_t conn_int_min;
   uint16_t conn_int_max;
   uint16_t supervision_tout;
@@ -364,7 +364,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t peer_bda;
+  RawAddress peer_bda;
   bool privacy_enable;
 
 } tBTA_DM_API_ENABLE_PRIVACY;
@@ -401,7 +401,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   uint16_t tx_data_length;
 } tBTA_DM_API_BLE_SET_DATA_LENGTH;
 
@@ -421,7 +421,7 @@
 /* data type for BTA_DM_API_REMOVE_ACL_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool remove_dev;
   tBTA_TRANSPORT transport;
 } tBTA_DM_API_REMOVE_ACL;
@@ -434,7 +434,7 @@
 } tBTA_DM_API_REMOVE_ALL_ACL;
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t min_int;
   uint16_t max_int;
   uint16_t latency;
@@ -535,7 +535,7 @@
 typedef uint8_t tBTA_DM_PM_REQ;
 
 typedef struct {
-  bt_bdaddr_t peer_bdaddr;
+  RawAddress peer_bdaddr;
   uint16_t link_policy;
   tBTA_DM_CONN_STATE conn_state;
   tBTA_PREF_ROLES pref_role;
@@ -561,7 +561,7 @@
 } tBTA_DM_ACTIVE_LINK;
 
 typedef struct {
-  bt_bdaddr_t peer_bdaddr;
+  RawAddress peer_bdaddr;
   tBTA_SYS_ID id;
   uint8_t app_id;
   tBTA_SYS_CONN_STATUS state;
@@ -594,7 +594,7 @@
   uint8_t pm_action[BTA_DM_PM_MODE_TIMER_MAX];
   uint8_t active; /* number of active timer */
 
-  bt_bdaddr_t peer_bdaddr;
+  RawAddress peer_bdaddr;
   bool in_use;
 } tBTA_PM_TIMER;
 
@@ -631,7 +631,7 @@
   uint16_t inquiry_scan_window;
 
   /* Storage for pin code request parameters */
-  bt_bdaddr_t pin_bd_addr;
+  RawAddress pin_bd_addr;
   DEV_CLASS pin_dev_class;
   tBTA_DM_SEC_EVT pin_evt;
   uint32_t num_val; /* the numeric value for comparison. If just_works, do not
@@ -660,7 +660,7 @@
   tBTA_SERVICE_MASK services_found;
   tSDP_DISCOVERY_DB* p_sdp_db;
   uint16_t state;
-  bt_bdaddr_t peer_bdaddr;
+  RawAddress peer_bdaddr;
   bool name_discover_done;
   BD_NAME peer_name;
   alarm_t* search_timer;
@@ -685,8 +685,7 @@
   uint32_t ble_raw_size;
   uint32_t ble_raw_used;
   alarm_t* gatt_close_timer; /* GATT channel close delay timer */
-  bt_bdaddr_t
-      pending_close_bda; /* pending GATT channel remote device address */
+  RawAddress pending_close_bda; /* pending GATT channel remote device address */
 
 } tBTA_DM_SEARCH_CB;
 
@@ -862,7 +861,7 @@
 extern void bta_dm_search_cancel_transac_cmpl(tBTA_DM_MSG* p_data);
 extern void bta_dm_disc_rmt_name(tBTA_DM_MSG* p_data);
 extern tBTA_DM_PEER_DEVICE* bta_dm_find_peer_device(
-    const bt_bdaddr_t& peer_addr);
+    const RawAddress& peer_addr);
 
 void bta_dm_eir_update_uuid(uint16_t uuid16, bool adding);
 
diff --git a/bta/dm/bta_dm_pm.cc b/bta/dm/bta_dm_pm.cc
index daeb0d7..ffb5d58 100644
--- a/bta/dm/bta_dm_pm.cc
+++ b/bta/dm/bta_dm_pm.cc
@@ -36,15 +36,15 @@
 extern fixed_queue_t* btu_bta_alarm_queue;
 
 static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                            uint8_t app_id, const bt_bdaddr_t& peer_addr);
-static void bta_dm_pm_set_mode(const bt_bdaddr_t& peer_addr,
+                            uint8_t app_id, const RawAddress& peer_addr);
+static void bta_dm_pm_set_mode(const RawAddress& peer_addr,
                                tBTA_DM_PM_ACTION pm_mode,
                                tBTA_DM_PM_REQ pm_req);
 static void bta_dm_pm_timer_cback(void* data);
-static void bta_dm_pm_btm_cback(const bt_bdaddr_t& bd_addr,
+static void bta_dm_pm_btm_cback(const RawAddress& bd_addr,
                                 tBTM_PM_STATUS status, uint16_t value,
                                 uint8_t hci_status);
-static bool bta_dm_pm_park(const bt_bdaddr_t& peer_addr);
+static bool bta_dm_pm_park(const RawAddress& peer_addr);
 static bool bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index);
 static bool bta_dm_pm_is_sco_active();
 static int bta_dm_get_sco_index();
@@ -61,7 +61,7 @@
  * can use it */
 #define BTA_DM_PM_SSR_HH BTA_DM_PM_SSR1
 #endif
-static void bta_dm_pm_ssr(const bt_bdaddr_t& peer_addr);
+static void bta_dm_pm_ssr(const RawAddress& peer_addr);
 #endif
 
 tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs;
@@ -150,7 +150,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_pm_stop_timer(const bt_bdaddr_t& peer_addr) {
+static void bta_dm_pm_stop_timer(const RawAddress& peer_addr) {
   APPL_TRACE_DEBUG("%s: ", __func__);
 
   for (int i = 0; i < BTA_DM_NUM_PM_TIMER; i++) {
@@ -207,7 +207,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_pm_stop_timer_by_mode(const bt_bdaddr_t& peer_addr,
+static void bta_dm_pm_stop_timer_by_mode(const RawAddress& peer_addr,
                                          uint8_t power_mode) {
   const uint8_t timer_idx = bta_pm_action_to_timer_idx(power_mode);
   if (timer_idx == BTA_DM_PM_MODE_TIMER_MAX) return;
@@ -240,7 +240,7 @@
  * Returns          index of the power mode delay timer
  *
  ******************************************************************************/
-static void bta_dm_pm_stop_timer_by_srvc_id(const bt_bdaddr_t& peer_addr,
+static void bta_dm_pm_stop_timer_by_srvc_id(const RawAddress& peer_addr,
                                             uint8_t srvc_id) {
   for (int i = 0; i < BTA_DM_NUM_PM_TIMER; i++) {
     if (bta_dm_cb.pm_timer[i].in_use &&
@@ -321,7 +321,7 @@
  *
  ******************************************************************************/
 static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                            uint8_t app_id, const bt_bdaddr_t& peer_addr) {
+                            uint8_t app_id, const RawAddress& peer_addr) {
   uint8_t i, j;
   uint8_t* p = NULL;
   tBTA_DM_PEER_DEVICE* p_dev;
@@ -488,7 +488,7 @@
  *
  ******************************************************************************/
 
-static void bta_dm_pm_set_mode(const bt_bdaddr_t& peer_addr,
+static void bta_dm_pm_set_mode(const RawAddress& peer_addr,
                                tBTA_DM_PM_ACTION pm_request,
                                tBTA_DM_PM_REQ pm_req) {
   tBTA_DM_PM_ACTION pm_action = BTA_DM_PM_NO_ACTION;
@@ -656,7 +656,7 @@
  * Returns          true if park attempted, false otherwise.
  *
  ******************************************************************************/
-static bool bta_dm_pm_park(const bt_bdaddr_t& peer_addr) {
+static bool bta_dm_pm_park(const RawAddress& peer_addr) {
   tBTM_PM_MODE mode = BTM_PM_STS_ACTIVE;
 
   /* if not in park mode, switch to park */
@@ -747,7 +747,7 @@
  *
  ******************************************************************************/
 #if (BTM_SSR_INCLUDED == TRUE)
-static void bta_dm_pm_ssr(const bt_bdaddr_t& peer_addr) {
+static void bta_dm_pm_ssr(const RawAddress& peer_addr) {
   tBTA_DM_SSR_SPEC *p_spec, *p_spec_cur;
   uint8_t i, j;
   int ssr = BTA_DM_PM_SSR0;
@@ -825,7 +825,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_dm_pm_active(const bt_bdaddr_t& peer_addr) {
+void bta_dm_pm_active(const RawAddress& peer_addr) {
   tBTM_PM_PWR_MD pm;
 
   memset((void*)&pm, 0, sizeof(pm));
@@ -845,7 +845,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_dm_pm_btm_cback(const bt_bdaddr_t& bd_addr,
+static void bta_dm_pm_btm_cback(const RawAddress& bd_addr,
                                 tBTM_PM_STATUS status, uint16_t value,
                                 uint8_t hci_status) {
   tBTA_DM_PM_BTM_STATUS* p_buf =
@@ -1027,7 +1027,7 @@
  * Returns          tBTA_DM_PEER_DEVICE
  *
  ******************************************************************************/
-tBTA_DM_PEER_DEVICE* bta_dm_find_peer_device(const bt_bdaddr_t& peer_addr) {
+tBTA_DM_PEER_DEVICE* bta_dm_find_peer_device(const RawAddress& peer_addr) {
   tBTA_DM_PEER_DEVICE* p_dev = NULL;
 
   for (int i = 0; i < bta_dm_cb.device_list.count; i++) {
diff --git a/bta/gatt/bta_gattc_act.cc b/bta/gatt/bta_gattc_act.cc
index 27b72c0..c5051ec 100644
--- a/bta/gatt/bta_gattc_act.cc
+++ b/bta/gatt/bta_gattc_act.cc
@@ -47,7 +47,7 @@
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
-static void bta_gattc_conn_cback(tGATT_IF gattc_if, const bt_bdaddr_t& bda,
+static void bta_gattc_conn_cback(tGATT_IF gattc_if, const RawAddress& bda,
                                  uint16_t conn_id, bool connected,
                                  tGATT_DISCONN_REASON reason,
                                  tBT_TRANSPORT transport);
@@ -60,7 +60,7 @@
                                    tGATT_CL_COMPLETE* p_data);
 
 static void bta_gattc_deregister_cmpl(tBTA_GATTC_RCB* p_clreg);
-static void bta_gattc_enc_cmpl_cback(tGATT_IF gattc_if, const bt_bdaddr_t& bda);
+static void bta_gattc_enc_cmpl_cback(tGATT_IF gattc_if, const RawAddress& bda);
 static void bta_gattc_cong_cback(uint16_t conn_id, bool congested);
 static void bta_gattc_phy_update_cback(tGATT_IF gatt_if, uint16_t conn_id,
                                        uint8_t tx_phy, uint8_t rx_phy,
@@ -325,7 +325,7 @@
 }
 
 /** process encryption complete message */
-void bta_gattc_process_enc_cmpl(tGATT_IF client_if, const bt_bdaddr_t& bda) {
+void bta_gattc_process_enc_cmpl(tGATT_IF client_if, const RawAddress& bda) {
   tBTA_GATTC_RCB* p_clreg;
   tBTA_GATTC cb_data;
 
@@ -1315,7 +1315,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_gattc_conn_cback(tGATT_IF gattc_if, const bt_bdaddr_t& bdaddr,
+static void bta_gattc_conn_cback(tGATT_IF gattc_if, const RawAddress& bdaddr,
                                  uint16_t conn_id, bool connected,
                                  tGATT_DISCONN_REASON reason,
                                  tBT_TRANSPORT transport) {
@@ -1352,8 +1352,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_gattc_enc_cmpl_cback(tGATT_IF gattc_if,
-                                     const bt_bdaddr_t& bda) {
+static void bta_gattc_enc_cmpl_cback(tGATT_IF gattc_if, const RawAddress& bda) {
   tBTA_GATTC_CLCB* p_clcb =
       bta_gattc_find_clcb_by_cif(gattc_if, bda, BTA_GATT_TRANSPORT_LE);
 
@@ -1385,7 +1384,7 @@
  * Returns          None.
  *
  ******************************************************************************/
-void bta_gattc_process_api_refresh(const bt_bdaddr_t& remote_bda) {
+void bta_gattc_process_api_refresh(const RawAddress& remote_bda) {
   tBTA_GATTC_SERV* p_srvc_cb = bta_gattc_find_srvr_cache(remote_bda);
   tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0];
   bool found = false;
@@ -1533,7 +1532,7 @@
   tBTA_GATTC_RCB* p_clrcb = NULL;
   tBTA_GATTC_SERV* p_srcb = NULL;
   tBTA_GATTC_NOTIFY notify;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATTC_IF gatt_if;
   tBTA_TRANSPORT transport;
 
diff --git a/bta/gatt/bta_gattc_api.cc b/bta/gatt/bta_gattc_api.cc
index 9722daf..4815f24 100644
--- a/bta/gatt/bta_gattc_api.cc
+++ b/bta/gatt/bta_gattc_api.cc
@@ -125,7 +125,7 @@
  *                                 and don't impact the disconnection timer
  *
  ******************************************************************************/
-void BTA_GATTC_Open(tBTA_GATTC_IF client_if, const bt_bdaddr_t& remote_bda,
+void BTA_GATTC_Open(tBTA_GATTC_IF client_if, const RawAddress& remote_bda,
                     bool is_direct, tBTA_GATT_TRANSPORT transport,
                     bool opportunistic) {
   uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
@@ -133,7 +133,7 @@
                  phy);
 }
 
-void BTA_GATTC_Open(tBTA_GATTC_IF client_if, const bt_bdaddr_t& remote_bda,
+void BTA_GATTC_Open(tBTA_GATTC_IF client_if, const RawAddress& remote_bda,
                     bool is_direct, tBTA_GATT_TRANSPORT transport,
                     bool opportunistic, uint8_t initiating_phys) {
   tBTA_GATTC_API_OPEN* p_buf =
@@ -165,8 +165,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if,
-                          const bt_bdaddr_t& remote_bda, bool is_direct) {
+void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if, const RawAddress& remote_bda,
+                          bool is_direct) {
   tBTA_GATTC_API_CANCEL_OPEN* p_buf = (tBTA_GATTC_API_CANCEL_OPEN*)osi_malloc(
       sizeof(tBTA_GATTC_API_CANCEL_OPEN));
 
@@ -626,7 +626,7 @@
  *
  ******************************************************************************/
 tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications(tBTA_GATTC_IF client_if,
-                                                    const bt_bdaddr_t& bda,
+                                                    const RawAddress& bda,
                                                     uint16_t handle) {
   tBTA_GATTC_RCB* p_clreg;
   tBTA_GATT_STATUS status = BTA_GATT_ILLEGAL_PARAMETER;
@@ -689,7 +689,7 @@
  *
  ******************************************************************************/
 tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications(tBTA_GATTC_IF client_if,
-                                                      const bt_bdaddr_t& bda,
+                                                      const RawAddress& bda,
                                                       uint16_t handle) {
   if (!handle) {
     APPL_TRACE_ERROR("%s: deregistration failed, handle is 0", __func__);
@@ -728,7 +728,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_GATTC_Refresh(const bt_bdaddr_t& remote_bda) {
+void BTA_GATTC_Refresh(const RawAddress& remote_bda) {
   do_in_bta_thread(FROM_HERE,
                    base::Bind(&bta_gattc_process_api_refresh, remote_bda));
 }
diff --git a/bta/gatt/bta_gattc_cache.cc b/bta/gatt/bta_gattc_cache.cc
index f146638..432e217 100644
--- a/bta/gatt/bta_gattc_cache.cc
+++ b/bta/gatt/bta_gattc_cache.cc
@@ -44,7 +44,7 @@
 #include "sdpdefs.h"
 #include "utl.h"
 
-static void bta_gattc_cache_write(const bt_bdaddr_t& server_bda,
+static void bta_gattc_cache_write(const RawAddress& server_bda,
                                   uint16_t num_attr, tBTA_GATTC_NV_ATTR* attr);
 static void bta_gattc_char_dscpt_disc_cmpl(uint16_t conn_id,
                                            tBTA_GATTC_SERV* p_srvc_cb);
@@ -64,7 +64,7 @@
 #define GATT_CACHE_VERSION 2
 
 static void bta_gattc_generate_cache_file_name(char* buffer, size_t buffer_len,
-                                               const bt_bdaddr_t& bda) {
+                                               const RawAddress& bda) {
   snprintf(buffer, buffer_len, "%s%02x%02x%02x%02x%02x%02x", GATT_CACHE_PREFIX,
            bda.address[0], bda.address[1], bda.address[2], bda.address[3],
            bda.address[4], bda.address[5]);
@@ -1493,7 +1493,7 @@
  * Returns
  *
  ******************************************************************************/
-static void bta_gattc_cache_write(const bt_bdaddr_t& server_bda,
+static void bta_gattc_cache_write(const RawAddress& server_bda,
                                   uint16_t num_attr, tBTA_GATTC_NV_ATTR* attr) {
   char fname[255] = {0};
   bta_gattc_generate_cache_file_name(fname, sizeof(fname), server_bda);
@@ -1541,7 +1541,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_gattc_cache_reset(const bt_bdaddr_t& server_bda) {
+void bta_gattc_cache_reset(const RawAddress& server_bda) {
   BTIF_TRACE_DEBUG("%s", __func__);
   char fname[255] = {0};
   bta_gattc_generate_cache_file_name(fname, sizeof(fname), server_bda);
diff --git a/bta/gatt/bta_gattc_int.h b/bta/gatt/bta_gattc_int.h
index f9279d0..8055090 100644
--- a/bta/gatt/bta_gattc_int.h
+++ b/bta/gatt/bta_gattc_int.h
@@ -83,7 +83,7 @@
 /* internal strucutre for GATTC register API  */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATTC_IF client_if;
   bool is_direct;
   tBTA_TRANSPORT transport;
@@ -160,7 +160,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATTC_IF client_if;
   uint8_t role;
   tBT_TRANSPORT transport;
@@ -212,7 +212,7 @@
 
 typedef struct {
   bool in_use;
-  bt_bdaddr_t server_bda;
+  RawAddress server_bda;
   bool connected;
 
 #define BTA_GATTC_SERV_IDLE 0
@@ -246,7 +246,7 @@
 
 typedef struct {
   bool in_use;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   uint16_t handle;
 } tBTA_GATTC_NOTIF_REG;
 
@@ -265,7 +265,7 @@
  * address */
 typedef struct {
   uint16_t bta_conn_id; /* client channel ID, unique for clcb */
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tBTA_TRANSPORT transport; /* channel transport */
   tBTA_GATTC_RCB* p_rcb;    /* pointer to the registration CB */
   tBTA_GATTC_SERV* p_srcb;  /* server cache CB */
@@ -294,14 +294,14 @@
 
 typedef struct {
   bool in_use;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATTC_CIF_MASK cif_mask;
 
 } tBTA_GATTC_BG_TCK;
 
 typedef struct {
   bool in_use;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
 } tBTA_GATTC_CONN;
 
 enum {
@@ -392,28 +392,29 @@
 extern void bta_gattc_cancel_bk_conn(tBTA_GATTC_API_CANCEL_OPEN* p_data);
 extern void bta_gattc_send_open_cback(tBTA_GATTC_RCB* p_clreg,
                                       tBTA_GATT_STATUS status,
-                                      const bt_bdaddr_t& remote_bda,
+                                      const RawAddress& remote_bda,
                                       uint16_t conn_id,
                                       tBTA_TRANSPORT transport, uint16_t mtu);
-extern void bta_gattc_process_api_refresh(const bt_bdaddr_t& remote_bda);
+extern void bta_gattc_process_api_refresh(const RawAddress& remote_bda);
 extern void bta_gattc_cfg_mtu(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data);
 extern void bta_gattc_listen(tBTA_GATTC_DATA* p_msg);
 extern void bta_gattc_broadcast(tBTA_GATTC_DATA* p_msg);
 
 /* utility functions */
-extern tBTA_GATTC_CLCB* bta_gattc_find_clcb_by_cif(
-    uint8_t client_if, const bt_bdaddr_t& remote_bda, tBTA_TRANSPORT transport);
+extern tBTA_GATTC_CLCB* bta_gattc_find_clcb_by_cif(uint8_t client_if,
+                                                   const RawAddress& remote_bda,
+                                                   tBTA_TRANSPORT transport);
 extern tBTA_GATTC_CLCB* bta_gattc_find_clcb_by_conn_id(uint16_t conn_id);
 extern tBTA_GATTC_CLCB* bta_gattc_clcb_alloc(tBTA_GATTC_IF client_if,
-                                             const bt_bdaddr_t& remote_bda,
+                                             const RawAddress& remote_bda,
                                              tBTA_TRANSPORT transport);
 extern void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB* p_clcb);
 extern tBTA_GATTC_CLCB* bta_gattc_find_alloc_clcb(tBTA_GATTC_IF client_if,
-                                                  const bt_bdaddr_t& remote_bda,
+                                                  const RawAddress& remote_bda,
                                                   tBTA_TRANSPORT transport);
 extern tBTA_GATTC_RCB* bta_gattc_cl_get_regcb(uint8_t client_if);
-extern tBTA_GATTC_SERV* bta_gattc_find_srcb(const bt_bdaddr_t& bda);
-extern tBTA_GATTC_SERV* bta_gattc_srcb_alloc(const bt_bdaddr_t& bda);
+extern tBTA_GATTC_SERV* bta_gattc_find_srcb(const RawAddress& bda);
+extern tBTA_GATTC_SERV* bta_gattc_srcb_alloc(const RawAddress& bda);
 extern tBTA_GATTC_SERV* bta_gattc_find_scb_by_cid(uint16_t conn_id);
 extern tBTA_GATTC_CLCB* bta_gattc_find_int_conn_clcb(tBTA_GATTC_DATA* p_msg);
 extern tBTA_GATTC_CLCB* bta_gattc_find_int_disconn_clcb(tBTA_GATTC_DATA* p_msg);
@@ -426,16 +427,15 @@
                                            tBTA_GATTC_SERV* p_srcb,
                                            tBTA_GATTC_NOTIFY* p_notify);
 extern bool bta_gattc_mark_bg_conn(tBTA_GATTC_IF client_if,
-                                   const bt_bdaddr_t& remote_bda, bool add);
+                                   const RawAddress& remote_bda, bool add);
 extern bool bta_gattc_check_bg_conn(tBTA_GATTC_IF client_if,
-                                    const bt_bdaddr_t& remote_bda,
-                                    uint8_t role);
+                                    const RawAddress& remote_bda, uint8_t role);
 extern uint8_t bta_gattc_num_reg_app(void);
 extern void bta_gattc_clear_notif_registration(tBTA_GATTC_SERV* p_srcb,
                                                uint16_t conn_id,
                                                uint16_t start_handle,
                                                uint16_t end_handle);
-extern tBTA_GATTC_SERV* bta_gattc_find_srvr_cache(const bt_bdaddr_t& bda);
+extern tBTA_GATTC_SERV* bta_gattc_find_srvr_cache(const RawAddress& bda);
 
 /* discovery functions */
 extern void bta_gattc_disc_res_cback(uint16_t conn_id,
@@ -468,13 +468,12 @@
 extern void bta_gattc_reset_discover_st(tBTA_GATTC_SERV* p_srcb,
                                         tBTA_GATT_STATUS status);
 
-extern tBTA_GATTC_CONN* bta_gattc_conn_alloc(const bt_bdaddr_t& remote_bda);
-extern tBTA_GATTC_CONN* bta_gattc_conn_find(const bt_bdaddr_t& remote_bda);
-extern tBTA_GATTC_CONN* bta_gattc_conn_find_alloc(
-    const bt_bdaddr_t& remote_bda);
-extern bool bta_gattc_conn_dealloc(const bt_bdaddr_t& remote_bda);
+extern tBTA_GATTC_CONN* bta_gattc_conn_alloc(const RawAddress& remote_bda);
+extern tBTA_GATTC_CONN* bta_gattc_conn_find(const RawAddress& remote_bda);
+extern tBTA_GATTC_CONN* bta_gattc_conn_find_alloc(const RawAddress& remote_bda);
+extern bool bta_gattc_conn_dealloc(const RawAddress& remote_bda);
 
 extern bool bta_gattc_cache_load(tBTA_GATTC_CLCB* p_clcb);
-extern void bta_gattc_cache_reset(const bt_bdaddr_t& server_bda);
+extern void bta_gattc_cache_reset(const RawAddress& server_bda);
 
 #endif /* BTA_GATTC_INT_H */
diff --git a/bta/gatt/bta_gattc_utils.cc b/bta/gatt/bta_gattc_utils.cc
index 3b218d3..d4ef668 100644
--- a/bta/gatt/bta_gattc_utils.cc
+++ b/bta/gatt/bta_gattc_utils.cc
@@ -151,7 +151,7 @@
  *
  ******************************************************************************/
 tBTA_GATTC_CLCB* bta_gattc_find_clcb_by_cif(uint8_t client_if,
-                                            const bt_bdaddr_t& remote_bda,
+                                            const RawAddress& remote_bda,
                                             tBTA_TRANSPORT transport) {
   tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0];
   uint8_t i;
@@ -192,7 +192,7 @@
  *
  ******************************************************************************/
 tBTA_GATTC_CLCB* bta_gattc_clcb_alloc(tBTA_GATTC_IF client_if,
-                                      const bt_bdaddr_t& remote_bda,
+                                      const RawAddress& remote_bda,
                                       tBTA_TRANSPORT transport) {
   uint8_t i_clcb = 0;
   tBTA_GATTC_CLCB* p_clcb = NULL;
@@ -238,7 +238,7 @@
  *
  ******************************************************************************/
 tBTA_GATTC_CLCB* bta_gattc_find_alloc_clcb(tBTA_GATTC_IF client_if,
-                                           const bt_bdaddr_t& remote_bda,
+                                           const RawAddress& remote_bda,
                                            tBTA_TRANSPORT transport) {
   tBTA_GATTC_CLCB* p_clcb;
 
@@ -296,7 +296,7 @@
  * Returns          pointer to the server cache.
  *
  ******************************************************************************/
-tBTA_GATTC_SERV* bta_gattc_find_srcb(const bt_bdaddr_t& bda) {
+tBTA_GATTC_SERV* bta_gattc_find_srcb(const RawAddress& bda) {
   tBTA_GATTC_SERV* p_srcb = &bta_gattc_cb.known_server[0];
   uint8_t i;
 
@@ -315,7 +315,7 @@
  * Returns          pointer to the server cache.
  *
  ******************************************************************************/
-tBTA_GATTC_SERV* bta_gattc_find_srvr_cache(const bt_bdaddr_t& bda) {
+tBTA_GATTC_SERV* bta_gattc_find_srvr_cache(const RawAddress& bda) {
   tBTA_GATTC_SERV* p_srcb = &bta_gattc_cb.known_server[0];
   uint8_t i;
 
@@ -350,7 +350,7 @@
  * Returns          pointer to the server cache.
  *
  ******************************************************************************/
-tBTA_GATTC_SERV* bta_gattc_srcb_alloc(const bt_bdaddr_t& bda) {
+tBTA_GATTC_SERV* bta_gattc_srcb_alloc(const RawAddress& bda) {
   tBTA_GATTC_SERV *p_tcb = &bta_gattc_cb.known_server[0], *p_recycle = NULL;
   bool found = false;
   uint8_t i;
@@ -430,7 +430,7 @@
  * Function         bta_gattc_clear_notif_registration
  *
  * Description      Clear up the notification registration information by
- *                  bt_bdaddr_t.
+ *                  RawAddress.
  *                  Where handle is between start_handle and end_handle, and
  *                  start_handle and end_handle are boundaries of service
  *                  containing characteristic.
@@ -441,7 +441,7 @@
 void bta_gattc_clear_notif_registration(tBTA_GATTC_SERV* p_srcb,
                                         uint16_t conn_id, uint16_t start_handle,
                                         uint16_t end_handle) {
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATTC_IF gatt_if;
   tBTA_GATTC_RCB* p_clrcb;
   uint8_t i;
@@ -481,7 +481,7 @@
  *
  ******************************************************************************/
 bool bta_gattc_mark_bg_conn(tBTA_GATTC_IF client_if,
-                            const bt_bdaddr_t& remote_bda_ptr, bool add) {
+                            const RawAddress& remote_bda_ptr, bool add) {
   tBTA_GATTC_BG_TCK* p_bg_tck = &bta_gattc_cb.bg_track[0];
   uint8_t i = 0;
   tBTA_GATTC_CIF_MASK* p_cif_mask;
@@ -539,7 +539,7 @@
  *
  ******************************************************************************/
 bool bta_gattc_check_bg_conn(tBTA_GATTC_IF client_if,
-                             const bt_bdaddr_t& remote_bda, uint8_t role) {
+                             const RawAddress& remote_bda, uint8_t role) {
   tBTA_GATTC_BG_TCK* p_bg_tck = &bta_gattc_cb.bg_track[0];
   uint8_t i = 0;
   bool is_bg_conn = false;
@@ -564,7 +564,7 @@
  *
  ******************************************************************************/
 void bta_gattc_send_open_cback(tBTA_GATTC_RCB* p_clreg, tBTA_GATT_STATUS status,
-                               const bt_bdaddr_t& remote_bda, uint16_t conn_id,
+                               const RawAddress& remote_bda, uint16_t conn_id,
                                tBTA_TRANSPORT transport, uint16_t mtu) {
   tBTA_GATTC cb_data;
 
@@ -590,7 +590,7 @@
  * Returns          pointer to the clcb
  *
  ******************************************************************************/
-tBTA_GATTC_CONN* bta_gattc_conn_alloc(const bt_bdaddr_t& remote_bda) {
+tBTA_GATTC_CONN* bta_gattc_conn_alloc(const RawAddress& remote_bda) {
   uint8_t i_conn = 0;
   tBTA_GATTC_CONN* p_conn = &bta_gattc_cb.conn_track[0];
 
@@ -617,7 +617,7 @@
  * Returns          pointer to the clcb
  *
  ******************************************************************************/
-tBTA_GATTC_CONN* bta_gattc_conn_find(const bt_bdaddr_t& remote_bda) {
+tBTA_GATTC_CONN* bta_gattc_conn_find(const RawAddress& remote_bda) {
   uint8_t i_conn = 0;
   tBTA_GATTC_CONN* p_conn = &bta_gattc_cb.conn_track[0];
 
@@ -642,7 +642,7 @@
  * Returns          pointer to the clcb
  *
  ******************************************************************************/
-tBTA_GATTC_CONN* bta_gattc_conn_find_alloc(const bt_bdaddr_t& remote_bda) {
+tBTA_GATTC_CONN* bta_gattc_conn_find_alloc(const RawAddress& remote_bda) {
   tBTA_GATTC_CONN* p_conn = bta_gattc_conn_find(remote_bda);
 
   if (p_conn == NULL) {
@@ -660,7 +660,7 @@
  * Returns          pointer to the clcb
  *
  ******************************************************************************/
-bool bta_gattc_conn_dealloc(const bt_bdaddr_t& remote_bda) {
+bool bta_gattc_conn_dealloc(const RawAddress& remote_bda) {
   tBTA_GATTC_CONN* p_conn = bta_gattc_conn_find(remote_bda);
 
   if (p_conn != NULL) {
diff --git a/bta/gatt/bta_gatts_act.cc b/bta/gatt/bta_gatts_act.cc
index 47fedf4..583faba 100644
--- a/bta/gatt/bta_gatts_act.cc
+++ b/bta/gatt/bta_gatts_act.cc
@@ -42,7 +42,7 @@
                                        tGATTS_SRV_CHG_REQ* p_req,
                                        tGATTS_SRV_CHG_RSP* p_rsp);
 
-static void bta_gatts_conn_cback(tGATT_IF gatt_if, const bt_bdaddr_t& bda,
+static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bda,
                                  uint16_t conn_id, bool connected,
                                  tGATT_DISCONN_REASON reason,
                                  tGATT_TRANSPORT transport);
@@ -373,7 +373,7 @@
   tBTA_GATTS_RCB* p_rcb = NULL;
   tBTA_GATT_STATUS status = BTA_GATT_ILLEGAL_PARAMETER;
   tGATT_IF gatt_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_TRANSPORT transport;
   tBTA_GATTS cb_data;
 
@@ -494,7 +494,7 @@
   tBTA_GATTS_RCB* p_rcb;
   tBTA_GATT_STATUS status = BTA_GATT_ERROR;
   tGATT_IF gatt_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATT_TRANSPORT transport;
 
   if (GATT_GetConnectionInfor(p_msg->hdr.layer_specific, &gatt_if, remote_bda,
@@ -575,7 +575,7 @@
  * Returns          none.
  *
  ******************************************************************************/
-static void bta_gatts_conn_cback(tGATT_IF gatt_if, const bt_bdaddr_t& bdaddr,
+static void bta_gatts_conn_cback(tGATT_IF gatt_if, const RawAddress& bdaddr,
                                  uint16_t conn_id, bool connected,
                                  tGATT_DISCONN_REASON reason,
                                  tGATT_TRANSPORT transport) {
diff --git a/bta/gatt/bta_gatts_api.cc b/bta/gatt/bta_gatts_api.cc
index a7b6082..7d45043 100644
--- a/bta/gatt/bta_gatts_api.cc
+++ b/bta/gatt/bta_gatts_api.cc
@@ -281,7 +281,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_GATTS_Open(tBTA_GATTS_IF server_if, const bt_bdaddr_t& remote_bda,
+void BTA_GATTS_Open(tBTA_GATTS_IF server_if, const RawAddress& remote_bda,
                     bool is_direct, tBTA_GATT_TRANSPORT transport) {
   tBTA_GATTS_API_OPEN* p_buf =
       (tBTA_GATTS_API_OPEN*)osi_malloc(sizeof(tBTA_GATTS_API_OPEN));
@@ -309,8 +309,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_GATTS_CancelOpen(tBTA_GATTS_IF server_if,
-                          const bt_bdaddr_t& remote_bda, bool is_direct) {
+void BTA_GATTS_CancelOpen(tBTA_GATTS_IF server_if, const RawAddress& remote_bda,
+                          bool is_direct) {
   tBTA_GATTS_API_CANCEL_OPEN* p_buf = (tBTA_GATTS_API_CANCEL_OPEN*)osi_malloc(
       sizeof(tBTA_GATTS_API_CANCEL_OPEN));
 
diff --git a/bta/gatt/bta_gatts_int.h b/bta/gatt/bta_gatts_int.h
index 3ce6ca7..df5d706 100644
--- a/bta/gatt/bta_gatts_int.h
+++ b/bta/gatt/bta_gatts_int.h
@@ -99,7 +99,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATTS_IF server_if;
   bool is_direct;
   tBTA_GATT_TRANSPORT transport;
diff --git a/bta/hd/bta_hd_act.cc b/bta/hd/bta_hd_act.cc
index 999d5ff..1c2da81 100644
--- a/bta/hd/bta_hd_act.cc
+++ b/bta/hd/bta_hd_act.cc
@@ -38,7 +38,7 @@
 
 #include "osi/include/osi.h"
 
-static void bta_hd_cback(const bt_bdaddr_t& bd_addr, uint8_t event,
+static void bta_hd_cback(const RawAddress& bd_addr, uint8_t event,
                          uint32_t data, BT_HDR* pdata);
 
 static bool check_descriptor(uint8_t* data, uint16_t length,
@@ -678,7 +678,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_hd_cback(const bt_bdaddr_t& bd_addr, uint8_t event,
+static void bta_hd_cback(const RawAddress& bd_addr, uint8_t event,
                          uint32_t data, BT_HDR* pdata) {
   tBTA_HD_CBACK_DATA* p_buf = NULL;
   uint16_t sm_event = BTA_HD_INVALID_EVT;
diff --git a/bta/hd/bta_hd_api.cc b/bta/hd/bta_hd_api.cc
index c44c9dc..199bc7b 100644
--- a/bta/hd/bta_hd_api.cc
+++ b/bta/hd/bta_hd_api.cc
@@ -218,7 +218,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HdConnect(const bt_bdaddr_t& addr) {
+extern void BTA_HdConnect(const RawAddress& addr) {
   APPL_TRACE_API("%s", __func__);
 
   tBTA_HD_DEVICE_CTRL* p_buf =
@@ -256,7 +256,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HdAddDevice(const bt_bdaddr_t& addr) {
+extern void BTA_HdAddDevice(const RawAddress& addr) {
   APPL_TRACE_API("%s", __func__);
   tBTA_HD_DEVICE_CTRL* p_buf =
       (tBTA_HD_DEVICE_CTRL*)osi_malloc(sizeof(tBTA_HD_DEVICE_CTRL));
@@ -276,7 +276,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HdRemoveDevice(const bt_bdaddr_t& addr) {
+extern void BTA_HdRemoveDevice(const RawAddress& addr) {
   APPL_TRACE_API("%s", __func__);
   tBTA_HD_DEVICE_CTRL* p_buf =
       (tBTA_HD_DEVICE_CTRL*)osi_malloc(sizeof(tBTA_HD_DEVICE_CTRL));
diff --git a/bta/hd/bta_hd_int.h b/bta/hd/bta_hd_int.h
index bf2a5fa..318e350 100644
--- a/bta/hd/bta_hd_int.h
+++ b/bta/hd/bta_hd_int.h
@@ -101,7 +101,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t addr;
+  RawAddress addr;
 } tBTA_HD_DEVICE_CTRL;
 
 typedef struct {
@@ -121,7 +121,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t addr;
+  RawAddress addr;
   uint32_t data;
   BT_HDR* p_data;
 } tBTA_HD_CBACK_DATA;
@@ -134,7 +134,7 @@
   uint32_t sdp_handle;
   uint8_t trace_level;
   uint8_t state;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool use_report_id;
   bool boot_mode;
   bool vc_unplug;
diff --git a/bta/hf_client/bta_hf_client_act.cc b/bta/hf_client/bta_hf_client_act.cc
index 7c99124..b633bd0 100644
--- a/bta/hf_client/bta_hf_client_act.cc
+++ b/bta/hf_client/bta_hf_client_act.cc
@@ -103,7 +103,7 @@
   }
 
   /* Check if RFCOMM has any incoming connection to avoid collision. */
-  bt_bdaddr_t pending_bd_addr;
+  RawAddress pending_bd_addr;
   if (PORT_IsOpening(pending_bd_addr)) {
     /* Let the incoming connection goes through.                        */
     /* Issue collision for now.                                         */
@@ -166,7 +166,7 @@
   }
 
   uint16_t lcid;
-  bt_bdaddr_t dev_addr;
+  RawAddress dev_addr;
   int status;
 
   /* set role */
diff --git a/bta/hf_client/bta_hf_client_api.cc b/bta/hf_client/bta_hf_client_api.cc
index 7dc1d03..d1ec0b7 100644
--- a/bta/hf_client/bta_hf_client_api.cc
+++ b/bta/hf_client/bta_hf_client_api.cc
@@ -76,7 +76,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_HfClientOpen(const bt_bdaddr_t& bd_addr, tBTA_SEC sec_mask,
+void BTA_HfClientOpen(const RawAddress& bd_addr, tBTA_SEC sec_mask,
                       uint16_t* p_handle) {
   APPL_TRACE_DEBUG("%s", __func__);
   tBTA_HF_CLIENT_API_OPEN* p_buf =
diff --git a/bta/hf_client/bta_hf_client_int.h b/bta/hf_client/bta_hf_client_int.h
index d8bec2f..9ff7fa1 100644
--- a/bta/hf_client/bta_hf_client_int.h
+++ b/bta/hf_client/bta_hf_client_int.h
@@ -105,7 +105,7 @@
 /* data type for BTA_HF_CLIENT_API_OPEN_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t* handle;
   tBTA_SEC sec_mask;
 } tBTA_HF_CLIENT_API_OPEN;
@@ -162,7 +162,7 @@
   // Fields useful for particular control block.
   uint8_t handle;               /* Handle of the control block to be
                                    used by upper layer */
-  bt_bdaddr_t peer_addr;        /* peer bd address */
+  RawAddress peer_addr;         /* peer bd address */
   tSDP_DISCOVERY_DB* p_disc_db; /* pointer to discovery database */
   uint16_t conn_handle;         /* RFCOMM handle of connected service */
   tBTA_SEC cli_sec_mask;        /* client security mask */
@@ -206,19 +206,19 @@
 /* main functions */
 extern tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_handle(uint16_t handle);
 extern tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_bda(
-    const bt_bdaddr_t& bd_addr);
+    const RawAddress& bd_addr);
 extern tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_rfc_handle(uint16_t handle);
 extern tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_sco_handle(uint16_t handle);
 extern bool bta_hf_client_hdl_event(BT_HDR* p_msg);
 extern void bta_hf_client_sm_execute(uint16_t event,
                                      tBTA_HF_CLIENT_DATA* p_data);
 extern void bta_hf_client_slc_seq(tBTA_HF_CLIENT_CB* client_cb, bool error);
-extern bool bta_hf_client_allocate_handle(const bt_bdaddr_t& bd_addr,
+extern bool bta_hf_client_allocate_handle(const RawAddress& bd_addr,
                                           uint16_t* p_handle);
 extern void bta_hf_client_app_callback(uint16_t event, tBTA_HF_CLIENT* data);
 extern void bta_hf_client_collision_cback(tBTA_SYS_CONN_STATUS status,
                                           uint8_t id, uint8_t app_id,
-                                          const bt_bdaddr_t* peer_addr);
+                                          const RawAddress* peer_addr);
 extern void bta_hf_client_resume_open(tBTA_HF_CLIENT_CB* client_cb);
 extern tBTA_STATUS bta_hf_client_api_enable(tBTA_HF_CLIENT_CBACK* p_cback,
                                             tBTA_SEC sec_mask,
diff --git a/bta/hf_client/bta_hf_client_main.cc b/bta/hf_client/bta_hf_client_main.cc
index 748959a..4c23755 100644
--- a/bta/hf_client/bta_hf_client_main.cc
+++ b/bta/hf_client/bta_hf_client_main.cc
@@ -366,7 +366,7 @@
  ******************************************************************************/
 void bta_hf_client_collision_cback(UNUSED_ATTR tBTA_SYS_CONN_STATUS status,
                                    uint8_t id, UNUSED_ATTR uint8_t app_id,
-                                   const bt_bdaddr_t* peer_addr) {
+                                   const RawAddress* peer_addr) {
   tBTA_HF_CLIENT_CB* client_cb = bta_hf_client_find_cb_by_bda(*peer_addr);
   if (client_cb != NULL && client_cb->state == BTA_HF_CLIENT_OPENING_ST) {
     if (id == BTA_ID_SYS) /* ACL collision */
@@ -491,7 +491,7 @@
  *                  none exists
  *
  ******************************************************************************/
-tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_bda(const bt_bdaddr_t& peer_addr) {
+tBTA_HF_CLIENT_CB* bta_hf_client_find_cb_by_bda(const RawAddress& peer_addr) {
   for (int i = 0; i < HF_CLIENT_MAX_DEVICES; i++) {
     // Check if the associated index is allocated and that BD ADDR matches
     tBTA_HF_CLIENT_CB* client_cb = &bta_hf_client_cb_arr.cb[i];
@@ -581,7 +581,7 @@
  * Returns          true if the creation of p_handle succeeded, false otherwise
  *
  ******************************************************************************/
-bool bta_hf_client_allocate_handle(const bt_bdaddr_t& bd_addr,
+bool bta_hf_client_allocate_handle(const RawAddress& bd_addr,
                                    uint16_t* p_handle) {
   tBTA_HF_CLIENT_CB* existing_cb = bta_hf_client_find_cb_by_bda(bd_addr);
   if (existing_cb != NULL) {
diff --git a/bta/hf_client/bta_hf_client_rfc.cc b/bta/hf_client/bta_hf_client_rfc.cc
index c46cf96..3f92068 100644
--- a/bta/hf_client/bta_hf_client_rfc.cc
+++ b/bta/hf_client/bta_hf_client_rfc.cc
@@ -98,7 +98,7 @@
       APPL_TRACE_DEBUG("%s: allocating a new CB for incoming connection",
                        __func__);
       // Find the BDADDR of the peer device
-      bt_bdaddr_t peer_addr;
+      RawAddress peer_addr;
       uint16_t lcid;
       PORT_CheckConnection(port_handle, peer_addr, &lcid);
 
diff --git a/bta/hh/bta_hh_act.cc b/bta/hh/bta_hh_act.cc
index d8eaa82..4b11a09 100644
--- a/bta/hh/bta_hh_act.cc
+++ b/bta/hh/bta_hh_act.cc
@@ -43,7 +43,7 @@
 /*****************************************************************************
  *  Local Function prototypes
  ****************************************************************************/
-static void bta_hh_cback(uint8_t dev_handle, const bt_bdaddr_t& addr,
+static void bta_hh_cback(uint8_t dev_handle, const RawAddress& addr,
                          uint8_t event, uint32_t data, BT_HDR* pdata);
 static tBTA_HH_STATUS bta_hh_get_trans_status(uint32_t result);
 
@@ -1088,7 +1088,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_hh_cback(uint8_t dev_handle, const bt_bdaddr_t& addr,
+static void bta_hh_cback(uint8_t dev_handle, const RawAddress& addr,
                          uint8_t event, uint32_t data, BT_HDR* pdata) {
   uint16_t sm_event = BTA_HH_INVALID_EVT;
   uint8_t xx = 0;
diff --git a/bta/hh/bta_hh_api.cc b/bta/hh/bta_hh_api.cc
index b46c1a2..164633c 100644
--- a/bta/hh/bta_hh_api.cc
+++ b/bta/hh/bta_hh_api.cc
@@ -122,7 +122,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_HhOpen(const bt_bdaddr_t& dev_bda, tBTA_HH_PROTO_MODE mode,
+void BTA_HhOpen(const RawAddress& dev_bda, tBTA_HH_PROTO_MODE mode,
                 tBTA_SEC sec_mask) {
   tBTA_HH_API_CONN* p_buf =
       (tBTA_HH_API_CONN*)osi_calloc(sizeof(tBTA_HH_API_CONN));
@@ -272,7 +272,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_HhSendData(uint8_t dev_handle, UNUSED_ATTR const bt_bdaddr_t& dev_bda,
+void BTA_HhSendData(uint8_t dev_handle, UNUSED_ATTR const RawAddress& dev_bda,
                     BT_HDR* p_data) {
 #if (BTA_HH_LE_INCLUDED == TRUE)
   if (p_data->layer_specific != BTA_HH_RPTT_OUTPUT) {
@@ -316,7 +316,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_HhAddDev(const bt_bdaddr_t& bda, tBTA_HH_ATTR_MASK attr_mask,
+void BTA_HhAddDev(const RawAddress& bda, tBTA_HH_ATTR_MASK attr_mask,
                   uint8_t sub_class, uint8_t app_id,
                   tBTA_HH_DEV_DSCP_INFO dscp_info) {
   size_t len = sizeof(tBTA_HH_MAINT_DEV) + dscp_info.descriptor.dl_len;
diff --git a/bta/hh/bta_hh_int.h b/bta/hh/bta_hh_int.h
index a53f6c9..128a078 100644
--- a/bta/hh/bta_hh_int.h
+++ b/bta/hh/bta_hh_int.h
@@ -115,7 +115,7 @@
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t sec_mask;
   tBTA_HH_PROTO_MODE mode;
 } tBTA_HH_API_CONN;
@@ -123,14 +123,14 @@
 /* internal event data from BTE HID callback */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t addr;
+  RawAddress addr;
   uint32_t data;
   BT_HDR* p_data;
 } tBTA_HH_CBACK_DATA;
 
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint16_t attr_mask;
   uint16_t sub_event;
   uint8_t sub_class;
@@ -217,7 +217,7 @@
 /* device control block */
 typedef struct {
   tBTA_HH_DEV_DSCP_INFO dscp_info; /* report descriptor and DI information */
-  bt_bdaddr_t addr;                /* BD-Addr of the HID device */
+  RawAddress addr;                 /* BD-Addr of the HID device */
   uint16_t attr_mask;              /* attribute mask */
   uint16_t w4_evt;                 /* W4_handshake event name */
   uint8_t index;                   /* index number referenced to handle index */
@@ -323,7 +323,7 @@
 extern void bta_hh_open_failure(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data);
 
 /* utility functions */
-extern uint8_t bta_hh_find_cb(const bt_bdaddr_t& bda);
+extern uint8_t bta_hh_find_cb(const RawAddress& bda);
 extern void bta_hh_parse_keybd_rpt(tBTA_HH_BOOT_RPT* p_kb_data,
                                    uint8_t* p_report, uint16_t report_len);
 extern void bta_hh_parse_mice_rpt(tBTA_HH_BOOT_RPT* p_kb_data,
@@ -348,7 +348,7 @@
 extern void bta_hh_api_disable(void);
 extern void bta_hh_disc_cmpl(void);
 
-extern tBTA_HH_STATUS bta_hh_read_ssr_param(const bt_bdaddr_t& bd_addr,
+extern tBTA_HH_STATUS bta_hh_read_ssr_param(const RawAddress& bd_addr,
                                             uint16_t* p_max_ssr_lat,
                                             uint16_t* p_min_ssr_tout);
 
@@ -357,9 +357,9 @@
 extern bool bta_hh_le_is_hh_gatt_if(tBTA_GATTC_IF client_if);
 extern void bta_hh_le_deregister(void);
 extern bool bta_hh_is_le_device(tBTA_HH_DEV_CB* p_cb,
-                                const bt_bdaddr_t& remote_bda);
+                                const RawAddress& remote_bda);
 extern void bta_hh_le_open_conn(tBTA_HH_DEV_CB* p_cb,
-                                const bt_bdaddr_t& remote_bda);
+                                const RawAddress& remote_bda);
 extern void bta_hh_le_api_disc_act(tBTA_HH_DEV_CB* p_cb);
 extern void bta_hh_le_get_dscp_act(tBTA_HH_DEV_CB* p_cb);
 extern void bta_hh_le_write_dev_act(tBTA_HH_DEV_CB* p_cb, tBTA_HH_DATA* p_data);
diff --git a/bta/hh/bta_hh_le.cc b/bta/hh/bta_hh_le.cc
index ac05420..b4827a2 100644
--- a/bta/hh/bta_hh_le.cc
+++ b/bta/hh/bta_hh_le.cc
@@ -378,7 +378,7 @@
  * Parameters:
  *
  ******************************************************************************/
-bool bta_hh_is_le_device(tBTA_HH_DEV_CB* p_cb, const bt_bdaddr_t& remote_bda) {
+bool bta_hh_is_le_device(tBTA_HH_DEV_CB* p_cb, const RawAddress& remote_bda) {
   p_cb->is_le_device = BTM_UseLeLink(remote_bda);
 
   return p_cb->is_le_device;
@@ -393,7 +393,7 @@
  * Parameters:
  *
  ******************************************************************************/
-void bta_hh_le_open_conn(tBTA_HH_DEV_CB* p_cb, const bt_bdaddr_t& remote_bda) {
+void bta_hh_le_open_conn(tBTA_HH_DEV_CB* p_cb, const RawAddress& remote_bda) {
   /* update cb_index[] map */
   p_cb->hid_handle = BTA_HH_GET_LE_DEV_HDL(p_cb->index);
   p_cb->addr = remote_bda;
@@ -429,7 +429,7 @@
  * Description      Utility function find a device control block by BD address.
  *
  ******************************************************************************/
-tBTA_HH_DEV_CB* bta_hh_le_find_dev_cb_by_bda(const bt_bdaddr_t& bda) {
+tBTA_HH_DEV_CB* bta_hh_le_find_dev_cb_by_bda(const RawAddress& bda) {
   uint8_t i;
   tBTA_HH_DEV_CB* p_dev_cb = &bta_hh_cb.kdev[0];
 
@@ -1036,7 +1036,7 @@
  * Parameters:
  *
  ******************************************************************************/
-void bta_hh_le_dis_cback(const bt_bdaddr_t& addr, tDIS_VALUE* p_dis_value) {
+void bta_hh_le_dis_cback(const RawAddress& addr, tDIS_VALUE* p_dis_value) {
   tBTA_HH_DEV_CB* p_cb = bta_hh_le_find_dev_cb_by_bda(addr);
 
   if (p_cb == NULL || p_dis_value == NULL) {
@@ -1100,7 +1100,7 @@
  * Returns          None
  *
  ******************************************************************************/
-void bta_hh_le_encrypt_cback(const bt_bdaddr_t* bd_addr,
+void bta_hh_le_encrypt_cback(const RawAddress* bd_addr,
                              UNUSED_ATTR tBTA_GATT_TRANSPORT transport,
                              UNUSED_ATTR void* p_ref_data, tBTM_STATUS result) {
   uint8_t idx = bta_hh_find_cb(*bd_addr);
@@ -1488,7 +1488,7 @@
   tBTA_HH_DEV_CB* p_dev_cb = (tBTA_HH_DEV_CB*)data;
 
   if (interop_match_addr(INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S,
-                         (bt_bdaddr_t*)&p_dev_cb->addr) == true) {
+                         (RawAddress*)&p_dev_cb->addr) == true) {
     if (tout < 300) tout = 300;
   }
 
@@ -2256,8 +2256,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_hh_le_hid_read_rpt_clt_cfg(const bt_bdaddr_t& bd_addr,
-                                    uint8_t rpt_id) {
+void bta_hh_le_hid_read_rpt_clt_cfg(const RawAddress& bd_addr, uint8_t rpt_id) {
   tBTA_HH_DEV_CB* p_cb = NULL;
   tBTA_HH_LE_RPT* p_rpt;
   uint8_t index = BTA_HH_IDX_INVALID;
diff --git a/bta/hh/bta_hh_utils.cc b/bta/hh/bta_hh_utils.cc
index f45f0a7..756a166 100644
--- a/bta/hh/bta_hh_utils.cc
+++ b/bta/hh/bta_hh_utils.cc
@@ -54,7 +54,7 @@
  * Returns          void
  *
  ******************************************************************************/
-uint8_t bta_hh_find_cb(const bt_bdaddr_t& bda) {
+uint8_t bta_hh_find_cb(const RawAddress& bda) {
   uint8_t xx;
 
   /* See how many active devices there are. */
@@ -370,7 +370,7 @@
  * Returns          tBTA_HH_STATUS  operation status
  *
  ******************************************************************************/
-tBTA_HH_STATUS bta_hh_read_ssr_param(const bt_bdaddr_t& bd_addr,
+tBTA_HH_STATUS bta_hh_read_ssr_param(const RawAddress& bd_addr,
                                      uint16_t* p_max_ssr_lat,
                                      uint16_t* p_min_ssr_tout) {
   tBTA_HH_STATUS status = BTA_HH_ERR;
diff --git a/bta/hl/bta_hl_api.cc b/bta/hl/bta_hl_api.cc
index a9739a6..145c4f2 100644
--- a/bta/hl/bta_hl_api.cc
+++ b/bta/hl/bta_hl_api.cc
@@ -443,7 +443,7 @@
  *
  ******************************************************************************/
 void BTA_HlSdpQuery(uint8_t app_id, tBTA_HL_APP_HANDLE app_handle,
-                    const bt_bdaddr_t& bd_addr) {
+                    const RawAddress& bd_addr) {
   tBTA_HL_API_SDP_QUERY* p_buf =
       (tBTA_HL_API_SDP_QUERY*)osi_malloc(sizeof(tBTA_HL_API_SDP_QUERY));
 
diff --git a/bta/hl/bta_hl_int.h b/bta/hl/bta_hl_int.h
index c4c6aa4..c0ba647 100644
--- a/bta/hl/bta_hl_int.h
+++ b/bta/hl/bta_hl_int.h
@@ -267,7 +267,7 @@
   uint8_t app_id;
   tBTA_HL_APP_HANDLE app_handle;
   uint16_t ctrl_psm;
-  bt_bdaddr_t bd_addr; /* Address of peer device */
+  RawAddress bd_addr;  /* Address of peer device */
   tBTA_SEC sec_mask;   /* security mask for initiating connection*/
 } tBTA_HL_API_CCH_OPEN;
 
@@ -359,7 +359,7 @@
   BT_HDR hdr;
   tBTA_HL_APP_HANDLE app_handle;
   uint8_t app_id;
-  bt_bdaddr_t bd_addr; /* Address of peer device */
+  RawAddress bd_addr; /* Address of peer device */
 } tBTA_HL_API_SDP_QUERY;
 
 typedef struct {
@@ -455,7 +455,7 @@
   uint16_t req_ctrl_psm;
   uint16_t ctrl_psm;
   uint16_t data_psm;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t cch_mtu;
   uint16_t sec_mask;
   tBTA_HL_MCL_HANDLE mcl_handle;
@@ -720,7 +720,7 @@
 extern bool bta_hl_find_mcl_idx_using_handle(tBTA_HL_MCL_HANDLE mcl_handle,
                                              uint8_t* p_app_idx,
                                              uint8_t* p_mcl_idx);
-extern bool bta_hl_find_mcl_idx(uint8_t app_idx, const bt_bdaddr_t& p_bd_addr,
+extern bool bta_hl_find_mcl_idx(uint8_t app_idx, const RawAddress& p_bd_addr,
                                 uint8_t* p_mcl_idx);
 extern bool bta_hl_is_the_first_reliable_existed(uint8_t app_idx,
                                                  uint8_t mcl_idx);
@@ -736,9 +736,9 @@
 extern void bta_hl_sort_cfg_time_idx(uint8_t app_idx, uint8_t* a, uint8_t n);
 extern void bta_hl_compact_mdl_cfg_time(uint8_t app_idx, uint8_t mdep_id);
 extern bool bta_hl_is_mdl_exsit_in_mcl(uint8_t app_idx,
-                                       const bt_bdaddr_t& bd_addr,
+                                       const RawAddress& bd_addr,
                                        tBTA_HL_MDL_ID mdl_id);
-extern bool bta_hl_delete_mdl_cfg(uint8_t app_idx, const bt_bdaddr_t& bd_addr,
+extern bool bta_hl_delete_mdl_cfg(uint8_t app_idx, const RawAddress& bd_addr,
                                   tBTA_HL_MDL_ID mdl_id);
 extern bool bta_hl_is_mdl_value_valid(tBTA_HL_MDL_ID mdl_id);
 extern bool bta_hl_find_mdep_cfg_idx(uint8_t app_idx,
@@ -775,7 +775,7 @@
                                  tBTA_HL_L2CAP_CFG_INFO* p_cfg);
 extern bool bta_hl_validate_chan_cfg(uint8_t app_idx, uint8_t mcl_idx,
                                      uint8_t mdl_idx);
-extern bool bta_hl_is_cong_on(uint8_t app_id, const bt_bdaddr_t& bd_addr,
+extern bool bta_hl_is_cong_on(uint8_t app_id, const RawAddress& bd_addr,
                               tBTA_HL_MDL_ID mdl_id);
 extern void bta_hl_check_cch_close(uint8_t app_idx, uint8_t mcl_idx,
                                    tBTA_HL_DATA* p_data, bool check_dch_setup);
@@ -811,12 +811,12 @@
 extern void bta_hl_build_cch_open_cfm(tBTA_HL* p_evt_data, uint8_t app_id,
                                       tBTA_HL_APP_HANDLE app_handle,
                                       tBTA_HL_MCL_HANDLE mcl_handle,
-                                      const bt_bdaddr_t& bd_addr,
+                                      const RawAddress& bd_addr,
                                       tBTA_HL_STATUS status);
 extern void bta_hl_build_cch_open_ind(tBTA_HL* p_evt_data,
                                       tBTA_HL_APP_HANDLE app_handle,
                                       tBTA_HL_MCL_HANDLE mcl_handle,
-                                      const bt_bdaddr_t& bd_addr);
+                                      const RawAddress& bd_addr);
 extern void bta_hl_build_cch_close_cfm(tBTA_HL* p_evt_data,
                                        tBTA_HL_APP_HANDLE app_handle,
                                        tBTA_HL_MCL_HANDLE mcl_handle,
@@ -844,7 +844,7 @@
                                        tBTA_HL_STATUS status);
 extern void bta_hl_build_sdp_query_cfm(tBTA_HL* p_evt_data, uint8_t app_id,
                                        tBTA_HL_APP_HANDLE app_handle,
-                                       const bt_bdaddr_t& bd_addr,
+                                       const RawAddress& bd_addr,
                                        tBTA_HL_SDP* p_sdp,
                                        tBTA_HL_STATUS status);
 
diff --git a/bta/hl/bta_hl_utils.cc b/bta/hl/bta_hl_utils.cc
index 3e8261f..8cdacc9 100644
--- a/bta/hl/bta_hl_utils.cc
+++ b/bta/hl/bta_hl_utils.cc
@@ -1026,7 +1026,7 @@
  * Returns      bool true-found
  *
  ******************************************************************************/
-bool bta_hl_find_mcl_idx(uint8_t app_idx, const bt_bdaddr_t& p_bd_addr,
+bool bta_hl_find_mcl_idx(uint8_t app_idx, const RawAddress& p_bd_addr,
                          uint8_t* p_mcl_idx) {
   bool found = false;
   uint8_t i;
@@ -1431,7 +1431,7 @@
  *                        false does not exist
  *
  ******************************************************************************/
-bool bta_hl_is_mdl_exsit_in_mcl(uint8_t app_idx, const bt_bdaddr_t& bd_addr,
+bool bta_hl_is_mdl_exsit_in_mcl(uint8_t app_idx, const RawAddress& bd_addr,
                                 tBTA_HL_MDL_ID mdl_id) {
   tBTA_HL_MDL_CFG* p_mdl;
   bool found = false;
@@ -1465,7 +1465,7 @@
  *                        false Failed
  *
  ******************************************************************************/
-bool bta_hl_delete_mdl_cfg(uint8_t app_idx, const bt_bdaddr_t& bd_addr,
+bool bta_hl_delete_mdl_cfg(uint8_t app_idx, const RawAddress& bd_addr,
                            tBTA_HL_MDL_ID mdl_id) {
   tBTA_HL_MDL_CFG* p_mdl;
   bool success = false;
@@ -2419,7 +2419,7 @@
  *                        false not congested
  *
  ******************************************************************************/
-bool bta_hl_is_cong_on(uint8_t app_id, const bt_bdaddr_t& bd_addr,
+bool bta_hl_is_cong_on(uint8_t app_id, const RawAddress& bd_addr,
                        tBTA_HL_MDL_ID mdl_id)
 
 {
@@ -2722,7 +2722,7 @@
 void bta_hl_build_cch_open_cfm(tBTA_HL* p_evt_data, uint8_t app_id,
                                tBTA_HL_APP_HANDLE app_handle,
                                tBTA_HL_MCL_HANDLE mcl_handle,
-                               const bt_bdaddr_t& bd_addr,
+                               const RawAddress& bd_addr,
                                tBTA_HL_STATUS status) {
   p_evt_data->cch_open_cfm.app_id = app_id;
   p_evt_data->cch_open_cfm.app_handle = app_handle;
@@ -2744,7 +2744,7 @@
 void bta_hl_build_cch_open_ind(tBTA_HL* p_evt_data,
                                tBTA_HL_APP_HANDLE app_handle,
                                tBTA_HL_MCL_HANDLE mcl_handle,
-                               const bt_bdaddr_t& bd_addr) {
+                               const RawAddress& bd_addr) {
   p_evt_data->cch_open_ind.app_handle = app_handle;
   p_evt_data->cch_open_ind.mcl_handle = mcl_handle;
   p_evt_data->cch_open_ind.bd_addr = bd_addr;
@@ -2827,7 +2827,7 @@
  ******************************************************************************/
 void bta_hl_build_sdp_query_cfm(tBTA_HL* p_evt_data, uint8_t app_id,
                                 tBTA_HL_APP_HANDLE app_handle,
-                                const bt_bdaddr_t& bd_addr, tBTA_HL_SDP* p_sdp,
+                                const RawAddress& bd_addr, tBTA_HL_SDP* p_sdp,
                                 tBTA_HL_STATUS status)
 
 {
diff --git a/bta/include/bta_ag_api.h b/bta/include/bta_ag_api.h
index e784246..1322368 100644
--- a/bta/include/bta_ag_api.h
+++ b/bta/include/bta_ag_api.h
@@ -332,7 +332,7 @@
 /* data associated with BTA_AG_OPEN_EVT */
 typedef struct {
   tBTA_AG_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_SERVICE_ID service_id;
   tBTA_AG_STATUS status;
 } tBTA_AG_OPEN;
@@ -340,21 +340,21 @@
 /* data associated with BTA_AG_CLOSE_EVT */
 typedef struct {
   tBTA_AG_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tBTA_AG_CLOSE;
 
 /* data associated with BTA_AG_CONN_EVT */
 typedef struct {
   tBTA_AG_HDR hdr;
   tBTA_AG_PEER_FEAT peer_feat;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_AG_PEER_CODEC peer_codec;
 } tBTA_AG_CONN;
 
 /* data associated with AT command event */
 typedef struct {
   tBTA_AG_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   char str[BTA_AG_AT_MAX_LEN + 1];
   uint16_t num;
   uint8_t idx;   /* call number used by CLCC and CHLD */
@@ -512,7 +512,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_AgOpen(uint16_t handle, const bt_bdaddr_t& bd_addr, tBTA_SEC sec_mask,
+void BTA_AgOpen(uint16_t handle, const RawAddress& bd_addr, tBTA_SEC sec_mask,
                 tBTA_SERVICE_MASK services);
 
 /*******************************************************************************
diff --git a/bta/include/bta_api.h b/bta/include/bta_api.h
index 7ee53c3..814038c 100644
--- a/bta/include/bta_api.h
+++ b/bta/include/bta_api.h
@@ -277,7 +277,7 @@
 
 /* Inquiry Filter Condition */
 typedef union {
-  bt_bdaddr_t bd_addr;             /* BD address of  device to filter. */
+  RawAddress bd_addr;              /* BD address of  device to filter. */
   tBTA_DM_COD_COND dev_class_cond; /* Device class filter condition */
 } tBTA_DM_INQ_COND;
 
@@ -346,7 +346,7 @@
 #define BTA_BLE_RSSI_ALERT_LO_BIT BTM_BLE_RSSI_ALERT_LO_BIT /*    (1 << 2) */
 typedef uint8_t tBTA_DM_BLE_RSSI_ALERT_MASK;
 
-typedef void(tBTA_DM_BLE_RSSI_CBACK)(const bt_bdaddr_t& bd_addr,
+typedef void(tBTA_DM_BLE_RSSI_CBACK)(const RawAddress& bd_addr,
                                      tBTA_DM_BLE_RSSI_ALERT_TYPE alert_type,
                                      int8_t rssi);
 
@@ -402,7 +402,7 @@
 typedef struct {
   /* Note: First 3 data members must be, bd_addr, dev_class, and bd_name in
    * order */
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr;  /* BD address peer device. */
   DEV_CLASS dev_class; /* Class of Device */
   BD_NAME bd_name;     /* Name of peer device. */
   bool min_16_digit;   /* true if the pin returned must be at least 16 digits */
@@ -501,19 +501,19 @@
 
 /* Structure associated with BTA_DM_BLE_SEC_REQ_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   BD_NAME bd_name; /* peer device name */
 } tBTA_DM_BLE_SEC_REQ;
 
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   tBTM_LE_KEY_TYPE key_type;
   tBTM_LE_KEY_VALUE* p_key_value;
 } tBTA_DM_BLE_KEY;
 
 /* Structure associated with BTA_DM_AUTH_CMPL_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr;  /* BD address peer device. */
   BD_NAME bd_name;     /* Name of peer device. */
   bool key_present;    /* Valid link key value in key element */
   LINK_KEY key;        /* Link key associated with peer device. */
@@ -526,7 +526,7 @@
 
 /* Structure associated with BTA_DM_AUTHORIZE_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;     /* BD address peer device. */
+  RawAddress bd_addr;      /* BD address peer device. */
   BD_NAME bd_name;         /* Name of peer device. */
   tBTA_SERVICE_ID service; /* Service ID to authorize. */
   DEV_CLASS dev_class;
@@ -534,13 +534,13 @@
 
 /* Structure associated with BTA_DM_LINK_UP_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr; /* BD address peer device. */
   tBTA_TRANSPORT link_type;
 } tBTA_DM_LINK_UP;
 
 /* Structure associated with BTA_DM_LINK_DOWN_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr; /* BD address peer device. */
   uint8_t status;  /* connection open/closed */
   bool is_removed; /* true if device is removed when link is down */
   tBTA_TRANSPORT link_type;
@@ -548,7 +548,7 @@
 
 /* Structure associated with BTA_DM_ROLE_CHG_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr; /* BD address peer device. */
   uint8_t new_role; /* the new connection role */
 } tBTA_DM_ROLE_CHG;
 
@@ -622,7 +622,7 @@
 typedef struct {
   /* Note: First 3 data members must be, bd_addr, dev_class, and bd_name in
    * order */
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr;  /* peer address */
   DEV_CLASS dev_class; /* peer CoD */
   BD_NAME bd_name;     /* peer device name */
   uint32_t num_val; /* the numeric value for comparison. If just_works, do not
@@ -645,7 +645,7 @@
 
 /* Structure associated with BTA_DM_SP_KEYPRESS_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   tBTA_SP_KEY_TYPE notif_type;
 } tBTA_DM_SP_KEY_PRESS;
 
@@ -653,7 +653,7 @@
 typedef struct {
   /* Note: First 3 data members must be, bd_addr, dev_class, and bd_name in
    * order */
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr;  /* peer address */
   DEV_CLASS dev_class; /* peer CoD */
   BD_NAME bd_name;     /* peer device name */
   uint32_t passkey; /* the numeric value for comparison. If just_works, do not
@@ -664,7 +664,7 @@
 typedef struct {
   /* Note: First 3 data members must be, bd_addr, dev_class, and bd_name in
    * order */
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr;  /* peer address */
   DEV_CLASS dev_class; /* peer CoD */
   BD_NAME bd_name;     /* peer device name */
 } tBTA_DM_SP_RMT_OOB;
@@ -719,7 +719,7 @@
 
 /* Structure associated with BTA_DM_INQ_RES_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;         /* BD address peer device. */
+  RawAddress bd_addr;          /* BD address peer device. */
   DEV_CLASS dev_class;         /* Device class of peer device. */
   bool remt_name_not_required; /* Application sets this flag if it already knows
                                   the name of the device */
@@ -748,14 +748,14 @@
 
 /* Structure associated with BTA_DM_DI_DISC_CMPL_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr; /* BD address peer device. */
   uint8_t num_record; /* Number of DI record */
   tBTA_STATUS result;
 } tBTA_DM_DI_DISC_CMPL;
 
 /* Structure associated with BTA_DM_DISC_RES_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;         /* BD address peer device. */
+  RawAddress bd_addr;          /* BD address peer device. */
   BD_NAME bd_name;             /* Name of peer device. */
   tBTA_SERVICE_MASK services;  /* Services found on peer device. */
   uint8_t* p_raw_data;         /* Raw data for discovery DB */
@@ -768,7 +768,7 @@
 
 /* Structure associated with tBTA_DM_DISC_BLE_RES */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address peer device. */
+  RawAddress bd_addr; /* BD address peer device. */
   BD_NAME bd_name;  /* Name of peer device. */
   tBT_UUID service; /* GATT based Services UUID found on peer device. */
 } tBTA_DM_DISC_BLE_RES;
@@ -792,7 +792,7 @@
 typedef void(tBTA_DM_EXEC_CBACK)(void* p_param);
 
 /* Encryption callback*/
-typedef void(tBTA_DM_ENCRYPT_CBACK)(const bt_bdaddr_t& bd_addr,
+typedef void(tBTA_DM_ENCRYPT_CBACK)(const RawAddress& bd_addr,
                                     tBTA_TRANSPORT transport,
                                     tBTA_STATUS result);
 
@@ -1157,7 +1157,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmDiscover(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmDiscover(const RawAddress& bd_addr,
                            tBTA_SERVICE_MASK services,
                            tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search);
 
@@ -1172,7 +1172,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmDiscoverUUID(const bt_bdaddr_t& bd_addr, tSDP_UUID* uuid,
+extern void BTA_DmDiscoverUUID(const RawAddress& bd_addr, tSDP_UUID* uuid,
                                tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search);
 
 /*******************************************************************************
@@ -1185,7 +1185,7 @@
  *                  BTA_FAILURE if cached name is not available
  *
  ******************************************************************************/
-tBTA_STATUS BTA_DmGetCachedRemoteName(const bt_bdaddr_t& remote_device,
+tBTA_STATUS BTA_DmGetCachedRemoteName(const RawAddress& remote_device,
                                       uint8_t** pp_cached_name);
 
 /*******************************************************************************
@@ -1200,7 +1200,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBond(const bt_bdaddr_t& bd_addr);
+extern void BTA_DmBond(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1215,7 +1215,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBondByTransport(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmBondByTransport(const RawAddress& bd_addr,
                                   tBTA_TRANSPORT transport);
 
 /*******************************************************************************
@@ -1229,7 +1229,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBondCancel(const bt_bdaddr_t& bd_addr);
+extern void BTA_DmBondCancel(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1244,7 +1244,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmPinReply(const bt_bdaddr_t& bd_addr, bool accept,
+extern void BTA_DmPinReply(const RawAddress& bd_addr, bool accept,
                            uint8_t pin_len, uint8_t* p_pin);
 
 /*******************************************************************************
@@ -1269,7 +1269,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmConfirm(const bt_bdaddr_t& bd_addr, bool accept);
+extern void BTA_DmConfirm(const RawAddress& bd_addr, bool accept);
 
 /*******************************************************************************
  *
@@ -1284,7 +1284,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmAddDevice(const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class,
+extern void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                             LINK_KEY link_key, tBTA_SERVICE_MASK trusted_mask,
                             bool is_trusted, uint8_t key_type,
                             tBTA_IO_CAP io_cap, uint8_t pin_length);
@@ -1302,7 +1302,7 @@
  *                  BTA_FAIL if operation failed.
  *
  ******************************************************************************/
-extern tBTA_STATUS BTA_DmRemoveDevice(const bt_bdaddr_t& bd_addr);
+extern tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1329,7 +1329,7 @@
  * Returns          0 if the device is NOT connected.
  *
  ******************************************************************************/
-extern uint16_t BTA_DmGetConnectionState(const bt_bdaddr_t& bd_addr);
+extern uint16_t BTA_DmGetConnectionState(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1360,7 +1360,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void BTA_DmCloseACL(const bt_bdaddr_t& bd_addr, bool remove_dev,
+extern void BTA_DmCloseACL(const RawAddress& bd_addr, bool remove_dev,
                            tBTA_TRANSPORT transport);
 
 /*******************************************************************************
@@ -1429,7 +1429,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBleSecurityGrant(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
                                    tBTA_DM_BLE_SEC_GRANT res);
 
 /**
@@ -1451,7 +1451,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBlePasskeyReply(const bt_bdaddr_t& bd_addr, bool accept,
+extern void BTA_DmBlePasskeyReply(const RawAddress& bd_addr, bool accept,
                                   uint32_t passkey);
 
 /*******************************************************************************
@@ -1467,7 +1467,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBleConfirmReply(const bt_bdaddr_t& bd_addr, bool accept);
+extern void BTA_DmBleConfirmReply(const RawAddress& bd_addr, bool accept);
 
 /*******************************************************************************
  *
@@ -1484,7 +1484,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmAddBleDevice(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmAddBleDevice(const RawAddress& bd_addr,
                                tBLE_ADDR_TYPE addr_type,
                                tBT_DEVICE_TYPE dev_type);
 
@@ -1503,7 +1503,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmAddBleKey(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmAddBleKey(const RawAddress& bd_addr,
                             tBTA_LE_KEY_VALUE* p_le_key,
                             tBTA_LE_KEY_TYPE key_type);
 
@@ -1524,7 +1524,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmSetBlePrefConnParams(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmSetBlePrefConnParams(const RawAddress& bd_addr,
                                        uint16_t min_conn_int,
                                        uint16_t max_conn_int,
                                        uint16_t slave_latency,
@@ -1586,7 +1586,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmDiscoverExt(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmDiscoverExt(const RawAddress& bd_addr,
                               tBTA_SERVICE_MASK_EXT* p_services,
                               tBTA_DM_SEARCH_CBACK* p_cback, bool sdp_search);
 
@@ -1606,7 +1606,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmDiscoverByTransport(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmDiscoverByTransport(const RawAddress& bd_addr,
                                       tBTA_SERVICE_MASK_EXT* p_services,
                                       tBTA_DM_SEARCH_CBACK* p_cback,
                                       bool sdp_search,
@@ -1635,7 +1635,7 @@
  *
  *
  ******************************************************************************/
-extern void BTA_DmSetEncryption(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmSetEncryption(const RawAddress& bd_addr,
                                 tBTA_TRANSPORT transport,
                                 tBTA_DM_ENCRYPT_CBACK* p_callback,
                                 tBTA_DM_BLE_SEC_ACT sec_act);
@@ -1683,7 +1683,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBleEnableRemotePrivacy(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmBleEnableRemotePrivacy(const RawAddress& bd_addr,
                                          bool privacy_enable);
 
 /*******************************************************************************
@@ -1702,7 +1702,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBleUpdateConnectionParams(const bt_bdaddr_t& bd_addr,
+extern void BTA_DmBleUpdateConnectionParams(const RawAddress& bd_addr,
                                             uint16_t min_int, uint16_t max_int,
                                             uint16_t latency, uint16_t timeout);
 
@@ -1715,7 +1715,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_DmBleSetDataLength(const bt_bdaddr_t& remote_device,
+extern void BTA_DmBleSetDataLength(const RawAddress& remote_device,
                                    uint16_t tx_data_length);
 
 /*******************************************************************************
diff --git a/bta/include/bta_ar_api.h b/bta/include/bta_ar_api.h
index 3199369..ffa9c19 100644
--- a/bta/include/bta_ar_api.h
+++ b/bta/include/bta_ar_api.h
@@ -86,7 +86,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const bt_bdaddr_t& bd_addr);
+extern void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_av_api.h b/bta/include/bta_av_api.h
index c45ef5c..9add76b 100644
--- a/bta/include/bta_av_api.h
+++ b/bta/include/bta_av_api.h
@@ -263,7 +263,7 @@
 typedef struct {
   tBTA_AV_CHNL chnl;
   tBTA_AV_HNDL hndl;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_AV_STATUS status;
   bool starting;
   tBTA_AV_EDR edr; /* 0, if peer device does not support EDR */
@@ -321,34 +321,34 @@
 typedef struct {
   uint8_t rc_handle;
   tBTA_AV_FEAT peer_features;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   tBTA_AV_STATUS status;
 } tBTA_AV_RC_OPEN;
 
 /* data associated with BTA_AV_RC_CLOSE_EVT */
 typedef struct {
   uint8_t rc_handle;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
 } tBTA_AV_RC_CLOSE;
 
 /* data associated with BTA_AV_RC_BROWSE_OPEN_EVT */
 typedef struct {
   uint8_t rc_handle;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   tBTA_AV_STATUS status;
 } tBTA_AV_RC_BROWSE_OPEN;
 
 /* data associated with BTA_AV_RC_BROWSE_CLOSE_EVT */
 typedef struct {
   uint8_t rc_handle;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
 } tBTA_AV_RC_BROWSE_CLOSE;
 
 /* data associated with BTA_AV_RC_FEAT_EVT */
 typedef struct {
   uint8_t rc_handle;
   tBTA_AV_FEAT peer_features;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
 } tBTA_AV_RC_FEAT;
 
 /* data associated with BTA_AV_REMOTE_CMD_EVT */
@@ -395,11 +395,11 @@
 } tBTA_AV_META_MSG;
 
 /* data associated with BTA_AV_PENDING_EVT */
-typedef struct { bt_bdaddr_t bd_addr; } tBTA_AV_PEND;
+typedef struct { RawAddress bd_addr; } tBTA_AV_PEND;
 
 /* data associated with BTA_AV_REJECT_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_AV_HNDL hndl; /* Handle associated with the stream that rejected the
                         connection. */
 } tBTA_AV_REJECT;
@@ -433,7 +433,7 @@
 
 typedef struct {
   uint8_t* codec_info;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tBTA_AVK_CONFIG;
 
 /* union of data associated with AV Media callback */
@@ -555,7 +555,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_AvOpen(const bt_bdaddr_t& bd_addr, tBTA_AV_HNDL handle, bool use_rc,
+void BTA_AvOpen(const RawAddress& bd_addr, tBTA_AV_HNDL handle, bool use_rc,
                 tBTA_SEC sec_mask, uint16_t uuid);
 
 /*******************************************************************************
@@ -578,7 +578,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_AvDisconnect(const bt_bdaddr_t& bd_addr);
+void BTA_AvDisconnect(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_av_co.h b/bta/include/bta_av_co.h
index 8bcbfe0..0e71ac2 100644
--- a/bta/include/bta_av_co.h
+++ b/bta/include/bta_av_co.h
@@ -61,7 +61,7 @@
  ******************************************************************************/
 void bta_av_co_audio_disc_res(tBTA_AV_HNDL hndl, uint8_t num_seps,
                               uint8_t num_snk, uint8_t num_src,
-                              const bt_bdaddr_t& addr, uint16_t uuid_local);
+                              const RawAddress& addr, uint16_t uuid_local);
 
 /*******************************************************************************
  *
@@ -93,7 +93,7 @@
  *
  ******************************************************************************/
 void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, const uint8_t* p_codec_info,
-                               uint8_t seid, const bt_bdaddr_t& addr,
+                               uint8_t seid, const RawAddress& addr,
                                uint8_t num_protect,
                                const uint8_t* p_protect_info,
                                uint8_t t_local_sep, uint8_t avdt_handle);
diff --git a/bta/include/bta_dm_api.h b/bta/include/bta_dm_api.h
index fd2863c..76cb618 100644
--- a/bta/include/bta_dm_api.h
+++ b/bta/include/bta_dm_api.h
@@ -27,6 +27,6 @@
 #include "stack/include/bt_types.h"
 
 // Brings connection to active mode
-void bta_dm_pm_active(const bt_bdaddr_t& peer_addr);
+void bta_dm_pm_active(const RawAddress& peer_addr);
 
 #endif /* BTA_DM_API_H */
diff --git a/bta/include/bta_dm_ci.h b/bta/include/bta_dm_ci.h
index 1ff7518..a517da5 100644
--- a/bta/include/bta_dm_ci.h
+++ b/bta/include/bta_dm_ci.h
@@ -40,7 +40,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void bta_dm_ci_io_req(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP io_cap,
+extern void bta_dm_ci_io_req(const RawAddress& bd_addr, tBTA_IO_CAP io_cap,
                              tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req);
 
 /*******************************************************************************
@@ -54,7 +54,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void bta_dm_ci_rmt_oob(bool accept, const bt_bdaddr_t& bd_addr,
+extern void bta_dm_ci_rmt_oob(bool accept, const RawAddress& bd_addr,
                               BT_OCTET16 c, BT_OCTET16 r);
 /*******************************************************************************
  *
diff --git a/bta/include/bta_dm_co.h b/bta/include/bta_dm_co.h
index f5b02e0..80e99c4 100644
--- a/bta/include/bta_dm_co.h
+++ b/bta/include/bta_dm_co.h
@@ -52,7 +52,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void bta_dm_co_io_req(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP* p_io_cap,
+extern void bta_dm_co_io_req(const RawAddress& bd_addr, tBTA_IO_CAP* p_io_cap,
                              tBTA_OOB_DATA* p_oob_data,
                              tBTA_AUTH_REQ* p_auth_req, bool is_orig);
 
@@ -73,7 +73,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void bta_dm_co_io_rsp(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP io_cap,
+extern void bta_dm_co_io_rsp(const RawAddress& bd_addr, tBTA_IO_CAP io_cap,
                              tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req);
 
 /*******************************************************************************
@@ -89,7 +89,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void bta_dm_co_lk_upgrade(const bt_bdaddr_t& bd_addr, bool* p_upgrade);
+extern void bta_dm_co_lk_upgrade(const RawAddress& bd_addr, bool* p_upgrade);
 
 /*******************************************************************************
  *
@@ -119,7 +119,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void bta_dm_co_rmt_oob(const bt_bdaddr_t& bd_addr);
+extern void bta_dm_co_rmt_oob(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -189,13 +189,10 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void bta_dm_co_ble_io_req(const bt_bdaddr_t& bd_addr,
-                                 tBTA_IO_CAP* p_io_cap,
-                                 tBTA_OOB_DATA* p_oob_data,
-                                 tBTA_LE_AUTH_REQ* p_auth_req,
-                                 uint8_t* p_max_key_size,
-                                 tBTA_LE_KEY_TYPE* p_init_key,
-                                 tBTA_LE_KEY_TYPE* p_resp_key);
+extern void bta_dm_co_ble_io_req(
+    const RawAddress& bd_addr, tBTA_IO_CAP* p_io_cap, tBTA_OOB_DATA* p_oob_data,
+    tBTA_LE_AUTH_REQ* p_auth_req, uint8_t* p_max_key_size,
+    tBTA_LE_KEY_TYPE* p_init_key, tBTA_LE_KEY_TYPE* p_resp_key);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_gatt_api.h b/bta/include/bta_gatt_api.h
index 061e7cb..8034dc7 100644
--- a/bta/include/bta_gatt_api.h
+++ b/bta/include/bta_gatt_api.h
@@ -266,7 +266,7 @@
   tBTA_GATT_STATUS status;
   uint16_t conn_id;
   tBTA_GATTC_IF client_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_TRANSPORT transport;
   uint16_t mtu;
 } tBTA_GATTC_OPEN;
@@ -275,14 +275,14 @@
   tBTA_GATT_STATUS status;
   uint16_t conn_id;
   tBTA_GATTC_IF client_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect
                               event is reported */
 } tBTA_GATTC_CLOSE;
 
 typedef struct {
   uint16_t conn_id;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint16_t handle;
   uint16_t len;
   uint8_t value[BTA_GATT_MAX_ATTR_LEN];
@@ -298,12 +298,12 @@
   tBTA_GATT_STATUS status;
   tBTA_GATTC_IF client_if;
   uint16_t conn_id;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
 } tBTA_GATTC_OPEN_CLOSE;
 
 typedef struct {
   tBTA_GATTC_IF client_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
 } tBTA_GATTC_ENC_CMPL_CB;
 
 typedef struct {
@@ -336,7 +336,7 @@
   tBTA_GATTC_EXEC_CMPL exec_cmpl; /*  execute complete */
   tBTA_GATTC_NOTIFY notify;       /* notification/indication event data */
   tBTA_GATTC_ENC_CMPL_CB enc_cmpl;
-  bt_bdaddr_t remote_bda;     /* service change event */
+  RawAddress remote_bda;      /* service change event */
   tBTA_GATTC_CFG_MTU cfg_mtu; /* configure MTU operation */
   tBTA_GATTC_CONGEST congest;
   tBTA_GATTC_PHY_UPDATE phy_update;
@@ -465,7 +465,7 @@
 
 typedef struct {
   tBTA_GATT_STATUS status;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   uint32_t trans_id;
   uint16_t conn_id;
   tBTA_GATTS_REQ_DATA* p_data;
@@ -494,7 +494,7 @@
 
 typedef struct {
   tBTA_GATTS_IF server_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   uint16_t conn_id;
   tBTA_GATT_REASON reason; /* report disconnect reason */
   tBTA_GATT_TRANSPORT transport;
@@ -639,10 +639,10 @@
  *
  ******************************************************************************/
 extern void BTA_GATTC_Open(tBTA_GATTC_IF client_if,
-                           const bt_bdaddr_t& remote_bda, bool is_direct,
+                           const RawAddress& remote_bda, bool is_direct,
                            tBTA_GATT_TRANSPORT transport, bool opportunistic);
 extern void BTA_GATTC_Open(tBTA_GATTC_IF client_if,
-                           const bt_bdaddr_t& remote_bda, bool is_direct,
+                           const RawAddress& remote_bda, bool is_direct,
                            tBTA_GATT_TRANSPORT transport, bool opportunistic,
                            uint8_t initiating_phys);
 
@@ -661,7 +661,7 @@
  *
  ******************************************************************************/
 extern void BTA_GATTC_CancelOpen(tBTA_GATTC_IF client_if,
-                                 const bt_bdaddr_t& remote_bda, bool is_direct);
+                                 const RawAddress& remote_bda, bool is_direct);
 
 /*******************************************************************************
  *
@@ -878,7 +878,7 @@
  *
  ******************************************************************************/
 extern tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications(
-    tBTA_GATTC_IF client_if, const bt_bdaddr_t& remote_bda, uint16_t handle);
+    tBTA_GATTC_IF client_if, const RawAddress& remote_bda, uint16_t handle);
 
 /*******************************************************************************
  *
@@ -895,7 +895,7 @@
  *
  ******************************************************************************/
 extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications(
-    tBTA_GATTC_IF client_if, const bt_bdaddr_t& remote_bda, uint16_t handle);
+    tBTA_GATTC_IF client_if, const RawAddress& remote_bda, uint16_t handle);
 
 /*******************************************************************************
  *
@@ -960,7 +960,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_GATTC_Refresh(const bt_bdaddr_t& remote_bda);
+extern void BTA_GATTC_Refresh(const RawAddress& remote_bda);
 
 /*******************************************************************************
  *
@@ -1134,7 +1134,7 @@
  *
  ******************************************************************************/
 extern void BTA_GATTS_Open(tBTA_GATTS_IF server_if,
-                           const bt_bdaddr_t& remote_bda, bool is_direct,
+                           const RawAddress& remote_bda, bool is_direct,
                            tBTA_GATT_TRANSPORT transport);
 
 /*******************************************************************************
@@ -1152,7 +1152,7 @@
  *
  ******************************************************************************/
 extern void BTA_GATTS_CancelOpen(tBTA_GATTS_IF server_if,
-                                 const bt_bdaddr_t& remote_bda, bool is_direct);
+                                 const RawAddress& remote_bda, bool is_direct);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_hd_api.h b/bta/include/bta_hd_api.h
index 564d2b1..31cb7a0 100644
--- a/bta/include/bta_hd_api.h
+++ b/bta/include/bta_hd_api.h
@@ -79,11 +79,11 @@
 typedef struct {
   tBTA_HD_STATUS status;
   bool in_use;
-  bt_bdaddr_t bda;
+  RawAddress bda;
 } tBTA_HD_REG_STATUS;
 
 typedef struct {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tBTA_HD_STATUS status;
 } tBTA_HD_CONN;
 
@@ -215,7 +215,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HdConnect(const bt_bdaddr_t& addr);
+extern void BTA_HdConnect(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -237,7 +237,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HdAddDevice(const bt_bdaddr_t& addr);
+extern void BTA_HdAddDevice(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -248,7 +248,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HdRemoveDevice(const bt_bdaddr_t& addr);
+extern void BTA_HdRemoveDevice(const RawAddress& addr);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_hf_client_api.h b/bta/include/bta_hf_client_api.h
index 73656c2..5d725e7 100644
--- a/bta/include/bta_hf_client_api.h
+++ b/bta/include/bta_hf_client_api.h
@@ -164,27 +164,27 @@
 
 /* data associated with BTA_HF_CLIENT_REGISTER_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HF_CLIENT_STATUS status;
 } tBTA_HF_CLIENT_REGISTER;
 
 /* data associated with BTA_HF_CLIENT_OPEN_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t handle;  // Handle for client control block
   tBTA_HF_CLIENT_STATUS status;
 } tBTA_HF_CLIENT_OPEN;
 
 /* data associated with BTA_HF_CLIENT_CONN_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HF_CLIENT_PEER_FEAT peer_feat;
   tBTA_HF_CLIENT_CHLD_FEAT chld_feat;
 } tBTA_HF_CLIENT_CONN;
 
 /* data associated with BTA_HF_CLIENT_IND_EVT event */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HF_CLIENT_IND_TYPE type;
   uint16_t value;
 } tBTA_HF_CLIENT_IND;
@@ -192,27 +192,27 @@
 /* data associated with BTA_HF_CLIENT_OPERATOR_NAME_EVT */
 #define BTA_HF_CLIENT_OPERATOR_NAME_LEN 16
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   char name[BTA_HF_CLIENT_OPERATOR_NAME_LEN + 1];
 } tBTA_HF_CLIENT_OPERATOR_NAME;
 
 /* data associated with BTA_HF_CLIENT_CLIP_EVT  and BTA_HF_CLIENT_CCWA_EVT*/
 #define BTA_HF_CLIENT_NUMBER_LEN 32
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   char number[BTA_HF_CLIENT_NUMBER_LEN + 1];
 } tBTA_HF_CLIENT_NUMBER;
 
 /* data associated with BTA_HF_CLIENT_AT_RESULT_EVT event */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HF_CLIENT_AT_RESULT_TYPE type;
   uint16_t cme;
 } tBTA_HF_CLIENT_AT_RESULT;
 
 /* data associated with BTA_HF_CLIENT_CLCC_EVT event */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint32_t idx;
   bool inc;
   uint8_t status;
@@ -223,21 +223,21 @@
 
 /* data associated with BTA_HF_CLIENT_CNUM_EVT event */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t service;
   char number[BTA_HF_CLIENT_NUMBER_LEN + 1];
 } tBTA_HF_CLIENT_CNUM;
 
 /* data associated with other events */
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t value;
 } tBTA_HF_CLIENT_VAL;
 
 /* union of data associated with AG callback */
 typedef union {
   // Common BD ADDR field for all tyepdefs
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HF_CLIENT_REGISTER reg;
   tBTA_HF_CLIENT_OPEN open;
   tBTA_HF_CLIENT_CONN conn;
@@ -303,7 +303,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_HfClientOpen(const bt_bdaddr_t& bd_addr, tBTA_SEC sec_mask,
+void BTA_HfClientOpen(const RawAddress& bd_addr, tBTA_SEC sec_mask,
                       uint16_t* p_handle);
 
 /*******************************************************************************
diff --git a/bta/include/bta_hh_api.h b/bta/include/bta_hh_api.h
index 8e30d5d..6960d6f 100644
--- a/bta/include/bta_hh_api.h
+++ b/bta/include/bta_hh_api.h
@@ -204,7 +204,7 @@
 
 /* callback event data for BTA_HH_OPEN_EVT */
 typedef struct {
-  bt_bdaddr_t bda;       /* HID device bd address    */
+  RawAddress bda;        /* HID device bd address    */
   tBTA_HH_STATUS status; /* operation status         */
   uint8_t handle;        /* device handle            */
 #if (BTA_HH_LE_INCLUDED == TRUE)
@@ -330,7 +330,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HhOpen(const bt_bdaddr_t& dev_bda, tBTA_HH_PROTO_MODE mode,
+extern void BTA_HhOpen(const RawAddress& dev_bda, tBTA_HH_PROTO_MODE mode,
                        tBTA_SEC sec_mask);
 
 /*******************************************************************************
@@ -453,7 +453,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HhSendData(uint8_t dev_handle, const bt_bdaddr_t& dev_bda,
+extern void BTA_HhSendData(uint8_t dev_handle, const RawAddress& dev_bda,
                            BT_HDR* p_buf);
 
 /*******************************************************************************
@@ -478,7 +478,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTA_HhAddDev(const bt_bdaddr_t& bda, tBTA_HH_ATTR_MASK attr_mask,
+extern void BTA_HhAddDev(const RawAddress& bda, tBTA_HH_ATTR_MASK attr_mask,
                          uint8_t sub_class, uint8_t app_id,
                          tBTA_HH_DEV_DSCP_INFO dscp_info);
 /*******************************************************************************
@@ -510,7 +510,7 @@
                                uint16_t report_len);
 
 /* test commands */
-extern void bta_hh_le_hid_read_rpt_clt_cfg(const bt_bdaddr_t& bd_addr,
+extern void bta_hh_le_hid_read_rpt_clt_cfg(const RawAddress& bd_addr,
                                            uint8_t rpt_id);
 
 #endif /* BTA_HH_API_H */
diff --git a/bta/include/bta_hh_co.h b/bta/include/bta_hh_co.h
index 79ebbe9..7781d00 100644
--- a/bta/include/bta_hh_co.h
+++ b/bta/include/bta_hh_co.h
@@ -48,7 +48,7 @@
  ******************************************************************************/
 extern void bta_hh_co_data(uint8_t dev_handle, uint8_t* p_rpt, uint16_t len,
                            tBTA_HH_PROTO_MODE mode, uint8_t sub_class,
-                           uint8_t ctry_code, const bt_bdaddr_t& peer_addr,
+                           uint8_t ctry_code, const RawAddress& peer_addr,
                            uint8_t app_id);
 
 /*******************************************************************************
@@ -94,7 +94,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-extern void bta_hh_le_co_rpt_info(const bt_bdaddr_t& remote_bda,
+extern void bta_hh_le_co_rpt_info(const RawAddress& remote_bda,
                                   tBTA_HH_RPT_CACHE_ENTRY* p_entry,
                                   uint8_t app_id);
 
@@ -115,7 +115,7 @@
  *
  ******************************************************************************/
 extern tBTA_HH_RPT_CACHE_ENTRY* bta_hh_le_co_cache_load(
-    const bt_bdaddr_t& remote_bda, uint8_t* p_num_rpt, uint8_t app_id);
+    const RawAddress& remote_bda, uint8_t* p_num_rpt, uint8_t app_id);
 
 /*******************************************************************************
  *
@@ -128,7 +128,7 @@
  * Returns          none
  *
  ******************************************************************************/
-extern void bta_hh_le_co_reset_rpt_cache(const bt_bdaddr_t& remote_bda,
+extern void bta_hh_le_co_reset_rpt_cache(const RawAddress& remote_bda,
                                          uint8_t app_id);
 
 #endif /* #if (BTA_HH_LE_INCLUDED == TRUE) */
diff --git a/bta/include/bta_hl_api.h b/bta/include/bta_hl_api.h
index 04c9983..414d42d 100644
--- a/bta/include/bta_hl_api.h
+++ b/bta/include/bta_hl_api.h
@@ -263,7 +263,7 @@
   bool active; /* true if this item is in use */
   tBTA_HL_DCH_MODE dch_mode;
   uint8_t fcs;
-  bt_bdaddr_t peer_bd_addr;
+  RawAddress peer_bd_addr;
 } tBTA_HL_MDL_CFG;
 
 /* Maximum number of supported feature list items (list_elem in
@@ -297,7 +297,7 @@
 
 typedef struct {
   uint16_t ctrl_psm;
-  bt_bdaddr_t bd_addr; /* Address of peer device */
+  RawAddress bd_addr; /* Address of peer device */
   tBTA_SEC sec_mask; /* security mask for initiating connection*/
 } tBTA_HL_CCH_OPEN_PARAM;
 
@@ -429,7 +429,7 @@
 typedef struct {
   tBTA_HL_MCL_HANDLE mcl_handle;
   tBTA_HL_APP_HANDLE app_handle;
-  bt_bdaddr_t bd_addr; /* address of peer device */
+  RawAddress bd_addr; /* address of peer device */
 } tBTA_HL_CCH_OPEN_IND;
 
 typedef struct {
@@ -437,7 +437,7 @@
   uint8_t app_id;
   tBTA_HL_MCL_HANDLE mcl_handle;
   tBTA_HL_APP_HANDLE app_handle;
-  bt_bdaddr_t bd_addr; /* address of peer device */
+  RawAddress bd_addr; /* address of peer device */
 } tBTA_HL_CCH_OPEN_CFM;
 
 typedef struct {
@@ -447,7 +447,7 @@
   tBTA_HL_MDL_ID mdl_id; /* MCAP data link ID for this
                             data channel conenction    */
   tBTA_HL_DCH_CFG cfg;   /* dch cfg requested by the peer device */
-  bt_bdaddr_t bd_addr;   /* address of peer device */
+  RawAddress bd_addr;    /* address of peer device */
 
 } tBTA_HL_DCH_CREATE_IND;
 
@@ -529,7 +529,7 @@
   tBTA_HL_STATUS status;
   uint8_t app_id;
   tBTA_HL_APP_HANDLE app_handle;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HL_SDP* p_sdp;
 } tBTA_HL_SDP_QUERY_CFM;
 
@@ -800,7 +800,7 @@
  *
  ******************************************************************************/
 extern void BTA_HlSdpQuery(uint8_t app_id, tBTA_HL_APP_HANDLE app_handle,
-                           const bt_bdaddr_t& bd_addr);
+                           const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_jv_api.h b/bta/include/bta_jv_api.h
index 8d68bd6..54824c4 100644
--- a/bta/include/bta_jv_api.h
+++ b/bta/include/bta_jv_api.h
@@ -187,7 +187,7 @@
 typedef struct {
   tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
   uint32_t handle;       /* The connection handle */
-  bt_bdaddr_t rem_bda;   /* The peer address */
+  RawAddress rem_bda;    /* The peer address */
   int32_t tx_mtu;        /* The transmit MTU */
 } tBTA_JV_L2CAP_OPEN;
 
@@ -195,7 +195,7 @@
 typedef struct {
   tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
   uint32_t handle;       /* The connection handle */
-  bt_bdaddr_t rem_bda;   /* The peer address */
+  RawAddress rem_bda;    /* The peer address */
   int32_t tx_mtu;        /* The transmit MTU */
   void** p_p_cback;      /* set them for new socket */
   void** p_user_data;    /* set them for new socket */
@@ -254,7 +254,7 @@
 typedef struct {
   tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
   uint16_t channel;      /* The connection channel */
-  bt_bdaddr_t addr;      /* The peer address */
+  RawAddress addr;       /* The peer address */
   uint32_t req_id;       /* The req_id in the associated BTA_JvL2capWrite() */
   uint8_t* p_data;       /* The buffer where data is held */
   uint16_t len;          /* The length of the data written. */
@@ -265,14 +265,14 @@
 typedef struct {
   tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
   uint32_t handle;       /* The connection handle */
-  bt_bdaddr_t rem_bda;   /* The peer address */
+  RawAddress rem_bda;    /* The peer address */
 } tBTA_JV_RFCOMM_OPEN;
 /* data associated with BTA_JV_RFCOMM_SRV_OPEN_EVT */
 typedef struct {
   tBTA_JV_STATUS status;      /* Whether the operation succeeded or failed. */
   uint32_t handle;            /* The connection handle */
   uint32_t new_listen_handle; /* The new listen handle */
-  bt_bdaddr_t rem_bda;        /* The peer address */
+  RawAddress rem_bda;         /* The peer address */
 } tBTA_JV_RFCOMM_SRV_OPEN;
 
 /* data associated with BTA_JV_RFCOMM_CLOSE_EVT */
@@ -423,7 +423,7 @@
  *                  false if not.
  *
  ******************************************************************************/
-bool BTA_JvIsEncrypted(const bt_bdaddr_t& bd_addr);
+bool BTA_JvIsEncrypted(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -474,7 +474,7 @@
  *                  BTA_JV_FAILURE, otherwise.
  *
  ******************************************************************************/
-tBTA_JV_STATUS BTA_JvStartDiscovery(const bt_bdaddr_t& bd_addr,
+tBTA_JV_STATUS BTA_JvStartDiscovery(const RawAddress& bd_addr,
                                     uint16_t num_uuid, tSDP_UUID* p_uuid_list,
                                     uint32_t rfcomm_slot_id);
 
@@ -522,7 +522,7 @@
                                     const tL2CAP_ERTM_INFO* ertm_info,
                                     uint16_t remote_chan, uint16_t rx_mtu,
                                     tL2CAP_CFG_INFO* cfg,
-                                    const bt_bdaddr_t& peer_bd_addr,
+                                    const RawAddress& peer_bd_addr,
                                     tBTA_JV_L2CAP_CBACK* p_cback,
                                     uint32_t l2cap_socket_id);
 
@@ -544,7 +544,7 @@
 tBTA_JV_STATUS BTA_JvL2capConnect(
     int conn_type, tBTA_SEC sec_mask, tBTA_JV_ROLE role,
     const tL2CAP_ERTM_INFO* ertm_info, uint16_t remote_psm, uint16_t rx_mtu,
-    tL2CAP_CFG_INFO* cfg, const bt_bdaddr_t& peer_bd_addr,
+    tL2CAP_CFG_INFO* cfg, const RawAddress& peer_bd_addr,
     tBTA_JV_L2CAP_CBACK* p_cback, uint32_t l2cap_socket_id);
 
 /*******************************************************************************
@@ -703,7 +703,7 @@
  *                  BTA_JV_FAILURE, otherwise.
  *
  ******************************************************************************/
-tBTA_JV_STATUS BTA_JvL2capWriteFixed(uint16_t channel, const bt_bdaddr_t& addr,
+tBTA_JV_STATUS BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
                                      uint32_t req_id,
                                      tBTA_JV_L2CAP_CBACK* p_cback,
                                      uint8_t* p_data, uint16_t len,
@@ -727,7 +727,7 @@
  ******************************************************************************/
 tBTA_JV_STATUS BTA_JvRfcommConnect(tBTA_SEC sec_mask, tBTA_JV_ROLE role,
                                    uint8_t remote_scn,
-                                   const bt_bdaddr_t& peer_bd_addr,
+                                   const RawAddress& peer_bd_addr,
                                    tBTA_JV_RFCOMM_CBACK* p_cback,
                                    uint32_t rfcomm_slot_id);
 
diff --git a/bta/include/bta_mce_api.h b/bta/include/bta_mce_api.h
index def3292..27d6236 100644
--- a/bta/include/bta_mce_api.h
+++ b/bta/include/bta_mce_api.h
@@ -61,7 +61,7 @@
 /* data associated with BTA_MCE_MAS_DISCOVERY_COMP_EVT */
 typedef struct {
   tBTA_MCE_STATUS status;
-  bt_bdaddr_t remote_addr;
+  RawAddress remote_addr;
   int num_mas;
   tBTA_MCE_MAS_INFO mas[BTA_MCE_MAX_MAS_INSTANCES];
 } tBTA_MCE_MAS_DISCOVERY_COMP;
@@ -116,6 +116,6 @@
  *                  BTA_MCE_FAILURE, otherwise.
  *
  ******************************************************************************/
-extern tBTA_MCE_STATUS BTA_MceGetRemoteMasInstances(const bt_bdaddr_t& bd_addr);
+extern tBTA_MCE_STATUS BTA_MceGetRemoteMasInstances(const RawAddress& bd_addr);
 
 #endif /* BTA_MCE_API_H */
diff --git a/bta/include/bta_pan_api.h b/bta/include/bta_pan_api.h
index 00b8ddd..1eaaa2d 100644
--- a/bta/include/bta_pan_api.h
+++ b/bta/include/bta_pan_api.h
@@ -69,14 +69,14 @@
 
 /* Event associated with BTA_PAN_OPENING_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* BD address of peer device. */
+  RawAddress bd_addr; /* BD address of peer device. */
   uint16_t handle; /* Handle associated with this connection. */
 
 } tBTA_PAN_OPENING;
 
 /* Event associated with BTA_PAN_OPEN_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;      /* BD address of peer device. */
+  RawAddress bd_addr;       /* BD address of peer device. */
   uint16_t handle;          /* Handle associated with this connection. */
   tBTA_PAN_STATUS status;   /* status of open event */
   tBTA_PAN_ROLE local_role; /* Local device PAN role for the connection */
@@ -161,7 +161,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_PanOpen(const bt_bdaddr_t& bd_addr, tBTA_PAN_ROLE local_role,
+void BTA_PanOpen(const RawAddress& bd_addr, tBTA_PAN_ROLE local_role,
                  tBTA_PAN_ROLE peer_role);
 
 /*******************************************************************************
diff --git a/bta/include/bta_pan_ci.h b/bta/include/bta_pan_ci.h
index 13e8c2d..889d77b 100644
--- a/bta/include/bta_pan_ci.h
+++ b/bta/include/bta_pan_ci.h
@@ -91,8 +91,8 @@
  * Returns          true if flow enabled
  *
  ******************************************************************************/
-extern void bta_pan_ci_rx_writebuf(uint16_t handle, const bt_bdaddr_t& src,
-                                   const bt_bdaddr_t& dst, uint16_t protocol,
+extern void bta_pan_ci_rx_writebuf(uint16_t handle, const RawAddress& src,
+                                   const RawAddress& dst, uint16_t protocol,
                                    BT_HDR* p_buf, bool ext);
 
 /*******************************************************************************
@@ -108,8 +108,8 @@
  * Returns          void
  *
  ******************************************************************************/
-extern BT_HDR* bta_pan_ci_readbuf(uint16_t handle, bt_bdaddr_t& src,
-                                  bt_bdaddr_t& dst, uint16_t* p_protocol,
+extern BT_HDR* bta_pan_ci_readbuf(uint16_t handle, RawAddress& src,
+                                  RawAddress& dst, uint16_t* p_protocol,
                                   bool* p_ext, bool* p_forward);
 
 /*******************************************************************************
diff --git a/bta/include/bta_pan_co.h b/bta/include/bta_pan_co.h
index 1b96919..1ce512d 100644
--- a/bta/include/bta_pan_co.h
+++ b/bta/include/bta_pan_co.h
@@ -75,7 +75,7 @@
  ******************************************************************************/
 extern void bta_pan_co_open(uint16_t handle, uint8_t app_id,
                             tBTA_PAN_ROLE local_role, tBTA_PAN_ROLE peer_role,
-                            const bt_bdaddr_t& peer_addr);
+                            const RawAddress& peer_addr);
 
 /*******************************************************************************
  *
@@ -134,7 +134,7 @@
  *
  ******************************************************************************/
 extern void bta_pan_co_tx_write(uint16_t handle, uint8_t app_id,
-                                const bt_bdaddr_t& src, const bt_bdaddr_t& dst,
+                                const RawAddress& src, const RawAddress& dst,
                                 uint16_t protocol, uint8_t* p_data,
                                 uint16_t len, bool ext, bool forward);
 
@@ -152,9 +152,9 @@
  *
  ******************************************************************************/
 extern void bta_pan_co_tx_writebuf(uint16_t handle, uint8_t app_id,
-                                   const bt_bdaddr_t& src,
-                                   const bt_bdaddr_t& dst, uint16_t protocol,
-                                   BT_HDR* p_buf, bool ext, bool forward);
+                                   const RawAddress& src, const RawAddress& dst,
+                                   uint16_t protocol, BT_HDR* p_buf, bool ext,
+                                   bool forward);
 
 /*******************************************************************************
  *
diff --git a/bta/include/bta_sdp_api.h b/bta/include/bta_sdp_api.h
index 3a0c4fa..4dc5885 100644
--- a/bta/include/bta_sdp_api.h
+++ b/bta/include/bta_sdp_api.h
@@ -54,7 +54,7 @@
 /* data associated with BTA_SDP_DISCOVERY_COMP_EVT */
 typedef struct {
   tBTA_SDP_STATUS status;
-  bt_bdaddr_t remote_addr;
+  RawAddress remote_addr;
   tBT_UUID uuid;
   int record_count;
   bluetooth_sdp_record records[BTA_SDP_MAX_RECORDS];
@@ -103,7 +103,7 @@
  *                  BTA_SDP_FAIL if internal failure.
  *
  ******************************************************************************/
-extern tBTA_SDP_STATUS BTA_SdpSearch(const bt_bdaddr_t& bd_addr,
+extern tBTA_SDP_STATUS BTA_SdpSearch(const RawAddress& bd_addr,
                                      tSDP_UUID* uuid);
 
 /*******************************************************************************
diff --git a/bta/jv/bta_jv_act.cc b/bta/jv/bta_jv_act.cc
index 1c4a283..911534c 100644
--- a/bta/jv/bta_jv_act.cc
+++ b/bta/jv/bta_jv_act.cc
@@ -52,7 +52,7 @@
 struct fc_client {
   struct fc_client* next_all_list;
   struct fc_client* next_chan_list;
-  bt_bdaddr_t remote_addr;
+  RawAddress remote_addr;
   uint32_t id;
   tBTA_JV_L2CAP_CBACK* p_cback;
   uint32_t l2cap_socket_id;
@@ -75,10 +75,10 @@
 static struct fc_channel* fc_channels;
 static uint32_t fc_next_id;
 
-static void fcchan_conn_chng_cbk(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void fcchan_conn_chng_cbk(uint16_t chan, const RawAddress& bd_addr,
                                  bool connected, uint16_t reason,
                                  tBT_TRANSPORT);
-static void fcchan_data_cbk(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void fcchan_data_cbk(uint16_t chan, const RawAddress& bd_addr,
                             BT_HDR* p_buf);
 
 extern void uuid_to_string_legacy(bt_uuid_t* p_uuid, char* str, size_t str_len);
@@ -500,7 +500,7 @@
 static tBTA_JV_PM_CB* bta_jv_alloc_set_pm_profile_cb(uint32_t jv_handle,
                                                      tBTA_JV_PM_ID app_id) {
   bool bRfcHandle = (jv_handle & BTA_JV_RFCOMM_MASK) != 0;
-  bt_bdaddr_t peer_bd_addr;
+  RawAddress peer_bd_addr;
   int i, j;
   tBTA_JV_PM_CB** pp_cb;
 
@@ -524,7 +524,7 @@
         for (j = 0; j < BTA_JV_MAX_L2C_CONN; j++) {
           if (jv_handle == bta_jv_cb.l2c_cb[j].handle) {
             pp_cb = &bta_jv_cb.l2c_cb[j].p_pm_cb;
-            const bt_bdaddr_t* p_bd_addr =
+            const RawAddress* p_bd_addr =
                 GAP_ConnGetRemoteAddr((uint16_t)jv_handle);
             if (p_bd_addr)
               peer_bd_addr = *p_bd_addr;
@@ -1428,7 +1428,7 @@
   tBTA_JV_RFC_CB* p_cb = bta_jv_rfc_port_to_cb(port_handle);
   tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
   tBTA_JV evt_data;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
   uint16_t lcid;
   tBTA_JV_RFCOMM_CBACK* p_cback; /* the callback function */
 
@@ -1640,7 +1640,7 @@
   tBTA_JV_PCB* p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
   tBTA_JV_RFC_CB* p_cb = bta_jv_rfc_port_to_cb(port_handle);
   tBTA_JV evt_data;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
   uint16_t lcid;
   APPL_TRACE_DEBUG("bta_jv_port_mgmt_sr_cback, code:%d, port_handle:%d", code,
                    port_handle);
@@ -2193,7 +2193,7 @@
 
 /* pass NULL to find servers */
 static struct fc_client* fcclient_find_by_addr(struct fc_client* start,
-                                               const bt_bdaddr_t* addr) {
+                                               const RawAddress* addr) {
   struct fc_client* t = start;
 
   while (t) {
@@ -2295,7 +2295,7 @@
   osi_free(fc);
 }
 
-static void fcchan_conn_chng_cbk(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void fcchan_conn_chng_cbk(uint16_t chan, const RawAddress& bd_addr,
                                  bool connected, uint16_t reason,
                                  tBT_TRANSPORT transport) {
   tBTA_JV init_evt;
@@ -2377,7 +2377,7 @@
   }
 }
 
-static void fcchan_data_cbk(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void fcchan_data_cbk(uint16_t chan, const RawAddress& bd_addr,
                             BT_HDR* p_buf) {
   tBTA_JV evt_data;
   struct fc_channel* tc;
diff --git a/bta/jv/bta_jv_api.cc b/bta/jv/bta_jv_api.cc
index 8f6b34f..0478a3b 100644
--- a/bta/jv/bta_jv_api.cc
+++ b/bta/jv/bta_jv_api.cc
@@ -113,7 +113,7 @@
  *                  false if not.
  *
  ******************************************************************************/
-bool BTA_JvIsEncrypted(const bt_bdaddr_t& bd_addr) {
+bool BTA_JvIsEncrypted(const RawAddress& bd_addr) {
   bool is_encrypted = false;
   uint8_t sec_flags, le_flags;
 
@@ -213,7 +213,7 @@
  *                  BTA_JV_FAILURE, otherwise.
  *
  ******************************************************************************/
-tBTA_JV_STATUS BTA_JvStartDiscovery(const bt_bdaddr_t& bd_addr,
+tBTA_JV_STATUS BTA_JvStartDiscovery(const RawAddress& bd_addr,
                                     uint16_t num_uuid, tSDP_UUID* p_uuid_list,
                                     uint32_t rfcomm_slot_id) {
   tBTA_JV_API_START_DISCOVERY* p_msg = (tBTA_JV_API_START_DISCOVERY*)osi_malloc(
@@ -302,7 +302,7 @@
                                     const tL2CAP_ERTM_INFO* ertm_info,
                                     uint16_t remote_chan, uint16_t rx_mtu,
                                     tL2CAP_CFG_INFO* cfg,
-                                    const bt_bdaddr_t& peer_bd_addr,
+                                    const RawAddress& peer_bd_addr,
                                     tBTA_JV_L2CAP_CBACK* p_cback,
                                     uint32_t l2cap_socket_id) {
   APPL_TRACE_API("%s", __func__);
@@ -355,7 +355,7 @@
 tBTA_JV_STATUS BTA_JvL2capConnect(
     int conn_type, tBTA_SEC sec_mask, tBTA_JV_ROLE role,
     const tL2CAP_ERTM_INFO* ertm_info, uint16_t remote_psm, uint16_t rx_mtu,
-    tL2CAP_CFG_INFO* cfg, const bt_bdaddr_t& peer_bd_addr,
+    tL2CAP_CFG_INFO* cfg, const RawAddress& peer_bd_addr,
     tBTA_JV_L2CAP_CBACK* p_cback, uint32_t l2cap_socket_id) {
   APPL_TRACE_API("%s", __func__);
 
@@ -720,7 +720,7 @@
  *                  BTA_JV_FAILURE, otherwise.
  *
  ******************************************************************************/
-tBTA_JV_STATUS BTA_JvL2capWriteFixed(uint16_t channel, const bt_bdaddr_t& addr,
+tBTA_JV_STATUS BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
                                      uint32_t req_id,
                                      tBTA_JV_L2CAP_CBACK* p_cback,
                                      uint8_t* p_data, uint16_t len,
@@ -763,7 +763,7 @@
  ******************************************************************************/
 tBTA_JV_STATUS BTA_JvRfcommConnect(tBTA_SEC sec_mask, tBTA_JV_ROLE role,
                                    uint8_t remote_scn,
-                                   const bt_bdaddr_t& peer_bd_addr,
+                                   const RawAddress& peer_bd_addr,
                                    tBTA_JV_RFCOMM_CBACK* p_cback,
                                    uint32_t rfcomm_slot_id) {
   APPL_TRACE_API("%s", __func__);
diff --git a/bta/jv/bta_jv_int.h b/bta/jv/bta_jv_int.h
index 46b5b32..94ee085 100644
--- a/bta/jv/bta_jv_int.h
+++ b/bta/jv/bta_jv_int.h
@@ -78,7 +78,7 @@
 /* data type for BTA_JV_API_START_DISCOVERY_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t num_uuid;
   tSDP_UUID uuid_list[BTA_JV_MAX_UUIDS];
   uint16_t num_attr;
@@ -97,7 +97,7 @@
   uint32_t handle;      /* The connection handle */
   uint8_t state;        /* state: see above enum */
   tBTA_JV_PM_ID app_id; /* JV app specific id indicating power table to use */
-  bt_bdaddr_t peer_bd_addr; /* Peer BD address */
+  RawAddress peer_bd_addr; /* Peer BD address */
 } tBTA_JV_PM_CB;
 
 enum {
@@ -163,7 +163,7 @@
     uint16_t remote_chan;
   };
   uint16_t rx_mtu;
-  bt_bdaddr_t peer_bd_addr;
+  RawAddress peer_bd_addr;
   int32_t has_cfg;
   tL2CAP_CFG_INFO cfg;
   int32_t has_ertm_info;
@@ -224,7 +224,7 @@
 typedef struct {
   BT_HDR hdr;
   uint16_t channel;
-  bt_bdaddr_t addr;
+  RawAddress addr;
   uint32_t req_id;
   tBTA_JV_L2CAP_CBACK* p_cback;
   uint8_t* p_data;
@@ -238,7 +238,7 @@
   tBTA_SEC sec_mask;
   tBTA_JV_ROLE role;
   uint8_t remote_scn;
-  bt_bdaddr_t peer_bd_addr;
+  RawAddress peer_bd_addr;
   tBTA_JV_RFCOMM_CBACK* p_cback;
   uint32_t rfcomm_slot_id;
 } tBTA_JV_API_RFCOMM_CONNECT;
diff --git a/bta/mce/bta_mce_api.cc b/bta/mce/bta_mce_api.cc
index 70d1347..b44c210 100644
--- a/bta/mce/bta_mce_api.cc
+++ b/bta/mce/bta_mce_api.cc
@@ -91,7 +91,7 @@
  *                  BTA_MCE_FAILURE, otherwise.
  *
  ******************************************************************************/
-tBTA_MCE_STATUS BTA_MceGetRemoteMasInstances(const bt_bdaddr_t& bd_addr) {
+tBTA_MCE_STATUS BTA_MceGetRemoteMasInstances(const RawAddress& bd_addr) {
   tBTA_MCE_API_GET_REMOTE_MAS_INSTANCES* p_msg =
       (tBTA_MCE_API_GET_REMOTE_MAS_INSTANCES*)osi_malloc(
           sizeof(tBTA_MCE_API_GET_REMOTE_MAS_INSTANCES));
diff --git a/bta/mce/bta_mce_int.h b/bta/mce/bta_mce_int.h
index 7d7c8fb..cff5875 100644
--- a/bta/mce/bta_mce_int.h
+++ b/bta/mce/bta_mce_int.h
@@ -49,7 +49,7 @@
 /* data type for BTA_MCE_API_GET_REMOTE_MAS_INSTANCES_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tBTA_MCE_API_GET_REMOTE_MAS_INSTANCES;
 
 /* union of all data types */
@@ -63,7 +63,7 @@
 /* MCE control block */
 typedef struct {
   uint8_t sdp_active; /* see BTA_MCE_SDP_ACT_* */
-  bt_bdaddr_t remote_addr;
+  RawAddress remote_addr;
   tBTA_MCE_DM_CBACK* p_dm_cback;
 } tBTA_MCE_CB;
 
diff --git a/bta/pan/bta_pan_act.cc b/bta/pan/bta_pan_act.cc
index 5a87d74..68e8f06 100644
--- a/bta/pan/bta_pan_act.cc
+++ b/bta/pan/bta_pan_act.cc
@@ -84,8 +84,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_pan_conn_state_cback(uint16_t handle,
-                                     const bt_bdaddr_t& bd_addr,
+static void bta_pan_conn_state_cback(uint16_t handle, const RawAddress& bd_addr,
                                      tPAN_RESULT state, bool is_role_change,
                                      uint8_t src_role, uint8_t dst_role) {
   tBTA_PAN_SCB* p_scb;
@@ -167,10 +166,9 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bta_pan_data_buf_ind_cback(uint16_t handle, const bt_bdaddr_t& src,
-                                       const bt_bdaddr_t& dst,
-                                       uint16_t protocol, BT_HDR* p_buf,
-                                       bool ext, bool forward) {
+static void bta_pan_data_buf_ind_cback(uint16_t handle, const RawAddress& src,
+                                       const RawAddress& dst, uint16_t protocol,
+                                       BT_HDR* p_buf, bool ext, bool forward) {
   tBTA_PAN_SCB* p_scb;
   BT_HDR* p_new_buf;
 
@@ -259,7 +257,7 @@
 static bool bta_pan_has_multiple_connections(uint8_t app_id) {
   tBTA_PAN_SCB* p_scb = NULL;
   bool found = false;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 
   for (uint8_t index = 0; index < BTA_PAN_NUM_CONN; index++) {
     p_scb = &bta_pan_cb.scb[index];
diff --git a/bta/pan/bta_pan_api.cc b/bta/pan/bta_pan_api.cc
index b3b006a..0011522 100644
--- a/bta/pan/bta_pan_api.cc
+++ b/bta/pan/bta_pan_api.cc
@@ -142,7 +142,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTA_PanOpen(const bt_bdaddr_t& bd_addr, tBTA_PAN_ROLE local_role,
+void BTA_PanOpen(const RawAddress& bd_addr, tBTA_PAN_ROLE local_role,
                  tBTA_PAN_ROLE peer_role) {
   tBTA_PAN_API_OPEN* p_buf =
       (tBTA_PAN_API_OPEN*)osi_malloc(sizeof(tBTA_PAN_API_OPEN));
@@ -184,7 +184,7 @@
                     UNUSED_ATTR tBTA_PAN_ROLE_INFO* p_gn_info,
                     UNUSED_ATTR tBTA_PAN_ROLE_INFO* p_nap_info) {}
 
-void BTA_PanOpen(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+void BTA_PanOpen(UNUSED_ATTR const RawAddress& bd_addr,
                  UNUSED_ATTR tBTA_PAN_ROLE local_role,
                  UNUSED_ATTR tBTA_PAN_ROLE peer_role) {}
 
diff --git a/bta/pan/bta_pan_ci.cc b/bta/pan/bta_pan_ci.cc
index 6650277..9863e78 100644
--- a/bta/pan/bta_pan_ci.cc
+++ b/bta/pan/bta_pan_ci.cc
@@ -120,8 +120,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_pan_ci_rx_write(uint16_t handle, const bt_bdaddr_t& dst,
-                         const bt_bdaddr_t& src, uint16_t protocol,
+void bta_pan_ci_rx_write(uint16_t handle, const RawAddress& dst,
+                         const RawAddress& src, uint16_t protocol,
                          uint8_t* p_data, uint16_t len, bool ext) {
   BT_HDR* p_buf = (BT_HDR*)osi_malloc(PAN_BUF_SIZE);
 
@@ -157,8 +157,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_pan_ci_rx_writebuf(uint16_t handle, const bt_bdaddr_t& dst,
-                            const bt_bdaddr_t& src, uint16_t protocol,
+void bta_pan_ci_rx_writebuf(uint16_t handle, const RawAddress& dst,
+                            const RawAddress& src, uint16_t protocol,
                             BT_HDR* p_buf, bool ext) {
   /* copy all other params before the data */
   ((tBTA_PAN_DATA_PARAMS*)p_buf)->src = src;
@@ -181,7 +181,7 @@
  * Returns          void
  *
  ******************************************************************************/
-BT_HDR* bta_pan_ci_readbuf(uint16_t handle, bt_bdaddr_t& src, bt_bdaddr_t& dst,
+BT_HDR* bta_pan_ci_readbuf(uint16_t handle, RawAddress& src, RawAddress& dst,
                            uint16_t* p_protocol, bool* p_ext, bool* p_forward) {
   tBTA_PAN_SCB* p_scb;
   BT_HDR* p_buf;
@@ -239,14 +239,14 @@
 void bta_pan_ci_tx_flow(UNUSED_ATTR uint16_t handle, UNUSED_ATTR bool enable) {}
 
 void bta_pan_ci_rx_writebuf(UNUSED_ATTR uint16_t handle,
-                            UNUSED_ATTR const bt_bdaddr_t& src,
-                            UNUSED_ATTR const bt_bdaddr_t& dst,
+                            UNUSED_ATTR const RawAddress& src,
+                            UNUSED_ATTR const RawAddress& dst,
                             UNUSED_ATTR uint16_t protocol,
                             UNUSED_ATTR BT_HDR* p_buf, UNUSED_ATTR bool ext) {}
 
 BT_HDR* bta_pan_ci_readbuf(UNUSED_ATTR uint16_t handle,
-                           UNUSED_ATTR bt_bdaddr_t& src,
-                           UNUSED_ATTR bt_bdaddr_t& dst,
+                           UNUSED_ATTR RawAddress& src,
+                           UNUSED_ATTR RawAddress& dst,
                            UNUSED_ATTR uint16_t* p_protocol,
                            UNUSED_ATTR bool* p_ext,
                            UNUSED_ATTR bool* p_forward) {
diff --git a/bta/pan/bta_pan_int.h b/bta/pan/bta_pan_int.h
index 404806d..089fd1d 100644
--- a/bta/pan/bta_pan_int.h
+++ b/bta/pan/bta_pan_int.h
@@ -87,7 +87,7 @@
   BT_HDR hdr;               /* Event header */
   tBTA_PAN_ROLE local_role; /* local role */
   tBTA_PAN_ROLE peer_role;  /* peer role */
-  bt_bdaddr_t bd_addr;      /* peer bdaddr */
+  RawAddress bd_addr;       /* peer bdaddr */
 } tBTA_PAN_API_OPEN;
 
 /* data type for BTA_PAN_CI_TX_FLOW_EVT */
@@ -115,7 +115,7 @@
 
 /* state machine control block */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer bdaddr */
+  RawAddress bd_addr; /* peer bdaddr */
   fixed_queue_t*
       data_queue;    /* Queue of buffers waiting to be passed to application */
   uint16_t handle;   /* BTA PAN/BNEP handle */
@@ -143,8 +143,8 @@
 /* pan data param */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t src;
-  bt_bdaddr_t dst;
+  RawAddress src;
+  RawAddress dst;
   uint16_t protocol;
   bool ext;
   bool forward;
diff --git a/bta/sdp/bta_sdp_api.cc b/bta/sdp/bta_sdp_api.cc
index 43d13fd..bc6a9b9 100644
--- a/bta/sdp/bta_sdp_api.cc
+++ b/bta/sdp/bta_sdp_api.cc
@@ -87,7 +87,7 @@
  *                  BTA_SDP_FAILURE, otherwise.
  *
  ******************************************************************************/
-tBTA_SDP_STATUS BTA_SdpSearch(const bt_bdaddr_t& bd_addr, tSDP_UUID* uuid) {
+tBTA_SDP_STATUS BTA_SdpSearch(const RawAddress& bd_addr, tSDP_UUID* uuid) {
   tBTA_SDP_API_SEARCH* p_msg =
       (tBTA_SDP_API_SEARCH*)osi_malloc(sizeof(tBTA_SDP_API_SEARCH));
 
diff --git a/bta/sdp/bta_sdp_int.h b/bta/sdp/bta_sdp_int.h
index e0b4b3c..0cb5b93 100644
--- a/bta/sdp/bta_sdp_int.h
+++ b/bta/sdp/bta_sdp_int.h
@@ -58,7 +58,7 @@
 /* data type for BTA_SDP_API_SEARCH_EVT */
 typedef struct {
   BT_HDR hdr;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tSDP_UUID uuid;
 } tBTA_SDP_API_SEARCH;
 
@@ -80,7 +80,7 @@
 /* SDP control block */
 typedef struct {
   uint8_t sdp_active; /* see BTA_SDP_SDP_ACT_* */
-  bt_bdaddr_t remote_addr;
+  RawAddress remote_addr;
   tBTA_SDP_DM_CBACK* p_dm_cback;
 } tBTA_SDP_CB;
 
diff --git a/bta/sys/bta_sys.h b/bta/sys/bta_sys.h
index 80d3793..e079ea4 100644
--- a/bta/sys/bta_sys.h
+++ b/bta/sys/bta_sys.h
@@ -136,7 +136,7 @@
 
 /* conn callback for role / low power manager*/
 typedef void(tBTA_SYS_CONN_CBACK)(tBTA_SYS_CONN_STATUS status, uint8_t id,
-                                  uint8_t app_id, const bt_bdaddr_t* peer_addr);
+                                  uint8_t app_id, const RawAddress* peer_addr);
 
 /* conn callback for role / low power manager*/
 typedef void(tBTA_SYS_SSR_CFG_CBACK)(uint8_t id, uint8_t app_id,
@@ -236,25 +236,25 @@
 extern void bta_sys_sco_register(tBTA_SYS_CONN_CBACK* p_cback);
 
 extern void bta_sys_conn_open(uint8_t id, uint8_t app_id,
-                              const bt_bdaddr_t& peer_addr);
+                              const RawAddress& peer_addr);
 extern void bta_sys_conn_close(uint8_t id, uint8_t app_id,
-                               const bt_bdaddr_t& peer_addr);
+                               const RawAddress& peer_addr);
 extern void bta_sys_app_open(uint8_t id, uint8_t app_id,
-                             const bt_bdaddr_t& peer_addr);
+                             const RawAddress& peer_addr);
 extern void bta_sys_app_close(uint8_t id, uint8_t app_id,
-                              const bt_bdaddr_t& peer_addr);
+                              const RawAddress& peer_addr);
 extern void bta_sys_sco_open(uint8_t id, uint8_t app_id,
-                             const bt_bdaddr_t& peer_addr);
+                             const RawAddress& peer_addr);
 extern void bta_sys_sco_close(uint8_t id, uint8_t app_id,
-                              const bt_bdaddr_t& peer_addr);
+                              const RawAddress& peer_addr);
 extern void bta_sys_sco_use(uint8_t id, uint8_t app_id,
-                            const bt_bdaddr_t& peer_addr);
+                            const RawAddress& peer_addr);
 extern void bta_sys_sco_unuse(uint8_t id, uint8_t app_id,
-                              const bt_bdaddr_t& peer_addr);
+                              const RawAddress& peer_addr);
 extern void bta_sys_idle(uint8_t id, uint8_t app_id,
-                         const bt_bdaddr_t& peer_addr);
+                         const RawAddress& peer_addr);
 extern void bta_sys_busy(uint8_t id, uint8_t app_id,
-                         const bt_bdaddr_t& peer_addr);
+                         const RawAddress& peer_addr);
 
 #if (BTM_SSR_INCLUDED == TRUE)
 extern void bta_sys_ssr_cfg_register(tBTA_SYS_SSR_CFG_CBACK* p_cback);
@@ -263,11 +263,11 @@
 #endif
 
 extern void bta_sys_role_chg_register(tBTA_SYS_CONN_CBACK* p_cback);
-extern void bta_sys_notify_role_chg(const bt_bdaddr_t& p_bda, uint8_t new_role,
+extern void bta_sys_notify_role_chg(const RawAddress& p_bda, uint8_t new_role,
                                     uint8_t hci_status);
 extern void bta_sys_collision_register(uint8_t bta_id,
                                        tBTA_SYS_CONN_CBACK* p_cback);
-extern void bta_sys_notify_collision(const bt_bdaddr_t& p_bda);
+extern void bta_sys_notify_collision(const RawAddress& p_bda);
 
 #if (BTA_EIR_CANNED_UUID_LIST != TRUE)
 extern void bta_sys_eir_register(tBTA_SYS_EIR_CBACK* p_cback);
@@ -280,9 +280,9 @@
 #endif
 
 extern void bta_sys_set_policy(uint8_t id, uint8_t policy,
-                               const bt_bdaddr_t& peer_addr);
+                               const RawAddress& peer_addr);
 extern void bta_sys_clear_policy(uint8_t id, uint8_t policy,
-                                 const bt_bdaddr_t& peer_addr);
+                                 const RawAddress& peer_addr);
 extern void bta_sys_set_default_policy(uint8_t id, uint8_t policy);
 extern void bta_sys_clear_default_policy(uint8_t id, uint8_t policy);
 
diff --git a/bta/sys/bta_sys_conn.cc b/bta/sys/bta_sys_conn.cc
index 60c6332..6d9fc17 100644
--- a/bta/sys/bta_sys_conn.cc
+++ b/bta/sys/bta_sys_conn.cc
@@ -97,7 +97,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_sys_notify_role_chg(const bt_bdaddr_t& p_bda, uint8_t new_role,
+void bta_sys_notify_role_chg(const RawAddress& p_bda, uint8_t new_role,
                              uint8_t hci_status) {
   if (bta_sys_cb.p_role_cb) {
     bta_sys_cb.p_role_cb(BTA_SYS_ROLE_CHANGE, new_role, hci_status, &p_bda);
@@ -137,7 +137,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_sys_notify_collision(const bt_bdaddr_t& p_bda) {
+void bta_sys_notify_collision(const RawAddress& p_bda) {
   uint8_t index;
 
   for (index = 0; index < MAX_COLLISION_REG; index++) {
@@ -188,7 +188,7 @@
  *
  ******************************************************************************/
 void bta_sys_conn_open(uint8_t id, uint8_t app_id,
-                       const bt_bdaddr_t& peer_addr) {
+                       const RawAddress& peer_addr) {
   if (bta_sys_cb.prm_cb) {
     bta_sys_cb.prm_cb(BTA_SYS_CONN_OPEN, id, app_id, &peer_addr);
   }
@@ -210,7 +210,7 @@
  *
  ******************************************************************************/
 void bta_sys_conn_close(uint8_t id, uint8_t app_id,
-                        const bt_bdaddr_t& peer_addr) {
+                        const RawAddress& peer_addr) {
   if (bta_sys_cb.prm_cb) {
     bta_sys_cb.prm_cb(BTA_SYS_CONN_CLOSE, id, app_id, &peer_addr);
   }
@@ -231,8 +231,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_sys_app_open(uint8_t id, uint8_t app_id,
-                      const bt_bdaddr_t& peer_addr) {
+void bta_sys_app_open(uint8_t id, uint8_t app_id, const RawAddress& peer_addr) {
   if (bta_sys_cb.ppm_cb) {
     bta_sys_cb.ppm_cb(BTA_SYS_APP_OPEN, id, app_id, &peer_addr);
   }
@@ -249,7 +248,7 @@
  *
  ******************************************************************************/
 void bta_sys_app_close(uint8_t id, uint8_t app_id,
-                       const bt_bdaddr_t& peer_addr) {
+                       const RawAddress& peer_addr) {
   if (bta_sys_cb.ppm_cb) {
     bta_sys_cb.ppm_cb(BTA_SYS_APP_CLOSE, id, app_id, &peer_addr);
   }
@@ -265,8 +264,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_sys_sco_open(uint8_t id, uint8_t app_id,
-                      const bt_bdaddr_t& peer_addr) {
+void bta_sys_sco_open(uint8_t id, uint8_t app_id, const RawAddress& peer_addr) {
   /* AG triggers p_sco_cb by bta_sys_sco_use. */
   if ((id != BTA_ID_AG) && (bta_sys_cb.p_sco_cb)) {
     /* without querying BTM_GetNumScoLinks() */
@@ -289,7 +287,7 @@
  *
  ******************************************************************************/
 void bta_sys_sco_close(uint8_t id, uint8_t app_id,
-                       const bt_bdaddr_t& peer_addr) {
+                       const RawAddress& peer_addr) {
   uint8_t num_sco_links;
 
   if ((id != BTA_ID_AG) && (bta_sys_cb.p_sco_cb)) {
@@ -313,7 +311,7 @@
  *
  ******************************************************************************/
 void bta_sys_sco_use(UNUSED_ATTR uint8_t id, uint8_t app_id,
-                     const bt_bdaddr_t& peer_addr) {
+                     const RawAddress& peer_addr) {
   /* AV streaming need to be suspended before SCO is connected. */
   if (bta_sys_cb.p_sco_cb) {
     /* without querying BTM_GetNumScoLinks() */
@@ -332,7 +330,7 @@
  *
  ******************************************************************************/
 void bta_sys_sco_unuse(uint8_t id, uint8_t app_id,
-                       const bt_bdaddr_t& peer_addr) {
+                       const RawAddress& peer_addr) {
   if ((bta_sys_cb.p_sco_cb)) {
     uint8_t num_sco_links = BTM_GetNumScoLinks();
     bta_sys_cb.p_sco_cb(BTA_SYS_SCO_CLOSE, num_sco_links, app_id, &peer_addr);
@@ -367,7 +365,7 @@
  *
  ******************************************************************************/
 void bta_sys_set_policy(uint8_t id, uint8_t policy,
-                        const bt_bdaddr_t& peer_addr) {
+                        const RawAddress& peer_addr) {
   if (bta_sys_cb.p_policy_cb) {
     bta_sys_cb.p_policy_cb(BTA_SYS_PLCY_SET, id, policy, &peer_addr);
   }
@@ -384,7 +382,7 @@
  *
  ******************************************************************************/
 void bta_sys_clear_policy(uint8_t id, uint8_t policy,
-                          const bt_bdaddr_t& peer_addr) {
+                          const RawAddress& peer_addr) {
   if (bta_sys_cb.p_policy_cb) {
     bta_sys_cb.p_policy_cb(BTA_SYS_PLCY_CLR, id, policy, &peer_addr);
   }
@@ -432,7 +430,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_sys_idle(uint8_t id, uint8_t app_id, const bt_bdaddr_t& peer_addr) {
+void bta_sys_idle(uint8_t id, uint8_t app_id, const RawAddress& peer_addr) {
   if (bta_sys_cb.prm_cb) {
     bta_sys_cb.prm_cb(BTA_SYS_CONN_IDLE, id, app_id, &peer_addr);
   }
@@ -452,7 +450,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bta_sys_busy(uint8_t id, uint8_t app_id, const bt_bdaddr_t& peer_addr) {
+void bta_sys_busy(uint8_t id, uint8_t app_id, const RawAddress& peer_addr) {
   if (bta_sys_cb.prm_cb) {
     bta_sys_cb.prm_cb(BTA_SYS_CONN_BUSY, id, app_id, &peer_addr);
   }
diff --git a/bta/test/bta_hf_client_test.cc b/bta/test/bta_hf_client_test.cc
index 3e0564b..7ca49db 100644
--- a/bta/test/bta_hf_client_test.cc
+++ b/bta/test/bta_hf_client_test.cc
@@ -22,8 +22,8 @@
 #include "bta/include/bta_hf_client_api.h"
 
 namespace {
-const bt_bdaddr_t bdaddr1 = {.address = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}};
-const bt_bdaddr_t bdaddr2 = {.address = {0x66, 0x55, 0x44, 0x33, 0x22, 0x11}};
+const RawAddress bdaddr1 = {.address = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}};
+const RawAddress bdaddr2 = {.address = {0x66, 0x55, 0x44, 0x33, 0x22, 0x11}};
 }  // namespace
 
 class BtaHfClientTest : public testing::Test {
diff --git a/btcore/include/bdaddr.h b/btcore/include/bdaddr.h
index 1f108d0..7e2baf0 100644
--- a/btcore/include/bdaddr.h
+++ b/btcore/include/bdaddr.h
@@ -33,21 +33,20 @@
 
 // Returns true if |addr| is the empty address (00:00:00:00:00:00).
 // |addr| may not be NULL.
-bool bdaddr_is_empty(const bt_bdaddr_t* addr);
+bool bdaddr_is_empty(const RawAddress* addr);
 
 // Makes a string representation of |addr| and places it into |string|. |size|
 // refers to the size of |string|'s buffer and must be >= 18. On success, this
 // function returns |string|, otherwise it returns NULL. Neither |addr| nor
 // |string| may be NULL.
-const char* bdaddr_to_string(const bt_bdaddr_t* addr, char* string,
-                             size_t size);
+const char* bdaddr_to_string(const RawAddress* addr, char* string, size_t size);
 
 // Returns true if |string| represents a Bluetooth address. |string| may not be
 // NULL.
 bool string_is_bdaddr(const char* string);
 
-// Converts |string| to bt_bdaddr_t and places it in |addr|. If |string| does
+// Converts |string| to RawAddress and places it in |addr|. If |string| does
 // not represent a Bluetooth address, |addr| is not modified and this function
 // returns false. Otherwise, it returns true. Neither |string| nor |addr| may be
 // NULL.
-bool string_to_bdaddr(const char* string, bt_bdaddr_t* addr);
+bool string_to_bdaddr(const char* string, RawAddress* addr);
diff --git a/btcore/include/property.h b/btcore/include/property.h
index 010c995..40e2f2a 100644
--- a/btcore/include/property.h
+++ b/btcore/include/property.h
@@ -41,7 +41,7 @@
 // using |property_free| or |property_free_array|.
 // Parameter must not be NULL. A copy of the parameter is made and
 // stored in the property.
-bt_property_t* property_new_addr(const bt_bdaddr_t* addr);
+bt_property_t* property_new_addr(const RawAddress* addr);
 bt_property_t* property_new_device_class(const bt_device_class_t* dc);
 bt_property_t* property_new_device_type(bt_device_type_t device_type);
 bt_property_t* property_new_discovery_timeout(const uint32_t timeout);
@@ -68,7 +68,7 @@
 
 // Value conversion convenience methods. The contents of the property are
 // properly typed and returned to the caller. |property| must not be NULL.
-const bt_bdaddr_t* property_as_addr(const bt_property_t* property);
+const RawAddress* property_as_addr(const bt_property_t* property);
 const bt_device_class_t* property_as_device_class(
     const bt_property_t* property);
 bt_device_type_t property_as_device_type(const bt_property_t* property);
diff --git a/btcore/src/bdaddr.cc b/btcore/src/bdaddr.cc
index 928d94a..c25b9d7 100644
--- a/btcore/src/bdaddr.cc
+++ b/btcore/src/bdaddr.cc
@@ -23,14 +23,14 @@
 
 #include "btcore/include/bdaddr.h"
 
-bool bdaddr_is_empty(const bt_bdaddr_t* addr) {
+bool bdaddr_is_empty(const RawAddress* addr) {
   CHECK(addr != NULL);
 
-  uint8_t zero[sizeof(bt_bdaddr_t)] = {0};
-  return memcmp(addr, &zero, sizeof(bt_bdaddr_t)) == 0;
+  uint8_t zero[sizeof(RawAddress)] = {0};
+  return memcmp(addr, &zero, sizeof(RawAddress)) == 0;
 }
 
-const char* bdaddr_to_string(const bt_bdaddr_t* addr, char* string,
+const char* bdaddr_to_string(const RawAddress* addr, char* string,
                              size_t size) {
   CHECK(addr != NULL);
   CHECK(string != NULL);
@@ -59,16 +59,16 @@
   return true;
 }
 
-bool string_to_bdaddr(const char* string, bt_bdaddr_t* addr) {
+bool string_to_bdaddr(const char* string, RawAddress* addr) {
   CHECK(string != NULL);
   CHECK(addr != NULL);
 
-  bt_bdaddr_t new_addr;
+  RawAddress new_addr;
   uint8_t* ptr = new_addr.address;
   bool ret = sscanf(string, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
                     &ptr[0], &ptr[1], &ptr[2], &ptr[3], &ptr[4], &ptr[5]) == 6;
 
-  if (ret) memcpy(addr, &new_addr, sizeof(bt_bdaddr_t));
+  if (ret) memcpy(addr, &new_addr, sizeof(RawAddress));
 
   return ret;
 }
diff --git a/btcore/src/property.cc b/btcore/src/property.cc
index 2049131..790e9b2 100644
--- a/btcore/src/property.cc
+++ b/btcore/src/property.cc
@@ -76,9 +76,9 @@
   return p1->len == p2->len && !memcmp(p1->val, p2->val, p1->len);
 }
 
-bt_property_t* property_new_addr(const bt_bdaddr_t* addr) {
+bt_property_t* property_new_addr(const RawAddress* addr) {
   CHECK(addr != NULL);
-  return property_new_((void*)addr, sizeof(bt_bdaddr_t), BT_PROPERTY_BDADDR);
+  return property_new_((void*)addr, sizeof(RawAddress), BT_PROPERTY_BDADDR);
 }
 
 bt_property_t* property_new_device_class(const bt_device_class_t* dc) {
@@ -172,9 +172,9 @@
 }
 
 // Convenience conversion methods to property values
-const bt_bdaddr_t* property_as_addr(const bt_property_t* property) {
+const RawAddress* property_as_addr(const bt_property_t* property) {
   CHECK(property_is_addr(property));
-  return (const bt_bdaddr_t*)property->val;
+  return (const RawAddress*)property->val;
 }
 
 const bt_device_class_t* property_as_device_class(
diff --git a/btcore/test/bdaddr_test.cc b/btcore/test/bdaddr_test.cc
index 951e49f..11d5a9a 100644
--- a/btcore/test/bdaddr_test.cc
+++ b/btcore/test/bdaddr_test.cc
@@ -24,18 +24,18 @@
 static const char* test_addr2 = "cb:a9:87:65:43:21";
 
 TEST(BdaddrTest, test_empty) {
-  bt_bdaddr_t empty;
+  RawAddress empty;
   string_to_bdaddr("00:00:00:00:00:00", &empty);
   ASSERT_TRUE(bdaddr_is_empty(&empty));
 
-  bt_bdaddr_t not_empty;
+  RawAddress not_empty;
   string_to_bdaddr("00:00:00:00:00:01", &not_empty);
   ASSERT_FALSE(bdaddr_is_empty(&not_empty));
 }
 
 TEST(BdaddrTest, test_to_from_str) {
   char ret[19];
-  bt_bdaddr_t bdaddr;
+  RawAddress bdaddr;
   string_to_bdaddr(test_addr, &bdaddr);
 
   ASSERT_EQ(0x12, bdaddr.address[0]);
@@ -51,9 +51,9 @@
 }
 
 TEST(BdaddrTest, test_equals) {
-  bt_bdaddr_t bdaddr1;
-  bt_bdaddr_t bdaddr2;
-  bt_bdaddr_t bdaddr3;
+  RawAddress bdaddr1;
+  RawAddress bdaddr2;
+  RawAddress bdaddr3;
   string_to_bdaddr(test_addr, &bdaddr1);
   string_to_bdaddr(test_addr, &bdaddr2);
   EXPECT_TRUE(bdaddr1 == bdaddr2);
@@ -63,8 +63,8 @@
 }
 
 TEST(BdaddrTest, test_copy) {
-  bt_bdaddr_t bdaddr1;
-  bt_bdaddr_t bdaddr2;
+  RawAddress bdaddr1;
+  RawAddress bdaddr2;
   string_to_bdaddr(test_addr, &bdaddr1);
   bdaddr2 = bdaddr1;
 
diff --git a/btcore/test/property_test.cc b/btcore/test/property_test.cc
index fbf5f9a..e87c186 100644
--- a/btcore/test/property_test.cc
+++ b/btcore/test/property_test.cc
@@ -25,7 +25,7 @@
 class PropertyTest : public AllocationTestHarness {};
 
 TEST_F(PropertyTest, addr) {
-  bt_bdaddr_t addr0 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
+  RawAddress addr0 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
   bt_property_t* property = property_new_addr(&addr0);
 
   EXPECT_EQ(addr0.address[0], ((uint8_t*)property->val)[0]);
@@ -35,9 +35,9 @@
   EXPECT_EQ(addr0.address[4], ((uint8_t*)property->val)[4]);
   EXPECT_EQ(addr0.address[5], ((uint8_t*)property->val)[5]);
   EXPECT_EQ(BT_PROPERTY_BDADDR, property->type);
-  EXPECT_EQ((int)sizeof(bt_bdaddr_t), property->len);
+  EXPECT_EQ((int)sizeof(RawAddress), property->len);
 
-  const bt_bdaddr_t* addr1 = property_as_addr(property);
+  const RawAddress* addr1 = property_as_addr(property);
   EXPECT_EQ(addr0.address[0], addr1->address[0]);
 
   property_free(property);
@@ -174,7 +174,7 @@
 
 TEST_F(PropertyTest, equals) {
   {
-    bt_bdaddr_t addr0 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
+    RawAddress addr0 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
     bt_property_t* property0 = property_new_addr(&addr0);
 
     bt_device_class_t dc0 = {{0x01, 0x23, 0x45}};
@@ -187,7 +187,7 @@
   }
 
   {
-    bt_bdaddr_t addr = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
+    RawAddress addr = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
     bt_property_t* property0 = property_new_addr(&addr);
     bt_property_t* property1 = property_new_addr(&addr);
 
@@ -198,10 +198,10 @@
   }
 
   {
-    bt_bdaddr_t addr0 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
+    RawAddress addr0 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}};
     bt_property_t* property0 = property_new_addr(&addr0);
 
-    bt_bdaddr_t addr1 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0xff}};
+    RawAddress addr1 = {{0x1, 0x2, 0x3, 0x4, 0x5, 0xff}};
     bt_property_t* property1 = property_new_addr(&addr1);
 
     EXPECT_FALSE(property_equals(property0, property1));
diff --git a/btif/co/bta_av_co.cc b/btif/co/bta_av_co.cc
index 07f6869..fd0f5cd 100644
--- a/btif/co/bta_av_co.cc
+++ b/btif/co/bta_av_co.cc
@@ -65,7 +65,7 @@
 } tBTA_AV_CO_SINK;
 
 typedef struct {
-  bt_bdaddr_t addr; /* address of audio/video peer */
+  RawAddress addr; /* address of audio/video peer */
   tBTA_AV_CO_SINK
       sinks[BTAV_A2DP_CODEC_INDEX_MAX]; /* array of supported sinks */
   tBTA_AV_CO_SINK srcs[BTAV_A2DP_CODEC_INDEX_MAX]; /* array of supported srcs */
@@ -240,7 +240,7 @@
  ******************************************************************************/
 void bta_av_co_audio_disc_res(tBTA_AV_HNDL hndl, uint8_t num_seps,
                               uint8_t num_sink, uint8_t num_src,
-                              const bt_bdaddr_t& addr, uint16_t uuid_local) {
+                              const RawAddress& addr, uint16_t uuid_local) {
   tBTA_AV_CO_PEER* p_peer;
 
   APPL_TRACE_DEBUG("%s: h:x%x num_seps:%d num_sink:%d num_src:%d", __func__,
@@ -492,7 +492,7 @@
  ******************************************************************************/
 void bta_av_co_audio_setconfig(tBTA_AV_HNDL hndl, const uint8_t* p_codec_info,
                                UNUSED_ATTR uint8_t seid,
-                               UNUSED_ATTR const bt_bdaddr_t& addr,
+                               UNUSED_ATTR const RawAddress& addr,
                                uint8_t num_protect,
                                const uint8_t* p_protect_info,
                                uint8_t t_local_sep, uint8_t avdt_handle) {
diff --git a/btif/co/bta_dm_co.cc b/btif/co/bta_dm_co.cc
index ab7ebd9..f6c7c1c 100644
--- a/btif/co/bta_dm_co.cc
+++ b/btif/co/bta_dm_co.cc
@@ -69,7 +69,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_dm_co_io_req(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+void bta_dm_co_io_req(UNUSED_ATTR const RawAddress& bd_addr,
                       tBTA_IO_CAP* p_io_cap, tBTA_OOB_DATA* p_oob_data,
                       tBTA_AUTH_REQ* p_auth_req, bool is_orig) {
   btif_dm_set_oob_for_io_req(p_oob_data);
@@ -97,7 +97,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_dm_co_io_rsp(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP io_cap,
+void bta_dm_co_io_rsp(const RawAddress& bd_addr, tBTA_IO_CAP io_cap,
                       tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req) {
   btif_dm_proc_io_rsp(bd_addr, io_cap, oob_data, auth_req);
 }
@@ -115,7 +115,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_dm_co_lk_upgrade(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+void bta_dm_co_lk_upgrade(UNUSED_ATTR const RawAddress& bd_addr,
                           UNUSED_ATTR bool* p_upgrade) {}
 
 /*******************************************************************************
@@ -152,7 +152,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_dm_co_rmt_oob(const bt_bdaddr_t& bd_addr) {
+void bta_dm_co_rmt_oob(const RawAddress& bd_addr) {
   BT_OCTET16 p_c;
   BT_OCTET16 p_r;
   bool result = false;
@@ -274,7 +274,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_dm_co_le_io_key_req(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+void bta_dm_co_le_io_key_req(UNUSED_ATTR const RawAddress& bd_addr,
                              uint8_t* p_max_key_size,
                              tBTA_LE_KEY_TYPE* p_init_key,
                              tBTA_LE_KEY_TYPE* p_resp_key) {
@@ -329,7 +329,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_dm_co_ble_io_req(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP* p_io_cap,
+void bta_dm_co_ble_io_req(const RawAddress& bd_addr, tBTA_IO_CAP* p_io_cap,
                           tBTA_OOB_DATA* p_oob_data,
                           tBTA_LE_AUTH_REQ* p_auth_req, uint8_t* p_max_key_size,
                           tBTA_LE_KEY_TYPE* p_init_key,
diff --git a/btif/co/bta_gatts_co.cc b/btif/co/bta_gatts_co.cc
index 3d25a3f..0466291 100644
--- a/btif/co/bta_gatts_co.cc
+++ b/btif/co/bta_gatts_co.cc
@@ -60,7 +60,7 @@
  *  Externally called functions
  ****************************************************************************/
 
-void btif_gatts_add_bonded_dev_from_nv(const bt_bdaddr_t& bda) {
+void btif_gatts_add_bonded_dev_from_nv(const RawAddress& bda) {
   btif_gatts_srv_chg_cb_t* p_cb = &btif_gatts_srv_chg_cb;
   bool found = false;
   uint8_t i;
diff --git a/btif/co/bta_hh_co.cc b/btif/co/bta_hh_co.cc
index 4b660cb..3f7bfb4 100644
--- a/btif/co/bta_hh_co.cc
+++ b/btif/co/bta_hh_co.cc
@@ -403,7 +403,7 @@
  ******************************************************************************/
 void bta_hh_co_data(uint8_t dev_handle, uint8_t* p_rpt, uint16_t len,
                     tBTA_HH_PROTO_MODE mode, uint8_t sub_class,
-                    uint8_t ctry_code, UNUSED_ATTR const bt_bdaddr_t& peer_addr,
+                    uint8_t ctry_code, UNUSED_ATTR const RawAddress& peer_addr,
                     uint8_t app_id) {
   btif_hh_device_t* p_dev;
 
@@ -520,7 +520,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void bta_hh_le_co_rpt_info(const bt_bdaddr_t& remote_bda,
+void bta_hh_le_co_rpt_info(const RawAddress& remote_bda,
                            tBTA_HH_RPT_CACHE_ENTRY* p_entry,
                            UNUSED_ATTR uint8_t app_id) {
   unsigned idx = 0;
@@ -559,7 +559,7 @@
  * Returns          the acched report array
  *
  ******************************************************************************/
-tBTA_HH_RPT_CACHE_ENTRY* bta_hh_le_co_cache_load(const bt_bdaddr_t& remote_bda,
+tBTA_HH_RPT_CACHE_ENTRY* bta_hh_le_co_cache_load(const RawAddress& remote_bda,
                                                  uint8_t* p_num_rpt,
                                                  UNUSED_ATTR uint8_t app_id) {
   bdstr_t bdstr;
@@ -589,7 +589,7 @@
  * Returns          none
  *
  ******************************************************************************/
-void bta_hh_le_co_reset_rpt_cache(const bt_bdaddr_t& remote_bda,
+void bta_hh_le_co_reset_rpt_cache(const RawAddress& remote_bda,
                                   UNUSED_ATTR uint8_t app_id) {
   bdstr_t bdstr;
   bdaddr_to_string(&remote_bda, bdstr, sizeof(bdstr));
diff --git a/btif/co/bta_pan_co.cc b/btif/co/bta_pan_co.cc
index 9000d36..b740c61 100644
--- a/btif/co/bta_pan_co.cc
+++ b/btif/co/bta_pan_co.cc
@@ -74,7 +74,7 @@
  *
  ******************************************************************************/
 void bta_pan_co_open(uint16_t handle, uint8_t app_id, tBTA_PAN_ROLE local_role,
-                     tBTA_PAN_ROLE peer_role, const bt_bdaddr_t& peer_addr) {
+                     tBTA_PAN_ROLE peer_role, const RawAddress& peer_addr) {
   BTIF_TRACE_API(
       "bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, "
       "handle:%d",
@@ -154,8 +154,8 @@
  ******************************************************************************/
 void bta_pan_co_tx_path(uint16_t handle, uint8_t app_id) {
   BT_HDR* p_buf;
-  bt_bdaddr_t src;
-  bt_bdaddr_t dst;
+  RawAddress src;
+  RawAddress dst;
   uint16_t protocol;
   bool ext;
   bool forward;
@@ -226,8 +226,8 @@
  ******************************************************************************/
 void bta_pan_co_tx_write(UNUSED_ATTR uint16_t handle,
                          UNUSED_ATTR uint8_t app_id,
-                         UNUSED_ATTR const bt_bdaddr_t& src,
-                         UNUSED_ATTR const bt_bdaddr_t& dst,
+                         UNUSED_ATTR const RawAddress& src,
+                         UNUSED_ATTR const RawAddress& dst,
                          UNUSED_ATTR uint16_t protocol,
                          UNUSED_ATTR uint8_t* p_data, UNUSED_ATTR uint16_t len,
                          UNUSED_ATTR bool ext, UNUSED_ATTR bool forward) {
@@ -249,8 +249,8 @@
  ******************************************************************************/
 void bta_pan_co_tx_writebuf(UNUSED_ATTR uint16_t handle,
                             UNUSED_ATTR uint8_t app_id,
-                            UNUSED_ATTR const bt_bdaddr_t& src,
-                            UNUSED_ATTR const bt_bdaddr_t& dst,
+                            UNUSED_ATTR const RawAddress& src,
+                            UNUSED_ATTR const RawAddress& dst,
                             UNUSED_ATTR uint16_t protocol,
                             UNUSED_ATTR BT_HDR* p_buf, UNUSED_ATTR bool ext,
                             UNUSED_ATTR bool forward) {
diff --git a/btif/include/btif_api.h b/btif/include/btif_api.h
index 20f06a6..739eabe 100644
--- a/btif/include/btif_api.h
+++ b/btif/include/btif_api.h
@@ -146,7 +146,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_get_remote_device_property(bt_bdaddr_t* remote_addr,
+bt_status_t btif_get_remote_device_property(RawAddress* remote_addr,
                                             bt_property_type_t type);
 
 /*******************************************************************************
@@ -158,7 +158,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_get_remote_device_properties(bt_bdaddr_t* remote_addr);
+bt_status_t btif_get_remote_device_properties(RawAddress* remote_addr);
 
 /*******************************************************************************
  *
@@ -171,7 +171,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_set_remote_device_property(bt_bdaddr_t* remote_addr,
+bt_status_t btif_set_remote_device_property(RawAddress* remote_addr,
                                             const bt_property_t* property);
 
 /*******************************************************************************
@@ -184,7 +184,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_get_remote_service_record(bt_bdaddr_t* remote_addr,
+bt_status_t btif_get_remote_service_record(RawAddress* remote_addr,
                                            bt_uuid_t* uuid);
 
 /*******************************************************************************
@@ -223,7 +223,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_create_bond(const bt_bdaddr_t* bd_addr, int transport);
+bt_status_t btif_dm_create_bond(const RawAddress* bd_addr, int transport);
 
 /*******************************************************************************
  *
@@ -235,7 +235,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_dm_create_bond_out_of_band(
-    const bt_bdaddr_t* bd_addr, int transport,
+    const RawAddress* bd_addr, int transport,
     const bt_out_of_band_data_t* oob_data);
 
 /*******************************************************************************
@@ -247,7 +247,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t* bd_addr);
+bt_status_t btif_dm_cancel_bond(const RawAddress* bd_addr);
 
 /*******************************************************************************
  *
@@ -258,7 +258,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_remove_bond(const bt_bdaddr_t* bd_addr);
+bt_status_t btif_dm_remove_bond(const RawAddress* bd_addr);
 
 /*******************************************************************************
  *
@@ -269,7 +269,7 @@
  * Returns          0 if not connected
  *
  ******************************************************************************/
-uint16_t btif_dm_get_connection_state(const bt_bdaddr_t* bd_addr);
+uint16_t btif_dm_get_connection_state(const RawAddress* bd_addr);
 
 /*******************************************************************************
  *
@@ -280,7 +280,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_pin_reply(const bt_bdaddr_t* bd_addr, uint8_t accept,
+bt_status_t btif_dm_pin_reply(const RawAddress* bd_addr, uint8_t accept,
                               uint8_t pin_len, bt_pin_code_t* pin_code);
 
 /*******************************************************************************
@@ -292,7 +292,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_passkey_reply(const bt_bdaddr_t* bd_addr, uint8_t accept,
+bt_status_t btif_dm_passkey_reply(const RawAddress* bd_addr, uint8_t accept,
                                   uint32_t passkey);
 
 /*******************************************************************************
@@ -305,7 +305,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_ssp_reply(const bt_bdaddr_t* bd_addr,
+bt_status_t btif_dm_ssp_reply(const RawAddress* bd_addr,
                               bt_ssp_variant_t variant, uint8_t accept,
                               uint32_t passkey);
 
@@ -329,7 +329,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_get_remote_service_record(bt_bdaddr_t* remote_addr,
+bt_status_t btif_dm_get_remote_service_record(RawAddress* remote_addr,
                                               bt_uuid_t* uuid);
 
 /*******************************************************************************
@@ -341,7 +341,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_get_remote_services(const bt_bdaddr_t& remote_addr);
+bt_status_t btif_dm_get_remote_services(const RawAddress& remote_addr);
 
 /*******************************************************************************
  *
@@ -352,7 +352,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_get_remote_services_by_transport(bt_bdaddr_t* remote_addr,
+bt_status_t btif_dm_get_remote_services_by_transport(RawAddress* remote_addr,
                                                      int transport);
 
 /*******************************************************************************
diff --git a/btif/include/btif_av.h b/btif/include/btif_av.h
index 6349701..3ba2d7d 100644
--- a/btif/include/btif_av.h
+++ b/btif/include/btif_av.h
@@ -64,7 +64,7 @@
  *
  ******************************************************************************/
 
-bt_bdaddr_t btif_av_get_addr(void);
+RawAddress btif_av_get_addr(void);
 
 /*******************************************************************************
  * Function         btif_av_is_sink_enabled
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index f283e00..d3ec355 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -235,7 +235,7 @@
 void btif_disable_bluetooth_evt(void);
 void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props,
                                  bt_property_t* p_props);
-void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t* remote_addr,
+void btif_remote_properties_evt(bt_status_t status, RawAddress* remote_addr,
                                 uint32_t num_props, bt_property_t* p_props);
 
 void bte_load_did_conf(const char* p_path);
diff --git a/btif/include/btif_config.h b/btif/include/btif_config.h
index bdcae79..7031802 100644
--- a/btif/include/btif_config.h
+++ b/btif/include/btif_config.h
@@ -55,7 +55,7 @@
 
 // TODO(zachoverflow): Eww...we need to move these out. These are peer specific,
 // not config general.
-bool btif_get_address_type(const bt_bdaddr_t& bd_addr, int* p_addr_type);
-bool btif_get_device_type(const bt_bdaddr_t& bd_addr, int* p_device_type);
+bool btif_get_address_type(const RawAddress& bd_addr, int* p_addr_type);
+bool btif_get_device_type(const RawAddress& bd_addr, int* p_device_type);
 
 void btif_debug_config_dump(int fd);
diff --git a/btif/include/btif_debug_conn.h b/btif/include/btif_debug_conn.h
index 1823b8a..532a09a 100644
--- a/btif/include/btif_debug_conn.h
+++ b/btif/include/btif_debug_conn.h
@@ -28,7 +28,7 @@
 } btif_debug_conn_state_t;
 
 // Report a connection state change
-void btif_debug_conn_state(const bt_bdaddr_t bda,
+void btif_debug_conn_state(const RawAddress bda,
                            const btif_debug_conn_state_t state,
                            const tGATT_DISCONN_REASON disconnect_reason);
 
diff --git a/btif/include/btif_dm.h b/btif/include/btif_dm.h
index f4b8e38..adafdef 100644
--- a/btif/include/btif_dm.h
+++ b/btif/include/btif_dm.h
@@ -43,26 +43,26 @@
 /**
  * Callout for handling io_capabilities request
  */
-void btif_dm_proc_io_req(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP* p_io_cap,
+void btif_dm_proc_io_req(const RawAddress& bd_addr, tBTA_IO_CAP* p_io_cap,
                          tBTA_OOB_DATA* p_oob_data, tBTA_AUTH_REQ* p_auth_req,
                          bool is_orig);
 /**
  * Callout for handling io_capabilities response
  */
-void btif_dm_proc_io_rsp(const bt_bdaddr_t& bd_addr, tBTA_IO_CAP io_cap,
+void btif_dm_proc_io_rsp(const RawAddress& bd_addr, tBTA_IO_CAP io_cap,
                          tBTA_OOB_DATA oob_data, tBTA_AUTH_REQ auth_req);
 
 /**
  * Out-of-band functions
  */
 void btif_dm_set_oob_for_io_req(tBTA_OOB_DATA* p_oob_data);
-void btif_dm_set_oob_for_le_io_req(const bt_bdaddr_t& bd_addr,
+void btif_dm_set_oob_for_le_io_req(const RawAddress& bd_addr,
                                    tBTA_OOB_DATA* p_oob_data,
                                    tBTA_LE_AUTH_REQ* p_auth_req);
 #ifdef BTIF_DM_OOB_TEST
 void btif_dm_load_local_oob(void);
 void btif_dm_proc_loc_oob(bool valid, BT_OCTET16 c, BT_OCTET16 r);
-bool btif_dm_proc_rmt_oob(const bt_bdaddr_t& bd_addr, BT_OCTET16 p_c,
+bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, BT_OCTET16 p_c,
                           BT_OCTET16 p_r);
 #endif /* BTIF_DM_OOB_TEST */
 
@@ -104,7 +104,7 @@
 void btif_dm_remove_ble_bonding_keys(void);
 void btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ* p_ble_req);
 
-void btif_dm_update_ble_remote_properties(const bt_bdaddr_t& bd_addr,
+void btif_dm_update_ble_remote_properties(const RawAddress& bd_addr,
                                           BD_NAME bd_name,
                                           tBT_DEVICE_TYPE dev_type);
 
diff --git a/btif/include/btif_gatt_util.h b/btif/include/btif_gatt_util.h
index 3ceea1a..731f519 100644
--- a/btif/include/btif_gatt_util.h
+++ b/btif/include/btif_gatt_util.h
@@ -34,7 +34,7 @@
 uint16_t set_read_value(btgatt_read_params_t* p_dest, tBTA_GATTC_READ* p_src);
 uint16_t get_uuid16(tBT_UUID* p_uuid);
 
-void btif_gatt_check_encrypted_link(bt_bdaddr_t bd_addr,
+void btif_gatt_check_encrypted_link(RawAddress bd_addr,
                                     tBTA_GATT_TRANSPORT transport);
 extern void btif_gatt_move_track_adv_data(btgatt_track_adv_info_t* p_dest,
                                           btgatt_track_adv_info_t* p_src);
diff --git a/btif/include/btif_hd.h b/btif/include/btif_hd.h
index 5697896..a119ebd 100644
--- a/btif/include/btif_hd.h
+++ b/btif/include/btif_hd.h
@@ -41,7 +41,7 @@
 
 extern btif_hd_cb_t btif_hd_cb;
 
-extern void btif_hd_remove_device(bt_bdaddr_t bd_addr);
+extern void btif_hd_remove_device(RawAddress bd_addr);
 extern void btif_hd_service_registration();
 
 #endif
diff --git a/btif/include/btif_hh.h b/btif/include/btif_hh.h
index 9c24e50..8505b08 100644
--- a/btif/include/btif_hh.h
+++ b/btif/include/btif_hh.h
@@ -58,7 +58,7 @@
 typedef struct {
   bthh_connection_state_t dev_status;
   uint8_t dev_handle;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HH_ATTR_MASK attr_mask;
   uint8_t sub_class;
   uint8_t app_id;
@@ -73,7 +73,7 @@
 /* Control block to maintain properties of devices */
 typedef struct {
   uint8_t dev_handle;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HH_ATTR_MASK attr_mask;
 } btif_hh_added_device_t;
 
@@ -97,11 +97,11 @@
 extern btif_hh_cb_t btif_hh_cb;
 
 extern btif_hh_device_t* btif_hh_find_connected_dev_by_handle(uint8_t handle);
-extern void btif_hh_remove_device(bt_bdaddr_t bd_addr);
-extern bool btif_hh_add_added_dev(const bt_bdaddr_t& bda,
+extern void btif_hh_remove_device(RawAddress bd_addr);
+extern bool btif_hh_add_added_dev(const RawAddress& bda,
                                   tBTA_HH_ATTR_MASK attr_mask);
-extern bt_status_t btif_hh_virtual_unplug(const bt_bdaddr_t* bd_addr);
-extern void btif_hh_disconnect(bt_bdaddr_t* bd_addr);
+extern bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr);
+extern void btif_hh_disconnect(RawAddress* bd_addr);
 extern void btif_hh_setreport(btif_hh_device_t* p_dev,
                               bthh_report_type_t r_type, uint16_t size,
                               uint8_t* report);
diff --git a/btif/include/btif_hl.h b/btif/include/btif_hl.h
index 9f0adc1..b5022ef 100644
--- a/btif/include/btif_hl.h
+++ b/btif/include/btif_hl.h
@@ -118,7 +118,7 @@
 
 typedef struct {
   int channel_id;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t mdep_cfg_idx;
   int max_s;
   int socket_id[2];
@@ -175,7 +175,7 @@
   bool in_use;
   btif_hl_chan_cb_state_t cb_state;
   btif_hl_pend_dch_op_t op;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool abort_pending;
 } btif_hl_pending_chan_cb_t;
 
@@ -186,7 +186,7 @@
   uint16_t req_ctrl_psm;
   uint16_t ctrl_psm;
   uint16_t data_psm;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t cch_mtu;
   tBTA_SEC sec_mask;
   tBTA_HL_MCL_HANDLE mcl_handle;
@@ -202,7 +202,7 @@
   bool active;
   uint16_t mdl_id;
   uint8_t mdep_cfg_idx;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   int channel_id;
 } btif_hl_delete_mdl_t;
 
@@ -252,7 +252,7 @@
 
 typedef struct {
   int app_id;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   int mdep_cfg_index;
   int channel_id;
   btif_hl_chan_cb_state_t cb_state;
@@ -291,7 +291,7 @@
 extern btif_hl_cb_t btif_hl_cb;
 extern btif_hl_cb_t* p_btif_hl_cb;
 
-extern bool btif_hl_find_mcl_idx(uint8_t app_idx, const bt_bdaddr_t& p_bd_addr,
+extern bool btif_hl_find_mcl_idx(uint8_t app_idx, const RawAddress& p_bd_addr,
                                  uint8_t* p_mcl_idx);
 extern bool btif_hl_find_app_idx(uint8_t app_id, uint8_t* p_app_idx);
 extern bool btif_hl_find_avail_mcl_idx(uint8_t app_idx, uint8_t* p_mcl_idx);
diff --git a/btif/include/btif_pan_internal.h b/btif/include/btif_pan_internal.h
index ba863a5..59802f5 100644
--- a/btif/include/btif_pan_internal.h
+++ b/btif/include/btif_pan_internal.h
@@ -56,8 +56,8 @@
  ******************************************************************************/
 
 typedef struct eth_hdr {
-  bt_bdaddr_t h_dest;
-  bt_bdaddr_t h_src;
+  RawAddress h_dest;
+  RawAddress h_src;
   short h_proto;
 } tETH_HDR;
 
@@ -65,10 +65,10 @@
   int handle;
   int state;
   uint16_t protocol;
-  bt_bdaddr_t peer;
+  RawAddress peer;
   int local_role;
   int remote_role;
-  bt_bdaddr_t eth_addr;
+  RawAddress eth_addr;
 } btpan_conn_t;
 
 typedef struct {
@@ -88,9 +88,9 @@
  ******************************************************************************/
 
 extern btpan_cb_t btpan_cb;
-btpan_conn_t* btpan_new_conn(int handle, const bt_bdaddr_t& addr,
-                             int local_role, int peer_role);
-btpan_conn_t* btpan_find_conn_addr(const bt_bdaddr_t& addr);
+btpan_conn_t* btpan_new_conn(int handle, const RawAddress& addr, int local_role,
+                             int peer_role);
+btpan_conn_t* btpan_find_conn_addr(const RawAddress& addr);
 btpan_conn_t* btpan_find_conn_handle(uint16_t handle);
 void btpan_set_flow_control(bool enable);
 int btpan_get_connected_count(void);
@@ -98,15 +98,15 @@
 void create_tap_read_thread(int tap_fd);
 void destroy_tap_read_thread(void);
 int btpan_tap_close(int tap_fd);
-int btpan_tap_send(int tap_fd, const bt_bdaddr_t& src, const bt_bdaddr_t& dst,
+int btpan_tap_send(int tap_fd, const RawAddress& src, const RawAddress& dst,
                    uint16_t protocol, const char* buff, uint16_t size, bool ext,
                    bool forward);
 
-static inline int is_empty_eth_addr(const bt_bdaddr_t& addr) {
+static inline int is_empty_eth_addr(const RawAddress& addr) {
   return addr == bd_addr_empty;
 }
 
-static inline int is_valid_bt_eth_addr(const bt_bdaddr_t& addr) {
+static inline int is_valid_bt_eth_addr(const RawAddress& addr) {
   if (is_empty_eth_addr(addr)) return 0;
   return addr.address[0] & 1 ? 0 : 1; /* Cannot be multicasting address */
 }
diff --git a/btif/include/btif_profile_queue.h b/btif/include/btif_profile_queue.h
index 01aa8f0..be3ff08 100644
--- a/btif/include/btif_profile_queue.h
+++ b/btif/include/btif_profile_queue.h
@@ -29,9 +29,9 @@
 
 #include <hardware/bluetooth.h>
 
-typedef bt_status_t (*btif_connect_cb_t)(bt_bdaddr_t* bda, uint16_t uuid);
+typedef bt_status_t (*btif_connect_cb_t)(RawAddress* bda, uint16_t uuid);
 
-bt_status_t btif_queue_connect(uint16_t uuid, const bt_bdaddr_t* bda,
+bt_status_t btif_queue_connect(uint16_t uuid, const RawAddress* bda,
                                btif_connect_cb_t connect_cb);
 void btif_queue_advance();
 bt_status_t btif_queue_connect_next(void);
diff --git a/btif/include/btif_sock_l2cap.h b/btif/include/btif_sock_l2cap.h
index 37fa90e..2715be0 100644
--- a/btif/include/btif_sock_l2cap.h
+++ b/btif/include/btif_sock_l2cap.h
@@ -16,7 +16,7 @@
 bt_status_t btsock_l2cap_cleanup();
 bt_status_t btsock_l2cap_listen(const char* name, int channel, int* sock_fd,
                                 int flags, int app_uid);
-bt_status_t btsock_l2cap_connect(const bt_bdaddr_t* bd_addr, int channel,
+bt_status_t btsock_l2cap_connect(const RawAddress* bd_addr, int channel,
                                  int* sock_fd, int flags, int app_uid);
 void btsock_l2cap_signaled(int fd, int flags, uint32_t user_id);
 void on_l2cap_psm_assigned(int id, int psm);
diff --git a/btif/include/btif_sock_rfc.h b/btif/include/btif_sock_rfc.h
index 50aecd7..5c588b5 100644
--- a/btif/include/btif_sock_rfc.h
+++ b/btif/include/btif_sock_rfc.h
@@ -34,7 +34,7 @@
 bt_status_t btsock_rfc_listen(const char* name, const uint8_t* uuid,
                               int channel, int* sock_fd, int flags,
                               int app_uid);
-bt_status_t btsock_rfc_connect(const bt_bdaddr_t* bd_addr, const uint8_t* uuid,
+bt_status_t btsock_rfc_connect(const RawAddress* bd_addr, const uint8_t* uuid,
                                int channel, int* sock_fd, int flags,
                                int app_uid);
 void btsock_rfc_signaled(int fd, int flags, uint32_t user_id);
diff --git a/btif/include/btif_sock_sco.h b/btif/include/btif_sock_sco.h
index 66859d7..50530ce 100644
--- a/btif/include/btif_sock_sco.h
+++ b/btif/include/btif_sock_sco.h
@@ -25,5 +25,5 @@
 bt_status_t btsock_sco_init(thread_t* thread);
 bt_status_t btsock_sco_cleanup(void);
 bt_status_t btsock_sco_listen(int* sock_fd, int flags);
-bt_status_t btsock_sco_connect(const bt_bdaddr_t* bd_addr, int* sock_fd,
+bt_status_t btsock_sco_connect(const RawAddress* bd_addr, int* sock_fd,
                                int flags);
diff --git a/btif/include/btif_storage.h b/btif/include/btif_storage.h
index ab7018c..1f7efd3 100644
--- a/btif/include/btif_storage.h
+++ b/btif/include/btif_storage.h
@@ -80,7 +80,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_get_remote_device_property(
-    const bt_bdaddr_t* remote_bd_addr, bt_property_t* property);
+    const RawAddress* remote_bd_addr, bt_property_t* property);
 
 /*******************************************************************************
  *
@@ -94,7 +94,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_set_remote_device_property(
-    const bt_bdaddr_t* remote_bd_addr, bt_property_t* property);
+    const RawAddress* remote_bd_addr, bt_property_t* property);
 
 /*******************************************************************************
  *
@@ -108,7 +108,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_add_remote_device(const bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_add_remote_device(const RawAddress* remote_bd_addr,
                                            uint32_t num_properties,
                                            bt_property_t* properties);
 
@@ -123,7 +123,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_add_bonded_device(RawAddress* remote_bd_addr,
                                            LINK_KEY link_key, uint8_t key_type,
                                            uint8_t pin_length);
 
@@ -137,8 +137,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_remove_bonded_device(
-    const bt_bdaddr_t* remote_bd_addr);
+bt_status_t btif_storage_remove_bonded_device(const RawAddress* remote_bd_addr);
 
 /*******************************************************************************
  *
@@ -165,7 +164,7 @@
  ******************************************************************************/
 
 bt_status_t btif_storage_add_hid_device_info(
-    bt_bdaddr_t* remote_bd_addr, uint16_t attr_mask, uint8_t sub_class,
+    RawAddress* remote_bd_addr, uint16_t attr_mask, uint8_t sub_class,
     uint8_t app_id, uint16_t vendor_id, uint16_t product_id, uint16_t version,
     uint8_t ctry_code, uint16_t ssr_max_latency, uint16_t ssr_min_tout,
     uint16_t dl_len, uint8_t* dsc_list);
@@ -193,7 +192,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_remove_hid_info(bt_bdaddr_t* remote_bd_addr);
+bt_status_t btif_storage_remove_hid_info(RawAddress* remote_bd_addr);
 
 /*******************************************************************************
  *
@@ -206,27 +205,27 @@
  *                  false otherwise
  *
  ******************************************************************************/
-bool btif_storage_is_restricted_device(const bt_bdaddr_t* remote_bd_addr);
+bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr);
 
-bt_status_t btif_storage_add_ble_bonding_key(bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_add_ble_bonding_key(RawAddress* remote_bd_addr,
                                              char* key, uint8_t key_type,
                                              uint8_t key_length);
-bt_status_t btif_storage_get_ble_bonding_key(bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_get_ble_bonding_key(RawAddress* remote_bd_addr,
                                              uint8_t key_type, char* key_value,
                                              int key_length);
 
 bt_status_t btif_storage_add_ble_local_key(char* key, uint8_t key_type,
                                            uint8_t key_length);
 bt_status_t btif_storage_remove_ble_bonding_keys(
-    const bt_bdaddr_t* remote_bd_addr);
+    const RawAddress* remote_bd_addr);
 bt_status_t btif_storage_remove_ble_local_keys(void);
 bt_status_t btif_storage_get_ble_local_key(uint8_t key_type, char* key_value,
                                            int key_len);
 
-bt_status_t btif_storage_get_remote_addr_type(const bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
                                               int* addr_type);
 
-bt_status_t btif_storage_set_remote_addr_type(const bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,
                                               uint8_t addr_type);
 
 /*******************************************************************************
@@ -249,7 +248,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_storage_set_hidd(bt_bdaddr_t* remote_bd_addr);
+bt_status_t btif_storage_set_hidd(RawAddress* remote_bd_addr);
 
 /*******************************************************************************
  *
@@ -261,15 +260,14 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_storage_remove_hidd(bt_bdaddr_t* remote_bd_addr);
+bt_status_t btif_storage_remove_hidd(RawAddress* remote_bd_addr);
 
 // Gets the device name for a given Bluetooth address |bd_addr|.
 // The device name (if found) is stored in |name|.
 // Returns true if the device name is found, othervise false.
 // Note: |name| should point to a buffer that can store string of length
 // |BTM_MAX_REM_BD_NAME_LEN|.
-bool btif_storage_get_stored_remote_name(const bt_bdaddr_t& bd_addr,
-                                         char* name);
+bool btif_storage_get_stored_remote_name(const RawAddress& bd_addr, char* name);
 
 /******************************************************************************
  * Exported for unit tests
diff --git a/btif/src/bluetooth.cc b/btif/src/bluetooth.cc
index 8a9cf57..1d2c66a 100644
--- a/btif/src/bluetooth.cc
+++ b/btif/src/bluetooth.cc
@@ -189,14 +189,14 @@
   return btif_set_adapter_property(property);
 }
 
-int get_remote_device_properties(bt_bdaddr_t* remote_addr) {
+int get_remote_device_properties(RawAddress* remote_addr) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
 
   return btif_get_remote_device_properties(remote_addr);
 }
 
-int get_remote_device_property(bt_bdaddr_t* remote_addr,
+int get_remote_device_property(RawAddress* remote_addr,
                                bt_property_type_t type) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
@@ -204,7 +204,7 @@
   return btif_get_remote_device_property(remote_addr, type);
 }
 
-int set_remote_device_property(bt_bdaddr_t* remote_addr,
+int set_remote_device_property(RawAddress* remote_addr,
                                const bt_property_t* property) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
@@ -212,14 +212,14 @@
   return btif_set_remote_device_property(remote_addr, property);
 }
 
-int get_remote_service_record(bt_bdaddr_t* remote_addr, bt_uuid_t* uuid) {
+int get_remote_service_record(RawAddress* remote_addr, bt_uuid_t* uuid) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
 
   return btif_get_remote_service_record(remote_addr, uuid);
 }
 
-int get_remote_services(bt_bdaddr_t* remote_addr) {
+int get_remote_services(RawAddress* remote_addr) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
 
@@ -240,14 +240,14 @@
   return btif_dm_cancel_discovery();
 }
 
-static int create_bond(const bt_bdaddr_t* bd_addr, int transport) {
+static int create_bond(const RawAddress* bd_addr, int transport) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
 
   return btif_dm_create_bond(bd_addr, transport);
 }
 
-static int create_bond_out_of_band(const bt_bdaddr_t* bd_addr, int transport,
+static int create_bond_out_of_band(const RawAddress* bd_addr, int transport,
                                    const bt_out_of_band_data_t* oob_data) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
@@ -255,14 +255,14 @@
   return btif_dm_create_bond_out_of_band(bd_addr, transport, oob_data);
 }
 
-static int cancel_bond(const bt_bdaddr_t* bd_addr) {
+static int cancel_bond(const RawAddress* bd_addr) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
 
   return btif_dm_cancel_bond(bd_addr);
 }
 
-static int remove_bond(const bt_bdaddr_t* bd_addr) {
+static int remove_bond(const RawAddress* bd_addr) {
   if (is_restricted_mode() && !btif_storage_is_restricted_device(bd_addr))
     return BT_STATUS_SUCCESS;
 
@@ -272,22 +272,22 @@
   return btif_dm_remove_bond(bd_addr);
 }
 
-static int get_connection_state(const bt_bdaddr_t* bd_addr) {
+static int get_connection_state(const RawAddress* bd_addr) {
   /* sanity check */
   if (interface_ready() == false) return 0;
 
   return btif_dm_get_connection_state(bd_addr);
 }
 
-static int pin_reply(const bt_bdaddr_t* bd_addr, uint8_t accept,
-                     uint8_t pin_len, bt_pin_code_t* pin_code) {
+static int pin_reply(const RawAddress* bd_addr, uint8_t accept, uint8_t pin_len,
+                     bt_pin_code_t* pin_code) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
 
   return btif_dm_pin_reply(bd_addr, accept, pin_len, pin_code);
 }
 
-static int ssp_reply(const bt_bdaddr_t* bd_addr, bt_ssp_variant_t variant,
+static int ssp_reply(const RawAddress* bd_addr, bt_ssp_variant_t variant,
                      uint8_t accept, uint32_t passkey) {
   /* sanity check */
   if (interface_ready() == false) return BT_STATUS_NOT_READY;
diff --git a/btif/src/btif_a2dp_source.cc b/btif/src/btif_a2dp_source.cc
index 6fd80ad..d200621 100644
--- a/btif/src/btif_a2dp_source.cc
+++ b/btif/src/btif_a2dp_source.cc
@@ -738,7 +738,7 @@
     }
 
     // Request RSSI for log purposes if we had to flush buffers
-    bt_bdaddr_t peer_bda = btif_av_get_addr();
+    RawAddress peer_bda = btif_av_get_addr();
     BTM_ReadRSSI(peer_bda, btm_read_rssi_cb);
   }
 
diff --git a/btif/src/btif_av.cc b/btif/src/btif_av.cc
index 04058ea..bc9c282 100644
--- a/btif/src/btif_av.cc
+++ b/btif/src/btif_av.cc
@@ -73,7 +73,7 @@
 
 typedef struct {
   tBTA_AV_HNDL bta_handle;
-  bt_bdaddr_t peer_bda;
+  RawAddress peer_bda;
   btif_sm_handle_t sm_handle;
   uint8_t flags;
   tBTA_AV_EDR edr;
@@ -82,14 +82,14 @@
 } btif_av_cb_t;
 
 typedef struct {
-  bt_bdaddr_t* target_bda;
+  RawAddress* target_bda;
   uint16_t uuid;
 } btif_av_connect_req_t;
 
 typedef struct {
   int sample_rate;
   int channel_count;
-  bt_bdaddr_t peer_bd;
+  RawAddress peer_bd;
 } btif_av_sink_config_req_t;
 
 /*****************************************************************************
@@ -142,9 +142,9 @@
  * Extern functions
  ************************************************************************/
 extern void btif_rc_handler(tBTA_AV_EVT event, tBTA_AV* p_data);
-extern bool btif_rc_get_connected_peer(bt_bdaddr_t* peer_addr);
-extern uint8_t btif_rc_get_connected_peer_handle(const bt_bdaddr_t& peer_addr);
-extern void btif_rc_check_handle_pending_play(const bt_bdaddr_t& peer_addr,
+extern bool btif_rc_get_connected_peer(RawAddress* peer_addr);
+extern uint8_t btif_rc_get_connected_peer_handle(const RawAddress& peer_addr);
+extern void btif_rc_check_handle_pending_play(const RawAddress& peer_addr,
                                               bool bSendToApp);
 
 extern fixed_queue_t* btu_general_alarm_queue;
@@ -221,7 +221,7 @@
  *
  ******************************************************************************/
 static void btif_initiate_av_open_timer_timeout(UNUSED_ATTR void* data) {
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   btif_av_connect_req_t connect_req;
 
   /* is there at least one RC connection - There should be */
@@ -255,7 +255,7 @@
  *
  ******************************************************************************/
 static void btif_report_connection_state(btav_connection_state_t state,
-                                         bt_bdaddr_t* bd_addr) {
+                                         RawAddress* bd_addr) {
   if (bt_av_sink_callbacks != NULL) {
     HAL_CBACK(bt_av_sink_callbacks, connection_state_cb, state, bd_addr);
   } else if (bt_av_src_callbacks != NULL) {
@@ -277,7 +277,7 @@
  *
  ******************************************************************************/
 static void btif_report_audio_state(btav_audio_state_t state,
-                                    bt_bdaddr_t* bd_addr) {
+                                    RawAddress* bd_addr) {
   if (bt_av_sink_callbacks != NULL) {
     HAL_CBACK(bt_av_sink_callbacks, audio_state_cb, state, bd_addr);
   } else if (bt_av_src_callbacks != NULL) {
@@ -333,7 +333,7 @@
   switch (event) {
     case BTIF_SM_ENTER_EVT:
       /* clear the peer_bda */
-      memset(&btif_av_cb.peer_bda, 0, sizeof(bt_bdaddr_t));
+      memset(&btif_av_cb.peer_bda, 0, sizeof(RawAddress));
       btif_av_cb.flags = 0;
       btif_av_cb.edr = 0;
       bta_av_co_init(btif_av_cb.codec_priorities);
@@ -355,7 +355,7 @@
       if (event == BTIF_AV_CONNECT_REQ_EVT) {
         memcpy(&btif_av_cb.peer_bda,
                ((btif_av_connect_req_t*)p_data)->target_bda,
-               sizeof(bt_bdaddr_t));
+               sizeof(RawAddress));
         BTA_AvOpen(btif_av_cb.peer_bda, btif_av_cb.bta_handle, true,
                    BTA_SEC_AUTHENTICATE,
                    ((btif_av_connect_req_t*)p_data)->uuid);
@@ -542,7 +542,7 @@
       } else {
         BTIF_TRACE_WARNING("BTA_AV_OPEN_EVT::FAILED status: %d",
                            p_bta_data->open.status);
-        bt_bdaddr_t peer_addr;
+        RawAddress peer_addr;
         uint8_t peer_handle = BTRC_HANDLE_NONE;
         if (btif_rc_get_connected_peer(&peer_addr) &&
             btif_av_cb.peer_bda == peer_addr) {
@@ -870,7 +870,7 @@
       break;
 
     case BTIF_AV_CONNECT_REQ_EVT:
-      if (memcmp((bt_bdaddr_t*)p_data, &(btif_av_cb.peer_bda),
+      if (memcmp((RawAddress*)p_data, &(btif_av_cb.peer_bda),
                  sizeof(btif_av_cb.peer_bda)) == 0) {
         BTIF_TRACE_DEBUG("%s: Ignore BTIF_AV_CONNECT_REQ_EVT for same device",
                          __func__);
@@ -878,7 +878,7 @@
         BTIF_TRACE_DEBUG("%s: Moved to opened by Other Incoming Conn req",
                          __func__);
         btif_report_connection_state(BTAV_CONNECTION_STATE_DISCONNECTED,
-                                     (bt_bdaddr_t*)p_data);
+                                     (RawAddress*)p_data);
       }
       btif_queue_advance();
       break;
@@ -1323,7 +1323,7 @@
  *
  ******************************************************************************/
 
-static bt_status_t connect_int(bt_bdaddr_t* bd_addr, uint16_t uuid) {
+static bt_status_t connect_int(RawAddress* bd_addr, uint16_t uuid) {
   btif_av_connect_req_t connect_req;
   connect_req.target_bda = bd_addr;
   connect_req.uuid = uuid;
@@ -1335,14 +1335,14 @@
   return BT_STATUS_SUCCESS;
 }
 
-static bt_status_t src_connect_sink(bt_bdaddr_t* bd_addr) {
+static bt_status_t src_connect_sink(RawAddress* bd_addr) {
   BTIF_TRACE_EVENT("%s", __func__);
   CHECK_BTAV_INIT();
 
   return btif_queue_connect(UUID_SERVCLASS_AUDIO_SOURCE, bd_addr, connect_int);
 }
 
-static bt_status_t sink_connect_src(bt_bdaddr_t* bd_addr) {
+static bt_status_t sink_connect_src(RawAddress* bd_addr) {
   BTIF_TRACE_EVENT("%s", __func__);
   CHECK_BTAV_INIT();
 
@@ -1358,13 +1358,13 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t disconnect(bt_bdaddr_t* bd_addr) {
+static bt_status_t disconnect(RawAddress* bd_addr) {
   BTIF_TRACE_EVENT("%s", __func__);
   CHECK_BTAV_INIT();
 
   /* Switch to BTIF context */
   return btif_transfer_context(btif_av_handle_event, BTIF_AV_DISCONNECT_REQ_EVT,
-                               (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+                               (char*)bd_addr, sizeof(RawAddress), NULL);
 }
 
 static bt_status_t codec_config_src(
@@ -1461,7 +1461,7 @@
  *
  ******************************************************************************/
 
-bt_bdaddr_t btif_av_get_addr(void) { return btif_av_cb.peer_bda; }
+RawAddress btif_av_get_addr(void) { return btif_av_cb.peer_bda; }
 
 /*******************************************************************************
  * Function         btif_av_is_sink_enabled
@@ -1727,7 +1727,7 @@
  * Returns          Void
  *
  ******************************************************************************/
-void btif_av_move_idle(bt_bdaddr_t bd_addr) {
+void btif_av_move_idle(RawAddress bd_addr) {
   /* inform the application that ACL is disconnected and move to idle state */
   btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle);
   BTIF_TRACE_DEBUG("%s: ACL Disconnected state %d  is same device %d", __func__,
diff --git a/btif/src/btif_ble_scanner.cc b/btif/src/btif_ble_scanner.cc
index a7c17dc..5dbf97d 100644
--- a/btif/src/btif_ble_scanner.cc
+++ b/btif/src/btif_ble_scanner.cc
@@ -66,8 +66,8 @@
 
 namespace std {
 template <>
-struct hash<bt_bdaddr_t> {
-  size_t operator()(const bt_bdaddr_t& f) const {
+struct hash<RawAddress> {
+  size_t operator()(const RawAddress& f) const {
     return f.address[0] + f.address[1] + f.address[2] + f.address[3] +
            f.address[4] + f.address[5];
   }
@@ -78,13 +78,13 @@
 namespace {
 
 // all access to this variable should be done on the jni thread
-std::unordered_set<bt_bdaddr_t> p_dev_cb;
+std::unordered_set<RawAddress> p_dev_cb;
 
-void btif_gattc_add_remote_bdaddr(const bt_bdaddr_t& p_bda, uint8_t addr_type) {
+void btif_gattc_add_remote_bdaddr(const RawAddress& p_bda, uint8_t addr_type) {
   p_dev_cb.insert(p_bda);
 }
 
-bool btif_gattc_find_bdaddr(const bt_bdaddr_t& p_bda) {
+bool btif_gattc_find_bdaddr(const RawAddress& p_bda) {
   return (p_dev_cb.count(p_bda) != 0);
 }
 
@@ -128,7 +128,7 @@
                     num_records, std::move(data));
 }
 
-void bta_scan_results_cb_impl(bt_bdaddr_t bd_addr, tBT_DEVICE_TYPE device_type,
+void bta_scan_results_cb_impl(RawAddress bd_addr, tBT_DEVICE_TYPE device_type,
                               int8_t rssi, uint8_t addr_type,
                               uint16_t ble_evt_type, uint8_t ble_primary_phy,
                               uint8_t ble_secondary_phy,
@@ -284,7 +284,7 @@
                            int company_id, int company_id_mask,
                            const bt_uuid_t* p_uuid,
                            const bt_uuid_t* p_uuid_mask,
-                           const bt_bdaddr_t* bd_addr, char addr_type,
+                           const RawAddress* bd_addr, char addr_type,
                            vector<uint8_t> data, vector<uint8_t> mask,
                            FilterConfigCallback cb) override {
     BTIF_TRACE_DEBUG("%s, %d, %d", __func__, action, filt_type);
@@ -426,7 +426,7 @@
                                 Bind(bta_batch_scan_reports_cb, client_if)));
   }
 
-  void StartSync(uint8_t sid, bt_bdaddr_t address, uint16_t skip,
+  void StartSync(uint8_t sid, RawAddress address, uint16_t skip,
                  uint16_t timeout, StartSyncCb start_cb, SyncReportCb report_cb,
                  SyncLostCb lost_cb) override {}
 
diff --git a/btif/src/btif_config.cc b/btif/src/btif_config.cc
index ecb9fc7..5919c39 100644
--- a/btif/src/btif_config.cc
+++ b/btif/src/btif_config.cc
@@ -89,7 +89,7 @@
 // TODO(zachoverflow): Move these two functions out, because they are too
 // specific for this file
 // {grumpy-cat/no, monty-python/you-make-me-sad}
-bool btif_get_device_type(const bt_bdaddr_t& bda, int* p_device_type) {
+bool btif_get_device_type(const RawAddress& bda, int* p_device_type) {
   if (p_device_type == NULL) return false;
 
   bdstr_t bd_addr_str;
@@ -102,7 +102,7 @@
   return true;
 }
 
-bool btif_get_address_type(const bt_bdaddr_t& bda, int* p_addr_type) {
+bool btif_get_address_type(const RawAddress& bda, int* p_addr_type) {
   if (p_addr_type == NULL) return false;
 
   bdstr_t bd_addr_str;
diff --git a/btif/src/btif_core.cc b/btif/src/btif_core.cc
index 06d0175..4887ee5 100644
--- a/btif/src/btif_core.cc
+++ b/btif/src/btif_core.cc
@@ -88,12 +88,12 @@
 *  in the downstream path for the adapter and remote_device property APIs */
 
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bt_property_type_t type;
 } btif_storage_read_t;
 
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bt_property_t prop;
 } btif_storage_write_t;
 
@@ -381,7 +381,7 @@
   BTIF_TRACE_DEBUG("%s: status %d", __func__, status);
 
   /* Fetch the local BD ADDR */
-  bt_bdaddr_t local_bd_addr = *controller_get_interface()->get_address();
+  RawAddress local_bd_addr = *controller_get_interface()->get_address();
 
   bdstr_t bdstr;
   bdaddr_to_string(&local_bd_addr, bdstr, sizeof(bdstr));
@@ -399,7 +399,7 @@
     bt_property_t prop;
     prop.type = BT_PROPERTY_BDADDR;
     prop.val = (void*)&local_bd_addr;
-    prop.len = sizeof(bt_bdaddr_t);
+    prop.len = sizeof(RawAddress);
     HAL_CBACK(bt_hal_cbacks, adapter_properties_cb, BT_STATUS_SUCCESS, 1,
               &prop);
   }
@@ -591,15 +591,15 @@
   bt_property_t properties[6];
   uint32_t num_props = 0;
 
-  bt_bdaddr_t addr;
+  RawAddress addr;
   bt_bdname_t name;
   bt_scan_mode_t mode;
   uint32_t disc_timeout;
-  bt_bdaddr_t bonded_devices[BTM_SEC_MAX_DEVICE_RECORDS];
+  RawAddress bonded_devices[BTM_SEC_MAX_DEVICE_RECORDS];
   bt_uuid_t local_uuids[BT_MAX_NUM_UUIDS];
   bt_status_t status;
 
-  /* bt_bdaddr_t */
+  /* RawAddress */
   BTIF_STORAGE_FILL_PROPERTY(&properties[num_props], BT_PROPERTY_BDADDR,
                              sizeof(addr), &addr);
   status = btif_storage_get_adapter_property(&properties[num_props]);
@@ -648,7 +648,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-static bt_status_t btif_in_get_remote_device_properties(bt_bdaddr_t* bd_addr) {
+static bt_status_t btif_in_get_remote_device_properties(RawAddress* bd_addr) {
   bt_property_t remote_properties[8];
   uint32_t num_props = 0;
 
@@ -813,7 +813,7 @@
                                  bt_property_t* p_props) {
   HAL_CBACK(bt_hal_cbacks, adapter_properties_cb, status, num_props, p_props);
 }
-void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t* remote_addr,
+void btif_remote_properties_evt(bt_status_t status, RawAddress* remote_addr,
                                 uint32_t num_props, bt_property_t* p_props) {
   HAL_CBACK(bt_hal_cbacks, remote_device_properties_cb, status, remote_addr,
             num_props, p_props);
@@ -891,7 +891,7 @@
       (type != BT_PROPERTY_BDNAME))
     return BT_STATUS_NOT_READY;
 
-  memset(&(req.read_req.bd_addr), 0, sizeof(bt_bdaddr_t));
+  memset(&(req.read_req.bd_addr), 0, sizeof(RawAddress));
   req.read_req.type = type;
 
   return btif_transfer_context(execute_storage_request,
@@ -993,7 +993,7 @@
   if (storage_req_id != BTIF_CORE_STORAGE_NO_ACTION) {
     /* pass on to storage for updating local database */
 
-    memset(&(req.write_req.bd_addr), 0, sizeof(bt_bdaddr_t));
+    memset(&(req.write_req.bd_addr), 0, sizeof(RawAddress));
     memcpy(&(req.write_req.prop), property, sizeof(bt_property_t));
 
     return btif_transfer_context(execute_storage_request, storage_req_id,
@@ -1014,13 +1014,13 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_get_remote_device_property(bt_bdaddr_t* remote_addr,
+bt_status_t btif_get_remote_device_property(RawAddress* remote_addr,
                                             bt_property_type_t type) {
   btif_storage_req_t req;
 
   if (!btif_is_enabled()) return BT_STATUS_NOT_READY;
 
-  memcpy(&(req.read_req.bd_addr), remote_addr, sizeof(bt_bdaddr_t));
+  memcpy(&(req.read_req.bd_addr), remote_addr, sizeof(RawAddress));
   req.read_req.type = type;
   return btif_transfer_context(execute_storage_remote_request,
                                BTIF_CORE_STORAGE_REMOTE_READ, (char*)&req,
@@ -1036,12 +1036,12 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_get_remote_device_properties(bt_bdaddr_t* remote_addr) {
+bt_status_t btif_get_remote_device_properties(RawAddress* remote_addr) {
   btif_storage_req_t req;
 
   if (!btif_is_enabled()) return BT_STATUS_NOT_READY;
 
-  memcpy(&(req.read_req.bd_addr), remote_addr, sizeof(bt_bdaddr_t));
+  memcpy(&(req.read_req.bd_addr), remote_addr, sizeof(RawAddress));
   return btif_transfer_context(execute_storage_remote_request,
                                BTIF_CORE_STORAGE_REMOTE_READ_ALL, (char*)&req,
                                sizeof(btif_storage_req_t), NULL);
@@ -1058,13 +1058,13 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_set_remote_device_property(bt_bdaddr_t* remote_addr,
+bt_status_t btif_set_remote_device_property(RawAddress* remote_addr,
                                             const bt_property_t* property) {
   btif_storage_req_t req;
 
   if (!btif_is_enabled()) return BT_STATUS_NOT_READY;
 
-  memcpy(&(req.write_req.bd_addr), remote_addr, sizeof(bt_bdaddr_t));
+  memcpy(&(req.write_req.bd_addr), remote_addr, sizeof(RawAddress));
   memcpy(&(req.write_req.prop), property, sizeof(bt_property_t));
 
   return btif_transfer_context(execute_storage_remote_request,
@@ -1083,7 +1083,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_get_remote_service_record(bt_bdaddr_t* remote_addr,
+bt_status_t btif_get_remote_service_record(RawAddress* remote_addr,
                                            bt_uuid_t* uuid) {
   if (!btif_is_enabled()) return BT_STATUS_NOT_READY;
 
diff --git a/btif/src/btif_debug_conn.cc b/btif/src/btif_debug_conn.cc
index 1a59456..69ca87c 100644
--- a/btif/src/btif_debug_conn.cc
+++ b/btif/src/btif_debug_conn.cc
@@ -30,7 +30,7 @@
 typedef struct conn_event_t {
   uint64_t ts;
   btif_debug_conn_state_t state;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tGATT_DISCONN_REASON disconnect_reason;
 } conn_event_t;
 
@@ -64,7 +64,7 @@
   if (current_event == NUM_CONNECTION_EVENTS) current_event = 0;
 }
 
-void btif_debug_conn_state(const bt_bdaddr_t bda,
+void btif_debug_conn_state(const RawAddress bda,
                            const btif_debug_conn_state_t state,
                            const tGATT_DISCONN_REASON disconnect_reason) {
   next_event();
@@ -73,7 +73,7 @@
   evt->ts = time_gettimeofday_us();
   evt->state = state;
   evt->disconnect_reason = disconnect_reason;
-  memcpy(&evt->bda, &bda, sizeof(bt_bdaddr_t));
+  memcpy(&evt->bda, &bda, sizeof(RawAddress));
 }
 
 void btif_debug_conn_dump(int fd) {
diff --git a/btif/src/btif_dm.cc b/btif/src/btif_dm.cc
index 4eeb432..04b26b9 100644
--- a/btif/src/btif_dm.cc
+++ b/btif/src/btif_dm.cc
@@ -110,8 +110,8 @@
 
 typedef struct {
   bt_bond_state_t state;
-  bt_bdaddr_t static_bdaddr;
-  bt_bdaddr_t bd_addr;
+  RawAddress static_bdaddr;
+  RawAddress bd_addr;
   tBTM_BOND_TYPE bond_type;
   uint8_t pin_code_len;
   uint8_t is_ssp;
@@ -141,18 +141,18 @@
 } btif_dm_local_key_cb_t;
 
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   BD_NAME bd_name;
 } btif_dm_remote_name_t;
 
 /* this structure holds optional OOB data for remote device */
 typedef struct {
-  bt_bdaddr_t bdaddr; /* peer bdaddr */
+  RawAddress bdaddr; /* peer bdaddr */
   bt_out_of_band_data_t oob_data;
 } btif_dm_oob_cb_t;
 
 typedef struct {
-  bt_bdaddr_t bdaddr;
+  RawAddress bdaddr;
   uint8_t transport; /* 0=Unknown, 1=BR/EDR, 2=LE */
 } btif_dm_create_bond_cb_t;
 
@@ -175,7 +175,7 @@
 } bt_bond_function_t;
 
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bt_bond_function_t function;
   bt_bond_state_t state;
   struct timespec timestamp;
@@ -215,10 +215,10 @@
 static btif_dm_pairing_cb_t pairing_cb;
 static btif_dm_oob_cb_t oob_cb;
 static void btif_dm_generic_evt(uint16_t event, char* p_param);
-static void btif_dm_cb_create_bond(const bt_bdaddr_t& bd_addr,
+static void btif_dm_cb_create_bond(const RawAddress& bd_addr,
                                    tBTA_TRANSPORT transport);
 static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME* p_remote_name);
-static void btif_update_remote_properties(const bt_bdaddr_t& bd_addr,
+static void btif_update_remote_properties(const RawAddress& bd_addr,
                                           BD_NAME bd_name, DEV_CLASS dev_class,
                                           tBT_DEVICE_TYPE dev_type);
 static btif_dm_local_key_cb_t ble_local_key_cb;
@@ -234,7 +234,7 @@
 
 static char* btif_get_default_local_name();
 
-static void btif_stats_add_bond_event(const bt_bdaddr_t& bd_addr,
+static void btif_stats_add_bond_event(const RawAddress& bd_addr,
                                       bt_bond_function_t function,
                                       bt_bond_state_t state);
 
@@ -247,10 +247,10 @@
 extern bt_status_t btif_hh_execute_service(bool b_enable);
 extern bt_status_t btif_hf_client_execute_service(bool b_enable);
 extern bt_status_t btif_sdp_execute_service(bool b_enable);
-extern int btif_hh_connect(const bt_bdaddr_t* bd_addr);
+extern int btif_hh_connect(const RawAddress* bd_addr);
 extern void bta_gatt_convert_uuid16_to_uuid128(uint8_t uuid_128[LEN_UUID_128],
                                                uint16_t uuid_16);
-extern void btif_av_move_idle(bt_bdaddr_t bd_addr);
+extern void btif_av_move_idle(RawAddress bd_addr);
 extern bt_status_t btif_hd_execute_service(bool b_enable);
 
 /******************************************************************************
@@ -404,7 +404,7 @@
   return false;
 }
 
-static uint32_t get_cod(const bt_bdaddr_t* remote_bdaddr) {
+static uint32_t get_cod(const RawAddress* remote_bdaddr) {
   uint32_t remote_cod;
   bt_property_t prop_name;
 
@@ -412,7 +412,7 @@
   BTIF_STORAGE_FILL_PROPERTY(&prop_name, BT_PROPERTY_CLASS_OF_DEVICE,
                              sizeof(uint32_t), &remote_cod);
   if (btif_storage_get_remote_device_property(
-          (bt_bdaddr_t*)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS) {
+          (RawAddress*)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS) {
     LOG_INFO(LOG_TAG, "%s remote_cod = 0x%08x", __func__, remote_cod);
     return remote_cod & COD_MASK;
   }
@@ -420,15 +420,15 @@
   return 0;
 }
 
-bool check_cod(const bt_bdaddr_t* remote_bdaddr, uint32_t cod) {
+bool check_cod(const RawAddress* remote_bdaddr, uint32_t cod) {
   return get_cod(remote_bdaddr) == cod;
 }
 
-bool check_cod_hid(const bt_bdaddr_t* remote_bdaddr) {
+bool check_cod_hid(const RawAddress* remote_bdaddr) {
   return (get_cod(remote_bdaddr) & COD_HID_MASK) == COD_HID_MAJOR;
 }
 
-bool check_hid_le(const bt_bdaddr_t* remote_bdaddr) {
+bool check_hid_le(const RawAddress* remote_bdaddr) {
   uint32_t remote_dev_type;
   bt_property_t prop_name;
 
@@ -436,7 +436,7 @@
   BTIF_STORAGE_FILL_PROPERTY(&prop_name, BT_PROPERTY_TYPE_OF_DEVICE,
                              sizeof(uint32_t), &remote_dev_type);
   if (btif_storage_get_remote_device_property(
-          (bt_bdaddr_t*)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS) {
+          (RawAddress*)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS) {
     if (remote_dev_type == BT_DEVICE_DEVTYPE_BLE) {
       bdstr_t bdstr;
       bdaddr_to_string(remote_bdaddr, bdstr, sizeof(bdstr));
@@ -457,7 +457,7 @@
  * Returns         true if the device is present in blacklist, else false
  *
  ******************************************************************************/
-bool check_sdp_bl(const bt_bdaddr_t* remote_bdaddr) {
+bool check_sdp_bl(const RawAddress* remote_bdaddr) {
   uint16_t manufacturer = 0;
   uint8_t lmp_ver = 0;
   uint16_t lmp_subver = 0;
@@ -474,7 +474,7 @@
                              sizeof(bt_remote_version_t), &info);
 
   if (btif_storage_get_remote_device_property(
-          (bt_bdaddr_t*)remote_bdaddr, &prop_name) != BT_STATUS_SUCCESS) {
+          (RawAddress*)remote_bdaddr, &prop_name) != BT_STATUS_SUCCESS) {
     return false;
   }
   manufacturer = info.manufacturer;
@@ -485,7 +485,7 @@
   return false;
 }
 
-static void bond_state_changed(bt_status_t status, const bt_bdaddr_t& bd_addr,
+static void bond_state_changed(bt_status_t status, const RawAddress& bd_addr,
                                bt_bond_state_t state) {
   btif_stats_add_bond_event(bd_addr, BTIF_DM_FUNC_BOND_STATE_CHANGED, state);
 
@@ -521,7 +521,7 @@
 
 /* store remote version in bt config to always have access
    to it post pairing*/
-static void btif_update_remote_version_property(bt_bdaddr_t* p_bd) {
+static void btif_update_remote_version_property(RawAddress* p_bd) {
   bt_property_t property;
   uint8_t lmp_ver = 0;
   uint16_t lmp_subver = 0;
@@ -551,7 +551,7 @@
   }
 }
 
-static void btif_update_remote_properties(const bt_bdaddr_t& bdaddr,
+static void btif_update_remote_properties(const RawAddress& bdaddr,
                                           BD_NAME bd_name, DEV_CLASS dev_class,
                                           tBT_DEVICE_TYPE device_type) {
   int num_properties = 0;
@@ -656,7 +656,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void btif_dm_cb_create_bond(const bt_bdaddr_t& bd_addr,
+static void btif_dm_cb_create_bond(const RawAddress& bd_addr,
                                    tBTA_TRANSPORT transport) {
   bool is_hid = check_cod(&bd_addr, COD_HID_POINTING);
   bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
@@ -711,7 +711,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btif_dm_cb_remove_bond(const bt_bdaddr_t* bd_addr) {
+void btif_dm_cb_remove_bond(const RawAddress* bd_addr) {
 /*special handling for HID devices */
 /*  VUP needs to be sent if its a HID Device. The HID HOST module will check if
 there
@@ -736,7 +736,7 @@
  *                  encrypted
  *
  ******************************************************************************/
-uint16_t btif_dm_get_connection_state(const bt_bdaddr_t* bd_addr) {
+uint16_t btif_dm_get_connection_state(const RawAddress* bd_addr) {
   uint16_t rc = BTA_DmGetConnectionState(*bd_addr);
 
   if (rc != 0) {
@@ -846,7 +846,7 @@
                                 p_pin_req->dev_class,
                                 (tBT_DEVICE_TYPE)dev_type);
 
-  const bt_bdaddr_t& bd_addr = p_pin_req->bd_addr;
+  const RawAddress& bd_addr = p_pin_req->bd_addr;
   memcpy(bd_name.name, p_pin_req->bd_name, BD_NAME_LEN);
 
   bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
@@ -929,7 +929,7 @@
                                 p_ssp_cfm_req->dev_class,
                                 (tBT_DEVICE_TYPE)dev_type);
 
-  bt_bdaddr_t bd_addr = p_ssp_cfm_req->bd_addr;
+  RawAddress bd_addr = p_ssp_cfm_req->bd_addr;
   memcpy(bd_name.name, p_ssp_cfm_req->bd_name, BD_NAME_LEN);
 
   /* Set the pairing_cb based on the local & remote authentication requirements
@@ -940,7 +940,7 @@
   if (p_ssp_cfm_req->just_works &&
       !(p_ssp_cfm_req->loc_auth_req & BTM_AUTH_BONDS) &&
       !(p_ssp_cfm_req->rmt_auth_req & BTM_AUTH_BONDS) &&
-      !(check_cod((bt_bdaddr_t*)&p_ssp_cfm_req->bd_addr, COD_HID_POINTING)))
+      !(check_cod((RawAddress*)&p_ssp_cfm_req->bd_addr, COD_HID_POINTING)))
     pairing_cb.bond_type = BOND_TYPE_TEMPORARY;
   else
     pairing_cb.bond_type = BOND_TYPE_PERSISTENT;
@@ -1000,7 +1000,7 @@
       p_ssp_key_notif->bd_addr, p_ssp_key_notif->bd_name,
       p_ssp_key_notif->dev_class, (tBT_DEVICE_TYPE)dev_type);
 
-  bt_bdaddr_t bd_addr = p_ssp_key_notif->bd_addr;
+  RawAddress bd_addr = p_ssp_key_notif->bd_addr;
   memcpy(bd_name.name, p_ssp_key_notif->bd_name, BD_NAME_LEN);
 
   bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
@@ -1032,7 +1032,7 @@
 
   BTIF_TRACE_DEBUG("%s: bond state=%d", __func__, pairing_cb.state);
 
-  bt_bdaddr_t bd_addr = p_auth_cmpl->bd_addr;
+  RawAddress bd_addr = p_auth_cmpl->bd_addr;
   if ((p_auth_cmpl->success == true) && (p_auth_cmpl->key_present)) {
     if ((p_auth_cmpl->key_type < HCI_LKEY_TYPE_DEBUG_COMB) ||
         (p_auth_cmpl->key_type == HCI_LKEY_TYPE_AUTH_COMB) ||
@@ -1094,7 +1094,7 @@
 
       LOG_WARN(LOG_TAG, "%s: Incoming HID Connection", __func__);
       bt_property_t prop;
-      bt_bdaddr_t bd_addr;
+      RawAddress bd_addr;
       bt_uuid_t uuid;
       char uuid_str[128] = UUID_HUMAN_INTERFACE_DEVICE;
 
@@ -1216,7 +1216,7 @@
         properties[0].type = BT_PROPERTY_BDNAME;
         properties[0].val = p_search_data->disc_res.bd_name;
         properties[0].len = strlen((char*)p_search_data->disc_res.bd_name);
-        bt_bdaddr_t& bdaddr = p_search_data->disc_res.bd_addr;
+        RawAddress& bdaddr = p_search_data->disc_res.bd_addr;
 
         status =
             btif_storage_set_remote_device_property(&bdaddr, &properties[0]);
@@ -1236,7 +1236,7 @@
       bdstr_t bdstr;
 
       p_search_data = (tBTA_DM_SEARCH*)p_param;
-      bt_bdaddr_t& bdaddr = p_search_data->inq_res.bd_addr;
+      RawAddress& bdaddr = p_search_data->inq_res.bd_addr;
 
       BTIF_TRACE_DEBUG("%s() %s device_type = 0x%x\n", __func__,
                        bdaddr_to_string(&bdaddr, bdstr, sizeof(bdstr)),
@@ -1264,7 +1264,7 @@
         int addr_type = 0;
 
         memset(properties, 0, sizeof(properties));
-        /* bt_bdaddr_t */
+        /* RawAddress */
         BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties],
                                    BT_PROPERTY_BDADDR, sizeof(bdaddr), &bdaddr);
         num_properties++;
@@ -1379,7 +1379,7 @@
       uint32_t i = 0;
       bt_status_t ret;
 
-      bt_bdaddr_t& bd_addr = p_data->disc_res.bd_addr;
+      RawAddress& bd_addr = p_data->disc_res.bd_addr;
 
       BTIF_TRACE_DEBUG("%s:(result=0x%x, services 0x%x)", __func__,
                        p_data->disc_res.result, p_data->disc_res.services);
@@ -1473,7 +1473,7 @@
         uuid_to_string_legacy(&uuid, temp, sizeof(temp));
         LOG_INFO(LOG_TAG, "%s uuid:%s", __func__, temp);
 
-        bt_bdaddr_t& bd_addr = p_data->disc_ble_res.bd_addr;
+        RawAddress& bd_addr = p_data->disc_ble_res.bd_addr;
         prop[0].type = BT_PROPERTY_UUIDS;
         prop[0].val = uuid.uu;
         prop[0].len = MAX_UUID_SIZE;
@@ -1526,7 +1526,7 @@
       bt_property_t prop;
 
       memset(&rec, 0, sizeof(bt_service_record_t));
-      bt_bdaddr_t& bd_addr = p_data->disc_res.bd_addr;
+      RawAddress& bd_addr = p_data->disc_res.bd_addr;
 
       BTIF_TRACE_DEBUG("%s:(result=0x%x, services 0x%x)", __func__,
                        p_data->disc_res.result, p_data->disc_res.services);
@@ -1564,7 +1564,7 @@
   tBTA_DM_SEC* p_data = (tBTA_DM_SEC*)p_param;
   tBTA_SERVICE_MASK service_mask;
   uint32_t i;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 
   BTIF_TRACE_EVENT("%s: ev: %s", __func__, dump_dm_event(event));
 
@@ -1933,7 +1933,7 @@
     } break;
 
     case BTIF_DM_CB_REMOVE_BOND: {
-      btif_dm_cb_remove_bond((bt_bdaddr_t*)p_param);
+      btif_dm_cb_remove_bond((RawAddress*)p_param);
     } break;
 
     case BTIF_DM_CB_HID_REMOTE_NAME: {
@@ -1941,7 +1941,7 @@
     } break;
 
     case BTIF_DM_CB_BOND_STATE_BONDING: {
-      bond_state_changed(BT_STATUS_SUCCESS, *((bt_bdaddr_t*)p_param),
+      bond_state_changed(BT_STATUS_SUCCESS, *((RawAddress*)p_param),
                          BT_BOND_STATE_BONDING);
     } break;
     case BTIF_DM_CB_LE_TX_TEST:
@@ -2209,7 +2209,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_create_bond(const bt_bdaddr_t* bd_addr, int transport) {
+bt_status_t btif_dm_create_bond(const RawAddress* bd_addr, int transport) {
   btif_dm_create_bond_cb_t create_bond_cb;
   create_bond_cb.transport = transport;
   create_bond_cb.bdaddr = *bd_addr;
@@ -2240,7 +2240,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_dm_create_bond_out_of_band(
-    const bt_bdaddr_t* bd_addr, int transport,
+    const RawAddress* bd_addr, int transport,
     const bt_out_of_band_data_t* oob_data) {
   oob_cb.bdaddr = *bd_addr;
   memcpy(&oob_cb.oob_data, oob_data, sizeof(bt_out_of_band_data_t));
@@ -2274,7 +2274,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_dm_cancel_bond(const bt_bdaddr_t* bd_addr) {
+bt_status_t btif_dm_cancel_bond(const RawAddress* bd_addr) {
   bdstr_t bdstr;
 
   BTIF_TRACE_EVENT("%s: bd_addr=%s", __func__,
@@ -2321,7 +2321,7 @@
  *
  ******************************************************************************/
 
-void btif_dm_hh_open_failed(bt_bdaddr_t* bdaddr) {
+void btif_dm_hh_open_failed(RawAddress* bdaddr) {
   if (pairing_cb.state == BT_BOND_STATE_BONDING &&
       *bdaddr == pairing_cb.bd_addr) {
     bond_state_changed(BT_STATUS_FAIL, *bdaddr, BT_BOND_STATE_NONE);
@@ -2338,7 +2338,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_dm_remove_bond(const bt_bdaddr_t* bd_addr) {
+bt_status_t btif_dm_remove_bond(const RawAddress* bd_addr) {
   bdstr_t bdstr;
 
   BTIF_TRACE_EVENT("%s: bd_addr=%s", __func__,
@@ -2348,7 +2348,7 @@
                             pairing_cb.state);
 
   btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_REMOVE_BOND,
-                        (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+                        (char*)bd_addr, sizeof(RawAddress), NULL);
 
   return BT_STATUS_SUCCESS;
 }
@@ -2363,7 +2363,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_dm_pin_reply(const bt_bdaddr_t* bd_addr, uint8_t accept,
+bt_status_t btif_dm_pin_reply(const RawAddress* bd_addr, uint8_t accept,
                               uint8_t pin_len, bt_pin_code_t* pin_code) {
   BTIF_TRACE_EVENT("%s: accept=%d", __func__, accept);
   if (pin_code == NULL || pin_len > PIN_CODE_LEN) return BT_STATUS_FAIL;
@@ -2394,7 +2394,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_ssp_reply(const bt_bdaddr_t* bd_addr,
+bt_status_t btif_dm_ssp_reply(const RawAddress* bd_addr,
                               bt_ssp_variant_t variant, uint8_t accept,
                               UNUSED_ATTR uint32_t passkey) {
   if (variant == BT_SSP_VARIANT_PASSKEY_ENTRY) {
@@ -2471,7 +2471,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_get_remote_services(const bt_bdaddr_t& remote_addr) {
+bt_status_t btif_dm_get_remote_services(const RawAddress& remote_addr) {
   bdstr_t bdstr;
 
   BTIF_TRACE_EVENT("%s: remote_addr=%s", __func__,
@@ -2492,7 +2492,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-bt_status_t btif_dm_get_remote_services_by_transport(bt_bdaddr_t* remote_addr,
+bt_status_t btif_dm_get_remote_services_by_transport(RawAddress* remote_addr,
                                                      const int transport) {
   BTIF_TRACE_EVENT("%s", __func__);
 
@@ -2517,7 +2517,7 @@
  *
  * Returns          bt_status_t
  ******************************************************************************/
-bt_status_t btif_dm_get_remote_service_record(bt_bdaddr_t* remote_addr,
+bt_status_t btif_dm_get_remote_service_record(RawAddress* remote_addr,
                                               bt_uuid_t* uuid) {
   tSDP_UUID sdp_uuid;
   bdstr_t bdstr;
@@ -2556,7 +2556,7 @@
   return;
 }
 
-void btif_dm_proc_io_req(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+void btif_dm_proc_io_req(UNUSED_ATTR const RawAddress& bd_addr,
                          UNUSED_ATTR tBTA_IO_CAP* p_io_cap,
                          UNUSED_ATTR tBTA_OOB_DATA* p_oob_data,
                          tBTA_AUTH_REQ* p_auth_req, bool is_orig) {
@@ -2593,7 +2593,7 @@
   BTIF_TRACE_DEBUG("-%s: p_auth_req=%d", __func__, *p_auth_req);
 }
 
-void btif_dm_proc_io_rsp(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+void btif_dm_proc_io_rsp(UNUSED_ATTR const RawAddress& bd_addr,
                          tBTA_IO_CAP io_cap, UNUSED_ATTR tBTA_OOB_DATA oob_data,
                          tBTA_AUTH_REQ auth_req) {
   if (auth_req & BTA_AUTH_BONDS) {
@@ -2612,7 +2612,7 @@
   BTIF_TRACE_DEBUG("%s: *p_has_oob_data=%d", __func__, *p_has_oob_data);
 }
 
-void btif_dm_set_oob_for_le_io_req(const bt_bdaddr_t& bd_addr,
+void btif_dm_set_oob_for_le_io_req(const RawAddress& bd_addr,
                                    tBTA_OOB_DATA* p_has_oob_data,
                                    tBTA_LE_AUTH_REQ* p_auth_req) {
   if (!is_empty_128bit(oob_cb.oob_data.le_sc_c) &&
@@ -2758,7 +2758,7 @@
   return true;
 }
 
-bool btif_dm_proc_rmt_oob(const bt_bdaddr_t& bd_addr, BT_OCTET16 p_c,
+bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, BT_OCTET16 p_c,
                           BT_OCTET16 p_r) {
   const char* path_a = "/data/misc/bluedroid/LOCAL/a.key";
   const char* path_b = "/data/misc/bluedroid/LOCAL/b.key";
@@ -2786,15 +2786,15 @@
   fread(p_r, 1, BT_OCTET16_LEN, fp);
   fclose(fp);
 
-  bt_bdaddr_t bt_bd_addr = bd_addr;
+  RawAddress bt_bd_addr = bd_addr;
   btif_transfer_context(btif_dm_generic_evt, BTIF_DM_CB_BOND_STATE_BONDING,
-                        (char*)&bt_bd_addr, sizeof(bt_bdaddr_t), NULL);
+                        (char*)&bt_bd_addr, sizeof(RawAddress), NULL);
   return true;
 }
 #endif /*  BTIF_DM_OOB_TEST */
 
 static void btif_dm_ble_key_notif_evt(tBTA_DM_SP_KEY_NOTIF* p_ssp_key_notif) {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bt_bdname_t bd_name;
   uint32_t cod;
   int dev_type;
@@ -2833,7 +2833,7 @@
   bt_status_t status = BT_STATUS_FAIL;
   bt_bond_state_t state = BT_BOND_STATE_NONE;
 
-  bt_bdaddr_t bd_addr = p_auth_cmpl->bd_addr;
+  RawAddress bd_addr = p_auth_cmpl->bd_addr;
 
   /* Clear OOB data */
   memset(&oob_cb, 0, sizeof(oob_cb));
@@ -2845,7 +2845,7 @@
     status = BT_STATUS_SUCCESS;
     state = BT_BOND_STATE_BONDED;
     int addr_type;
-    bt_bdaddr_t bdaddr = p_auth_cmpl->bd_addr;
+    RawAddress bdaddr = p_auth_cmpl->bd_addr;
     if (btif_storage_get_remote_addr_type(&bdaddr, &addr_type) !=
         BT_STATUS_SUCCESS)
       btif_storage_set_remote_addr_type(&bdaddr, p_auth_cmpl->addr_type);
@@ -2929,7 +2929,7 @@
 void btif_dm_save_ble_bonding_keys(void) {
   BTIF_TRACE_DEBUG("%s", __func__);
 
-  bt_bdaddr_t bd_addr = pairing_cb.bd_addr;
+  RawAddress bd_addr = pairing_cb.bd_addr;
 
   if (pairing_cb.ble.is_penc_key_rcvd) {
     btif_storage_add_ble_bonding_key(&bd_addr, (char*)&pairing_cb.ble.penc_key,
@@ -2969,7 +2969,7 @@
 void btif_dm_remove_ble_bonding_keys(void) {
   BTIF_TRACE_DEBUG("%s", __func__);
 
-  bt_bdaddr_t bd_addr = pairing_cb.bd_addr;
+  RawAddress bd_addr = pairing_cb.bd_addr;
   btif_storage_remove_ble_bonding_keys(&bd_addr);
 }
 
@@ -3001,7 +3001,7 @@
   btif_dm_update_ble_remote_properties(p_ble_req->bd_addr, p_ble_req->bd_name,
                                        (tBT_DEVICE_TYPE)dev_type);
 
-  bt_bdaddr_t bd_addr = p_ble_req->bd_addr;
+  RawAddress bd_addr = p_ble_req->bd_addr;
   memcpy(bd_name.name, p_ble_req->bd_name, BD_NAME_LEN);
 
   bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
@@ -3039,7 +3039,7 @@
   btif_dm_update_ble_remote_properties(p_pin_req->bd_addr, p_pin_req->bd_name,
                                        (tBT_DEVICE_TYPE)dev_type);
 
-  bt_bdaddr_t bd_addr = p_pin_req->bd_addr;
+  RawAddress bd_addr = p_pin_req->bd_addr;
   memcpy(bd_name.name, p_pin_req->bd_name, BD_NAME_LEN);
 
   bond_state_changed(BT_STATUS_SUCCESS, bd_addr, BT_BOND_STATE_BONDING);
@@ -3057,7 +3057,7 @@
   btif_update_remote_properties(p_notif_req->bd_addr, p_notif_req->bd_name,
                                 NULL, BT_DEVICE_TYPE_BLE);
 
-  bt_bdaddr_t bd_addr = p_notif_req->bd_addr;
+  RawAddress bd_addr = p_notif_req->bd_addr;
 
   bt_bdname_t bd_name;
   memcpy(bd_name.name, p_notif_req->bd_name, BD_NAME_LEN);
@@ -3074,7 +3074,7 @@
 static void btif_dm_ble_oob_req_evt(tBTA_DM_SP_RMT_OOB* req_oob_type) {
   BTIF_TRACE_DEBUG("%s", __func__);
 
-  bt_bdaddr_t bd_addr = req_oob_type->bd_addr;
+  RawAddress bd_addr = req_oob_type->bd_addr;
   /* We already checked if OOB data is present in
    * btif_dm_set_oob_for_le_io_req, but check here again. If it's not present
    * do nothing, pairing will timeout.
@@ -3105,7 +3105,7 @@
 static void btif_dm_ble_sc_oob_req_evt(tBTA_DM_SP_RMT_OOB* req_oob_type) {
   BTIF_TRACE_DEBUG("%s", __func__);
 
-  bt_bdaddr_t bd_addr = req_oob_type->bd_addr;
+  RawAddress bd_addr = req_oob_type->bd_addr;
 
   /* We already checked if OOB data is present in
    * btif_dm_set_oob_for_le_io_req, but check here again. If it's not present
@@ -3138,7 +3138,7 @@
       req_oob_type->bd_addr, oob_cb.oob_data.le_sc_c, oob_cb.oob_data.le_sc_r);
 }
 
-void btif_dm_update_ble_remote_properties(const bt_bdaddr_t& bd_addr,
+void btif_dm_update_ble_remote_properties(const RawAddress& bd_addr,
                                           BD_NAME bd_name,
                                           tBT_DEVICE_TYPE dev_type) {
   btif_update_remote_properties(bd_addr, bd_name, NULL, dev_type);
@@ -3222,7 +3222,7 @@
   return btif_default_local_name;
 }
 
-static void btif_stats_add_bond_event(const bt_bdaddr_t& bd_addr,
+static void btif_stats_add_bond_event(const RawAddress& bd_addr,
                                       bt_bond_function_t function,
                                       bt_bond_state_t state) {
   std::unique_lock<std::mutex> lock(bond_event_lock);
diff --git a/btif/src/btif_gatt_client.cc b/btif/src/btif_gatt_client.cc
index debdaac..c850c5a 100644
--- a/btif/src/btif_gatt_client.cc
+++ b/btif/src/btif_gatt_client.cc
@@ -88,7 +88,7 @@
   0x40                             /* bit7, bit6 is 01 to be resolvable random \
                                       */
 #define BLE_RESOLVE_ADDR_MASK 0xc0 /* bit 6, and bit7 */
-inline bool BTM_BLE_IS_RESOLVE_BDA(const bt_bdaddr_t& x) {
+inline bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
   return ((x.address)[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB;
 }
 namespace {
@@ -250,7 +250,7 @@
   return do_in_jni_thread(Bind(&btif_gattc_unregister_app_impl, client_if));
 }
 
-void btif_gattc_open_impl(int client_if, bt_bdaddr_t address, bool is_direct,
+void btif_gattc_open_impl(int client_if, RawAddress address, bool is_direct,
                           int transport_p, int initiating_phys) {
   // Ensure device is in inquiry database
   int addr_type = 0;
@@ -310,7 +310,7 @@
                  initiating_phys);
 }
 
-bt_status_t btif_gattc_open(int client_if, const bt_bdaddr_t& bd_addr,
+bt_status_t btif_gattc_open(int client_if, const RawAddress& bd_addr,
                             bool is_direct, int transport,
                             int initiating_phys) {
   CHECK_BTGATT_INIT();
@@ -319,7 +319,7 @@
                                is_direct, transport, initiating_phys));
 }
 
-void btif_gattc_close_impl(int client_if, bt_bdaddr_t address, int conn_id) {
+void btif_gattc_close_impl(int client_if, RawAddress address, int conn_id) {
   // Disconnect established connections
   if (conn_id != 0)
     BTA_GATTC_Close(conn_id);
@@ -330,14 +330,14 @@
   BTA_GATTC_CancelOpen(client_if, address, false);
 }
 
-bt_status_t btif_gattc_close(int client_if, const bt_bdaddr_t& bd_addr,
+bt_status_t btif_gattc_close(int client_if, const RawAddress& bd_addr,
                              int conn_id) {
   CHECK_BTGATT_INIT();
   return do_in_jni_thread(
       Bind(&btif_gattc_close_impl, client_if, bd_addr, conn_id));
 }
 
-bt_status_t btif_gattc_refresh(int client_if, const bt_bdaddr_t& bd_addr) {
+bt_status_t btif_gattc_refresh(int client_if, const RawAddress& bd_addr) {
   CHECK_BTGATT_INIT();
   return do_in_jni_thread(Bind(&BTA_GATTC_Refresh, bd_addr));
 }
@@ -487,7 +487,7 @@
 }
 
 void btif_gattc_reg_for_notification_impl(tBTA_GATTC_IF client_if,
-                                          const bt_bdaddr_t& bda,
+                                          const RawAddress& bda,
                                           uint16_t handle) {
   tBTA_GATT_STATUS status =
       BTA_GATTC_RegisterForNotifications(client_if, bda, handle);
@@ -498,7 +498,7 @@
 }
 
 bt_status_t btif_gattc_reg_for_notification(int client_if,
-                                            const bt_bdaddr_t& bd_addr,
+                                            const RawAddress& bd_addr,
                                             uint16_t handle) {
   CHECK_BTGATT_INIT();
 
@@ -508,7 +508,7 @@
 }
 
 void btif_gattc_dereg_for_notification_impl(tBTA_GATTC_IF client_if,
-                                            const bt_bdaddr_t& bda,
+                                            const RawAddress& bda,
                                             uint16_t handle) {
   tBTA_GATT_STATUS status =
       BTA_GATTC_DeregisterForNotifications(client_if, bda, handle);
@@ -519,7 +519,7 @@
 }
 
 bt_status_t btif_gattc_dereg_for_notification(int client_if,
-                                              const bt_bdaddr_t& bd_addr,
+                                              const RawAddress& bd_addr,
                                               uint16_t handle) {
   CHECK_BTGATT_INIT();
 
@@ -529,7 +529,7 @@
 }
 
 bt_status_t btif_gattc_read_remote_rssi(int client_if,
-                                        const bt_bdaddr_t& bd_addr) {
+                                        const RawAddress& bd_addr) {
   CHECK_BTGATT_INIT();
   rssi_request_client_if = client_if;
 
@@ -543,7 +543,7 @@
       Bind(base::IgnoreResult(&BTA_GATTC_ConfigureMTU), conn_id, mtu));
 }
 
-void btif_gattc_conn_parameter_update_impl(bt_bdaddr_t addr, int min_interval,
+void btif_gattc_conn_parameter_update_impl(RawAddress addr, int min_interval,
                                            int max_interval, int latency,
                                            int timeout) {
   if (BTA_DmGetConnectionState(addr))
@@ -554,7 +554,7 @@
                                timeout);
 }
 
-bt_status_t btif_gattc_conn_parameter_update(const bt_bdaddr_t& bd_addr,
+bt_status_t btif_gattc_conn_parameter_update(const RawAddress& bd_addr,
                                              int min_interval, int max_interval,
                                              int latency, int timeout) {
   CHECK_BTGATT_INIT();
@@ -563,7 +563,7 @@
            min_interval, max_interval, latency, timeout));
 }
 
-bt_status_t btif_gattc_set_preferred_phy(const bt_bdaddr_t& bd_addr,
+bt_status_t btif_gattc_set_preferred_phy(const RawAddress& bd_addr,
                                          uint8_t tx_phy, uint8_t rx_phy,
                                          uint16_t phy_options) {
   CHECK_BTGATT_INIT();
@@ -573,7 +573,7 @@
 }
 
 bt_status_t btif_gattc_read_phy(
-    const bt_bdaddr_t& bd_addr,
+    const RawAddress& bd_addr,
     base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) {
   CHECK_BTGATT_INIT();
   do_in_bta_thread(FROM_HERE, Bind(&BTM_BleReadPhy, bd_addr,
@@ -581,7 +581,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-int btif_gattc_get_device_type(const bt_bdaddr_t& bd_addr) {
+int btif_gattc_get_device_type(const RawAddress& bd_addr) {
   int device_type = 0;
   char bd_addr_str[18] = {0};
 
diff --git a/btif/src/btif_gatt_server.cc b/btif/src/btif_gatt_server.cc
index f72e028..bd3a94ce 100644
--- a/btif/src/btif_gatt_server.cc
+++ b/btif/src/btif_gatt_server.cc
@@ -280,7 +280,7 @@
   return do_in_jni_thread(Bind(&BTA_GATTS_AppDeregister, server_if));
 }
 
-static void btif_gatts_open_impl(int server_if, const bt_bdaddr_t& address,
+static void btif_gatts_open_impl(int server_if, const RawAddress& address,
                                  bool is_direct, int transport_param) {
   // Ensure device is in inquiry database
   int addr_type = 0;
@@ -322,14 +322,14 @@
   BTA_GATTS_Open(server_if, address, is_direct, transport);
 }
 
-static bt_status_t btif_gatts_open(int server_if, const bt_bdaddr_t& bd_addr,
+static bt_status_t btif_gatts_open(int server_if, const RawAddress& bd_addr,
                                    bool is_direct, int transport) {
   CHECK_BTGATT_INIT();
   return do_in_jni_thread(
       Bind(&btif_gatts_open_impl, server_if, bd_addr, is_direct, transport));
 }
 
-static void btif_gatts_close_impl(int server_if, const bt_bdaddr_t& address,
+static void btif_gatts_close_impl(int server_if, const RawAddress& address,
                                   int conn_id) {
   // Close active connection
   if (conn_id != 0)
@@ -341,7 +341,7 @@
   BTA_GATTS_CancelOpen(server_if, address, false);
 }
 
-static bt_status_t btif_gatts_close(int server_if, const bt_bdaddr_t& bd_addr,
+static bt_status_t btif_gatts_close(int server_if, const RawAddress& bd_addr,
                                     int conn_id) {
   CHECK_BTGATT_INIT();
   return do_in_jni_thread(
@@ -421,7 +421,7 @@
                                trans_id, status, response));
 }
 
-static bt_status_t btif_gatts_set_preferred_phy(const bt_bdaddr_t& bd_addr,
+static bt_status_t btif_gatts_set_preferred_phy(const RawAddress& bd_addr,
                                                 uint8_t tx_phy, uint8_t rx_phy,
                                                 uint16_t phy_options) {
   CHECK_BTGATT_INIT();
@@ -431,7 +431,7 @@
 }
 
 static bt_status_t btif_gatts_read_phy(
-    const bt_bdaddr_t& bd_addr,
+    const RawAddress& bd_addr,
     base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) {
   CHECK_BTGATT_INIT();
   do_in_bta_thread(FROM_HERE, Bind(&BTM_BleReadPhy, bd_addr,
diff --git a/btif/src/btif_gatt_test.cc b/btif/src/btif_gatt_test.cc
index b1552e2..4312533 100644
--- a/btif/src/btif_gatt_test.cc
+++ b/btif/src/btif_gatt_test.cc
@@ -86,7 +86,7 @@
   return str_buf;
 }
 
-static void btif_test_connect_cback(tGATT_IF, const bt_bdaddr_t&,
+static void btif_test_connect_cback(tGATT_IF, const RawAddress&,
                                     uint16_t conn_id, bool connected,
                                     tGATT_DISCONN_REASON, tBT_TRANSPORT) {
   LOG_DEBUG(LOG_TAG, "%s: conn_id=%d, connected=%d", __func__, conn_id,
diff --git a/btif/src/btif_gatt_util.cc b/btif/src/btif_gatt_util.cc
index 647c93b..61c7663 100644
--- a/btif/src/btif_gatt_util.cc
+++ b/btif/src/btif_gatt_util.cc
@@ -212,11 +212,11 @@
  ******************************************************************************/
 
 #if (BLE_DELAY_REQUEST_ENC == FALSE)
-static bool btif_gatt_is_link_encrypted(const bt_bdaddr_t& bd_addr) {
+static bool btif_gatt_is_link_encrypted(const RawAddress& bd_addr) {
   return BTA_JvIsEncrypted(bd_addr);
 }
 
-static void btif_gatt_set_encryption_cb(UNUSED_ATTR const bt_bdaddr_t& bd_addr,
+static void btif_gatt_set_encryption_cb(UNUSED_ATTR const RawAddress& bd_addr,
                                         UNUSED_ATTR tBTA_TRANSPORT transport,
                                         tBTA_STATUS result) {
   if (result != BTA_SUCCESS && result != BTA_BUSY) {
@@ -226,7 +226,7 @@
 #endif
 
 #if (BLE_DELAY_REQUEST_ENC == FALSE)
-void btif_gatt_check_encrypted_link(bt_bdaddr_t bd_addr,
+void btif_gatt_check_encrypted_link(RawAddress bd_addr,
                                     tBTA_GATT_TRANSPORT transport_link) {
   char buf[100];
 
@@ -240,7 +240,7 @@
   }
 }
 #else
-void btif_gatt_check_encrypted_link(UNUSED_ATTR bt_bdaddr_t bd_addr,
+void btif_gatt_check_encrypted_link(UNUSED_ATTR RawAddress bd_addr,
                                     UNUSED_ATTR tBTA_GATT_TRANSPORT
                                         transport_link) {}
 #endif
diff --git a/btif/src/btif_hd.cc b/btif/src/btif_hd.cc
index eb01013..eb3dbbb 100644
--- a/btif/src/btif_hd.cc
+++ b/btif/src/btif_hd.cc
@@ -53,8 +53,8 @@
 #define COD_HID_COMBO 0x05C0
 #define COD_HID_MAJOR 0x0500
 
-extern bool bta_dm_check_if_only_hd_connected(const bt_bdaddr_t& peer_addr);
-extern bool check_cod_hid(const bt_bdaddr_t* remote_bdaddr);
+extern bool bta_dm_check_if_only_hd_connected(const RawAddress& peer_addr);
+extern bool check_cod_hid(const RawAddress* remote_bdaddr);
 extern void btif_hh_service_registration(bool enable);
 
 /* HD request events */
@@ -123,7 +123,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btif_hd_remove_device(bt_bdaddr_t bd_addr) {
+void btif_hd_remove_device(RawAddress bd_addr) {
   BTA_HdRemoveDevice(bd_addr);
   btif_storage_remove_hidd(&bd_addr);
 }
@@ -176,7 +176,7 @@
       break;
 
     case BTA_HD_REGISTER_APP_EVT: {
-      bt_bdaddr_t* addr = (bt_bdaddr_t*)&p_data->reg_status.bda;
+      RawAddress* addr = (RawAddress*)&p_data->reg_status.bda;
 
       if (!p_data->reg_status.in_use) {
         addr = NULL;
@@ -199,7 +199,7 @@
       break;
 
     case BTA_HD_OPEN_EVT: {
-      bt_bdaddr_t* addr = (bt_bdaddr_t*)&p_data->conn.bda;
+      RawAddress* addr = (RawAddress*)&p_data->conn.bda;
       BTIF_TRACE_WARNING(
           "BTA_HD_OPEN_EVT, address (%02x:%02x:%02x:%02x:%02x:%02x)",
           addr->address[0], addr->address[1], addr->address[2],
@@ -212,22 +212,22 @@
         BTA_HdDisconnect();
         break;
       }
-      btif_storage_set_hidd((bt_bdaddr_t*)&p_data->conn.bda);
+      btif_storage_set_hidd((RawAddress*)&p_data->conn.bda);
 
       HAL_CBACK(bt_hd_callbacks, connection_state_cb,
-                (bt_bdaddr_t*)&p_data->conn.bda, BTHD_CONN_STATE_CONNECTED);
+                (RawAddress*)&p_data->conn.bda, BTHD_CONN_STATE_CONNECTED);
     } break;
 
     case BTA_HD_CLOSE_EVT:
       if (btif_hd_cb.forced_disc) {
-        bt_bdaddr_t* addr = (bt_bdaddr_t*)&p_data->conn.bda;
+        RawAddress* addr = (RawAddress*)&p_data->conn.bda;
         BTIF_TRACE_WARNING("remote device was forcefully disconnected");
         btif_hd_remove_device(*addr);
         btif_hd_cb.forced_disc = FALSE;
         break;
       }
       HAL_CBACK(bt_hd_callbacks, connection_state_cb,
-                (bt_bdaddr_t*)&p_data->conn.bda, BTHD_CONN_STATE_DISCONNECTED);
+                (RawAddress*)&p_data->conn.bda, BTHD_CONN_STATE_DISCONNECTED);
       break;
 
     case BTA_HD_GET_REPORT_EVT:
@@ -252,13 +252,13 @@
 
     case BTA_HD_VC_UNPLUG_EVT:
       HAL_CBACK(bt_hd_callbacks, connection_state_cb,
-                (bt_bdaddr_t*)&p_data->conn.bda, BTHD_CONN_STATE_DISCONNECTED);
+                (RawAddress*)&p_data->conn.bda, BTHD_CONN_STATE_DISCONNECTED);
       if (bta_dm_check_if_only_hd_connected(p_data->conn.bda)) {
         BTIF_TRACE_DEBUG("%s: Removing bonding as only HID profile connected",
                          __func__);
         BTA_DmRemoveDevice(p_data->conn.bda);
       } else {
-        bt_bdaddr_t* bd_addr = (bt_bdaddr_t*)&p_data->conn.bda;
+        RawAddress* bd_addr = (RawAddress*)&p_data->conn.bda;
         BTIF_TRACE_DEBUG(
             "%s: Only removing HID data as some other profiles "
             "connected",
@@ -270,7 +270,7 @@
 
     case BTA_HD_CONN_STATE_EVT:
       HAL_CBACK(bt_hd_callbacks, connection_state_cb,
-                (bt_bdaddr_t*)&p_data->conn.bda,
+                (RawAddress*)&p_data->conn.bda,
                 (bthd_connection_state_t)p_data->conn.status);
       break;
 
@@ -477,7 +477,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect(bt_bdaddr_t* bd_addr) {
+static bt_status_t connect(RawAddress* bd_addr) {
   BTIF_TRACE_API("%s", __func__);
 
   if (!btif_hd_cb.app_registered) {
diff --git a/btif/src/btif_hf.cc b/btif/src/btif_hf.cc
index d422c8f..06a8b59 100644
--- a/btif/src/btif_hf.cc
+++ b/btif/src/btif_hf.cc
@@ -126,7 +126,7 @@
 /* BTIF-HF control block to map bdaddr to BTA handle */
 typedef struct _btif_hf_cb {
   uint16_t handle;
-  bt_bdaddr_t connected_bda;
+  RawAddress connected_bda;
   bthf_connection_state_t state;
   bthf_vr_state_t vr_state;
   tBTA_AG_PEER_FEAT peer_feat;
@@ -169,7 +169,7 @@
  * Returns          true if connected
  *
  ******************************************************************************/
-static bool is_connected(bt_bdaddr_t* bd_addr) {
+static bool is_connected(RawAddress* bd_addr) {
   int i;
   for (i = 0; i < btif_max_hf_clients; ++i) {
     if (((btif_hf_cb[i].state == BTHF_CONNECTION_STATE_CONNECTED) ||
@@ -189,7 +189,7 @@
  * Returns          idx
  *
  ******************************************************************************/
-static int btif_hf_idx_by_bdaddr(bt_bdaddr_t* bd_addr) {
+static int btif_hf_idx_by_bdaddr(RawAddress* bd_addr) {
   int i;
   for (i = 0; i < btif_max_hf_clients; ++i) {
     if (*bd_addr == btif_hf_cb[i].connected_bda) return i;
@@ -641,7 +641,7 @@
  *
  ******************************************************************************/
 static void btif_in_hf_generic_evt(uint16_t event, char* p_param) {
-  int idx = btif_hf_idx_by_bdaddr((bt_bdaddr_t*)p_param);
+  int idx = btif_hf_idx_by_bdaddr((RawAddress*)p_param);
 
   BTIF_TRACE_EVENT("%s: event=%d", __func__, event);
 
@@ -723,7 +723,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect_int(bt_bdaddr_t* bd_addr, uint16_t uuid) {
+static bt_status_t connect_int(RawAddress* bd_addr, uint16_t uuid) {
   CHECK_BTHF_INIT();
   int i;
   for (i = 0; i < btif_max_hf_clients;) {
@@ -748,7 +748,7 @@
   return BT_STATUS_BUSY;
 }
 
-static bt_status_t connect(bt_bdaddr_t* bd_addr) {
+static bt_status_t connect(RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
   return btif_queue_connect(UUID_SERVCLASS_AG_HANDSFREE, bd_addr, connect_int);
 }
@@ -762,7 +762,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t disconnect(bt_bdaddr_t* bd_addr) {
+static bt_status_t disconnect(RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -789,7 +789,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect_audio(bt_bdaddr_t* bd_addr) {
+static bt_status_t connect_audio(RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -809,7 +809,7 @@
     /* Inform the application that the audio connection has been initiated
      * successfully */
     btif_transfer_context(btif_in_hf_generic_evt, BTIF_HFP_CB_AUDIO_CONNECTING,
-                          (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+                          (char*)bd_addr, sizeof(RawAddress), NULL);
     return BT_STATUS_SUCCESS;
   }
 
@@ -825,7 +825,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t disconnect_audio(bt_bdaddr_t* bd_addr) {
+static bt_status_t disconnect_audio(RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -852,7 +852,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t start_voice_recognition(bt_bdaddr_t* bd_addr) {
+static bt_status_t start_voice_recognition(RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -887,7 +887,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t stop_voice_recognition(bt_bdaddr_t* bd_addr) {
+static bt_status_t stop_voice_recognition(RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -923,7 +923,7 @@
  *
  ******************************************************************************/
 static bt_status_t volume_control(bthf_volume_type_t type, int volume,
-                                  bt_bdaddr_t* bd_addr) {
+                                  RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -986,7 +986,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t cops_response(const char* cops, bt_bdaddr_t* bd_addr) {
+static bt_status_t cops_response(const char* cops, RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -1020,7 +1020,7 @@
  ******************************************************************************/
 static bt_status_t cind_response(int svc, int num_active, int num_held,
                                  bthf_call_state_t call_setup_state, int signal,
-                                 int roam, int batt_chg, bt_bdaddr_t* bd_addr) {
+                                 int roam, int batt_chg, RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -1067,7 +1067,7 @@
  ******************************************************************************/
 static bt_status_t bind_response(bthf_hf_ind_type_t ind_id,
                                  bthf_hf_ind_status_t ind_status,
-                                 bt_bdaddr_t* bd_addr) {
+                                 RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int index = btif_hf_idx_by_bdaddr(bd_addr);
@@ -1100,8 +1100,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t formatted_at_response(const char* rsp,
-                                         bt_bdaddr_t* bd_addr) {
+static bt_status_t formatted_at_response(const char* rsp, RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
   tBTA_AG_RES_DATA ag_res;
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -1133,7 +1132,7 @@
  *
  ******************************************************************************/
 static bt_status_t at_response(bthf_at_response_t response_code, int error_code,
-                               bt_bdaddr_t* bd_addr) {
+                               RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -1169,7 +1168,7 @@
                                  bthf_call_state_t state, bthf_call_mode_t mode,
                                  bthf_call_mpty_type_t mpty, const char* number,
                                  bthf_call_addrtype_t type,
-                                 bt_bdaddr_t* bd_addr) {
+                                 RawAddress* bd_addr) {
   CHECK_BTHF_INIT();
 
   int idx = btif_hf_idx_by_bdaddr(bd_addr);
@@ -1519,7 +1518,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t configure_wbs(bt_bdaddr_t* bd_addr,
+static bt_status_t configure_wbs(RawAddress* bd_addr,
                                  bthf_wbs_config_t config) {
   CHECK_BTHF_INIT();
 
diff --git a/btif/src/btif_hf_client.cc b/btif/src/btif_hf_client.cc
index fcbad51..7833c0e 100644
--- a/btif/src/btif_hf_client.cc
+++ b/btif/src/btif_hf_client.cc
@@ -84,7 +84,7 @@
 /* BTIF-HF control block to map bdaddr to BTA handle */
 typedef struct {
   uint16_t handle;                       // Handle obtained frm the BTA
-  bt_bdaddr_t peer_bda;                  // Device corresponding to handle
+  RawAddress peer_bda;                   // Device corresponding to handle
   bthf_client_connection_state_t state;  // State of current connection
   tBTA_HF_CLIENT_PEER_FEAT peer_feat;    // HF features
   tBTA_HF_CLIENT_CHLD_FEAT chld_feat;    // AT+CHLD=<> command features
@@ -100,7 +100,7 @@
  * Local function declarations
  ******************************************************************************/
 btif_hf_client_cb_t* btif_hf_client_get_cb_by_handle(uint16_t handle);
-btif_hf_client_cb_t* btif_hf_client_get_cb_by_bda(const bt_bdaddr_t& addr);
+btif_hf_client_cb_t* btif_hf_client_get_cb_by_bda(const RawAddress& addr);
 bool is_connected(const btif_hf_client_cb_t* cb);
 
 /*******************************************************************************
@@ -153,7 +153,7 @@
  ******************************************************************************/
 static void btif_in_hf_client_generic_evt(uint16_t event, char* p_param) {
   BTIF_TRACE_DEBUG("%s", __func__);
-  bt_bdaddr_t* bd_addr = (bt_bdaddr_t*)p_param;
+  RawAddress* bd_addr = (RawAddress*)p_param;
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) {
     BTIF_TRACE_ERROR("%s: failed to find block for bda", __func__);
@@ -215,7 +215,7 @@
  * Returns         btif_hf_client_cb_t pointer if available NULL otherwise
  *
  ******************************************************************************/
-btif_hf_client_cb_t* btif_hf_client_get_cb_by_bda(const bt_bdaddr_t& bd_addr) {
+btif_hf_client_cb_t* btif_hf_client_get_cb_by_bda(const RawAddress& bd_addr) {
   VLOG(1) << __func__ << " incoming addr " << bd_addr;
 
   for (int i = 0; i < HF_CLIENT_MAX_DEVICES; i++) {
@@ -287,7 +287,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect_int(bt_bdaddr_t* bd_addr, uint16_t uuid) {
+static bt_status_t connect_int(RawAddress* bd_addr, uint16_t uuid) {
   btif_hf_client_cb_t* cb = btif_hf_client_allocate_cb();
   if (cb == NULL) {
     BTIF_TRACE_ERROR("%s: could not allocate block!", __func__);
@@ -309,7 +309,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-static bt_status_t connect(bt_bdaddr_t* bd_addr) {
+static bt_status_t connect(RawAddress* bd_addr) {
   BTIF_TRACE_EVENT("HFP Client version is  %s", btif_hf_client_version);
   CHECK_BTHF_CLIENT_INIT();
   return btif_queue_connect(UUID_SERVCLASS_HF_HANDSFREE, bd_addr, connect_int);
@@ -324,7 +324,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t disconnect(const bt_bdaddr_t* bd_addr) {
+static bt_status_t disconnect(const RawAddress* bd_addr) {
   CHECK_BTHF_CLIENT_INIT();
 
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
@@ -345,7 +345,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect_audio(const bt_bdaddr_t* bd_addr) {
+static bt_status_t connect_audio(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -362,7 +362,7 @@
    * successfully */
   btif_transfer_context(btif_in_hf_client_generic_evt,
                         BTIF_HF_CLIENT_CB_AUDIO_CONNECTING, (char*)bd_addr,
-                        sizeof(bt_bdaddr_t), NULL);
+                        sizeof(RawAddress), NULL);
   return BT_STATUS_SUCCESS;
 }
 
@@ -375,7 +375,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t disconnect_audio(const bt_bdaddr_t* bd_addr) {
+static bt_status_t disconnect_audio(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -394,7 +394,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t start_voice_recognition(const bt_bdaddr_t* bd_addr) {
+static bt_status_t start_voice_recognition(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -416,7 +416,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t stop_voice_recognition(const bt_bdaddr_t* bd_addr) {
+static bt_status_t stop_voice_recognition(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -438,7 +438,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t volume_control(const bt_bdaddr_t* bd_addr,
+static bt_status_t volume_control(const RawAddress* bd_addr,
                                   bthf_client_volume_type_t type, int volume) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
@@ -468,7 +468,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t dial(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+static bt_status_t dial(UNUSED_ATTR const RawAddress* bd_addr,
                         const char* number) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
@@ -492,7 +492,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t dial_memory(const bt_bdaddr_t* bd_addr, int location) {
+static bt_status_t dial_memory(const RawAddress* bd_addr, int location) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -511,7 +511,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t handle_call_action(const bt_bdaddr_t* bd_addr,
+static bt_status_t handle_call_action(const RawAddress* bd_addr,
                                       bthf_client_call_action_t action,
                                       int idx) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
@@ -601,7 +601,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t query_current_calls(UNUSED_ATTR const bt_bdaddr_t* bd_addr) {
+static bt_status_t query_current_calls(UNUSED_ATTR const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -624,7 +624,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t query_current_operator_name(const bt_bdaddr_t* bd_addr) {
+static bt_status_t query_current_operator_name(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -643,7 +643,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t retrieve_subscriber_info(const bt_bdaddr_t* bd_addr) {
+static bt_status_t retrieve_subscriber_info(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -662,7 +662,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t send_dtmf(const bt_bdaddr_t* bd_addr, char code) {
+static bt_status_t send_dtmf(const RawAddress* bd_addr, char code) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -681,7 +681,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t request_last_voice_tag_number(const bt_bdaddr_t* bd_addr) {
+static bt_status_t request_last_voice_tag_number(const RawAddress* bd_addr) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
 
@@ -721,7 +721,7 @@
  * Returns          bt_status_t
  *
  ******************************************************************************/
-static bt_status_t send_at_cmd(const bt_bdaddr_t* bd_addr, int cmd, int val1,
+static bt_status_t send_at_cmd(const RawAddress* bd_addr, int cmd, int val1,
                                int val2, const char* arg) {
   btif_hf_client_cb_t* cb = btif_hf_client_get_cb_by_bda(*bd_addr);
   if (cb == NULL || !is_connected(cb)) return BT_STATUS_FAIL;
diff --git a/btif/src/btif_hh.cc b/btif/src/btif_hh.cc
index 5b31def..2f87554 100644
--- a/btif/src/btif_hh.cc
+++ b/btif/src/btif_hh.cc
@@ -138,17 +138,17 @@
  ******************************************************************************/
 extern void bta_hh_co_destroy(int fd);
 extern void bta_hh_co_write(int fd, uint8_t* rpt, uint16_t len);
-extern bt_status_t btif_dm_remove_bond(const bt_bdaddr_t* bd_addr);
+extern bt_status_t btif_dm_remove_bond(const RawAddress* bd_addr);
 extern void bta_hh_co_send_hid_info(btif_hh_device_t* p_dev,
                                     const char* dev_name, uint16_t vendor_id,
                                     uint16_t product_id, uint16_t version,
                                     uint8_t ctry_code, int dscp_len,
                                     uint8_t* p_dscp);
-extern bool check_cod(const bt_bdaddr_t* remote_bdaddr, uint32_t cod);
-extern void btif_dm_cb_remove_bond(const bt_bdaddr_t* bd_addr);
-extern bool check_cod_hid(const bt_bdaddr_t* remote_bdaddr);
+extern bool check_cod(const RawAddress* remote_bdaddr, uint32_t cod);
+extern void btif_dm_cb_remove_bond(const RawAddress* bd_addr);
+extern bool check_cod_hid(const RawAddress* remote_bdaddr);
 extern int scru_ascii_2_hex(char* p_ascii, int len, uint8_t* p_hex);
-extern void btif_dm_hh_open_failed(bt_bdaddr_t* bdaddr);
+extern void btif_dm_hh_open_failed(RawAddress* bdaddr);
 extern void btif_hd_service_registration();
 
 /*****************************************************************************
@@ -344,11 +344,11 @@
  *
  * Function         btif_hh_find_dev_by_bda
  *
- * Description      Return the device pointer of the specified bt_bdaddr_t.
+ * Description      Return the device pointer of the specified RawAddress.
  *
  * Returns          Device entry pointer in the device table
  ******************************************************************************/
-static btif_hh_device_t* btif_hh_find_dev_by_bda(const bt_bdaddr_t& bd_addr) {
+static btif_hh_device_t* btif_hh_find_dev_by_bda(const RawAddress& bd_addr) {
   uint32_t i;
   for (i = 0; i < BTIF_HH_MAX_HID; i++) {
     if (btif_hh_cb.devices[i].dev_status != BTHH_CONN_STATE_UNKNOWN &&
@@ -364,12 +364,12 @@
  * Function         btif_hh_find_connected_dev_by_bda
  *
  * Description      Return the connected device pointer of the specified
- *                  bt_bdaddr_t.
+ *                  RawAddress.
  *
  * Returns          Device entry pointer in the device table
  ******************************************************************************/
 static btif_hh_device_t* btif_hh_find_connected_dev_by_bda(
-    const bt_bdaddr_t& bd_addr) {
+    const RawAddress& bd_addr) {
   uint32_t i;
   for (i = 0; i < BTIF_HH_MAX_HID; i++) {
     if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_CONNECTED &&
@@ -388,7 +388,7 @@
  *
  * Returns      void
  ******************************************************************************/
-void btif_hh_stop_vup_timer(bt_bdaddr_t* bd_addr) {
+void btif_hh_stop_vup_timer(RawAddress* bd_addr) {
   btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr);
 
   if (p_dev != NULL) {
@@ -405,7 +405,7 @@
  *
  * Returns      void
  ******************************************************************************/
-void btif_hh_start_vup_timer(const bt_bdaddr_t* bd_addr) {
+void btif_hh_start_vup_timer(const RawAddress* bd_addr) {
   BTIF_TRACE_DEBUG("%s", __func__);
 
   btif_hh_device_t* p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr);
@@ -425,8 +425,7 @@
  *
  * Returns          true if add successfully, otherwise false.
  ******************************************************************************/
-bool btif_hh_add_added_dev(const bt_bdaddr_t& bda,
-                           tBTA_HH_ATTR_MASK attr_mask) {
+bool btif_hh_add_added_dev(const RawAddress& bda, tBTA_HH_ATTR_MASK attr_mask) {
   int i;
   for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) {
     if (btif_hh_cb.added_devices[i].bd_addr == bda) {
@@ -456,7 +455,7 @@
  **
  ** Returns          void
  ******************************************************************************/
-void btif_hh_remove_device(bt_bdaddr_t bd_addr) {
+void btif_hh_remove_device(RawAddress bd_addr) {
   int i;
   btif_hh_device_t* p_dev;
   btif_hh_added_device_t* p_added_dev;
@@ -533,7 +532,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_hh_virtual_unplug(const bt_bdaddr_t* bd_addr) {
+bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr) {
   BTIF_TRACE_DEBUG("%s", __func__);
   btif_hh_device_t* p_dev;
   char bd_str[18];
@@ -565,7 +564,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_hh_connect(const bt_bdaddr_t* bd_addr) {
+bt_status_t btif_hh_connect(const RawAddress* bd_addr) {
   btif_hh_added_device_t* added_dev = NULL;
   CHECK_BTHH_INIT();
   BTIF_TRACE_EVENT("BTHH: %s", __func__);
@@ -624,7 +623,7 @@
  *
  ******************************************************************************/
 
-void btif_hh_disconnect(bt_bdaddr_t* bd_addr) {
+void btif_hh_disconnect(RawAddress* bd_addr) {
   btif_hh_device_t* p_dev;
   p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr);
   if (p_dev != NULL) {
@@ -764,7 +763,7 @@
           // HID device number.
           BTA_HhClose(p_data->conn.handle);
           HAL_CBACK(bt_hh_callbacks, connection_state_cb,
-                    (bt_bdaddr_t*)&p_data->conn.bda,
+                    (RawAddress*)&p_data->conn.bda,
                     BTHH_CONN_STATE_DISCONNECTED);
         } else if (p_dev->fd < 0) {
           BTIF_TRACE_WARNING(
@@ -793,7 +792,7 @@
                     p_dev->dev_status);
         }
       } else {
-        bt_bdaddr_t* bdaddr = &p_data->conn.bda;
+        RawAddress* bdaddr = &p_data->conn.bda;
         btif_dm_hh_open_failed(bdaddr);
         p_dev = btif_hh_find_dev_by_bda(*bdaddr);
         if (p_dev != NULL) {
@@ -805,8 +804,7 @@
           p_dev->dev_status = BTHH_CONN_STATE_DISCONNECTED;
         }
         HAL_CBACK(bt_hh_callbacks, connection_state_cb,
-                  (bt_bdaddr_t*)&p_data->conn.bda,
-                  BTHH_CONN_STATE_DISCONNECTED);
+                  (RawAddress*)&p_data->conn.bda, BTHH_CONN_STATE_DISCONNECTED);
         btif_hh_cb.status = (BTIF_HH_STATUS)BTIF_HH_DEV_DISCONNECTED;
       }
       break;
@@ -856,11 +854,11 @@
           data = (uint8_t*)(hdr + 1) + hdr->offset;
           len = hdr->len;
           HAL_CBACK(bt_hh_callbacks, get_report_cb,
-                    (bt_bdaddr_t*)&(p_dev->bd_addr),
+                    (RawAddress*)&(p_dev->bd_addr),
                     (bthh_status_t)p_data->hs_data.status, data, len);
         } else {
           HAL_CBACK(bt_hh_callbacks, handshake_cb,
-                    (bt_bdaddr_t*)&(p_dev->bd_addr),
+                    (RawAddress*)&(p_dev->bd_addr),
                     (bthh_status_t)p_data->hs_data.status);
         }
       } else {
@@ -875,8 +873,7 @@
                        p_data->dev_status.status, p_data->dev_status.handle);
       p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
       if (p_dev != NULL) {
-        HAL_CBACK(bt_hh_callbacks, handshake_cb,
-                  (bt_bdaddr_t*)&(p_dev->bd_addr),
+        HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->bd_addr),
                   (bthh_status_t)p_data->hs_data.status);
       }
       break;
@@ -894,12 +891,11 @@
                     : "Unsupported");
       if (p_data->hs_data.rsp_data.proto_mode != BTA_HH_PROTO_UNKNOWN) {
         HAL_CBACK(bt_hh_callbacks, protocol_mode_cb,
-                  (bt_bdaddr_t*)&(p_dev->bd_addr),
+                  (RawAddress*)&(p_dev->bd_addr),
                   (bthh_status_t)p_data->hs_data.status,
                   (bthh_protocol_mode_t)p_data->hs_data.rsp_data.proto_mode);
       } else {
-        HAL_CBACK(bt_hh_callbacks, handshake_cb,
-                  (bt_bdaddr_t*)&(p_dev->bd_addr),
+        HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->bd_addr),
                   (bthh_status_t)p_data->hs_data.status);
       }
       break;
@@ -909,8 +905,7 @@
                        p_data->dev_status.status, p_data->dev_status.handle);
       p_dev = btif_hh_find_connected_dev_by_handle(p_data->dev_status.handle);
       if (p_dev) {
-        HAL_CBACK(bt_hh_callbacks, handshake_cb,
-                  (bt_bdaddr_t*)&(p_dev->bd_addr),
+        HAL_CBACK(bt_hh_callbacks, handshake_cb, (RawAddress*)&(p_dev->bd_addr),
                   (bthh_status_t)p_data->hs_data.status);
       }
       break;
@@ -921,7 +916,7 @@
           p_data->hs_data.handle, p_data->hs_data.status,
           p_data->hs_data.rsp_data.idle_rate);
       p_dev = btif_hh_find_connected_dev_by_handle(p_data->hs_data.handle);
-      HAL_CBACK(bt_hh_callbacks, idle_time_cb, (bt_bdaddr_t*)&(p_dev->bd_addr),
+      HAL_CBACK(bt_hh_callbacks, idle_time_cb, (RawAddress*)&(p_dev->bd_addr),
                 (bthh_status_t)p_data->hs_data.status,
                 p_data->hs_data.rsp_data.idle_rate);
       break;
@@ -1129,7 +1124,7 @@
  ******************************************************************************/
 
 static void btif_hh_handle_evt(uint16_t event, char* p_param) {
-  bt_bdaddr_t* bd_addr = (bt_bdaddr_t*)p_param;
+  RawAddress* bd_addr = (RawAddress*)p_param;
   BTIF_TRACE_EVENT("%s: event=%d", __func__, event);
   int ret;
   switch (event) {
@@ -1220,10 +1215,10 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect(bt_bdaddr_t* bd_addr) {
+static bt_status_t connect(RawAddress* bd_addr) {
   if (btif_hh_cb.status != BTIF_HH_DEV_CONNECTING) {
     btif_transfer_context(btif_hh_handle_evt, BTIF_HH_CONNECT_REQ_EVT,
-                          (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+                          (char*)bd_addr, sizeof(RawAddress), NULL);
     return BT_STATUS_SUCCESS;
   } else
     return BT_STATUS_BUSY;
@@ -1238,7 +1233,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t disconnect(bt_bdaddr_t* bd_addr) {
+static bt_status_t disconnect(RawAddress* bd_addr) {
   CHECK_BTHH_INIT();
   BTIF_TRACE_EVENT("BTHH: %s", __func__);
   btif_hh_device_t* p_dev;
@@ -1251,7 +1246,7 @@
   p_dev = btif_hh_find_connected_dev_by_bda(*bd_addr);
   if (p_dev != NULL) {
     return btif_transfer_context(btif_hh_handle_evt, BTIF_HH_DISCONNECT_REQ_EVT,
-                                 (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+                                 (char*)bd_addr, sizeof(RawAddress), NULL);
   } else {
     BTIF_TRACE_WARNING("%s: Error, device  not opened.", __func__);
     return BT_STATUS_FAIL;
@@ -1267,7 +1262,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t virtual_unplug(bt_bdaddr_t* bd_addr) {
+static bt_status_t virtual_unplug(RawAddress* bd_addr) {
   CHECK_BTHH_INIT();
   BTIF_TRACE_EVENT("BTHH: %s", __func__);
   btif_hh_device_t* p_dev;
@@ -1285,7 +1280,7 @@
     return BT_STATUS_FAIL;
   }
   btif_transfer_context(btif_hh_handle_evt, BTIF_HH_VUP_REQ_EVT, (char*)bd_addr,
-                        sizeof(bt_bdaddr_t), NULL);
+                        sizeof(RawAddress), NULL);
   return BT_STATUS_SUCCESS;
 }
 
@@ -1298,7 +1293,7 @@
 ** Returns         bt_status_t
 **
 *******************************************************************************/
-static bt_status_t get_idle_time(bt_bdaddr_t* bd_addr) {
+static bt_status_t get_idle_time(RawAddress* bd_addr) {
   CHECK_BTHH_INIT();
 
   char bdstr[20] = {0};
@@ -1326,7 +1321,7 @@
 ** Returns         bt_status_t
 **
 *******************************************************************************/
-static bt_status_t set_idle_time(bt_bdaddr_t* bd_addr, uint8_t idle_time) {
+static bt_status_t set_idle_time(RawAddress* bd_addr, uint8_t idle_time) {
   CHECK_BTHH_INIT();
 
   char bdstr[20] = {0};
@@ -1358,7 +1353,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t set_info(bt_bdaddr_t* bd_addr, bthh_hid_info_t hid_info) {
+static bt_status_t set_info(RawAddress* bd_addr, bthh_hid_info_t hid_info) {
   CHECK_BTHH_INIT();
   tBTA_HH_DEV_DSCP_INFO dscp_info;
 
@@ -1403,7 +1398,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t get_protocol(bt_bdaddr_t* bd_addr,
+static bt_status_t get_protocol(RawAddress* bd_addr,
                                 UNUSED_ATTR bthh_protocol_mode_t protocolMode) {
   CHECK_BTHH_INIT();
 
@@ -1430,7 +1425,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t set_protocol(bt_bdaddr_t* bd_addr,
+static bt_status_t set_protocol(RawAddress* bd_addr,
                                 bthh_protocol_mode_t protocolMode) {
   CHECK_BTHH_INIT();
   btif_hh_device_t* p_dev;
@@ -1469,7 +1464,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t get_report(bt_bdaddr_t* bd_addr,
+static bt_status_t get_report(RawAddress* bd_addr,
                               bthh_report_type_t reportType, uint8_t reportId,
                               int bufferSize) {
   CHECK_BTHH_INIT();
@@ -1508,7 +1503,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t set_report(bt_bdaddr_t* bd_addr,
+static bt_status_t set_report(RawAddress* bd_addr,
                               bthh_report_type_t reportType, char* report) {
   CHECK_BTHH_INIT();
   btif_hh_device_t* p_dev;
@@ -1564,7 +1559,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t send_data(bt_bdaddr_t* bd_addr, char* data) {
+static bt_status_t send_data(RawAddress* bd_addr, char* data) {
   CHECK_BTHH_INIT();
   btif_hh_device_t* p_dev;
 
diff --git a/btif/src/btif_hl.cc b/btif/src/btif_hl.cc
index fc5d185..b539a9d 100644
--- a/btif/src/btif_hl.cc
+++ b/btif/src/btif_hl.cc
@@ -633,7 +633,7 @@
  * Returns      bool
  *
  ******************************************************************************/
-bool btif_hl_dch_open(uint8_t app_id, const bt_bdaddr_t& bd_addr,
+bool btif_hl_dch_open(uint8_t app_id, const RawAddress& bd_addr,
                       tBTA_HL_DCH_OPEN_PARAM* p_dch_open_api, int mdep_cfg_idx,
                       btif_hl_pend_dch_op_t op, int* channel_id) {
   btif_hl_app_cb_t* p_acb;
@@ -725,7 +725,7 @@
  * Returns     Nothing
  *
  ******************************************************************************/
-bool btif_hl_cch_open(uint8_t app_id, const bt_bdaddr_t& bd_addr,
+bool btif_hl_cch_open(uint8_t app_id, const RawAddress& bd_addr,
                       uint16_t ctrl_psm, int mdep_cfg_idx,
                       btif_hl_pend_dch_op_t op, int* channel_id) {
   btif_hl_app_cb_t* p_acb;
@@ -962,8 +962,7 @@
  * Returns          bool
  *
  ******************************************************************************/
-static bool btif_hl_find_peer_mdep_id(uint8_t app_id,
-                                      const bt_bdaddr_t& bd_addr,
+static bool btif_hl_find_peer_mdep_id(uint8_t app_id, const RawAddress& bd_addr,
                                       tBTA_HL_MDEP_ROLE local_mdep_role,
                                       uint16_t data_type,
                                       tBTA_HL_MDEP_ID* p_peer_mdep_id) {
@@ -1060,7 +1059,7 @@
  * Returns      bool
  *
  ******************************************************************************/
-bool btif_hl_find_mcl_idx(uint8_t app_idx, const bt_bdaddr_t& p_bd_addr,
+bool btif_hl_find_mcl_idx(uint8_t app_idx, const RawAddress& p_bd_addr,
                           uint8_t* p_mcl_idx) {
   bool found = false;
   uint8_t i;
@@ -1638,7 +1637,7 @@
   btif_hl_mcl_cb_t* p_mcb;
   btif_hl_mdl_cb_t* p_dcb;
   uint8_t j, x;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 
   p_acb = BTIF_HL_GET_APP_CB_PTR(app_idx);
   for (j = 0; j < BTA_HL_NUM_MCLS; j++) {
@@ -1901,7 +1900,7 @@
 void btif_hl_send_destroyed_cb(btif_hl_app_cb_t* p_acb) {
   int app_id = (int)btif_hl_get_app_id(p_acb->delete_mdl.channel_id);
 
-  bt_bdaddr_t bd_addr = p_acb->delete_mdl.bd_addr;
+  RawAddress bd_addr = p_acb->delete_mdl.bd_addr;
   BTIF_TRACE_DEBUG("%s", __func__);
   BTIF_TRACE_DEBUG(
       "call channel state callback channel_id=0x%08x mdep_cfg_idx=%d, state=%d "
@@ -1930,7 +1929,7 @@
   btif_hl_soc_cb_t* p_scb = p_dcb->p_scb;
   int app_id = (int)btif_hl_get_app_id(p_scb->channel_id);
 
-  bt_bdaddr_t bd_addr = p_scb->bd_addr;
+  RawAddress bd_addr = p_scb->bd_addr;
 
   BTIF_TRACE_DEBUG("%s", __func__);
   BTIF_TRACE_DEBUG(
@@ -1956,7 +1955,7 @@
   btif_hl_pending_chan_cb_t* p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
   int app_id = (int)btif_hl_get_app_id(p_pcb->channel_id);
 
-  bt_bdaddr_t bd_addr = p_pcb->bd_addr;
+  RawAddress bd_addr = p_pcb->bd_addr;
 
   if (p_pcb->in_use &&
       p_pcb->cb_state == BTIF_HL_CHAN_CB_STATE_CONNECTING_PENDING) {
@@ -1987,7 +1986,7 @@
   btif_hl_pending_chan_cb_t* p_pcb = BTIF_HL_GET_PCB_PTR(app_idx, mcl_idx);
   int app_id = (int)btif_hl_get_app_id(p_pcb->channel_id);
 
-  bt_bdaddr_t bd_addr = p_pcb->bd_addr;
+  RawAddress bd_addr = p_pcb->bd_addr;
 
   BTIF_TRACE_DEBUG("%s p_pcb->in_use=%d", __func__, p_pcb->in_use);
   if (p_pcb->in_use) {
@@ -2927,7 +2926,7 @@
         send_chan_cb = false;
 
       if (send_chan_cb) {
-        bt_bdaddr_t bd_addr = p_data->chan_cb.bd_addr;
+        RawAddress bd_addr = p_data->chan_cb.bd_addr;
         BTIF_TRACE_DEBUG(
             "state callbk: ch_id=0x%08x cb_state=%d state=%d  fd=%d",
             p_data->chan_cb.channel_id, p_data->chan_cb.cb_state, state,
@@ -3545,7 +3544,7 @@
  * Returns         bt_status_t
  *
  ******************************************************************************/
-static bt_status_t connect_channel(int app_id, bt_bdaddr_t* bd_addr,
+static bt_status_t connect_channel(int app_id, RawAddress* bd_addr,
                                    int mdep_cfg_index, int* channel_id) {
   uint8_t app_idx, mcl_idx;
   btif_hl_app_cb_t* p_acb = NULL;
diff --git a/btif/src/btif_mce.cc b/btif/src/btif_mce.cc
index 7239f42..0074272 100644
--- a/btif/src/btif_mce.cc
+++ b/btif/src/btif_mce.cc
@@ -64,7 +64,7 @@
     insts[i].p_name = evt_data->mas[i].p_srv_name;
   }
 
-  bt_bdaddr_t addr = evt_data->remote_addr;
+  RawAddress addr = evt_data->remote_addr;
   HAL_CBACK(bt_mce_callbacks, remote_mas_instances_cb,
             (bt_status_t)evt_data->status, &addr, evt_data->num_mas, insts);
 }
@@ -125,7 +125,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-static bt_status_t get_remote_mas_instances(bt_bdaddr_t* bd_addr) {
+static bt_status_t get_remote_mas_instances(RawAddress* bd_addr) {
   VLOG(2) << __func__ << ": remote_addr=" << bd_addr;
 
   BTA_MceGetRemoteMasInstances(*bd_addr);
diff --git a/btif/src/btif_pan.cc b/btif/src/btif_pan.cc
index 939f6f3..a872236 100644
--- a/btif/src/btif_pan.cc
+++ b/btif/src/btif_pan.cc
@@ -96,9 +96,9 @@
 
 static bt_status_t btpan_jni_init(const btpan_callbacks_t* callbacks);
 static void btpan_jni_cleanup();
-static bt_status_t btpan_connect(const bt_bdaddr_t* bd_addr, int local_role,
+static bt_status_t btpan_connect(const RawAddress* bd_addr, int local_role,
                                  int remote_role);
-static bt_status_t btpan_disconnect(const bt_bdaddr_t* bd_addr);
+static bt_status_t btpan_disconnect(const RawAddress* bd_addr);
 static bt_status_t btpan_enable(int local_role);
 static int btpan_get_local_role(void);
 
@@ -218,7 +218,7 @@
   return btpan_dev_local_role;
 }
 
-static bt_status_t btpan_connect(const bt_bdaddr_t* bd_addr, int local_role,
+static bt_status_t btpan_connect(const RawAddress* bd_addr, int local_role,
                                  int remote_role) {
   BTIF_TRACE_DEBUG("local_role:%d, remote_role:%d", local_role, remote_role);
   int bta_local_role = btpan_role_to_bta(local_role);
@@ -232,7 +232,7 @@
   BTIF_TRACE_EVENT("%s: event=%d", __func__, event);
   switch (event) {
     case BTIF_PAN_CB_DISCONNECTING: {
-      bt_bdaddr_t* bd_addr = (bt_bdaddr_t*)p_param;
+      RawAddress* bd_addr = (RawAddress*)p_param;
       btpan_conn_t* conn = btpan_find_conn_addr(*bd_addr);
       int btpan_conn_local_role;
       int btpan_remote_role;
@@ -251,13 +251,13 @@
   }
 }
 
-static bt_status_t btpan_disconnect(const bt_bdaddr_t* bd_addr) {
+static bt_status_t btpan_disconnect(const RawAddress* bd_addr) {
   btpan_conn_t* conn = btpan_find_conn_addr(*bd_addr);
   if (conn && conn->handle >= 0) {
     /* Inform the application that the disconnect has been initiated
      * successfully */
     btif_transfer_context(btif_in_pan_generic_evt, BTIF_PAN_CB_DISCONNECTING,
-                          (char*)bd_addr, sizeof(bt_bdaddr_t), NULL);
+                          (char*)bd_addr, sizeof(RawAddress), NULL);
     BTA_PanClose(conn->handle);
     return BT_STATUS_SUCCESS;
   }
@@ -278,7 +278,7 @@
   }
 }
 
-static int tap_if_up(const char* devname, const bt_bdaddr_t* addr) {
+static int tap_if_up(const char* devname, const RawAddress* addr) {
   struct ifreq ifr;
   int sk, err;
 
@@ -407,7 +407,7 @@
   return INVALID_FD;
 }
 
-int btpan_tap_send(int tap_fd, const bt_bdaddr_t& src, const bt_bdaddr_t& dst,
+int btpan_tap_send(int tap_fd, const RawAddress& src, const RawAddress& dst,
                    uint16_t proto, const char* buf, uint16_t len,
                    UNUSED_ATTR bool ext, UNUSED_ATTR bool forward) {
   if (tap_fd != INVALID_FD) {
@@ -446,7 +446,7 @@
   return NULL;
 }
 
-btpan_conn_t* btpan_find_conn_addr(const bt_bdaddr_t& addr) {
+btpan_conn_t* btpan_find_conn_addr(const RawAddress& addr) {
   for (int i = 0; i < MAX_PAN_CONNS; i++) {
     if (btpan_cb.conns[i].peer == addr) return &btpan_cb.conns[i];
   }
@@ -512,8 +512,8 @@
   }
 }
 
-btpan_conn_t* btpan_new_conn(int handle, const bt_bdaddr_t& addr,
-                             int local_role, int remote_role) {
+btpan_conn_t* btpan_new_conn(int handle, const RawAddress& addr, int local_role,
+                             int remote_role) {
   for (int i = 0; i < MAX_PAN_CONNS; i++) {
     BTIF_TRACE_DEBUG("conns[%d]:%d", i, btpan_cb.conns[i].handle);
     if (btpan_cb.conns[i].handle == -1) {
diff --git a/btif/src/btif_profile_queue.cc b/btif/src/btif_profile_queue.cc
index 1346092..bdf7fc3 100644
--- a/btif/src/btif_profile_queue.cc
+++ b/btif/src/btif_profile_queue.cc
@@ -47,7 +47,7 @@
 } btif_queue_event_t;
 
 typedef struct {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint16_t uuid;
   bool busy;
   btif_connect_cb_t connect_cb;
@@ -118,11 +118,11 @@
  * Returns          BT_STATUS_SUCCESS if successful
  *
  ******************************************************************************/
-bt_status_t btif_queue_connect(uint16_t uuid, const bt_bdaddr_t* bda,
+bt_status_t btif_queue_connect(uint16_t uuid, const RawAddress* bda,
                                btif_connect_cb_t connect_cb) {
   connect_node_t node;
   memset(&node, 0, sizeof(connect_node_t));
-  memcpy(&node.bda, bda, sizeof(bt_bdaddr_t));
+  memcpy(&node.bda, bda, sizeof(RawAddress));
   node.uuid = uuid;
   node.connect_cb = connect_cb;
 
diff --git a/btif/src/btif_rc.cc b/btif/src/btif_rc.cc
index bcdb4d4..9e51917 100644
--- a/btif/src/btif_rc.cc
+++ b/btif/src/btif_rc.cc
@@ -150,7 +150,7 @@
     btif_rc_status_cmd_timer_t rc_status_cmd;
     btif_rc_control_cmd_timer_t rc_control_cmd;
   };
-  bt_bdaddr_t rc_addr;
+  RawAddress rc_addr;
 } btif_rc_timer_context_t;
 
 typedef struct {
@@ -173,7 +173,7 @@
   uint8_t rc_handle;
   tBTA_AV_FEAT rc_features;
   btrc_connection_state_t rc_state;
-  bt_bdaddr_t rc_addr;
+  RawAddress rc_addr;
   uint16_t rc_pending_play;
   btif_rc_cmd_ctxt_t rc_pdu_info[MAX_CMD_QUEUE_LEN];
   btif_rc_reg_notifications_t rc_notif[MAX_RC_NOTIFICATIONS];
@@ -207,7 +207,7 @@
 
 typedef struct {
   uint8_t label;
-  bt_bdaddr_t rc_addr;
+  RawAddress rc_addr;
 } rc_context_t;
 
 typedef struct { uint8_t handle; } btif_rc_handle_t;
@@ -319,7 +319,7 @@
                                  btrc_folder_items_t* btrc_item);
 void get_folder_item_type_player(const tAVRC_ITEM* avrc_item,
                                  btrc_folder_items_t* btrc_item);
-static bt_status_t get_folder_items_cmd(bt_bdaddr_t* bd_addr, uint8_t scope,
+static bt_status_t get_folder_items_cmd(RawAddress* bd_addr, uint8_t scope,
                                         uint8_t start_item, uint8_t num_items);
 
 static void btif_rc_upstreams_evt(uint16_t event, tAVRC_COMMAND* p_param,
@@ -349,7 +349,7 @@
  *  Externs
  *****************************************************************************/
 extern bool btif_hf_call_terminated_recently();
-extern bool check_cod(const bt_bdaddr_t* remote_bdaddr, uint32_t cod);
+extern bool check_cod(const RawAddress* remote_bdaddr, uint32_t cod);
 
 extern fixed_queue_t* btu_general_alarm_queue;
 
@@ -394,7 +394,7 @@
   return connected_devices;
 }
 
-btif_rc_device_cb_t* btif_rc_get_device_by_bda(const bt_bdaddr_t* bd_addr) {
+btif_rc_device_cb_t* btif_rc_get_device_by_bda(const RawAddress* bd_addr) {
   VLOG(1) << __func__ << ": bd_addr: " << *bd_addr;
 
   for (int idx = 0; idx < BTIF_RC_NUM_CONN; idx++) {
@@ -483,18 +483,18 @@
   }
 
   BTIF_TRACE_DEBUG("%s: Update rc features to CTRL: %d", __func__, rc_features);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
   HAL_CBACK(bt_rc_ctrl_callbacks, getrcfeatures_cb, &rc_addr, rc_features);
 }
 
 void handle_rc_features(btif_rc_device_cb_t* p_dev) {
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
   bdstr_t addr1, addr2;
 
   CHECK(bt_rc_callbacks);
 
   btrc_remote_features_t rc_features = BTRC_FEAT_NONE;
-  bt_bdaddr_t avdtp_addr = btif_av_get_addr();
+  RawAddress avdtp_addr = btif_av_get_addr();
 
   BTIF_TRACE_DEBUG("%s: AVDTP Address: %s AVCTP address: %s", __func__,
                    bdaddr_to_string(&avdtp_addr, addr1, sizeof(addr1)),
@@ -576,7 +576,7 @@
    * to a browse when not connected to the control channel over AVRCP is
    * probably not preferred anyways. */
   if (p_rc_br_open->status == BTA_AV_SUCCESS) {
-    bt_bdaddr_t rc_addr = p_dev->rc_addr;
+    RawAddress rc_addr = p_dev->rc_addr;
     p_dev->br_connected = true;
     HAL_CBACK(bt_rc_ctrl_callbacks, connection_state_cb, true, true, &rc_addr);
   }
@@ -636,7 +636,7 @@
 
   p_dev->rc_playing_uid = RC_INVALID_TRACK_ID;
   if (bt_rc_ctrl_callbacks != NULL) {
-    bt_bdaddr_t rc_addr = p_dev->rc_addr;
+    RawAddress rc_addr = p_dev->rc_addr;
     HAL_CBACK(bt_rc_ctrl_callbacks, connection_state_cb, true, false, &rc_addr);
   }
   /* report connection state if remote device is AVRCP target */
@@ -666,7 +666,7 @@
     BTIF_TRACE_ERROR("Got disconnect of unknown device");
     return;
   }
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
   /* Clean up AVRCP procedure flags */
   memset(&p_dev->rc_app_settings, 0, sizeof(btif_rc_player_app_settings_t));
   p_dev->rc_features_processed = false;
@@ -728,7 +728,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   BTIF_TRACE_DEBUG("%s: p_remote_cmd->rc_id: %d", __func__,
                    p_remote_cmd->rc_id);
@@ -785,7 +785,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (!(p_dev->rc_features & BTA_AV_FEAT_RCTG)) {
     BTIF_TRACE_ERROR("%s: DUT does not support AVRCP controller role",
@@ -1085,7 +1085,7 @@
  ** Description    Fetches the connected headset's address if any
  **
  ***************************************************************************/
-bool btif_rc_get_connected_peer(bt_bdaddr_t* peer_addr) {
+bool btif_rc_get_connected_peer(RawAddress* peer_addr) {
   for (int idx = 0; idx < BTIF_RC_NUM_CONN; idx++) {
     btif_rc_device_cb_t* p_dev = get_connected_device(idx);
     if (p_dev != NULL && (p_dev->rc_connected == TRUE)) {
@@ -1103,7 +1103,7 @@
  ** Description    Fetches the connected headset's handle if any
  **
  ***************************************************************************/
-uint8_t btif_rc_get_connected_peer_handle(const bt_bdaddr_t& peer_addr) {
+uint8_t btif_rc_get_connected_peer_handle(const RawAddress& peer_addr) {
   btif_rc_device_cb_t* p_dev = NULL;
   p_dev = btif_rc_get_device_by_bda(&peer_addr);
 
@@ -1124,7 +1124,7 @@
  ***************************************************************************/
 
 /* clear the queued PLAY command. if |bSendToApp| is true, forward to app */
-void btif_rc_check_handle_pending_play(const bt_bdaddr_t& peer_addr,
+void btif_rc_check_handle_pending_play(const RawAddress& peer_addr,
                                        bool bSendToApp) {
   btif_rc_device_cb_t* p_dev = NULL;
   p_dev = btif_rc_get_device_by_bda(&peer_addr);
@@ -1418,7 +1418,7 @@
   BTIF_TRACE_EVENT("%s: pdu: %s handle: 0x%x ctype: %x label: %x event ID: %x",
                    __func__, dump_rc_pdu(pavrc_cmd->pdu), p_dev->rc_handle,
                    ctype, label, pavrc_cmd->reg_notif.event_id);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   switch (event) {
     case AVRC_PDU_GET_PLAY_STATUS: {
@@ -1637,7 +1637,7 @@
                                            btif_rc_device_cb_t* p_dev) {
   BTIF_TRACE_DEBUG("%s: pdu: %s: handle: 0x%x", __func__,
                    dump_rc_pdu(pavrc_cmd->pdu), p_dev->rc_handle);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
   switch (event) {
     case AVRC_PDU_SET_ABSOLUTE_VOLUME:
       HAL_CBACK(bt_rc_ctrl_callbacks, setabsvol_cmd_cb, &rc_addr,
@@ -1668,7 +1668,7 @@
   BTIF_TRACE_EVENT("%s: pdu: %s: handle: 0x%x ctype: %x label: %x", __func__,
                    dump_rc_pdu(pavrc_resp->pdu), p_dev->rc_handle, ctype,
                    label);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   switch (event) {
     case AVRC_PDU_REGISTER_NOTIFICATION: {
@@ -1782,7 +1782,7 @@
  * Returns          bt_status_t
  *
  **************************************************************************/
-static bt_status_t get_play_status_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t get_play_status_rsp(RawAddress* bd_addr,
                                        btrc_play_status_t play_status,
                                        uint32_t song_len, uint32_t song_pos) {
   tAVRC_RESPONSE avrc_rsp;
@@ -1822,7 +1822,7 @@
  * Returns          bt_status_t
  *
  **************************************************************************/
-static bt_status_t get_element_attr_rsp(bt_bdaddr_t* bd_addr, uint8_t num_attr,
+static bt_status_t get_element_attr_rsp(RawAddress* bd_addr, uint8_t num_attr,
                                         btrc_element_attr_val_t* p_attrs) {
   tAVRC_RESPONSE avrc_rsp;
   uint32_t i;
@@ -2009,7 +2009,7 @@
  *                                            get_folder_items_list PDU
  *
  **************************************************************************/
-static bt_status_t get_folder_items_list_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t get_folder_items_list_rsp(RawAddress* bd_addr,
                                              btrc_status_t rsp_status,
                                              uint16_t uid_counter,
                                              uint8_t num_items,
@@ -2173,7 +2173,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t set_addressed_player_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t set_addressed_player_rsp(RawAddress* bd_addr,
                                             btrc_status_t rsp_status) {
   tAVRC_RESPONSE avrc_rsp;
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -2211,7 +2211,7 @@
  *                                            set_browsed_player PDU
  *
  **************************************************************************/
-static bt_status_t set_browsed_player_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t set_browsed_player_rsp(RawAddress* bd_addr,
                                           btrc_status_t rsp_status,
                                           uint32_t num_items,
                                           uint16_t charset_id,
@@ -2329,7 +2329,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t change_path_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t change_path_rsp(RawAddress* bd_addr,
                                    btrc_status_t rsp_status,
                                    uint32_t num_items) {
   tAVRC_RESPONSE avrc_rsp;
@@ -2362,7 +2362,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t search_rsp(bt_bdaddr_t* bd_addr, btrc_status_t rsp_status,
+static bt_status_t search_rsp(RawAddress* bd_addr, btrc_status_t rsp_status,
                               uint32_t uid_counter, uint32_t num_items) {
   tAVRC_RESPONSE avrc_rsp;
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -2395,7 +2395,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t get_item_attr_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t get_item_attr_rsp(RawAddress* bd_addr,
                                      btrc_status_t rsp_status, uint8_t num_attr,
                                      btrc_element_attr_val_t* p_attrs) {
   tAVRC_RESPONSE avrc_rsp;
@@ -2437,7 +2437,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t add_to_now_playing_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t add_to_now_playing_rsp(RawAddress* bd_addr,
                                           btrc_status_t rsp_status) {
   tAVRC_RESPONSE avrc_rsp;
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -2469,7 +2469,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t play_item_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t play_item_rsp(RawAddress* bd_addr,
                                  btrc_status_t rsp_status) {
   tAVRC_RESPONSE avrc_rsp;
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -2501,7 +2501,7 @@
  *                      BT_STATUS_SUCCESS   - always if RC is connected
  *
  **************************************************************************/
-static bt_status_t get_total_num_of_items_rsp(bt_bdaddr_t* bd_addr,
+static bt_status_t get_total_num_of_items_rsp(RawAddress* bd_addr,
                                               btrc_status_t rsp_status,
                                               uint32_t uid_counter,
                                               uint32_t num_items) {
@@ -3229,7 +3229,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (pmeta_msg->code == AVRC_RSP_INTERIM) {
     btif_rc_supported_event_t* p_event;
@@ -3469,7 +3469,7 @@
   }
 
   p_app_settings = &p_dev->rc_app_settings;
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (p_app_settings->attr_index < p_app_settings->num_attrs) {
     attr_index = p_app_settings->attr_index;
@@ -3548,7 +3548,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   app_settings.num_attr = p_rsp->num_val;
   for (xx = 0; xx < app_settings.num_attr; xx++) {
@@ -3590,7 +3590,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
   p_app_settings = &p_dev->rc_app_settings;
 
   /* Todo: Do we need to retry on command timeout */
@@ -3663,7 +3663,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
   p_app_settings = &p_dev->rc_app_settings;
 
   /* Todo: Do we need to retry on command timeout */
@@ -3770,7 +3770,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   /* For timeout pmeta_msg will be NULL, else we need to
    * check if this is accepted by TG
@@ -3806,7 +3806,7 @@
       return;
     }
 
-    bt_bdaddr_t rc_addr = p_dev->rc_addr;
+    RawAddress rc_addr = p_dev->rc_addr;
 
     for (int i = 0; i < p_rsp->num_attrs; i++) {
       p_attr[i].attr_id = p_rsp->p_attrs[i].attr_id;
@@ -3856,7 +3856,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (p_rsp->status == AVRC_STS_NO_ERROR) {
     HAL_CBACK(bt_rc_ctrl_callbacks, play_position_changed_cb, &rc_addr,
@@ -3887,7 +3887,7 @@
     return;
   }
 
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (p_rsp->status == AVRC_STS_NO_ERROR) {
     HAL_CBACK(bt_rc_ctrl_callbacks, set_addressed_player_cb, &rc_addr,
@@ -3911,7 +3911,7 @@
                                              tAVRC_GET_ITEMS_RSP* p_rsp) {
   btif_rc_device_cb_t* p_dev =
       btif_rc_get_device_by_handle(pmeta_msg->rc_handle);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (p_rsp->status == AVRC_STS_NO_ERROR) {
     /* Convert the internal folder listing into a response that can
@@ -4148,7 +4148,7 @@
                                         tAVRC_CHG_PATH_RSP* p_rsp) {
   btif_rc_device_cb_t* p_dev =
       btif_rc_get_device_by_handle(pmeta_msg->rc_handle);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (p_rsp->status == AVRC_STS_NO_ERROR) {
     HAL_CBACK(bt_rc_ctrl_callbacks, change_folder_path_cb, &rc_addr,
@@ -4172,7 +4172,7 @@
                                                tAVRC_SET_BR_PLAYER_RSP* p_rsp) {
   btif_rc_device_cb_t* p_dev =
       btif_rc_get_device_by_handle(pmeta_msg->rc_handle);
-  bt_bdaddr_t rc_addr = p_dev->rc_addr;
+  RawAddress rc_addr = p_dev->rc_addr;
 
   if (p_rsp->status == AVRC_STS_NO_ERROR) {
     HAL_CBACK(bt_rc_ctrl_callbacks, set_browsed_player_cb, &rc_addr,
@@ -4521,7 +4521,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t get_playback_state_cmd(bt_bdaddr_t* bd_addr) {
+static bt_status_t get_playback_state_cmd(RawAddress* bd_addr) {
   BTIF_TRACE_DEBUG("%s", __func__);
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
   return get_play_status_cmd(p_dev);
@@ -4540,7 +4540,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t get_now_playing_list_cmd(bt_bdaddr_t* bd_addr,
+static bt_status_t get_now_playing_list_cmd(RawAddress* bd_addr,
                                             uint8_t start_item,
                                             uint8_t num_items) {
   BTIF_TRACE_DEBUG("%s start, end: (%d, %d)", __func__, start_item, num_items);
@@ -4561,7 +4561,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t get_folder_list_cmd(bt_bdaddr_t* bd_addr, uint8_t start_item,
+static bt_status_t get_folder_list_cmd(RawAddress* bd_addr, uint8_t start_item,
                                        uint8_t num_items) {
   BTIF_TRACE_DEBUG("%s start, end: (%d, %d)", __func__, start_item, num_items);
   return get_folder_items_cmd(bd_addr, AVRC_SCOPE_FILE_SYSTEM, start_item,
@@ -4581,7 +4581,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t get_player_list_cmd(bt_bdaddr_t* bd_addr, uint8_t start_item,
+static bt_status_t get_player_list_cmd(RawAddress* bd_addr, uint8_t start_item,
                                        uint8_t num_items) {
   BTIF_TRACE_DEBUG("%s start, end: (%d, %d)", __func__, start_item, num_items);
   return get_folder_items_cmd(bd_addr, AVRC_SCOPE_PLAYER_LIST, start_item,
@@ -4603,7 +4603,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t change_folder_path_cmd(bt_bdaddr_t* bd_addr,
+static bt_status_t change_folder_path_cmd(RawAddress* bd_addr,
                                           uint8_t direction, uint8_t* uid) {
   BTIF_TRACE_DEBUG("%s: direction %d", __func__, direction);
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -4655,7 +4655,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t set_browsed_player_cmd(bt_bdaddr_t* bd_addr, uint16_t id) {
+static bt_status_t set_browsed_player_cmd(RawAddress* bd_addr, uint16_t id) {
   BTIF_TRACE_DEBUG("%s: id %d", __func__, id);
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
   CHECK_RC_CONNECTED(p_dev);
@@ -4702,7 +4702,7 @@
  **                  BT_STATUS_FAIL.
  **
  ***************************************************************************/
-static bt_status_t set_addressed_player_cmd(bt_bdaddr_t* bd_addr, uint16_t id) {
+static bt_status_t set_addressed_player_cmd(RawAddress* bd_addr, uint16_t id) {
   BTIF_TRACE_DEBUG("%s: id %d", __func__, id);
 
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -4755,7 +4755,7 @@
  *                  BT_STATUS_FAIL.
  *
  **************************************************************************/
-static bt_status_t get_folder_items_cmd(bt_bdaddr_t* bd_addr, uint8_t scope,
+static bt_status_t get_folder_items_cmd(RawAddress* bd_addr, uint8_t scope,
                                         uint8_t start_item, uint8_t end_item) {
   /* Check that both avrcp and browse channel are connected. */
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -4806,7 +4806,7 @@
  * Returns          void
  *
  **************************************************************************/
-static bt_status_t change_player_app_setting(bt_bdaddr_t* bd_addr,
+static bt_status_t change_player_app_setting(RawAddress* bd_addr,
                                              uint8_t num_attrib,
                                              uint8_t* attrib_ids,
                                              uint8_t* attrib_vals) {
@@ -4840,7 +4840,7 @@
  * Returns          void
  *
  **************************************************************************/
-static bt_status_t play_item_cmd(bt_bdaddr_t* bd_addr, uint8_t scope,
+static bt_status_t play_item_cmd(RawAddress* bd_addr, uint8_t scope,
                                  uint8_t* uid, uint16_t uid_counter) {
   BTIF_TRACE_DEBUG("%s: scope %d uid_counter %d", __func__, scope, uid_counter);
   btif_rc_device_cb_t* p_dev = btif_rc_get_device_by_bda(bd_addr);
@@ -5010,7 +5010,7 @@
  * Returns          void
  *
  **************************************************************************/
-static bt_status_t set_volume_rsp(bt_bdaddr_t* bd_addr, uint8_t abs_vol,
+static bt_status_t set_volume_rsp(RawAddress* bd_addr, uint8_t abs_vol,
                                   uint8_t label) {
   tAVRC_STS status = BT_STATUS_UNSUPPORTED;
   tAVRC_RESPONSE avrc_rsp;
@@ -5053,7 +5053,7 @@
  *
  **************************************************************************/
 static bt_status_t volume_change_notification_rsp(
-    bt_bdaddr_t* bd_addr, btrc_notification_type_t rsp_type, uint8_t abs_vol,
+    RawAddress* bd_addr, btrc_notification_type_t rsp_type, uint8_t abs_vol,
     uint8_t label) {
   tAVRC_STS status = BT_STATUS_UNSUPPORTED;
   tAVRC_RESPONSE avrc_rsp;
@@ -5099,7 +5099,7 @@
  * Returns          void
  *
  **************************************************************************/
-static bt_status_t send_groupnavigation_cmd(bt_bdaddr_t* bd_addr,
+static bt_status_t send_groupnavigation_cmd(RawAddress* bd_addr,
                                             uint8_t key_code,
                                             uint8_t key_state) {
   tAVRC_STS status = BT_STATUS_UNSUPPORTED;
@@ -5144,7 +5144,7 @@
  * Returns          void
  *
  **************************************************************************/
-static bt_status_t send_passthrough_cmd(bt_bdaddr_t* bd_addr, uint8_t key_code,
+static bt_status_t send_passthrough_cmd(RawAddress* bd_addr, uint8_t key_code,
                                         uint8_t key_state) {
   tAVRC_STS status = BT_STATUS_UNSUPPORTED;
   btif_rc_device_cb_t* p_dev = NULL;
diff --git a/btif/src/btif_sdp.cc b/btif/src/btif_sdp.cc
index c6cb759..de39c42 100644
--- a/btif/src/btif_sdp.cc
+++ b/btif/src/btif_sdp.cc
@@ -64,7 +64,7 @@
 
 static void btif_sdp_search_comp_evt(uint16_t event, char* p_param) {
   tBTA_SDP_SEARCH_COMP* evt_data = (tBTA_SDP_SEARCH_COMP*)p_param;
-  bt_bdaddr_t addr;
+  RawAddress addr;
   BTIF_TRACE_DEBUG("%s:  event = %d", __func__, event);
 
   if (event != BTA_SDP_SEARCH_COMP_EVT) return;
@@ -137,7 +137,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-static bt_status_t search(bt_bdaddr_t* bd_addr, const uint8_t* uuid) {
+static bt_status_t search(RawAddress* bd_addr, const uint8_t* uuid) {
   tSDP_UUID sdp_uuid;
   sdp_uuid.len = 16;
   memcpy(sdp_uuid.uu.uuid128, uuid, sizeof(sdp_uuid.uu.uuid128));
diff --git a/btif/src/btif_sock.cc b/btif/src/btif_sock.cc
index 2495d46..a41ab13 100644
--- a/btif/src/btif_sock.cc
+++ b/btif/src/btif_sock.cc
@@ -39,10 +39,9 @@
 static bt_status_t btsock_listen(btsock_type_t type, const char* service_name,
                                  const uint8_t* uuid, int channel, int* sock_fd,
                                  int flags, int app_uid);
-static bt_status_t btsock_connect(const bt_bdaddr_t* bd_addr,
-                                  btsock_type_t type, const uint8_t* uuid,
-                                  int channel, int* sock_fd, int flags,
-                                  int app_uid);
+static bt_status_t btsock_connect(const RawAddress* bd_addr, btsock_type_t type,
+                                  const uint8_t* uuid, int channel,
+                                  int* sock_fd, int flags, int app_uid);
 
 static void btsock_signaled(int fd, int type, int flags, uint32_t user_id);
 
@@ -154,10 +153,9 @@
   return status;
 }
 
-static bt_status_t btsock_connect(const bt_bdaddr_t* bd_addr,
-                                  btsock_type_t type, const uint8_t* uuid,
-                                  int channel, int* sock_fd, int flags,
-                                  int app_uid) {
+static bt_status_t btsock_connect(const RawAddress* bd_addr, btsock_type_t type,
+                                  const uint8_t* uuid, int channel,
+                                  int* sock_fd, int flags, int app_uid) {
   CHECK(uuid != NULL || channel > 0);
   CHECK(bd_addr != NULL);
   CHECK(sock_fd != NULL);
diff --git a/btif/src/btif_sock_l2cap.cc b/btif/src/btif_sock_l2cap.cc
index 23a9b6e..90e3755 100644
--- a/btif/src/btif_sock_l2cap.cc
+++ b/btif/src/btif_sock_l2cap.cc
@@ -62,7 +62,7 @@
 typedef struct l2cap_socket {
   struct l2cap_socket* prev;  // link to prev list item
   struct l2cap_socket* next;  // link to next list item
-  bt_bdaddr_t addr;           // other side's address
+  RawAddress addr;            // other side's address
   char name[256];             // user-friendly name of the service
   uint32_t id;                // just a tag to find this struct
   int app_uid;                // The UID of the app who requested this socket
@@ -273,7 +273,7 @@
 }
 
 static l2cap_socket* btsock_l2cap_alloc_l(const char* name,
-                                          const bt_bdaddr_t* addr,
+                                          const RawAddress* addr,
                                           char is_server, int flags) {
   unsigned security = 0;
   int fds[2];
@@ -356,9 +356,8 @@
                        sizeof(sock->channel)) == sizeof(sock->channel);
 }
 
-static bool send_app_connect_signal(int fd, const bt_bdaddr_t* addr,
-                                    int channel, int status, int send_fd,
-                                    int tx_mtu) {
+static bool send_app_connect_signal(int fd, const RawAddress* addr, int channel,
+                                    int status, int send_fd, int tx_mtu) {
   sock_connect_signal_t cs;
   cs.size = sizeof(cs);
   cs.bd_addr = *addr;
@@ -865,7 +864,7 @@
 }
 
 static bt_status_t btsock_l2cap_listen_or_connect(const char* name,
-                                                  const bt_bdaddr_t* addr,
+                                                  const RawAddress* addr,
                                                   int channel, int* sock_fd,
                                                   int flags, char listen,
                                                   int app_uid) {
@@ -962,7 +961,7 @@
                                         app_uid);
 }
 
-bt_status_t btsock_l2cap_connect(const bt_bdaddr_t* bd_addr, int channel,
+bt_status_t btsock_l2cap_connect(const RawAddress* bd_addr, int channel,
                                  int* sock_fd, int flags, int app_uid) {
   return btsock_l2cap_listen_or_connect(NULL, bd_addr, channel, sock_fd, flags,
                                         0, app_uid);
diff --git a/btif/src/btif_sock_rfc.cc b/btif/src/btif_sock_rfc.cc
index abb8b4f..2ea2a15 100644
--- a/btif/src/btif_sock_rfc.cc
+++ b/btif/src/btif_sock_rfc.cc
@@ -80,7 +80,7 @@
   int security;
   int scn;  // Server channel number
   int scn_notified;
-  bt_bdaddr_t addr;
+  RawAddress addr;
   int is_service_uuid_valid;
   uint8_t service_uuid[16];
   char service_name[256];
@@ -180,7 +180,7 @@
   return false;
 }
 
-static rfc_slot_t* alloc_rfc_slot(const bt_bdaddr_t* addr, const char* name,
+static rfc_slot_t* alloc_rfc_slot(const RawAddress* addr, const char* name,
                                   const uint8_t* uuid, int channel, int flags,
                                   bool server) {
   int security = 0;
@@ -236,7 +236,7 @@
 }
 
 static rfc_slot_t* create_srv_accept_rfc_slot(rfc_slot_t* srv_rs,
-                                              const bt_bdaddr_t* addr,
+                                              const RawAddress* addr,
                                               int open_handle,
                                               int new_listen_handle) {
   rfc_slot_t* accept_rs = alloc_rfc_slot(
@@ -328,7 +328,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-bt_status_t btsock_rfc_connect(const bt_bdaddr_t* bd_addr,
+bt_status_t btsock_rfc_connect(const RawAddress* bd_addr,
                                const uint8_t* service_uuid, int channel,
                                int* sock_fd, int flags, int app_uid) {
   CHECK(sock_fd != NULL);
@@ -453,8 +453,8 @@
                        sizeof(slot->scn)) == sizeof(slot->scn);
 }
 
-static bool send_app_connect_signal(int fd, const bt_bdaddr_t* addr,
-                                    int channel, int status, int send_fd) {
+static bool send_app_connect_signal(int fd, const RawAddress* addr, int channel,
+                                    int status, int send_fd) {
   sock_connect_signal_t cs;
   cs.size = sizeof(cs);
   cs.bd_addr = *addr;
diff --git a/btif/src/btif_sock_sco.cc b/btif/src/btif_sock_sco.cc
index 783a001..f3e2bb9 100644
--- a/btif/src/btif_sock_sco.cc
+++ b/btif/src/btif_sock_sco.cc
@@ -65,7 +65,7 @@
 } sco_socket_t;
 
 static sco_socket_t* sco_socket_establish_locked(bool is_listening,
-                                                 const bt_bdaddr_t* bd_addr,
+                                                 const RawAddress* bd_addr,
                                                  int* sock_fd);
 static sco_socket_t* sco_socket_new(void);
 static void sco_socket_free_locked(sco_socket_t* socket);
@@ -116,7 +116,7 @@
   return BT_STATUS_SUCCESS;
 }
 
-bt_status_t btsock_sco_connect(const bt_bdaddr_t* bd_addr, int* sock_fd,
+bt_status_t btsock_sco_connect(const RawAddress* bd_addr, int* sock_fd,
                                UNUSED_ATTR int flags) {
   CHECK(bd_addr != NULL);
   CHECK(sock_fd != NULL);
@@ -130,7 +130,7 @@
 
 // Must be called with |lock| held.
 static sco_socket_t* sco_socket_establish_locked(bool is_listening,
-                                                 const bt_bdaddr_t* bd_addr,
+                                                 const RawAddress* bd_addr,
                                                  int* sock_fd) {
   int pair[2] = {INVALID_FD, INVALID_FD};
   sco_socket_t* sco_socket = NULL;
diff --git a/btif/src/btif_storage.cc b/btif/src/btif_storage.cc
index 9141997..40c188e 100644
--- a/btif/src/btif_storage.cc
+++ b/btif/src/btif_storage.cc
@@ -154,14 +154,14 @@
  ******************************************************************************/
 typedef struct {
   uint32_t num_devices;
-  bt_bdaddr_t devices[BTM_SEC_MAX_DEVICE_RECORDS];
+  RawAddress devices[BTM_SEC_MAX_DEVICE_RECORDS];
 } btif_bonded_devices_t;
 
 /*******************************************************************************
  *  External functions
  ******************************************************************************/
 
-extern void btif_gatts_add_bonded_dev_from_nv(const bt_bdaddr_t& bda);
+extern void btif_gatts_add_bonded_dev_from_nv(const RawAddress& bda);
 
 /*******************************************************************************
  *  Internal Functions
@@ -178,7 +178,7 @@
  *  Static functions
  ******************************************************************************/
 
-static int prop2cfg(const bt_bdaddr_t* remote_bd_addr, bt_property_t* prop) {
+static int prop2cfg(const RawAddress* remote_bd_addr, bt_property_t* prop) {
   bdstr_t bdstr = {0};
   if (remote_bd_addr) bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
   BTIF_TRACE_DEBUG("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type,
@@ -264,7 +264,7 @@
   return true;
 }
 
-static int cfg2prop(const bt_bdaddr_t* remote_bd_addr, bt_property_t* prop) {
+static int cfg2prop(const RawAddress* remote_bd_addr, bt_property_t* prop) {
   bdstr_t bdstr = {0};
   if (remote_bd_addr) bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
   BTIF_TRACE_DEBUG("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type,
@@ -430,7 +430,7 @@
     if (btif_config_get_bin(name, "LinkKey", link_key, &size)) {
       int linkkey_type;
       if (btif_config_get_int(name, "LinkKeyType", &linkkey_type)) {
-        bt_bdaddr_t bd_addr;
+        RawAddress bd_addr;
         string_to_bdaddr(name, &bd_addr);
         if (add) {
           DEV_CLASS dev_class = {0, 0, 0};
@@ -449,7 +449,7 @@
         }
         bt_linkkey_file_found = true;
         memcpy(&p_bonded_devices->devices[p_bonded_devices->num_devices++],
-               &bd_addr, sizeof(bt_bdaddr_t));
+               &bd_addr, sizeof(RawAddress));
       } else {
         bt_linkkey_file_found = false;
       }
@@ -463,7 +463,7 @@
 }
 
 static void btif_read_le_key(const uint8_t key_type, const size_t key_len,
-                             bt_bdaddr_t bd_addr, const uint8_t addr_type,
+                             RawAddress bd_addr, const uint8_t addr_type,
                              const bool add_key, bool* device_added,
                              bool* key_found) {
   CHECK(device_added);
@@ -543,20 +543,20 @@
 bt_status_t btif_storage_get_adapter_property(bt_property_t* property) {
   /* Special handling for adapter address and BONDED_DEVICES */
   if (property->type == BT_PROPERTY_BDADDR) {
-    bt_bdaddr_t* bd_addr = (bt_bdaddr_t*)property->val;
+    RawAddress* bd_addr = (RawAddress*)property->val;
     /* Fetch the local BD ADDR */
     const controller_t* controller = controller_get_interface();
     if (controller->get_is_ready() == false) {
       LOG_ERROR(LOG_TAG,
                 "%s: Controller not ready! Unable to return Bluetooth Address",
                 __func__);
-      memset(bd_addr, 0, sizeof(bt_bdaddr_t));
+      memset(bd_addr, 0, sizeof(RawAddress));
       return BT_STATUS_FAIL;
     } else {
       LOG_ERROR(LOG_TAG, "%s: Controller ready!", __func__);
-      memcpy(bd_addr, controller->get_address(), sizeof(bt_bdaddr_t));
+      memcpy(bd_addr, controller->get_address(), sizeof(RawAddress));
     }
-    property->len = sizeof(bt_bdaddr_t);
+    property->len = sizeof(RawAddress);
     return BT_STATUS_SUCCESS;
   } else if (property->type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) {
     btif_bonded_devices_t bonded_devices;
@@ -569,7 +569,7 @@
         __func__, bonded_devices.num_devices);
 
     if (bonded_devices.num_devices > 0) {
-      property->len = bonded_devices.num_devices * sizeof(bt_bdaddr_t);
+      property->len = bonded_devices.num_devices * sizeof(RawAddress);
       memcpy(property->val, bonded_devices.devices, property->len);
     }
 
@@ -654,7 +654,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_get_remote_device_property(
-    const bt_bdaddr_t* remote_bd_addr, bt_property_t* property) {
+    const RawAddress* remote_bd_addr, bt_property_t* property) {
   return cfg2prop(remote_bd_addr, property) ? BT_STATUS_SUCCESS
                                             : BT_STATUS_FAIL;
 }
@@ -670,7 +670,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_set_remote_device_property(
-    const bt_bdaddr_t* remote_bd_addr, bt_property_t* property) {
+    const RawAddress* remote_bd_addr, bt_property_t* property) {
   return prop2cfg(remote_bd_addr, property) ? BT_STATUS_SUCCESS
                                             : BT_STATUS_FAIL;
 }
@@ -687,7 +687,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_add_remote_device(const bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_add_remote_device(const RawAddress* remote_bd_addr,
                                            uint32_t num_properties,
                                            bt_property_t* properties) {
   uint32_t i = 0;
@@ -723,7 +723,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_storage_add_bonded_device(bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_add_bonded_device(RawAddress* remote_bd_addr,
                                            LINK_KEY link_key, uint8_t key_type,
                                            uint8_t pin_length) {
   bdstr_t bdstr;
@@ -754,7 +754,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_remove_bonded_device(
-    const bt_bdaddr_t* remote_bd_addr) {
+    const RawAddress* remote_bd_addr) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
   BTIF_TRACE_DEBUG("in bd addr:%s", bdstr);
@@ -792,7 +792,7 @@
   bt_property_t adapter_props[6];
   uint32_t num_props = 0;
   bt_property_t remote_properties[8];
-  bt_bdaddr_t addr;
+  RawAddress addr;
   bt_bdname_t name, alias;
   bt_scan_mode_t mode;
   uint32_t disc_timeout;
@@ -838,14 +838,14 @@
     num_props++;
 
     /* BONDED_DEVICES */
-    bt_bdaddr_t* devices_list = (bt_bdaddr_t*)osi_malloc(
-        sizeof(bt_bdaddr_t) * bonded_devices.num_devices);
+    RawAddress* devices_list = (RawAddress*)osi_malloc(
+        sizeof(RawAddress) * bonded_devices.num_devices);
     adapter_props[num_props].type = BT_PROPERTY_ADAPTER_BONDED_DEVICES;
     adapter_props[num_props].len =
-        bonded_devices.num_devices * sizeof(bt_bdaddr_t);
+        bonded_devices.num_devices * sizeof(RawAddress);
     adapter_props[num_props].val = devices_list;
     for (i = 0; i < bonded_devices.num_devices; i++) {
-      memcpy(devices_list + i, &bonded_devices.devices[i], sizeof(bt_bdaddr_t));
+      memcpy(devices_list + i, &bonded_devices.devices[i], sizeof(RawAddress));
     }
     num_props++;
 
@@ -865,7 +865,7 @@
 
   {
     for (i = 0; i < bonded_devices.num_devices; i++) {
-      bt_bdaddr_t* p_remote_addr;
+      RawAddress* p_remote_addr;
 
       /*
        * TODO: improve handling of missing fields in NVRAM.
@@ -919,7 +919,7 @@
  *
  ******************************************************************************/
 
-bt_status_t btif_storage_add_ble_bonding_key(bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_add_ble_bonding_key(RawAddress* remote_bd_addr,
                                              char* key, uint8_t key_type,
                                              uint8_t key_length) {
   bdstr_t bdstr;
@@ -962,7 +962,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_get_ble_bonding_key(bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_get_ble_bonding_key(RawAddress* remote_bd_addr,
                                              uint8_t key_type, char* key_value,
                                              int key_length) {
   bdstr_t bdstr;
@@ -1005,7 +1005,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_remove_ble_bonding_keys(
-    const bt_bdaddr_t* remote_bd_addr) {
+    const RawAddress* remote_bd_addr) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
   BTIF_TRACE_DEBUG(" %s in bd addr:%s", __func__, bdstr);
@@ -1122,7 +1122,7 @@
     btif_bonded_devices_t* p_bonded_devices) {
   int device_type;
   int addr_type;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool device_added = false;
   bool key_found = false;
 
@@ -1162,7 +1162,7 @@
     // Fill in the bonded devices
     if (device_added) {
       memcpy(&p_bonded_devices->devices[p_bonded_devices->num_devices++],
-             &bd_addr, sizeof(bt_bdaddr_t));
+             &bd_addr, sizeof(RawAddress));
       btif_gatts_add_bonded_dev_from_nv(bd_addr);
     }
 
@@ -1171,7 +1171,7 @@
   return BT_STATUS_FAIL;
 }
 
-bt_status_t btif_storage_set_remote_addr_type(const bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,
                                               uint8_t addr_type) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
@@ -1193,7 +1193,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_get_remote_addr_type(const bt_bdaddr_t* remote_bd_addr,
+bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
                                               int* addr_type) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
@@ -1213,7 +1213,7 @@
  ******************************************************************************/
 
 bt_status_t btif_storage_add_hid_device_info(
-    bt_bdaddr_t* remote_bd_addr, uint16_t attr_mask, uint8_t sub_class,
+    RawAddress* remote_bd_addr, uint16_t attr_mask, uint8_t sub_class,
     uint8_t app_id, uint16_t vendor_id, uint16_t product_id, uint16_t version,
     uint8_t ctry_code, uint16_t ssr_max_latency, uint16_t ssr_min_tout,
     uint16_t dl_len, uint8_t* dsc_list) {
@@ -1245,7 +1245,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_load_bonded_hid_info(void) {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTA_HH_DEV_DSCP_INFO dscp_info;
   uint16_t attr_mask;
   uint8_t sub_class;
@@ -1325,7 +1325,7 @@
  *                  BT_STATUS_FAIL otherwise
  *
  ******************************************************************************/
-bt_status_t btif_storage_remove_hid_info(bt_bdaddr_t* remote_bd_addr) {
+bt_status_t btif_storage_remove_hid_info(RawAddress* remote_bd_addr) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
 
@@ -1354,7 +1354,7 @@
  *                  false otherwise
  *
  ******************************************************************************/
-bool btif_storage_is_restricted_device(const bt_bdaddr_t* remote_bd_addr) {
+bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
 
@@ -1370,7 +1370,7 @@
  *
  ******************************************************************************/
 bt_status_t btif_storage_load_hidd(void) {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 
   for (const btif_config_section_iter_t* iter = btif_config_section_begin();
        iter != btif_config_section_end();
@@ -1401,7 +1401,7 @@
  * Returns          BT_STATUS_SUCCESS
  *
  ******************************************************************************/
-bt_status_t btif_storage_set_hidd(bt_bdaddr_t* remote_bd_addr) {
+bt_status_t btif_storage_set_hidd(RawAddress* remote_bd_addr) {
   bdstr_t bdstr = {0};
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
   btif_config_set_int(bdstr, "HidDeviceCabled", 1);
@@ -1418,7 +1418,7 @@
  * Returns          BT_STATUS_SUCCESS
  *
  ******************************************************************************/
-bt_status_t btif_storage_remove_hidd(bt_bdaddr_t* remote_bd_addr) {
+bt_status_t btif_storage_remove_hidd(RawAddress* remote_bd_addr) {
   bdstr_t bdstr;
   bdaddr_to_string(remote_bd_addr, bdstr, sizeof(bdstr));
 
@@ -1429,7 +1429,7 @@
 }
 
 // Get the name of a device from btif for interop database matching.
-bool btif_storage_get_stored_remote_name(const bt_bdaddr_t& bd_addr,
+bool btif_storage_get_stored_remote_name(const RawAddress& bd_addr,
                                          char* name) {
   bt_property_t property;
   property.type = BT_PROPERTY_BDNAME;
diff --git a/device/include/controller.h b/device/include/controller.h
index a892209..4e7e34a 100644
--- a/device/include/controller.h
+++ b/device/include/controller.h
@@ -32,7 +32,7 @@
 typedef struct controller_t {
   bool (*get_is_ready)(void);
 
-  const bt_bdaddr_t* (*get_address)(void);
+  const RawAddress* (*get_address)(void);
   const bt_version_t* (*get_bt_version)(void);
 
   const bt_device_features_t* (*get_features_classic)(int index);
diff --git a/device/include/interop.h b/device/include/interop.h
index a3b252b..810f501 100644
--- a/device/include/interop.h
+++ b/device/include/interop.h
@@ -86,7 +86,7 @@
 // address based lookups where more information is not available. No
 // look-ups or random address resolution are performed on |addr|.
 bool interop_match_addr(const interop_feature_t feature,
-                        const bt_bdaddr_t* addr);
+                        const RawAddress* addr);
 
 // Check if a given remote device |name| matches a known workaround.
 // Name comparisons are case sensitive and do not allow for partial matches.
@@ -99,10 +99,10 @@
 // Add a dynamic interop database entry for a device matching the first |length|
 // bytes of |addr|, implementing the workaround identified by |feature|.
 // |addr| may not be null.
-// |length| must be greater than 0 and less than sizeof(bt_bdaddr_t).
+// |length| must be greater than 0 and less than sizeof(RawAddress).
 // As |interop_feature_t| is not exposed in the public API, feature must be a
 // valid integer representing an option in the enum.
-void interop_database_add(const uint16_t feature, const bt_bdaddr_t* addr,
+void interop_database_add(const uint16_t feature, const RawAddress* addr,
                           size_t length);
 
 // Clear the dynamic portion of the interoperability workaround database.
diff --git a/device/include/interop_database.h b/device/include/interop_database.h
index 36a8ae2..7f2b3d8 100644
--- a/device/include/interop_database.h
+++ b/device/include/interop_database.h
@@ -21,7 +21,7 @@
 #include "device/include/interop.h"
 
 typedef struct {
-  bt_bdaddr_t addr;
+  RawAddress addr;
   size_t length;
   interop_feature_t feature;
 } interop_addr_entry_t;
diff --git a/device/src/controller.cc b/device/src/controller.cc
index ad2e0bf..8e1d887 100644
--- a/device/src/controller.cc
+++ b/device/src/controller.cc
@@ -48,7 +48,7 @@
 static const hci_packet_factory_t* packet_factory;
 static const hci_packet_parser_t* packet_parser;
 
-static bt_bdaddr_t address;
+static RawAddress address;
 static bt_version_t bt_version;
 
 static uint8_t supported_commands[HCI_SUPPORTED_COMMANDS_ARRAY_SIZE];
@@ -274,7 +274,7 @@
 
 static bool get_is_ready(void) { return readable; }
 
-static const bt_bdaddr_t* get_address(void) {
+static const RawAddress* get_address(void) {
   CHECK(readable);
   return &address;
 }
diff --git a/device/src/interop.cc b/device/src/interop.cc
index c6b5062..8f3e522 100644
--- a/device/src/interop.cc
+++ b/device/src/interop.cc
@@ -38,14 +38,14 @@
 static void interop_free_entry_(void* data);
 static void interop_lazy_init_(void);
 static bool interop_match_fixed_(const interop_feature_t feature,
-                                 const bt_bdaddr_t* addr);
+                                 const RawAddress* addr);
 static bool interop_match_dynamic_(const interop_feature_t feature,
-                                   const bt_bdaddr_t* addr);
+                                   const RawAddress* addr);
 
 // Interface functions
 
 bool interop_match_addr(const interop_feature_t feature,
-                        const bt_bdaddr_t* addr) {
+                        const RawAddress* addr) {
   CHECK(addr);
 
   if (interop_match_fixed_(feature, addr) ||
@@ -77,11 +77,11 @@
   return false;
 }
 
-void interop_database_add(const uint16_t feature, const bt_bdaddr_t* addr,
+void interop_database_add(const uint16_t feature, const RawAddress* addr,
                           size_t length) {
   CHECK(addr);
   CHECK(length > 0);
-  CHECK(length < sizeof(bt_bdaddr_t));
+  CHECK(length < sizeof(RawAddress));
 
   interop_addr_entry_t* entry = static_cast<interop_addr_entry_t*>(
       osi_calloc(sizeof(interop_addr_entry_t)));
@@ -144,7 +144,7 @@
 }
 
 static bool interop_match_dynamic_(const interop_feature_t feature,
-                                   const bt_bdaddr_t* addr) {
+                                   const RawAddress* addr) {
   if (interop_list == NULL || list_length(interop_list) == 0) return false;
 
   const list_node_t* node = list_begin(interop_list);
@@ -163,7 +163,7 @@
 }
 
 static bool interop_match_fixed_(const interop_feature_t feature,
-                                 const bt_bdaddr_t* addr) {
+                                 const RawAddress* addr) {
   CHECK(addr);
 
   const size_t db_size =
diff --git a/device/test/interop_test.cc b/device/test/interop_test.cc
index 5116f2c..1f40958 100644
--- a/device/test/interop_test.cc
+++ b/device/test/interop_test.cc
@@ -21,7 +21,7 @@
 #include "device/include/interop.h"
 
 TEST(InteropTest, test_lookup_hit) {
-  bt_bdaddr_t test_address;
+  RawAddress test_address;
   string_to_bdaddr("38:2c:4a:e6:67:89", &test_address);
   EXPECT_TRUE(
       interop_match_addr(INTEROP_DISABLE_LE_SECURE_CONNECTIONS, &test_address));
@@ -30,7 +30,7 @@
 }
 
 TEST(InteropTest, test_lookup_miss) {
-  bt_bdaddr_t test_address;
+  RawAddress test_address;
   string_to_bdaddr("00:00:00:00:00:00", &test_address);
   EXPECT_FALSE(
       interop_match_addr(INTEROP_DISABLE_LE_SECURE_CONNECTIONS, &test_address));
@@ -44,7 +44,7 @@
 }
 
 TEST(InteropTest, test_dynamic) {
-  bt_bdaddr_t test_address;
+  RawAddress test_address;
 
   string_to_bdaddr("11:22:33:44:55:66", &test_address);
   EXPECT_FALSE(
diff --git a/hci/include/hci_packet_parser.h b/hci/include/hci_packet_parser.h
index b5117b9..ab88bb7 100644
--- a/hci/include/hci_packet_parser.h
+++ b/hci/include/hci_packet_parser.h
@@ -38,7 +38,7 @@
                                                  bt_version_t* bt_version_ptr);
 
   void (*parse_read_bd_addr_response)(BT_HDR* response,
-                                      bt_bdaddr_t* address_ptr);
+                                      RawAddress* address_ptr);
 
   void (*parse_read_local_supported_commands_response)(
       BT_HDR* response, uint8_t* supported_commands_ptr,
diff --git a/hci/src/hci_packet_parser.cc b/hci/src/hci_packet_parser.cc
index 9a2ce00..38f2011 100644
--- a/hci/src/hci_packet_parser.cc
+++ b/hci/src/hci_packet_parser.cc
@@ -86,9 +86,9 @@
 }
 
 static void parse_read_bd_addr_response(BT_HDR* response,
-                                        bt_bdaddr_t* address_ptr) {
+                                        RawAddress* address_ptr) {
   uint8_t* stream = read_command_complete_header(
-      response, HCI_READ_BD_ADDR, sizeof(bt_bdaddr_t) /* bytes after */);
+      response, HCI_READ_BD_ADDR, sizeof(RawAddress) /* bytes after */);
   CHECK(stream != NULL);
   STREAM_TO_BDADDR(*address_ptr, stream);
 
diff --git a/service/adapter.cc b/service/adapter.cc
index 42f8d79..e059c80 100644
--- a/service/adapter.cc
+++ b/service/adapter.cc
@@ -265,7 +265,7 @@
       switch (property->type) {
         case BT_PROPERTY_BDADDR: {
           std::string address =
-              BtAddrString(reinterpret_cast<bt_bdaddr_t*>(property->val));
+              BtAddrString(reinterpret_cast<RawAddress*>(property->val));
           LOG(INFO) << "Adapter address changed: " << address;
           address_.Set(address);
           break;
@@ -300,13 +300,13 @@
     }
   }
 
-  void SSPRequestCallback(bt_bdaddr_t*, bt_bdname_t*, uint32_t,
-                          bt_ssp_variant_t, uint32_t pass_key) override {
+  void SSPRequestCallback(RawAddress*, bt_bdname_t*, uint32_t, bt_ssp_variant_t,
+                          uint32_t pass_key) override {
     LOG(INFO) << "Passkey is: " << pass_key;
   }
 
   void AclStateChangedCallback(bt_status_t status,
-                               const bt_bdaddr_t& remote_bdaddr,
+                               const RawAddress& remote_bdaddr,
                                bt_acl_state_t state) override {
     std::string device_address = BtAddrString(&remote_bdaddr);
     bool connected = (state == BT_ACL_STATE_CONNECTED);
diff --git a/service/common/bluetooth/util/address_helper.cc b/service/common/bluetooth/util/address_helper.cc
index 17aecce..0a7cf02 100644
--- a/service/common/bluetooth/util/address_helper.cc
+++ b/service/common/bluetooth/util/address_helper.cc
@@ -24,11 +24,11 @@
 namespace util {
 
 bool IsAddressValid(const std::string& address) {
-  bt_bdaddr_t addr;
+  RawAddress addr;
   return BdAddrFromString(address, &addr);
 }
 
-bool BdAddrFromString(const std::string& address, bt_bdaddr_t* out_addr) {
+bool BdAddrFromString(const std::string& address, RawAddress* out_addr) {
   CHECK(out_addr);
 
   if (address.length() != 17) return false;
diff --git a/service/common/bluetooth/util/address_helper.h b/service/common/bluetooth/util/address_helper.h
index d71d907..13079f5 100644
--- a/service/common/bluetooth/util/address_helper.h
+++ b/service/common/bluetooth/util/address_helper.h
@@ -29,8 +29,8 @@
 // where X is an alpha-numeric character.
 bool IsAddressValid(const std::string& address);
 
-// Populates a bt_bdaddr_t from a given string. Returns false if the data is
+// Populates a RawAddress from a given string. Returns false if the data is
 // invalid.
-bool BdAddrFromString(const std::string& address, bt_bdaddr_t* out_addr);
+bool BdAddrFromString(const std::string& address, RawAddress* out_addr);
 
 }  // namespace util
diff --git a/service/gatt_server.cc b/service/gatt_server.cc
index d2550cd..e23bb0f 100644
--- a/service/gatt_server.cc
+++ b/service/gatt_server.cc
@@ -109,7 +109,7 @@
           << " offset: " << offset;
   lock_guard<mutex> lock(mutex_);
 
-  bt_bdaddr_t addr;
+  RawAddress addr;
   if (!util::BdAddrFromString(device_address, &addr)) {
     LOG(ERROR) << "Invalid device address given: " << device_address;
     return false;
@@ -178,7 +178,7 @@
           << " device_address: " << device_address << " confirm: " << confirm;
   lock_guard<mutex> lock(mutex_);
 
-  bt_bdaddr_t addr;
+  RawAddress addr;
   if (!util::BdAddrFromString(device_address, &addr)) {
     LOG(ERROR) << "Invalid device address given: " << device_address;
     return false;
@@ -236,7 +236,7 @@
 
 void GattServer::ConnectionCallback(
     hal::BluetoothGattInterface* /* gatt_iface */, int conn_id, int server_id,
-    int connected, const bt_bdaddr_t& bda) {
+    int connected, const RawAddress& bda) {
   lock_guard<mutex> lock(mutex_);
 
   if (server_id != server_id_) return;
@@ -328,7 +328,7 @@
 
 void GattServer::RequestReadCharacteristicCallback(
     hal::BluetoothGattInterface* /* gatt_iface */, int conn_id, int trans_id,
-    const bt_bdaddr_t& bda, int attribute_handle, int offset, bool is_long) {
+    const RawAddress& bda, int attribute_handle, int offset, bool is_long) {
   lock_guard<mutex> lock(mutex_);
 
   // Check to see if we know about this connection. Otherwise ignore the
@@ -361,7 +361,7 @@
 }
 void GattServer::RequestReadDescriptorCallback(
     hal::BluetoothGattInterface* /* gatt_iface */, int conn_id, int trans_id,
-    const bt_bdaddr_t& bda, int attribute_handle, int offset, bool is_long) {
+    const RawAddress& bda, int attribute_handle, int offset, bool is_long) {
   lock_guard<mutex> lock(mutex_);
 
   // Check to see if we know about this connection. Otherwise ignore the
@@ -395,7 +395,7 @@
 
 void GattServer::RequestWriteCharacteristicCallback(
     hal::BluetoothGattInterface* /* gatt_iface */, int conn_id, int trans_id,
-    const bt_bdaddr_t& bda, int attr_handle, int offset, bool need_rsp,
+    const RawAddress& bda, int attr_handle, int offset, bool need_rsp,
     bool is_prep, std::vector<uint8_t> value) {
   lock_guard<mutex> lock(mutex_);
 
@@ -434,7 +434,7 @@
 
 void GattServer::RequestWriteDescriptorCallback(
     hal::BluetoothGattInterface* /* gatt_iface */, int conn_id, int trans_id,
-    const bt_bdaddr_t& bda, int attr_handle, int offset, bool need_rsp,
+    const RawAddress& bda, int attr_handle, int offset, bool need_rsp,
     bool is_prep, std::vector<uint8_t> value) {
   lock_guard<mutex> lock(mutex_);
 
@@ -473,7 +473,7 @@
 
 void GattServer::RequestExecWriteCallback(
     hal::BluetoothGattInterface* /* gatt_iface */, int conn_id, int trans_id,
-    const bt_bdaddr_t& bda, int exec_write) {
+    const RawAddress& bda, int exec_write) {
   lock_guard<mutex> lock(mutex_);
 
   // Check to see if we know about this connection. Otherwise ignore the
@@ -533,7 +533,7 @@
 }
 
 std::shared_ptr<GattServer::Connection> GattServer::GetConnection(
-    int conn_id, const bt_bdaddr_t& bda, int request_id) {
+    int conn_id, const RawAddress& bda, int request_id) {
   auto iter = conn_id_map_.find(conn_id);
   if (iter == conn_id_map_.end()) {
     VLOG(1) << "Connection doesn't belong to this server";
diff --git a/service/gatt_server.h b/service/gatt_server.h
index e35b60a..e17e862 100644
--- a/service/gatt_server.h
+++ b/service/gatt_server.h
@@ -169,13 +169,13 @@
   // request ID and the device address for the connection. If |request_id| is -1
   // then no ATT read/write request is currently pending.
   struct Connection {
-    Connection(int conn_id, const bt_bdaddr_t& bdaddr)
+    Connection(int conn_id, const RawAddress& bdaddr)
         : conn_id(conn_id), bdaddr(bdaddr) {}
     Connection() : conn_id(-1) { memset(&bdaddr, 0, sizeof(bdaddr)); }
 
     int conn_id;
     std::unordered_map<int, int> request_id_to_handle;
-    bt_bdaddr_t bdaddr;
+    RawAddress bdaddr;
   };
 
   // Used to keep track of a pending Handle-Value indication.
@@ -194,7 +194,7 @@
   // hal::BluetoothGattInterface::ServerObserver overrides:
   void ConnectionCallback(hal::BluetoothGattInterface* gatt_iface, int conn_id,
                           int server_id, int connected,
-                          const bt_bdaddr_t& bda) override;
+                          const RawAddress& bda) override;
   void ServiceAddedCallback(hal::BluetoothGattInterface* gatt_iface, int status,
                             int server_if,
                             std::vector<btgatt_db_element_t>) override;
@@ -203,26 +203,25 @@
                               int service_handle) override;
   void RequestReadCharacteristicCallback(
       hal::BluetoothGattInterface* gatt_iface, int conn_id, int trans_id,
-      const bt_bdaddr_t& bda, int attribute_handle, int offset,
+      const RawAddress& bda, int attribute_handle, int offset,
       bool is_long) override;
   void RequestReadDescriptorCallback(hal::BluetoothGattInterface* gatt_iface,
                                      int conn_id, int trans_id,
-                                     const bt_bdaddr_t& bda,
+                                     const RawAddress& bda,
                                      int attribute_handle, int offset,
                                      bool is_long) override;
   void RequestWriteCharacteristicCallback(
       hal::BluetoothGattInterface* gatt_iface, int conn_id, int trans_id,
-      const bt_bdaddr_t& bda, int attr_handle, int offset, bool need_rsp,
+      const RawAddress& bda, int attr_handle, int offset, bool need_rsp,
       bool is_prep, std::vector<uint8_t> value) override;
   void RequestWriteDescriptorCallback(hal::BluetoothGattInterface* gatt_iface,
                                       int conn_id, int trans_id,
-                                      const bt_bdaddr_t& bda, int attr_handle,
+                                      const RawAddress& bda, int attr_handle,
                                       int offset, bool need_rsp, bool is_prep,
                                       std::vector<uint8_t> value) override;
   void RequestExecWriteCallback(hal::BluetoothGattInterface* gatt_iface,
                                 int conn_id, int trans_id,
-                                const bt_bdaddr_t& bda,
-                                int exec_write) override;
+                                const RawAddress& bda, int exec_write) override;
   void IndicationSentCallback(hal::BluetoothGattInterface* gatt_iface,
                               int conn_id, int status) override;
 
@@ -234,7 +233,7 @@
 
   // Helper method that returns a pointer to an internal Connection instance
   // that matches the given parameters.
-  std::shared_ptr<Connection> GetConnection(int conn_id, const bt_bdaddr_t& bda,
+  std::shared_ptr<Connection> GetConnection(int conn_id, const RawAddress& bda,
                                             int request_id);
 
   // See getters for documentation.
diff --git a/service/gatt_server_old.cc b/service/gatt_server_old.cc
index eadc13a..f6099ef 100644
--- a/service/gatt_server_old.cc
+++ b/service/gatt_server_old.cc
@@ -204,7 +204,7 @@
   }
 }
 
-void RequestReadCallback(int conn_id, int trans_id, const bt_bdaddr_t& bda,
+void RequestReadCallback(int conn_id, int trans_id, const RawAddress& bda,
                          int attr_handle, int attribute_offset_octets,
                          bool is_long) {
   std::lock_guard<std::mutex> lock(g_internal->lock);
@@ -247,7 +247,7 @@
   g_internal->gatt->server->send_response(conn_id, trans_id, 0, response);
 }
 
-void RequestWriteCallback(int conn_id, int trans_id, const bt_bdaddr_t& bda,
+void RequestWriteCallback(int conn_id, int trans_id, const RawAddress& bda,
                           int attr_handle, int attribute_offset, bool need_rsp,
                           bool is_prep, std::vector<uint8_t> value) {
   std::string addr(BtAddrString(&bda));
@@ -303,7 +303,7 @@
   g_internal->gatt->server->send_response(conn_id, trans_id, 0, response);
 }
 
-void RequestExecWriteCallback(int conn_id, int trans_id, const bt_bdaddr_t& bda,
+void RequestExecWriteCallback(int conn_id, int trans_id, const RawAddress& bda,
                               int exec_write) {
   std::string addr(BtAddrString(&bda));
   LOG_INFO(LOG_TAG, "%s: connection:%d (%s:trans:%d) exec_write:%d", __func__,
@@ -328,7 +328,7 @@
 }
 
 void ConnectionCallback(int conn_id, int server_if, int connected,
-                        const bt_bdaddr_t& bda) {
+                        const RawAddress& bda) {
   std::string addr(BtAddrString(&bda));
   LOG_INFO(LOG_TAG, "%s: connection:%d server_if:%d connected:%d addr:%s",
            __func__, conn_id, server_if, connected, addr.c_str());
@@ -372,7 +372,7 @@
 }
 
 void ScanResultCallback(uint16_t ble_evt_type, uint8_t addr_type,
-                        bt_bdaddr_t* bda, uint8_t ble_primary_phy,
+                        RawAddress* bda, uint8_t ble_primary_phy,
                         uint8_t ble_secondary_phy, uint8_t ble_advertising_sid,
                         int8_t ble_tx_power, int8_t rssi,
                         uint16_t ble_periodic_adv_int,
@@ -383,14 +383,14 @@
 }
 
 void ClientConnectCallback(int conn_id, int status, int client_if,
-                           const bt_bdaddr_t& bda) {
+                           const RawAddress& bda) {
   std::string addr(BtAddrString(&bda));
   LOG_INFO(LOG_TAG, "%s: conn_id:%d status:%d client_if:%d %s", __func__,
            conn_id, status, client_if, addr.c_str());
 }
 
 void ClientDisconnectCallback(int conn_id, int status, int client_if,
-                              const bt_bdaddr_t& bda) {
+                              const RawAddress& bda) {
   std::string addr(BtAddrString(&bda));
   LOG_INFO(LOG_TAG, "%s: conn_id:%d status:%d client_if:%d %s", __func__,
            conn_id, status, client_if, addr.c_str());
diff --git a/service/hal/bluetooth_gatt_interface.cc b/service/hal/bluetooth_gatt_interface.cc
index 652318e..f33fdbc 100644
--- a/service/hal/bluetooth_gatt_interface.cc
+++ b/service/hal/bluetooth_gatt_interface.cc
@@ -89,7 +89,7 @@
 }
 
 void ScanResultCallback(
-    uint16_t ble_evt_type, uint8_t addr_type, bt_bdaddr_t* bda,
+    uint16_t ble_evt_type, uint8_t addr_type, RawAddress* bda,
     uint8_t ble_primary_phy, uint8_t ble_secondary_phy,
     uint8_t ble_advertising_sid, int8_t ble_tx_power, int8_t rssi,
     uint16_t ble_periodic_adv_int,
@@ -105,7 +105,7 @@
 }
 
 void ConnectCallback(int conn_id, int status, int client_if,
-                     const bt_bdaddr_t& bda) {
+                     const RawAddress& bda) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VERIFY_INTERFACE_OR_RETURN();
 
@@ -117,7 +117,7 @@
 }
 
 void DisconnectCallback(int conn_id, int status, int client_if,
-                        const bt_bdaddr_t& bda) {
+                        const RawAddress& bda) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VERIFY_INTERFACE_OR_RETURN();
 
@@ -232,7 +232,7 @@
 }
 
 void ConnectionCallback(int conn_id, int server_if, int connected,
-                        const bt_bdaddr_t& bda) {
+                        const RawAddress& bda) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VLOG(2) << __func__ << " - conn_id: " << conn_id
           << " server_if: " << server_if << " connected: " << connected;
@@ -276,7 +276,7 @@
 }
 
 void RequestReadCharacteristicCallback(int conn_id, int trans_id,
-                                       const bt_bdaddr_t& bda, int attr_handle,
+                                       const RawAddress& bda, int attr_handle,
                                        int offset, bool is_long) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VLOG(2) << __func__ << " - conn_id: " << conn_id << " trans_id: " << trans_id
@@ -289,7 +289,7 @@
 }
 
 void RequestReadDescriptorCallback(int conn_id, int trans_id,
-                                   const bt_bdaddr_t& bda, int attr_handle,
+                                   const RawAddress& bda, int attr_handle,
                                    int offset, bool is_long) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VLOG(2) << __func__ << " - conn_id: " << conn_id << " trans_id: " << trans_id
@@ -302,7 +302,7 @@
 }
 
 void RequestWriteCharacteristicCallback(int conn_id, int trans_id,
-                                        const bt_bdaddr_t& bda, int attr_handle,
+                                        const RawAddress& bda, int attr_handle,
                                         int offset, bool need_rsp, bool is_prep,
                                         std::vector<uint8_t> value) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
@@ -318,7 +318,7 @@
 }
 
 void RequestWriteDescriptorCallback(
-    int conn_id, int trans_id, const bt_bdaddr_t& bda, int attr_handle,
+    int conn_id, int trans_id, const RawAddress& bda, int attr_handle,
     int offset, bool need_rsp, bool is_prep,
     std::vector<uint8_t> value) {  // NOLINT(pass-by-value)
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
@@ -333,7 +333,7 @@
       is_prep, value));
 }
 
-void RequestExecWriteCallback(int conn_id, int trans_id, const bt_bdaddr_t& bda,
+void RequestExecWriteCallback(int conn_id, int trans_id, const RawAddress& bda,
                               int exec_write) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VLOG(2) << __func__ << " - conn_id: " << conn_id << " trans_id: " << trans_id
@@ -559,7 +559,7 @@
 // themselves are optional.
 
 void BluetoothGattInterface::ScannerObserver::ScanResultCallback(
-    BluetoothGattInterface* /* gatt_iface */, const bt_bdaddr_t& /* bda */,
+    BluetoothGattInterface* /* gatt_iface */, const RawAddress& /* bda */,
     int /* rssi */,
     std::vector<uint8_t> /* adv_data */) {  // NOLINT(pass-by-value)
   // Do Nothing.
@@ -573,13 +573,13 @@
 
 void BluetoothGattInterface::ClientObserver::ConnectCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* status */, int /* client_if */, const bt_bdaddr_t& /* bda */) {
+    int /* status */, int /* client_if */, const RawAddress& /* bda */) {
   // Do nothing
 }
 
 void BluetoothGattInterface::ClientObserver::DisconnectCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* status */, int /* client_if */, const bt_bdaddr_t& /* bda */) {
+    int /* status */, int /* client_if */, const RawAddress& /* bda */) {
   // Do nothing
 }
 
@@ -645,7 +645,7 @@
 
 void BluetoothGattInterface::ServerObserver::ConnectionCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* server_if */, int /* connected */, const bt_bdaddr_t& /* bda */) {
+    int /* server_if */, int /* connected */, const RawAddress& /* bda */) {
   // Do nothing.
 }
 
@@ -670,21 +670,21 @@
 
 void BluetoothGattInterface::ServerObserver::RequestReadCharacteristicCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* trans_id */, const bt_bdaddr_t& /* bda */, int /* attr_handle */,
+    int /* trans_id */, const RawAddress& /* bda */, int /* attr_handle */,
     int /* offset */, bool /* is_long */) {
   // Do nothing.
 }
 
 void BluetoothGattInterface::ServerObserver::RequestReadDescriptorCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* trans_id */, const bt_bdaddr_t& /* bda */, int /* attr_handle */,
+    int /* trans_id */, const RawAddress& /* bda */, int /* attr_handle */,
     int /* offset */, bool /* is_long */) {
   // Do nothing.
 }
 
 void BluetoothGattInterface::ServerObserver::RequestWriteCharacteristicCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* trans_id */, const bt_bdaddr_t& /* bda */, int /* attr_handle */,
+    int /* trans_id */, const RawAddress& /* bda */, int /* attr_handle */,
     int /* offset */, bool /* need_rsp */, bool /* is_prep */,
     std::vector<uint8_t> /* value */) {  // NOLINT(pass-by-value)
   // Do nothing.
@@ -692,7 +692,7 @@
 
 void BluetoothGattInterface::ServerObserver::RequestWriteDescriptorCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* trans_id */, const bt_bdaddr_t& /* bda */, int /* attr_handle */,
+    int /* trans_id */, const RawAddress& /* bda */, int /* attr_handle */,
     int /* offset */, bool /* need_rsp */, bool /* is_prep */,
     std::vector<uint8_t> /* value */) {  // NOLINT(pass-by-value)
   // Do nothing.
@@ -700,7 +700,7 @@
 
 void BluetoothGattInterface::ServerObserver::RequestExecWriteCallback(
     BluetoothGattInterface* /* gatt_iface */, int /* conn_id */,
-    int /* trans_id */, const bt_bdaddr_t& /* bda */, int /* exec_write */) {
+    int /* trans_id */, const RawAddress& /* bda */, int /* exec_write */) {
   // Do nothing.
 }
 
diff --git a/service/hal/bluetooth_gatt_interface.h b/service/hal/bluetooth_gatt_interface.h
index b88bd4b..345ed88 100644
--- a/service/hal/bluetooth_gatt_interface.h
+++ b/service/hal/bluetooth_gatt_interface.h
@@ -53,7 +53,7 @@
     // "btgatt_scanner_callbacks_t" in the HAL API definitions.
 
     virtual void ScanResultCallback(
-        BluetoothGattInterface* gatt_iface, const bt_bdaddr_t& bda, int rssi,
+        BluetoothGattInterface* gatt_iface, const RawAddress& bda, int rssi,
         std::vector<uint8_t> adv_data);  // NOLINT(pass-by-value)
   };
 
@@ -71,11 +71,11 @@
 
     virtual void ConnectCallback(BluetoothGattInterface* gatt_iface,
                                  int conn_id, int status, int client_if,
-                                 const bt_bdaddr_t& bda);
+                                 const RawAddress& bda);
 
     virtual void DisconnectCallback(BluetoothGattInterface* gatt_iface,
                                     int conn_id, int status, int client_if,
-                                    const bt_bdaddr_t& bda);
+                                    const RawAddress& bda);
 
     virtual void SearchCompleteCallback(BluetoothGattInterface* gatt_iface,
                                         int conn_id, int status);
@@ -124,7 +124,7 @@
 
     virtual void ConnectionCallback(BluetoothGattInterface* gatt_iface,
                                     int conn_id, int server_if, int connected,
-                                    const bt_bdaddr_t& bda);
+                                    const RawAddress& bda);
 
     virtual void ServiceAddedCallback(
         BluetoothGattInterface* gatt_iface, int status, int server_if,
@@ -140,27 +140,27 @@
 
     virtual void RequestReadCharacteristicCallback(
         BluetoothGattInterface* gatt_iface, int conn_id, int trans_id,
-        const bt_bdaddr_t& bda, int attr_handle, int offset, bool is_long);
+        const RawAddress& bda, int attr_handle, int offset, bool is_long);
 
     virtual void RequestReadDescriptorCallback(
         BluetoothGattInterface* gatt_iface, int conn_id, int trans_id,
-        const bt_bdaddr_t& bda, int attr_handle, int offset, bool is_long);
+        const RawAddress& bda, int attr_handle, int offset, bool is_long);
 
     virtual void RequestWriteCharacteristicCallback(
         BluetoothGattInterface* gatt_iface, int conn_id, int trans_id,
-        const bt_bdaddr_t& bda, int attr_handle, int offset, bool need_rsp,
+        const RawAddress& bda, int attr_handle, int offset, bool need_rsp,
         bool is_prep,
         std::vector<uint8_t> value);  // NOLINT(pass-by-value)
 
     virtual void RequestWriteDescriptorCallback(
         BluetoothGattInterface* gatt_iface, int conn_id, int trans_id,
-        const bt_bdaddr_t& bda, int attr_handle, int offset, bool need_rsp,
+        const RawAddress& bda, int attr_handle, int offset, bool need_rsp,
         bool is_prep,
         std::vector<uint8_t> value);  // NOLINT(pass-by-alue)
 
     virtual void RequestExecWriteCallback(BluetoothGattInterface* gatt_iface,
                                           int conn_id, int trans_id,
-                                          const bt_bdaddr_t& bda,
+                                          const RawAddress& bda,
                                           int exec_write);
 
     virtual void ResponseConfirmationCallback(
diff --git a/service/hal/bluetooth_interface.cc b/service/hal/bluetooth_interface.cc
index cf55afd..39816ef 100644
--- a/service/hal/bluetooth_interface.cc
+++ b/service/hal/bluetooth_interface.cc
@@ -83,7 +83,7 @@
 }
 
 void RemoteDevicePropertiesCallback(bt_status_t status,
-                                    bt_bdaddr_t* remote_bd_addr,
+                                    RawAddress* remote_bd_addr,
                                     int num_properties,
                                     bt_property_t* properties) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
@@ -103,7 +103,7 @@
   FOR_EACH_BLUETOOTH_OBSERVER(DiscoveryStateChangedCallback(state));
 }
 
-void PinRequestCallback(bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name,
+void PinRequestCallback(RawAddress* remote_bd_addr, bt_bdname_t* bd_name,
                         uint32_t cod, bool min_16_digit) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VERIFY_INTERFACE_OR_RETURN();
@@ -114,7 +114,7 @@
       PinRequestCallback(remote_bd_addr, bd_name, cod, min_16_digit));
 }
 
-void SSPRequestCallback(bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name,
+void SSPRequestCallback(RawAddress* remote_bd_addr, bt_bdname_t* bd_name,
                         uint32_t cod, bt_ssp_variant_t pairing_variant,
                         uint32_t pass_key) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
@@ -126,7 +126,7 @@
                                                  pairing_variant, pass_key));
 }
 
-void BondStateChangedCallback(bt_status_t status, bt_bdaddr_t* remote_bd_addr,
+void BondStateChangedCallback(bt_status_t status, RawAddress* remote_bd_addr,
                               bt_bond_state_t state) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VERIFY_INTERFACE_OR_RETURN();
@@ -136,7 +136,7 @@
       BondStateChangedCallback(status, remote_bd_addr, state));
 }
 
-void AclStateChangedCallback(bt_status_t status, bt_bdaddr_t* remote_bd_addr,
+void AclStateChangedCallback(bt_status_t status, RawAddress* remote_bd_addr,
                              bt_acl_state_t state) {
   shared_lock<shared_mutex_impl> lock(g_instance_lock);
   VERIFY_INTERFACE_OR_RETURN();
@@ -320,7 +320,7 @@
 }
 
 void BluetoothInterface::Observer::RemoteDevicePropertiesCallback(
-    bt_status_t /* status */, bt_bdaddr_t* /* remote_bd_addr */,
+    bt_status_t /* status */, RawAddress* /* remote_bd_addr */,
     int /* num_properties */, bt_property_t* /* properties */) {
   // Do nothing.
 }
@@ -331,24 +331,24 @@
 }
 
 void BluetoothInterface::Observer::PinRequestCallback(
-    bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod,
+    RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod,
     bool min_16_digit) {
   // Do nothing.
 }
 
 void BluetoothInterface::Observer::SSPRequestCallback(
-    bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod,
+    RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod,
     bt_ssp_variant_t pairing_variant, uint32_t pass_key) {
   // Do nothing.
 }
 
 void BluetoothInterface::Observer::BondStateChangedCallback(
-    bt_status_t status, bt_bdaddr_t* remote_bd_addr, bt_bond_state_t state) {
+    bt_status_t status, RawAddress* remote_bd_addr, bt_bond_state_t state) {
   // Do nothing.
 }
 
 void BluetoothInterface::Observer::AclStateChangedCallback(
-    bt_status_t /* status */, const bt_bdaddr_t& /* remote_bdaddr */,
+    bt_status_t /* status */, const RawAddress& /* remote_bdaddr */,
     bt_acl_state_t /* state */) {
   // Do nothing.
 }
diff --git a/service/hal/bluetooth_interface.h b/service/hal/bluetooth_interface.h
index 92d94ba..49d621c 100644
--- a/service/hal/bluetooth_interface.h
+++ b/service/hal/bluetooth_interface.h
@@ -54,22 +54,22 @@
                                            int num_properties,
                                            bt_property_t* properties);
     virtual void RemoteDevicePropertiesCallback(bt_status_t status,
-                                                bt_bdaddr_t* remote_bd_addr,
+                                                RawAddress* remote_bd_addr,
                                                 int num_properties,
                                                 bt_property_t* properties);
     virtual void DiscoveryStateChangedCallback(bt_discovery_state_t state);
-    virtual void PinRequestCallback(bt_bdaddr_t* remote_bd_addr,
+    virtual void PinRequestCallback(RawAddress* remote_bd_addr,
                                     bt_bdname_t* bd_name, uint32_t cod,
                                     bool min_16_digit);
-    virtual void SSPRequestCallback(bt_bdaddr_t* remote_bd_addr,
+    virtual void SSPRequestCallback(RawAddress* remote_bd_addr,
                                     bt_bdname_t* bd_name, uint32_t cod,
                                     bt_ssp_variant_t pairing_variant,
                                     uint32_t pass_key);
     virtual void BondStateChangedCallback(bt_status_t status,
-                                          bt_bdaddr_t* remote_bd_addr,
+                                          RawAddress* remote_bd_addr,
                                           bt_bond_state_t state);
     virtual void AclStateChangedCallback(bt_status_t status,
-                                         const bt_bdaddr_t& remote_bdaddr,
+                                         const RawAddress& remote_bdaddr,
                                          bt_acl_state_t state);
 
     // TODO(armansito): Complete the list of callbacks.
diff --git a/service/hal/fake_bluetooth_gatt_interface.cc b/service/hal/fake_bluetooth_gatt_interface.cc
index 82c1a47..f6f521b 100644
--- a/service/hal/fake_bluetooth_gatt_interface.cc
+++ b/service/hal/fake_bluetooth_gatt_interface.cc
@@ -40,7 +40,7 @@
   return BT_STATUS_FAIL;
 }
 
-bt_status_t FakeConnect(int client_if, const bt_bdaddr_t& bd_addr,
+bt_status_t FakeConnect(int client_if, const RawAddress& bd_addr,
                         bool is_direct, int transport, int phy) {
   if (g_client_handler)
     return g_client_handler->Connect(client_if, bd_addr, is_direct, transport);
@@ -48,7 +48,7 @@
   return BT_STATUS_FAIL;
 }
 
-bt_status_t FakeDisconnect(int client_if, const bt_bdaddr_t& bd_addr,
+bt_status_t FakeDisconnect(int client_if, const RawAddress& bd_addr,
                            int conn_id) {
   if (g_client_handler)
     return g_client_handler->Disconnect(client_if, bd_addr, conn_id);
@@ -176,7 +176,7 @@
 // The methods below can be used to notify observers with certain events and
 // given parameters.
 void FakeBluetoothGattInterface::NotifyScanResultCallback(
-    const bt_bdaddr_t& bda, int rssi, std::vector<uint8_t> adv_data) {
+    const RawAddress& bda, int rssi, std::vector<uint8_t> adv_data) {
   FOR_EACH_OBSERVER(ScannerObserver, scanner_observers_,
                     ScanResultCallback(this, bda, rssi, adv_data));
 }
@@ -189,13 +189,13 @@
 
 void FakeBluetoothGattInterface::NotifyConnectCallback(int conn_id, int status,
                                                        int client_if,
-                                                       const bt_bdaddr_t& bda) {
+                                                       const RawAddress& bda) {
   FOR_EACH_OBSERVER(ClientObserver, client_observers_,
                     ConnectCallback(this, conn_id, status, client_if, bda));
 }
 
 void FakeBluetoothGattInterface::NotifyDisconnectCallback(
-    int conn_id, int status, int client_if, const bt_bdaddr_t& bda) {
+    int conn_id, int status, int client_if, const RawAddress& bda) {
   FOR_EACH_OBSERVER(ClientObserver, client_observers_,
                     DisconnectCallback(this, conn_id, status, client_if, bda));
 }
@@ -207,7 +207,7 @@
 }
 
 void FakeBluetoothGattInterface::NotifyServerConnectionCallback(
-    int conn_id, int server_if, int connected, const bt_bdaddr_t& bda) {
+    int conn_id, int server_if, int connected, const RawAddress& bda) {
   FOR_EACH_OBSERVER(
       ServerObserver, server_observers_,
       ConnectionCallback(this, conn_id, server_if, connected, bda));
@@ -220,7 +220,7 @@
 }
 
 void FakeBluetoothGattInterface::NotifyRequestReadCharacteristicCallback(
-    int conn_id, int trans_id, const bt_bdaddr_t& bda, int attr_handle,
+    int conn_id, int trans_id, const RawAddress& bda, int attr_handle,
     int offset, bool is_long) {
   FOR_EACH_OBSERVER(
       ServerObserver, server_observers_,
@@ -229,7 +229,7 @@
 }
 
 void FakeBluetoothGattInterface::NotifyRequestReadDescriptorCallback(
-    int conn_id, int trans_id, const bt_bdaddr_t& bda, int attr_handle,
+    int conn_id, int trans_id, const RawAddress& bda, int attr_handle,
     int offset, bool is_long) {
   FOR_EACH_OBSERVER(
       ServerObserver, server_observers_,
@@ -238,7 +238,7 @@
 }
 
 void FakeBluetoothGattInterface::NotifyRequestWriteCharacteristicCallback(
-    int conn_id, int trans_id, const bt_bdaddr_t& bda, int attr_handle,
+    int conn_id, int trans_id, const RawAddress& bda, int attr_handle,
     int offset, bool need_rsp, bool is_prep, std::vector<uint8_t> value) {
   FOR_EACH_OBSERVER(ServerObserver, server_observers_,
                     RequestWriteCharacteristicCallback(
@@ -247,7 +247,7 @@
 }
 
 void FakeBluetoothGattInterface::NotifyRequestWriteDescriptorCallback(
-    int conn_id, int trans_id, const bt_bdaddr_t& bda, int attr_handle,
+    int conn_id, int trans_id, const RawAddress& bda, int attr_handle,
     int offset, bool need_rsp, bool is_prep, std::vector<uint8_t> value) {
   FOR_EACH_OBSERVER(
       ServerObserver, server_observers_,
@@ -256,7 +256,7 @@
 }
 
 void FakeBluetoothGattInterface::NotifyRequestExecWriteCallback(
-    int conn_id, int trans_id, const bt_bdaddr_t& bda, int exec_write) {
+    int conn_id, int trans_id, const RawAddress& bda, int exec_write) {
   FOR_EACH_OBSERVER(
       ServerObserver, server_observers_,
       RequestExecWriteCallback(this, conn_id, trans_id, bda, exec_write));
diff --git a/service/hal/fake_bluetooth_gatt_interface.h b/service/hal/fake_bluetooth_gatt_interface.h
index 77ce6ba..7ad3c89 100644
--- a/service/hal/fake_bluetooth_gatt_interface.h
+++ b/service/hal/fake_bluetooth_gatt_interface.h
@@ -38,9 +38,9 @@
     virtual bt_status_t RegisterClient(const bt_uuid_t& app_uuid) = 0;
     virtual bt_status_t UnregisterClient(int client_if) = 0;
 
-    virtual bt_status_t Connect(int client_if, const bt_bdaddr_t& bd_addr,
+    virtual bt_status_t Connect(int client_if, const RawAddress& bd_addr,
                                 bool is_direct, int transport) = 0;
-    virtual bt_status_t Disconnect(int client_if, const bt_bdaddr_t& bd_addr,
+    virtual bt_status_t Disconnect(int client_if, const RawAddress& bd_addr,
                                    int conn_id) = 0;
   };
 
@@ -78,22 +78,22 @@
 
   void NotifyRegisterScannerCallback(int status, int client_if,
                                      const bt_uuid_t& app_uuid);
-  void NotifyScanResultCallback(const bt_bdaddr_t& bda, int rssi,
+  void NotifyScanResultCallback(const RawAddress& bda, int rssi,
                                 std::vector<uint8_t> adv_data);
 
   // Client callbacks:
   void NotifyRegisterClientCallback(int status, int client_if,
                                     const bt_uuid_t& app_uuid);
   void NotifyConnectCallback(int conn_id, int status, int client_if,
-                             const bt_bdaddr_t& bda);
+                             const RawAddress& bda);
   void NotifyDisconnectCallback(int conn_id, int status, int client_if,
-                                const bt_bdaddr_t& bda);
+                                const RawAddress& bda);
 
   // Server callbacks:
   void NotifyRegisterServerCallback(int status, int server_if,
                                     const bt_uuid_t& app_uuid);
   void NotifyServerConnectionCallback(int conn_id, int server_if, int connected,
-                                      const bt_bdaddr_t& bda);
+                                      const RawAddress& bda);
   void NotifyServiceAddedCallback(int status, int server_if,
                                   std::vector<btgatt_db_element_t> srvc);
   void NotifyCharacteristicAddedCallback(int status, int server_if,
@@ -104,25 +104,25 @@
                                      int desc_handle);
   void NotifyServiceStartedCallback(int status, int server_if, int srvc_handle);
   void NotifyRequestReadCharacteristicCallback(int conn_id, int trans_id,
-                                               const bt_bdaddr_t& bda,
+                                               const RawAddress& bda,
                                                int attr_handle, int offset,
                                                bool is_long);
   void NotifyRequestReadDescriptorCallback(int conn_id, int trans_id,
-                                           const bt_bdaddr_t& bda,
+                                           const RawAddress& bda,
                                            int attr_handle, int offset,
                                            bool is_long);
   void NotifyRequestWriteCharacteristicCallback(int conn_id, int trans_id,
-                                                const bt_bdaddr_t& bda,
+                                                const RawAddress& bda,
                                                 int attr_handle, int offset,
                                                 bool need_rsp, bool is_prep,
                                                 std::vector<uint8_t> value);
   void NotifyRequestWriteDescriptorCallback(int conn_id, int trans_id,
-                                            const bt_bdaddr_t& bda,
+                                            const RawAddress& bda,
                                             int attr_handle, int offset,
                                             bool need_rsp, bool is_prep,
                                             std::vector<uint8_t> value);
   void NotifyRequestExecWriteCallback(int conn_id, int trans_id,
-                                      const bt_bdaddr_t& bda, int exec_write);
+                                      const RawAddress& bda, int exec_write);
   void NotifyIndicationSentCallback(int conn_id, int status);
 
   // BluetoothGattInterface overrides:
diff --git a/service/hal/fake_bluetooth_interface.cc b/service/hal/fake_bluetooth_interface.cc
index 95f1f98..0ce6119 100644
--- a/service/hal/fake_bluetooth_interface.cc
+++ b/service/hal/fake_bluetooth_interface.cc
@@ -113,9 +113,9 @@
 }
 
 void FakeBluetoothInterface::NotifyAdapterAddressPropertyChanged(
-    const bt_bdaddr_t* address) {
+    const RawAddress* address) {
   bt_property_t property;
-  property.len = sizeof(bt_bdaddr_t);
+  property.len = sizeof(RawAddress);
   property.val = (void*)address;
   property.type = BT_PROPERTY_BDADDR;
 
@@ -133,8 +133,7 @@
 }
 
 void FakeBluetoothInterface::NotifyAclStateChangedCallback(
-    bt_status_t status, const bt_bdaddr_t& remote_bdaddr,
-    bt_acl_state_t state) {
+    bt_status_t status, const RawAddress& remote_bdaddr, bt_acl_state_t state) {
   FOR_EACH_OBSERVER(Observer, observers_,
                     AclStateChangedCallback(status, remote_bdaddr, state));
 }
diff --git a/service/hal/fake_bluetooth_interface.h b/service/hal/fake_bluetooth_interface.h
index 1b2e246..b0fd657 100644
--- a/service/hal/fake_bluetooth_interface.h
+++ b/service/hal/fake_bluetooth_interface.h
@@ -51,11 +51,11 @@
   void NotifyAdapterPropertiesChanged(int num_properties,
                                       bt_property_t* properties);
   void NotifyAdapterNamePropertyChanged(const std::string& name);
-  void NotifyAdapterAddressPropertyChanged(const bt_bdaddr_t* address);
+  void NotifyAdapterAddressPropertyChanged(const RawAddress* address);
   void NotifyAdapterLocalLeFeaturesPropertyChanged(
       const bt_local_le_features_t* features);
   void NotifyAclStateChangedCallback(bt_status_t status,
-                                     const bt_bdaddr_t& remote_bdaddr,
+                                     const RawAddress& remote_bdaddr,
                                      bt_acl_state_t state);
 
   // hal::BluetoothInterface overrides:
diff --git a/service/logging_helpers.cc b/service/logging_helpers.cc
index 34e70e4..39706ec 100644
--- a/service/logging_helpers.cc
+++ b/service/logging_helpers.cc
@@ -140,7 +140,7 @@
   }
 }
 
-std::string BtAddrString(const bt_bdaddr_t* addr) {
+std::string BtAddrString(const RawAddress* addr) {
   char buffer[20];
   snprintf(buffer, sizeof(buffer), "%02X:%02X:%02X:%02X:%02X:%02X",
            addr->address[0], addr->address[1], addr->address[2],
diff --git a/service/logging_helpers.h b/service/logging_helpers.h
index 4462f3e..d3c58d1 100644
--- a/service/logging_helpers.h
+++ b/service/logging_helpers.h
@@ -44,4 +44,4 @@
 const char* BtAclText(const bt_acl_state_t state);
 
 // TODO(icoolidge): Address object.
-std::string BtAddrString(const bt_bdaddr_t* addr);
+std::string BtAddrString(const RawAddress* addr);
diff --git a/service/low_energy_client.cc b/service/low_energy_client.cc
index c43c492..2e79249 100644
--- a/service/low_energy_client.cc
+++ b/service/low_energy_client.cc
@@ -54,7 +54,7 @@
 bool LowEnergyClient::Connect(const std::string& address, bool is_direct) {
   VLOG(2) << __func__ << "Address: " << address << " is_direct: " << is_direct;
 
-  bt_bdaddr_t bda;
+  RawAddress bda;
   util::BdAddrFromString(address, &bda);
 
   bt_status_t status =
@@ -71,10 +71,10 @@
 bool LowEnergyClient::Disconnect(const std::string& address) {
   VLOG(2) << __func__ << "Address: " << address;
 
-  bt_bdaddr_t bda;
+  RawAddress bda;
   util::BdAddrFromString(address, &bda);
 
-  std::map<const bt_bdaddr_t, int>::iterator conn_id;
+  std::map<const RawAddress, int>::iterator conn_id;
   {
     lock_guard<mutex> lock(connection_fields_lock_);
     conn_id = connection_ids_.find(bda);
@@ -98,10 +98,10 @@
 bool LowEnergyClient::SetMtu(const std::string& address, int mtu) {
   VLOG(2) << __func__ << "Address: " << address << " MTU: " << mtu;
 
-  bt_bdaddr_t bda;
+  RawAddress bda;
   util::BdAddrFromString(address, &bda);
 
-  std::map<const bt_bdaddr_t, int>::iterator conn_id;
+  std::map<const RawAddress, int>::iterator conn_id;
   {
     lock_guard<mutex> lock(connection_fields_lock_);
     conn_id = connection_ids_.find(bda);
@@ -135,7 +135,7 @@
 
 void LowEnergyClient::ConnectCallback(hal::BluetoothGattInterface* gatt_iface,
                                       int conn_id, int status, int client_id,
-                                      const bt_bdaddr_t& bda) {
+                                      const RawAddress& bda) {
   if (client_id != client_id_) return;
 
   VLOG(1) << __func__ << "client_id: " << client_id << " status: " << status;
@@ -155,7 +155,7 @@
 
 void LowEnergyClient::DisconnectCallback(
     hal::BluetoothGattInterface* gatt_iface, int conn_id, int status,
-    int client_id, const bt_bdaddr_t& bda) {
+    int client_id, const RawAddress& bda) {
   if (client_id != client_id_) return;
 
   VLOG(1) << __func__ << " client_id: " << client_id << " status: " << status;
@@ -176,7 +176,7 @@
   VLOG(1) << __func__ << " conn_id: " << conn_id << " status: " << status
           << " mtu: " << mtu;
 
-  const bt_bdaddr_t* bda = nullptr;
+  const RawAddress* bda = nullptr;
   {
     lock_guard<mutex> lock(connection_fields_lock_);
     for (auto& connection : connection_ids_) {
diff --git a/service/low_energy_client.h b/service/low_energy_client.h
index d9b1d37..ea048bb 100644
--- a/service/low_energy_client.h
+++ b/service/low_energy_client.h
@@ -34,8 +34,8 @@
 namespace bluetooth {
 
 struct ConnComparator {
-  bool operator()(const bt_bdaddr_t& a, const bt_bdaddr_t& b) const {
-    return memcmp(&a, &b, sizeof(bt_bdaddr_t)) < 0;
+  bool operator()(const RawAddress& a, const RawAddress& b) const {
+    return memcmp(&a, &b, sizeof(RawAddress)) < 0;
   }
 };
 
@@ -104,10 +104,10 @@
   // BluetoothGattInterface::ClientObserver overrides:
   void ConnectCallback(hal::BluetoothGattInterface* gatt_iface, int conn_id,
                        int status, int client_id,
-                       const bt_bdaddr_t& bda) override;
+                       const RawAddress& bda) override;
   void DisconnectCallback(hal::BluetoothGattInterface* gatt_iface, int conn_id,
                           int status, int client_id,
-                          const bt_bdaddr_t& bda) override;
+                          const RawAddress& bda) override;
   void MtuChangedCallback(hal::BluetoothGattInterface* gatt_iface, int conn_id,
                           int status, int mtu) override;
 
@@ -132,7 +132,7 @@
 
   // Maps bluetooth address to connection id
   // TODO(jpawlowski): change type to bimap
-  std::map<const bt_bdaddr_t, int, ConnComparator> connection_ids_;
+  std::map<const RawAddress, int, ConnComparator> connection_ids_;
 
   DISALLOW_COPY_AND_ASSIGN(LowEnergyClient);
 };
diff --git a/service/low_energy_scanner.cc b/service/low_energy_scanner.cc
index 5220414..7dd0ade 100644
--- a/service/low_energy_scanner.cc
+++ b/service/low_energy_scanner.cc
@@ -139,7 +139,7 @@
 int LowEnergyScanner::GetInstanceId() const { return scanner_id_; }
 
 void LowEnergyScanner::ScanResultCallback(
-    hal::BluetoothGattInterface* gatt_iface, const bt_bdaddr_t& bda, int rssi,
+    hal::BluetoothGattInterface* gatt_iface, const RawAddress& bda, int rssi,
     std::vector<uint8_t> adv_data) {
   // Ignore scan results if this client didn't start a scan.
   if (!scan_started_.load()) return;
diff --git a/service/low_energy_scanner.h b/service/low_energy_scanner.h
index e7f6584..279ea7b 100644
--- a/service/low_energy_scanner.h
+++ b/service/low_energy_scanner.h
@@ -85,7 +85,7 @@
   int GetInstanceId() const override;
 
   void ScanResultCallback(hal::BluetoothGattInterface* gatt_iface,
-                          const bt_bdaddr_t& bda, int rssi,
+                          const RawAddress& bda, int rssi,
                           std::vector<uint8_t> adv_data) override;
 
  private:
diff --git a/service/test/adapter_unittest.cc b/service/test/adapter_unittest.cc
index f7ee109..b7a5df4 100644
--- a/service/test/adapter_unittest.cc
+++ b/service/test/adapter_unittest.cc
@@ -227,7 +227,7 @@
 TEST_F(AdapterTest, GetAddress) {
   EXPECT_EQ(bluetooth::Adapter::kDefaultAddress, adapter_->GetAddress());
 
-  const bt_bdaddr_t kTestAdapterInput = {{0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc}};
+  const RawAddress kTestAdapterInput = {{0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc}};
   const char kTestAdapterAddressOutput[] = "12:34:56:78:9A:BC";
 
   fake_hal_iface_->NotifyAdapterAddressPropertyChanged(&kTestAdapterInput);
@@ -255,7 +255,7 @@
 
   EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr));
 
-  bt_bdaddr_t hal_addr;
+  RawAddress hal_addr;
   ASSERT_TRUE(util::BdAddrFromString(kDeviceAddr, &hal_addr));
 
   // status != BT_STATUS_SUCCESS should be ignored
diff --git a/service/test/gatt_client_unittest.cc b/service/test/gatt_client_unittest.cc
index c3926eb..2d59106 100644
--- a/service/test/gatt_client_unittest.cc
+++ b/service/test/gatt_client_unittest.cc
@@ -36,8 +36,8 @@
   MOCK_METHOD1(RegisterClient, bt_status_t(const bt_uuid_t&));
   MOCK_METHOD1(UnregisterClient, bt_status_t(int));
   MOCK_METHOD1(Scan, bt_status_t(bool));
-  MOCK_METHOD4(Connect, bt_status_t(int, const bt_bdaddr_t&, bool, int));
-  MOCK_METHOD3(Disconnect, bt_status_t(int, const bt_bdaddr_t&, int));
+  MOCK_METHOD4(Connect, bt_status_t(int, const RawAddress&, bool, int));
+  MOCK_METHOD3(Disconnect, bt_status_t(int, const RawAddress&, int));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockGattHandler);
diff --git a/service/test/gatt_server_unittest.cc b/service/test/gatt_server_unittest.cc
index ab12ff2..ee4ce3d 100644
--- a/service/test/gatt_server_unittest.cc
+++ b/service/test/gatt_server_unittest.cc
@@ -400,7 +400,7 @@
   EXPECT_FALSE(gatt_server_->SendResponse(kTestAddress0, kReqId0,
                                           GATT_ERROR_NONE, 0, kTestValue));
 
-  bt_bdaddr_t hal_addr0, hal_addr1;
+  RawAddress hal_addr0, hal_addr1;
   ASSERT_TRUE(util::BdAddrFromString(kTestAddress0, &hal_addr0));
   ASSERT_TRUE(util::BdAddrFromString(kTestAddress1, &hal_addr1));
 
@@ -510,7 +510,7 @@
   EXPECT_FALSE(gatt_server_->SendResponse(kTestAddress0, kReqId0,
                                           GATT_ERROR_NONE, 0, kTestValue));
 
-  bt_bdaddr_t hal_addr0, hal_addr1;
+  RawAddress hal_addr0, hal_addr1;
   ASSERT_TRUE(util::BdAddrFromString(kTestAddress0, &hal_addr0));
   ASSERT_TRUE(util::BdAddrFromString(kTestAddress1, &hal_addr1));
 
@@ -620,7 +620,7 @@
   const int kConnId0 = 0;
   const int kConnId1 = 1;
   std::vector<uint8_t> value;
-  bt_bdaddr_t hal_addr0;
+  RawAddress hal_addr0;
   ASSERT_TRUE(util::BdAddrFromString(kTestAddress0, &hal_addr0));
 
   // Set up two connections with the same address.
diff --git a/service/test/low_energy_client_unittest.cc b/service/test/low_energy_client_unittest.cc
index 0fa98b8..5870f2e 100644
--- a/service/test/low_energy_client_unittest.cc
+++ b/service/test/low_energy_client_unittest.cc
@@ -42,8 +42,8 @@
 
   MOCK_METHOD1(RegisterClient, bt_status_t(const bt_uuid_t&));
   MOCK_METHOD1(UnregisterClient, bt_status_t(int));
-  MOCK_METHOD4(Connect, bt_status_t(int, const bt_bdaddr_t&, bool, int));
-  MOCK_METHOD3(Disconnect, bt_status_t(int, const bt_bdaddr_t&, int));
+  MOCK_METHOD4(Connect, bt_status_t(int, const RawAddress&, bool, int));
+  MOCK_METHOD3(Disconnect, bt_status_t(int, const RawAddress&, int));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockGattHandler);
@@ -256,7 +256,7 @@
 }
 
 TEST_F(LowEnergyClientPostRegisterTest, Connect) {
-  const bt_bdaddr_t kTestAddress = {{0x01, 0x02, 0x03, 0x0A, 0x0B, 0x0C}};
+  const RawAddress kTestAddress = {{0x01, 0x02, 0x03, 0x0A, 0x0B, 0x0C}};
   const char kTestAddressStr[] = "01:02:03:0A:0B:0C";
   const bool kTestDirect = false;
   const int connId = 12;
@@ -271,7 +271,7 @@
               Connect(le_client_->GetInstanceId(), BitEq(kTestAddress),
                       kTestDirect, BT_TRANSPORT_LE))
       .Times(1)
-      .WillOnce(DoAll(Invoke([&](int client_id, const bt_bdaddr_t& bd_addr,
+      .WillOnce(DoAll(Invoke([&](int client_id, const RawAddress& bd_addr,
                                  bool is_direct, int transport) {
                         fake_hal_gatt_iface_->NotifyConnectCallback(
                             connId, BT_STATUS_SUCCESS, client_id, bd_addr);
@@ -287,7 +287,7 @@
                                          BitEq(kTestAddress), connId))
       .Times(1)
       .WillOnce(DoAll(
-          Invoke([&](int client_id, const bt_bdaddr_t& bd_addr, int connId) {
+          Invoke([&](int client_id, const RawAddress& bd_addr, int connId) {
             fake_hal_gatt_iface_->NotifyDisconnectCallback(
                 connId, BT_STATUS_SUCCESS, client_id, bd_addr);
           }),
diff --git a/service/test/low_energy_scanner_unittest.cc b/service/test/low_energy_scanner_unittest.cc
index dc20ecf..d723a50 100644
--- a/service/test/low_energy_scanner_unittest.cc
+++ b/service/test/low_energy_scanner_unittest.cc
@@ -67,7 +67,7 @@
 
   MOCK_METHOD2(BatchscanReadReports, void(int client_if, int scan_mode));
 
-  MOCK_METHOD7(StartSync, void(uint8_t, bt_bdaddr_t, uint16_t, uint16_t,
+  MOCK_METHOD7(StartSync, void(uint8_t, RawAddress, uint16_t, uint16_t,
                                StartSyncCb, SyncReportCb, SyncLostCb));
   MOCK_METHOD1(StopSync, void(uint16_t));
 
@@ -75,7 +75,7 @@
                            int company_id, int company_id_mask,
                            const bt_uuid_t* p_uuid,
                            const bt_uuid_t* p_uuid_mask,
-                           const bt_bdaddr_t* bd_addr, char addr_type,
+                           const RawAddress* bd_addr, char addr_type,
                            std::vector<uint8_t> data,
                            std::vector<uint8_t> p_mask,
                            FilterConfigCallback cb){};
@@ -307,7 +307,7 @@
        0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
        0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
        0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00});
-  const bt_bdaddr_t kTestAddress = {{0x01, 0x02, 0x03, 0x0A, 0x0B, 0x0C}};
+  const RawAddress kTestAddress = {{0x01, 0x02, 0x03, 0x0A, 0x0B, 0x0C}};
   const char kTestAddressStr[] = "01:02:03:0A:0B:0C";
   const int kTestRssi = 64;
 
diff --git a/service/test/util_unittest.cc b/service/test/util_unittest.cc
index 83e7fb7..7cea354 100644
--- a/service/test/util_unittest.cc
+++ b/service/test/util_unittest.cc
@@ -31,15 +31,15 @@
 }
 
 TEST(UtilTest, BdAddrFromString) {
-  bt_bdaddr_t addr;
+  RawAddress addr;
   memset(&addr, 0, sizeof(addr));
 
   EXPECT_TRUE(BdAddrFromString("00:00:00:00:00:00", &addr));
-  const bt_bdaddr_t result0 = {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
+  const RawAddress result0 = {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
   EXPECT_EQ(0, memcmp(&addr, &result0, sizeof(addr)));
 
   EXPECT_TRUE(BdAddrFromString("ab:01:4C:d5:21:9f", &addr));
-  const bt_bdaddr_t result1 = {{0xab, 0x01, 0x4c, 0xd5, 0x21, 0x9f}};
+  const RawAddress result1 = {{0xab, 0x01, 0x4c, 0xd5, 0x21, 0x9f}};
   EXPECT_EQ(0, memcmp(&addr, &result1, sizeof(addr)));
 }
 
diff --git a/stack/a2dp/a2dp_api.cc b/stack/a2dp/a2dp_api.cc
index 900efad..06b3ae9 100644
--- a/stack/a2dp/a2dp_api.cc
+++ b/stack/a2dp/a2dp_api.cc
@@ -266,7 +266,7 @@
  *                  A2DP_FAIL if function execution failed.
  *
  *****************************************************************************/
-tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, const bt_bdaddr_t& bd_addr,
+tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, const RawAddress& bd_addr,
                               tA2DP_SDP_DB_PARAMS* p_db,
                               tA2DP_FIND_CBACK* p_cback) {
   tSDP_UUID uuid_list;
diff --git a/stack/avct/avct_api.cc b/stack/avct/avct_api.cc
index 9f28f30..52e1c8c 100644
--- a/stack/avct/avct_api.cc
+++ b/stack/avct/avct_api.cc
@@ -130,7 +130,7 @@
  *
  ******************************************************************************/
 uint16_t AVCT_CreateConn(uint8_t* p_handle, tAVCT_CC* p_cc,
-                         const bt_bdaddr_t& peer_addr) {
+                         const RawAddress& peer_addr) {
   uint16_t result = AVCT_SUCCESS;
   tAVCT_CCB* p_ccb;
   tAVCT_LCB* p_lcb;
diff --git a/stack/avct/avct_ccb.cc b/stack/avct/avct_ccb.cc
index 887c849..d15fff2 100644
--- a/stack/avct/avct_ccb.cc
+++ b/stack/avct/avct_ccb.cc
@@ -72,7 +72,7 @@
  *
  ******************************************************************************/
 void avct_ccb_dealloc(tAVCT_CCB* p_ccb, uint8_t event, uint16_t result,
-                      const bt_bdaddr_t* bd_addr) {
+                      const RawAddress* bd_addr) {
   tAVCT_CTRL_CBACK* p_cback = p_ccb->cc.p_ctrl_cback;
 
   AVCT_TRACE_DEBUG("avct_ccb_dealloc %d", avct_ccb_to_idx(p_ccb));
diff --git a/stack/avct/avct_int.h b/stack/avct/avct_int.h
index b1ec3ea..53b8b97 100644
--- a/stack/avct/avct_int.h
+++ b/stack/avct/avct_int.h
@@ -80,7 +80,7 @@
   uint8_t ch_flags;       /* L2CAP configuration flags */
   BT_HDR* p_rx_msg;       /* Message being reassembled */
   uint16_t conflict_lcid; /* L2CAP channel LCID */
-  bt_bdaddr_t peer_addr;  /* BD address of peer */
+  RawAddress peer_addr;   /* BD address of peer */
   fixed_queue_t* tx_q;    /* Transmit data buffer queue       */
   bool cong;              /* true, if congested */
 } tAVCT_LCB;
@@ -97,7 +97,7 @@
   BT_HDR* p_tx_msg;  /* Message to be sent - in case the browsing channel is not
                         open when MsgReg is called */
   uint8_t ch_close;  /* CCB index+1, if CCB initiated channel close */
-  bt_bdaddr_t peer_addr; /* BD address of peer */
+  RawAddress peer_addr; /* BD address of peer */
 } tAVCT_BCB;
 
 #define AVCT_ALOC_LCB 0x01
@@ -154,8 +154,8 @@
 extern uint8_t avct_bcb_get_last_ccb_index(tAVCT_BCB* p_bcb,
                                            tAVCT_CCB* p_ccb_last);
 extern tAVCT_BCB* avct_bcb_by_lcid(uint16_t lcid);
-extern tAVCT_LCB* avct_lcb_by_bd(const bt_bdaddr_t& bd_addr);
-extern tAVCT_LCB* avct_lcb_alloc(const bt_bdaddr_t& bd_addr);
+extern tAVCT_LCB* avct_lcb_by_bd(const RawAddress& bd_addr);
+extern tAVCT_LCB* avct_lcb_alloc(const RawAddress& bd_addr);
 extern void avct_lcb_dealloc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
 extern tAVCT_LCB* avct_lcb_by_lcid(uint16_t lcid);
 extern tAVCT_CCB* avct_lcb_has_pid(tAVCT_LCB* p_lcb, uint16_t pid);
@@ -205,7 +205,7 @@
 /* CCB function declarations */
 extern tAVCT_CCB* avct_ccb_alloc(tAVCT_CC* p_cc);
 extern void avct_ccb_dealloc(tAVCT_CCB* p_ccb, uint8_t event, uint16_t result,
-                             const bt_bdaddr_t* bd_addr);
+                             const RawAddress* bd_addr);
 extern uint8_t avct_ccb_to_idx(tAVCT_CCB* p_ccb);
 extern tAVCT_CCB* avct_ccb_by_idx(uint8_t idx);
 
diff --git a/stack/avct/avct_l2c.cc b/stack/avct/avct_l2c.cc
index 4435a80..cad4e4a 100644
--- a/stack/avct/avct_l2c.cc
+++ b/stack/avct/avct_l2c.cc
@@ -37,7 +37,7 @@
 #define AVCT_L2C_CFG_CFM_DONE (1 << 1)
 
 /* callback function declarations */
-void avct_l2c_connect_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void avct_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                 uint16_t psm, uint8_t id);
 void avct_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result);
 void avct_l2c_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
@@ -99,7 +99,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void avct_l2c_connect_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void avct_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                 UNUSED_ATTR uint16_t psm, uint8_t id) {
   tAVCT_LCB* p_lcb;
   uint16_t result = L2CAP_CONN_OK;
diff --git a/stack/avct/avct_l2c_br.cc b/stack/avct/avct_l2c_br.cc
index b35ef82..e6f767d 100644
--- a/stack/avct/avct_l2c_br.cc
+++ b/stack/avct/avct_l2c_br.cc
@@ -70,7 +70,7 @@
 #define AVCT_BR_FCR_OPT_MONITOR_TOUT 12000
 
 /* callback function declarations */
-void avct_l2c_br_connect_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void avct_l2c_br_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                    uint16_t psm, uint8_t id);
 void avct_l2c_br_connect_cfm_cback(uint16_t lcid, uint16_t result);
 void avct_l2c_br_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
@@ -116,7 +116,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void avct_l2c_br_connect_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void avct_l2c_br_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                    UNUSED_ATTR uint16_t psm, uint8_t id) {
   tAVCT_LCB* p_lcb;
   uint16_t result = L2CAP_CONN_NO_RESOURCES;
diff --git a/stack/avct/avct_lcb.cc b/stack/avct/avct_lcb.cc
index 49fa6f8..96156a2 100644
--- a/stack/avct/avct_lcb.cc
+++ b/stack/avct/avct_lcb.cc
@@ -231,7 +231,7 @@
  * Returns          pointer to the lcb, or NULL if none found.
  *
  ******************************************************************************/
-tAVCT_LCB* avct_lcb_by_bd(const bt_bdaddr_t& bd_addr) {
+tAVCT_LCB* avct_lcb_by_bd(const RawAddress& bd_addr) {
   tAVCT_LCB* p_lcb = &avct_cb.lcb[0];
   int i;
 
@@ -261,7 +261,7 @@
  * Returns          pointer to the lcb, or NULL if none could be allocated.
  *
  ******************************************************************************/
-tAVCT_LCB* avct_lcb_alloc(const bt_bdaddr_t& bd_addr) {
+tAVCT_LCB* avct_lcb_alloc(const RawAddress& bd_addr) {
   tAVCT_LCB* p_lcb = &avct_cb.lcb[0];
   int i;
 
diff --git a/stack/avdt/avdt_api.cc b/stack/avdt/avdt_api.cc
index 2c63183..bcbf502 100644
--- a/stack/avdt/avdt_api.cc
+++ b/stack/avdt/avdt_api.cc
@@ -235,9 +235,8 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-uint16_t AVDT_DiscoverReq(const bt_bdaddr_t& bd_addr,
-                          tAVDT_SEP_INFO* p_sep_info, uint8_t max_seps,
-                          tAVDT_CTRL_CBACK* p_cback) {
+uint16_t AVDT_DiscoverReq(const RawAddress& bd_addr, tAVDT_SEP_INFO* p_sep_info,
+                          uint8_t max_seps, tAVDT_CTRL_CBACK* p_cback) {
   tAVDT_CCB* p_ccb;
   uint16_t result = AVDT_SUCCESS;
   tAVDT_CCB_EVT evt;
@@ -278,7 +277,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-static uint16_t avdt_get_cap_req(const bt_bdaddr_t& bd_addr,
+static uint16_t avdt_get_cap_req(const RawAddress& bd_addr,
                                  tAVDT_CCB_API_GETCAP* p_evt) {
   tAVDT_CCB* p_ccb = NULL;
   uint16_t result = AVDT_SUCCESS;
@@ -338,7 +337,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-uint16_t AVDT_GetCapReq(const bt_bdaddr_t& bd_addr, uint8_t seid,
+uint16_t AVDT_GetCapReq(const RawAddress& bd_addr, uint8_t seid,
                         tAVDT_CFG* p_cfg, tAVDT_CTRL_CBACK* p_cback) {
   tAVDT_CCB_API_GETCAP getcap;
 
@@ -373,7 +372,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-uint16_t AVDT_GetAllCapReq(const bt_bdaddr_t& bd_addr, uint8_t seid,
+uint16_t AVDT_GetAllCapReq(const RawAddress& bd_addr, uint8_t seid,
                            tAVDT_CFG* p_cfg, tAVDT_CTRL_CBACK* p_cback) {
   tAVDT_CCB_API_GETCAP getcap;
 
@@ -429,7 +428,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-uint16_t AVDT_OpenReq(uint8_t handle, const bt_bdaddr_t& bd_addr, uint8_t seid,
+uint16_t AVDT_OpenReq(uint8_t handle, const RawAddress& bd_addr, uint8_t seid,
                       tAVDT_CFG* p_cfg) {
   tAVDT_CCB* p_ccb = NULL;
   tAVDT_SCB* p_scb = NULL;
@@ -895,7 +894,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-uint16_t AVDT_ConnectReq(const bt_bdaddr_t& bd_addr, uint8_t sec_mask,
+uint16_t AVDT_ConnectReq(const RawAddress& bd_addr, uint8_t sec_mask,
                          tAVDT_CTRL_CBACK* p_cback) {
   tAVDT_CCB* p_ccb = NULL;
   uint16_t result = AVDT_SUCCESS;
@@ -937,7 +936,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-uint16_t AVDT_DisconnectReq(const bt_bdaddr_t& bd_addr,
+uint16_t AVDT_DisconnectReq(const RawAddress& bd_addr,
                             tAVDT_CTRL_CBACK* p_cback) {
   tAVDT_CCB* p_ccb = NULL;
   uint16_t result = AVDT_SUCCESS;
@@ -994,7 +993,7 @@
  * Returns          CID if successful, otherwise 0.
  *
  ******************************************************************************/
-uint16_t AVDT_GetSignalChannel(uint8_t handle, const bt_bdaddr_t& bd_addr) {
+uint16_t AVDT_GetSignalChannel(uint8_t handle, const RawAddress& bd_addr) {
   tAVDT_SCB* p_scb;
   tAVDT_CCB* p_ccb;
   uint8_t tcid = 0; /* tcid is always 0 for signal channel */
diff --git a/stack/avdt/avdt_ccb.cc b/stack/avdt/avdt_ccb.cc
index 2c8ebfc..20f3f69 100644
--- a/stack/avdt/avdt_ccb.cc
+++ b/stack/avdt/avdt_ccb.cc
@@ -405,7 +405,7 @@
  * Returns          pointer to the ccb, or NULL if none found.
  *
  ******************************************************************************/
-tAVDT_CCB* avdt_ccb_by_bd(const bt_bdaddr_t& bd_addr) {
+tAVDT_CCB* avdt_ccb_by_bd(const RawAddress& bd_addr) {
   tAVDT_CCB* p_ccb = &avdt_cb.ccb[0];
   int i;
 
@@ -435,7 +435,7 @@
  * Returns          pointer to the ccb, or NULL if none could be allocated.
  *
  ******************************************************************************/
-tAVDT_CCB* avdt_ccb_alloc(const bt_bdaddr_t& bd_addr) {
+tAVDT_CCB* avdt_ccb_alloc(const RawAddress& bd_addr) {
   tAVDT_CCB* p_ccb = &avdt_cb.ccb[0];
   int i;
 
diff --git a/stack/avdt/avdt_ccb_act.cc b/stack/avdt/avdt_ccb_act.cc
index f4f5799..2668c32 100644
--- a/stack/avdt/avdt_ccb_act.cc
+++ b/stack/avdt/avdt_ccb_act.cc
@@ -992,7 +992,7 @@
   /* save callback pointer, bd addr */
   p_cback = p_ccb->p_conn_cback;
   if (!p_cback) p_cback = avdt_cb.p_conn_cback;
-  bt_bdaddr_t bd_addr = p_ccb->peer_addr;
+  RawAddress bd_addr = p_ccb->peer_addr;
 
   /* dealloc ccb */
   avdt_ccb_dealloc(p_ccb, NULL);
diff --git a/stack/avdt/avdt_int.h b/stack/avdt/avdt_int.h
index 9712bd7..1f593ef 100644
--- a/stack/avdt/avdt_int.h
+++ b/stack/avdt/avdt_int.h
@@ -400,7 +400,7 @@
 
 /* channel control block type */
 typedef struct {
-  bt_bdaddr_t peer_addr; /* BD address of peer */
+  RawAddress peer_addr; /* BD address of peer */
   /*
    * NOTE: idle_ccb_timer, ret_ccb_timer and rsp_ccb_timer are mutually
    * exclusive - no more than one timer should be running at the same time.
@@ -530,8 +530,8 @@
 extern void avdt_ccb_init(void);
 extern void avdt_ccb_event(tAVDT_CCB* p_ccb, uint8_t event,
                            tAVDT_CCB_EVT* p_data);
-extern tAVDT_CCB* avdt_ccb_by_bd(const bt_bdaddr_t& bd_addr);
-extern tAVDT_CCB* avdt_ccb_alloc(const bt_bdaddr_t& bd_addr);
+extern tAVDT_CCB* avdt_ccb_by_bd(const RawAddress& bd_addr);
+extern tAVDT_CCB* avdt_ccb_alloc(const RawAddress& bd_addr);
 extern void avdt_ccb_dealloc(tAVDT_CCB* p_ccb, tAVDT_CCB_EVT* p_data);
 extern uint8_t avdt_ccb_to_idx(tAVDT_CCB* p_ccb);
 extern tAVDT_CCB* avdt_ccb_by_idx(uint8_t idx);
diff --git a/stack/avdt/avdt_l2c.cc b/stack/avdt/avdt_l2c.cc
index 417d00c..8ae1d43 100644
--- a/stack/avdt/avdt_l2c.cc
+++ b/stack/avdt/avdt_l2c.cc
@@ -37,7 +37,7 @@
 #include "osi/include/osi.h"
 
 /* callback function declarations */
-void avdt_l2c_connect_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void avdt_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                 uint16_t psm, uint8_t id);
 void avdt_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result);
 void avdt_l2c_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
@@ -72,7 +72,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void avdt_sec_check_complete_term(const bt_bdaddr_t* bd_addr,
+static void avdt_sec_check_complete_term(const RawAddress* bd_addr,
                                          tBT_TRANSPORT transport,
                                          UNUSED_ATTR void* p_ref_data,
                                          uint8_t res) {
@@ -123,7 +123,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void avdt_sec_check_complete_orig(const bt_bdaddr_t* bd_addr,
+static void avdt_sec_check_complete_orig(const RawAddress* bd_addr,
                                          tBT_TRANSPORT trasnport,
                                          UNUSED_ATTR void* p_ref_data,
                                          uint8_t res) {
@@ -162,7 +162,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void avdt_l2c_connect_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void avdt_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                 UNUSED_ATTR uint16_t psm, uint8_t id) {
   tAVDT_CCB* p_ccb;
   tAVDT_TC_TBL* p_tbl = NULL;
@@ -313,7 +313,7 @@
             p_tbl->cfg_flags = AVDT_L2C_CFG_CONN_INT;
 
             if (interop_match_addr(INTEROP_2MBPS_LINK_ONLY,
-                                   (const bt_bdaddr_t*)&p_ccb->peer_addr)) {
+                                   (const RawAddress*)&p_ccb->peer_addr)) {
               // Disable 3DH packets for AVDT ACL to improve sensitivity on HS
               tACL_CONN* p_acl_cb =
                   btm_bda_to_acl(p_ccb->peer_addr, BT_TRANSPORT_BR_EDR);
diff --git a/stack/avdt/avdt_scb_act.cc b/stack/avdt/avdt_scb_act.cc
index 2e87974..f2d3daa 100644
--- a/stack/avdt/avdt_scb_act.cc
+++ b/stack/avdt/avdt_scb_act.cc
@@ -667,7 +667,7 @@
   tAVDT_CTRL avdt_ctrl;
   uint8_t event;
   tAVDT_CCB* p_ccb = p_scb->p_ccb;
-  bt_bdaddr_t remote_addr = p_ccb->peer_addr;
+  RawAddress remote_addr = p_ccb->peer_addr;
 
   /* set up hdr */
   avdt_ctrl.hdr.err_code = p_scb->close_code;
diff --git a/stack/avrc/avrc_api.cc b/stack/avrc/avrc_api.cc
index 62f074a..ed851d4 100644
--- a/stack/avrc/avrc_api.cc
+++ b/stack/avrc/avrc_api.cc
@@ -82,7 +82,7 @@
  *
  *****************************************************************************/
 static void avrc_ctrl_cback(uint8_t handle, uint8_t event, uint16_t result,
-                            const bt_bdaddr_t* peer_addr) {
+                            const RawAddress* peer_addr) {
   uint8_t avrc_event;
 
   if (event <= AVRC_MAX_RCV_CTRL_EVT && avrc_cb.ccb[handle].p_ctrl_cback) {
@@ -1028,7 +1028,7 @@
  *
  *****************************************************************************/
 uint16_t AVRC_Open(uint8_t* p_handle, tAVRC_CONN_CB* p_ccb,
-                   const bt_bdaddr_t& peer_addr) {
+                   const RawAddress& peer_addr) {
   uint16_t status;
   tAVCT_CC cc;
 
diff --git a/stack/avrc/avrc_sdp.cc b/stack/avrc/avrc_sdp.cc
index e37de31..3a7ed96 100644
--- a/stack/avrc/avrc_sdp.cc
+++ b/stack/avrc/avrc_sdp.cc
@@ -103,7 +103,7 @@
  *                                    perform the service search.
  *
  *****************************************************************************/
-uint16_t AVRC_FindService(uint16_t service_uuid, const bt_bdaddr_t& bd_addr,
+uint16_t AVRC_FindService(uint16_t service_uuid, const RawAddress& bd_addr,
                           tAVRC_SDP_DB_PARAMS* p_db,
                           tAVRC_FIND_CBACK* p_cback) {
   tSDP_UUID uuid_list;
diff --git a/stack/bnep/bnep_api.cc b/stack/bnep/bnep_api.cc
index 6c551e3..1fe1f57 100644
--- a/stack/bnep/bnep_api.cc
+++ b/stack/bnep/bnep_api.cc
@@ -125,7 +125,7 @@
  *                  BNEP_NO_RESOURCES           if no resources
  *
  ******************************************************************************/
-tBNEP_RESULT BNEP_Connect(const bt_bdaddr_t& p_rem_bda, tBT_UUID* src_uuid,
+tBNEP_RESULT BNEP_Connect(const RawAddress& p_rem_bda, tBT_UUID* src_uuid,
                           tBT_UUID* dst_uuid, uint16_t* p_handle) {
   uint16_t cid;
   tBNEP_CONN* p_bcb = bnepu_find_bcb_by_bd_addr(p_rem_bda);
@@ -333,9 +333,9 @@
  *                  BNEP_SUCCESS            - If written successfully
  *
  ******************************************************************************/
-tBNEP_RESULT BNEP_WriteBuf(uint16_t handle, const bt_bdaddr_t& p_dest_addr,
+tBNEP_RESULT BNEP_WriteBuf(uint16_t handle, const RawAddress& p_dest_addr,
                            BT_HDR* p_buf, uint16_t protocol,
-                           const bt_bdaddr_t* p_src_addr, bool fw_ext_present) {
+                           const RawAddress* p_src_addr, bool fw_ext_present) {
   tBNEP_CONN* p_bcb;
   uint8_t* p_data;
 
@@ -435,9 +435,9 @@
  *                  BNEP_SUCCESS            - If written successfully
  *
  ******************************************************************************/
-tBNEP_RESULT BNEP_Write(uint16_t handle, const bt_bdaddr_t& p_dest_addr,
+tBNEP_RESULT BNEP_Write(uint16_t handle, const RawAddress& p_dest_addr,
                         uint8_t* p_data, uint16_t len, uint16_t protocol,
-                        const bt_bdaddr_t* p_src_addr, bool fw_ext_present) {
+                        const RawAddress* p_src_addr, bool fw_ext_present) {
   tBNEP_CONN* p_bcb;
   uint8_t* p;
 
diff --git a/stack/bnep/bnep_int.h b/stack/bnep/bnep_int.h
index 2c516b0..e25e7f8 100644
--- a/stack/bnep/bnep_int.h
+++ b/stack/bnep/bnep_int.h
@@ -125,7 +125,7 @@
   BT_HDR* p_pending_data;
 
   uint16_t l2cap_cid;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
   uint16_t rem_mtu_size;
   alarm_t* conn_timer;
   fixed_queue_t* xmit_q;
@@ -135,16 +135,16 @@
   uint16_t sent_prot_filter_end[BNEP_MAX_PROT_FILTERS];
 
   uint16_t sent_mcast_filters;
-  bt_bdaddr_t sent_mcast_filter_start[BNEP_MAX_MULTI_FILTERS];
-  bt_bdaddr_t sent_mcast_filter_end[BNEP_MAX_MULTI_FILTERS];
+  RawAddress sent_mcast_filter_start[BNEP_MAX_MULTI_FILTERS];
+  RawAddress sent_mcast_filter_end[BNEP_MAX_MULTI_FILTERS];
 
   uint16_t rcvd_num_filters;
   uint16_t rcvd_prot_filter_start[BNEP_MAX_PROT_FILTERS];
   uint16_t rcvd_prot_filter_end[BNEP_MAX_PROT_FILTERS];
 
   uint16_t rcvd_mcast_filters;
-  bt_bdaddr_t rcvd_mcast_filter_start[BNEP_MAX_MULTI_FILTERS];
-  bt_bdaddr_t rcvd_mcast_filter_end[BNEP_MAX_MULTI_FILTERS];
+  RawAddress rcvd_mcast_filter_start[BNEP_MAX_MULTI_FILTERS];
+  RawAddress rcvd_mcast_filter_end[BNEP_MAX_MULTI_FILTERS];
 
   uint16_t bad_pkts_rcvd;
   uint8_t re_transmits;
@@ -192,16 +192,16 @@
 /* Functions provided by bnep_utils.cc
 */
 extern tBNEP_CONN* bnepu_find_bcb_by_cid(uint16_t cid);
-extern tBNEP_CONN* bnepu_find_bcb_by_bd_addr(const bt_bdaddr_t& p_bda);
-extern tBNEP_CONN* bnepu_allocate_bcb(const bt_bdaddr_t& p_rem_bda);
+extern tBNEP_CONN* bnepu_find_bcb_by_bd_addr(const RawAddress& p_bda);
+extern tBNEP_CONN* bnepu_allocate_bcb(const RawAddress& p_rem_bda);
 extern void bnepu_release_bcb(tBNEP_CONN* p_bcb);
 extern void bnepu_send_peer_our_filters(tBNEP_CONN* p_bcb);
 extern void bnepu_send_peer_our_multi_filters(tBNEP_CONN* p_bcb);
 extern bool bnepu_does_dest_support_prot(tBNEP_CONN* p_bcb, uint16_t protocol);
 extern void bnepu_build_bnep_hdr(tBNEP_CONN* p_bcb, BT_HDR* p_buf,
                                  uint16_t protocol,
-                                 const bt_bdaddr_t* p_src_addr,
-                                 const bt_bdaddr_t* p_dest_addr, bool ext_bit);
+                                 const RawAddress* p_src_addr,
+                                 const RawAddress* p_dest_addr, bool ext_bit);
 extern void test_bnepu_build_bnep_hdr(tBNEP_CONN* p_bcb, BT_HDR* p_buf,
                                       uint16_t protocol, uint8_t* p_src_addr,
                                       uint8_t* p_dest_addr, uint8_t type);
@@ -223,11 +223,11 @@
                                              uint8_t* p_setup);
 extern uint8_t* bnep_process_control_packet(tBNEP_CONN* p_bcb, uint8_t* p,
                                             uint16_t* len, bool is_ext);
-extern void bnep_sec_check_complete(const bt_bdaddr_t* bd_addr,
+extern void bnep_sec_check_complete(const RawAddress* bd_addr,
                                     tBT_TRANSPORT trasnport, void* p_ref_data,
                                     uint8_t result);
 extern tBNEP_RESULT bnep_is_packet_allowed(tBNEP_CONN* p_bcb,
-                                           const bt_bdaddr_t& p_dest_addr,
+                                           const RawAddress& p_dest_addr,
                                            uint16_t protocol,
                                            bool fw_ext_present,
                                            uint8_t* p_data);
diff --git a/stack/bnep/bnep_main.cc b/stack/bnep/bnep_main.cc
index 52616bf..3752c59 100644
--- a/stack/bnep/bnep_main.cc
+++ b/stack/bnep/bnep_main.cc
@@ -57,7 +57,7 @@
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
 /******************************************************************************/
-static void bnep_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t l2cap_cid,
+static void bnep_connect_ind(const RawAddress& bd_addr, uint16_t l2cap_cid,
                              uint16_t psm, uint8_t l2cap_id);
 static void bnep_connect_cfm(uint16_t l2cap_cid, uint16_t result);
 static void bnep_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg);
@@ -114,7 +114,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void bnep_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t l2cap_cid,
+static void bnep_connect_ind(const RawAddress& bd_addr, uint16_t l2cap_cid,
                              UNUSED_ATTR uint16_t psm, uint8_t l2cap_id) {
   tBNEP_CONN* p_bcb = bnepu_find_bcb_by_bd_addr(bd_addr);
 
@@ -505,14 +505,14 @@
                    p_buf->len, extension_present);
 
   /* Initialize addresses to 'not supplied' */
-  const bt_bdaddr_t *p_src_addr, *p_dst_addr;
+  const RawAddress *p_src_addr, *p_dst_addr;
   p_src_addr = p_dst_addr = NULL;
 
   switch (type) {
     case BNEP_FRAME_GENERAL_ETHERNET:
-      p_dst_addr = (bt_bdaddr_t*)p;
+      p_dst_addr = (RawAddress*)p;
       p += BD_ADDR_LEN;
-      p_src_addr = (bt_bdaddr_t*)p;
+      p_src_addr = (RawAddress*)p;
       p += BD_ADDR_LEN;
       BE_STREAM_TO_UINT16(protocol, p);
       rem_len -= 14;
@@ -550,14 +550,14 @@
       break;
 
     case BNEP_FRAME_COMPRESSED_ETHERNET_SRC_ONLY:
-      p_src_addr = (bt_bdaddr_t*)p;
+      p_src_addr = (RawAddress*)p;
       p += BD_ADDR_LEN;
       BE_STREAM_TO_UINT16(protocol, p);
       rem_len -= 8;
       break;
 
     case BNEP_FRAME_COMPRESSED_ETHERNET_DEST_ONLY:
-      p_dst_addr = (bt_bdaddr_t*)p;
+      p_dst_addr = (RawAddress*)p;
       p += BD_ADDR_LEN;
       BE_STREAM_TO_UINT16(protocol, p);
       rem_len -= 8;
diff --git a/stack/bnep/bnep_utils.cc b/stack/bnep/bnep_utils.cc
index 5a3d605..318e848 100644
--- a/stack/bnep/bnep_utils.cc
+++ b/stack/bnep/bnep_utils.cc
@@ -80,7 +80,7 @@
  * Returns          the BCB address, or NULL if not found.
  *
  ******************************************************************************/
-tBNEP_CONN* bnepu_find_bcb_by_bd_addr(const bt_bdaddr_t& p_bda) {
+tBNEP_CONN* bnepu_find_bcb_by_bd_addr(const RawAddress& p_bda) {
   uint16_t xx;
   tBNEP_CONN* p_bcb;
 
@@ -104,7 +104,7 @@
  * Returns          BCB address, or NULL if none available.
  *
  ******************************************************************************/
-tBNEP_CONN* bnepu_allocate_bcb(const bt_bdaddr_t& p_rem_bda) {
+tBNEP_CONN* bnepu_allocate_bcb(const RawAddress& p_rem_bda) {
   uint16_t xx;
   tBNEP_CONN* p_bcb;
 
@@ -423,8 +423,8 @@
  *
  ******************************************************************************/
 void bnepu_build_bnep_hdr(tBNEP_CONN* p_bcb, BT_HDR* p_buf, uint16_t protocol,
-                          const bt_bdaddr_t* p_src_addr,
-                          const bt_bdaddr_t* p_dest_addr, bool fw_ext_present) {
+                          const RawAddress* p_src_addr,
+                          const RawAddress* p_dest_addr, bool fw_ext_present) {
   const controller_t* controller = controller_get_interface();
   uint8_t ext_bit, *p = (uint8_t*)NULL;
   uint8_t type = BNEP_FRAME_COMPRESSED_ETHERNET;
@@ -1087,7 +1087,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void bnep_sec_check_complete(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+void bnep_sec_check_complete(UNUSED_ATTR const RawAddress* bd_addr,
                              UNUSED_ATTR tBT_TRANSPORT trasnport,
                              void* p_ref_data, uint8_t result) {
   tBNEP_CONN* p_bcb = (tBNEP_CONN*)p_ref_data;
@@ -1192,7 +1192,7 @@
  *
  ******************************************************************************/
 tBNEP_RESULT bnep_is_packet_allowed(tBNEP_CONN* p_bcb,
-                                    const bt_bdaddr_t& p_dest_addr,
+                                    const RawAddress& p_dest_addr,
                                     uint16_t protocol, bool fw_ext_present,
                                     uint8_t* p_data) {
   if (p_bcb->rcvd_num_filters) {
diff --git a/stack/btm/ble_advertiser_hci_interface.cc b/stack/btm/ble_advertiser_hci_interface.cc
index 3a2e9b4..7ab9238 100644
--- a/stack/btm/ble_advertiser_hci_interface.cc
+++ b/stack/btm/ble_advertiser_hci_interface.cc
@@ -112,8 +112,8 @@
 
   void SetParameters(uint8_t handle, uint16_t properties, uint32_t adv_int_min,
                      uint32_t adv_int_max, uint8_t channel_map,
-                     uint8_t own_address_type, const bt_bdaddr_t& own_address,
-                     uint8_t peer_address_type, const bt_bdaddr_t& peer_address,
+                     uint8_t own_address_type, const RawAddress& own_address,
+                     uint8_t peer_address_type, const RawAddress& peer_address,
                      uint8_t filter_policy, int8_t tx_power,
                      uint8_t primary_phy, uint8_t secondary_max_skip,
                      uint8_t secondary_phy, uint8_t advertising_sid,
@@ -191,7 +191,7 @@
                command_complete);
   }
 
-  void SetRandomAddress(uint8_t handle, const bt_bdaddr_t& random_address,
+  void SetRandomAddress(uint8_t handle, const RawAddress& random_address,
                         status_cb command_complete) override {
     VLOG(1) << __func__;
     uint8_t param[BTM_BLE_MULTI_ADV_SET_RANDOM_ADDR_LEN];
@@ -317,8 +317,8 @@
   void SetParameters(uint8_t handle, uint16_t properties, uint32_t adv_int_min,
                      uint32_t adv_int_max, uint8_t channel_map,
                      uint8_t own_address_type,
-                     const bt_bdaddr_t& /* own_address */,
-                     uint8_t peer_address_type, const bt_bdaddr_t& peer_address,
+                     const RawAddress& /* own_address */,
+                     uint8_t peer_address_type, const RawAddress& peer_address,
                      uint8_t filter_policy, int8_t tx_power,
                      uint8_t primary_phy, uint8_t secondary_max_skip,
                      uint8_t secondary_phy, uint8_t advertising_sid,
@@ -390,7 +390,7 @@
                HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA + 1, command_complete);
   }
 
-  void SetRandomAddress(uint8_t handle, const bt_bdaddr_t& random_address,
+  void SetRandomAddress(uint8_t handle, const RawAddress& random_address,
                         status_cb command_complete) override {
     VLOG(1) << __func__;
 
@@ -470,8 +470,8 @@
   void SetParameters(uint8_t handle, uint16_t properties, uint32_t adv_int_min,
                      uint32_t adv_int_max, uint8_t channel_map,
                      uint8_t own_address_type,
-                     const bt_bdaddr_t& /* own_address */,
-                     uint8_t peer_address_type, const bt_bdaddr_t& peer_address,
+                     const RawAddress& /* own_address */,
+                     uint8_t peer_address_type, const RawAddress& peer_address,
                      uint8_t filter_policy, int8_t tx_power,
                      uint8_t primary_phy, uint8_t secondary_max_skip,
                      uint8_t secondary_phy, uint8_t advertising_sid,
@@ -547,7 +547,7 @@
                cmd_length, command_complete);
   }
 
-  void SetRandomAddress(uint8_t handle, const bt_bdaddr_t& random_address,
+  void SetRandomAddress(uint8_t handle, const RawAddress& random_address,
                         status_cb command_complete) override {
     VLOG(1) << __func__;
     const int LE_SET_ADVERTISING_SET_RANDOM_ADDRESS_LEN = 7;
diff --git a/stack/btm/ble_advertiser_hci_interface.h b/stack/btm/ble_advertiser_hci_interface.h
index 7ac149c..60497ff 100644
--- a/stack/btm/ble_advertiser_hci_interface.h
+++ b/stack/btm/ble_advertiser_hci_interface.h
@@ -53,8 +53,8 @@
   virtual void SetParameters(
       uint8_t handle, uint16_t properties, uint32_t adv_int_min,
       uint32_t adv_int_max, uint8_t channel_map, uint8_t own_address_type,
-      const bt_bdaddr_t& own_address, uint8_t peer_address_type,
-      const bt_bdaddr_t& peer_address, uint8_t filter_policy, int8_t tx_power,
+      const RawAddress& own_address, uint8_t peer_address_type,
+      const RawAddress& peer_address, uint8_t filter_policy, int8_t tx_power,
       uint8_t primary_phy, uint8_t secondary_max_skip, uint8_t secondary_phy,
       uint8_t advertising_sid, uint8_t scan_request_notify_enable,
       parameters_cb command_complete) = 0;
@@ -68,7 +68,7 @@
                                    uint8_t* scan_response_data,
                                    status_cb command_complete) = 0;
   virtual void SetRandomAddress(uint8_t handle,
-                                const bt_bdaddr_t& random_address,
+                                const RawAddress& random_address,
                                 status_cb command_complete) = 0;
   virtual void Enable(uint8_t enable, uint8_t handle, uint16_t duration,
                       uint8_t max_extended_advertising_events,
diff --git a/stack/btm/btm_acl.cc b/stack/btm/btm_acl.cc
index b2e6d6e..0ba0f92 100644
--- a/stack/btm/btm_acl.cc
+++ b/stack/btm/btm_acl.cc
@@ -90,7 +90,7 @@
  *                 NULL if not found.
  *
  ******************************************************************************/
-tACL_CONN* btm_bda_to_acl(const bt_bdaddr_t& bda, tBT_TRANSPORT transport) {
+tACL_CONN* btm_bda_to_acl(const RawAddress& bda, tBT_TRANSPORT transport) {
   tACL_CONN* p = &btm_cb.acl_db[0];
   uint16_t xx;
   for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p++) {
@@ -140,7 +140,7 @@
  *
  ******************************************************************************/
 bool btm_ble_get_acl_remote_addr(tBTM_SEC_DEV_REC* p_dev_rec,
-                                 bt_bdaddr_t& conn_addr,
+                                 RawAddress& conn_addr,
                                  tBLE_ADDR_TYPE* p_addr_type) {
   bool st = true;
 
@@ -185,7 +185,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_acl_created(const bt_bdaddr_t& bda, DEV_CLASS dc, BD_NAME bdn,
+void btm_acl_created(const RawAddress& bda, DEV_CLASS dc, BD_NAME bdn,
                      uint16_t hci_handle, uint8_t link_role,
                      tBT_TRANSPORT transport) {
   tBTM_SEC_DEV_REC* p_dev_rec = NULL;
@@ -291,7 +291,7 @@
   }
 }
 
-void btm_acl_update_conn_addr(uint8_t conn_handle, const bt_bdaddr_t& address) {
+void btm_acl_update_conn_addr(uint8_t conn_handle, const RawAddress& address) {
   uint8_t idx = btm_handle_to_acl_index(conn_handle);
   if (idx != MAX_L2CAP_LINKS) {
     btm_cb.acl_db[idx].conn_addr = address;
@@ -308,7 +308,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_acl_report_role_change(uint8_t hci_status, const bt_bdaddr_t* bda) {
+void btm_acl_report_role_change(uint8_t hci_status, const RawAddress* bda) {
   tBTM_ROLE_SWITCH_CMPL ref_data;
   BTM_TRACE_DEBUG("btm_acl_report_role_change");
   if (btm_cb.devcb.p_switch_role_cb &&
@@ -334,7 +334,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_acl_removed(const bt_bdaddr_t& bda, tBT_TRANSPORT transport) {
+void btm_acl_removed(const RawAddress& bda, tBT_TRANSPORT transport) {
   tACL_CONN* p;
   tBTM_SEC_DEV_REC* p_dev_rec = NULL;
   BTM_TRACE_DEBUG("btm_acl_removed");
@@ -495,7 +495,7 @@
  *                  BTM_UNKNOWN_ADDR if no active link with bd addr specified
  *
  ******************************************************************************/
-tBTM_STATUS BTM_GetRole(const bt_bdaddr_t& remote_bd_addr, uint8_t* p_role) {
+tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, uint8_t* p_role) {
   tACL_CONN* p;
   BTM_TRACE_DEBUG("BTM_GetRole");
   p = btm_bda_to_acl(remote_bd_addr, BT_TRANSPORT_BR_EDR);
@@ -528,7 +528,7 @@
  *                  BTM_BUSY if the previous command is not completed
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SwitchRole(const bt_bdaddr_t& remote_bd_addr, uint8_t new_role,
+tBTM_STATUS BTM_SwitchRole(const RawAddress& remote_bd_addr, uint8_t new_role,
                            tBTM_CMPL_CB* p_cb) {
   tACL_CONN* p;
   tBTM_SEC_DEV_REC* p_dev_rec = NULL;
@@ -708,7 +708,7 @@
  * Returns          status of the operation
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetLinkPolicy(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_SetLinkPolicy(const RawAddress& remote_bda,
                               uint16_t* settings) {
   tACL_CONN* p;
   uint8_t* localFeatures = BTM_ReadLocalFeatures();
@@ -804,7 +804,7 @@
   btsnd_hcic_write_def_policy_set(settings);
 }
 
-void btm_use_preferred_conn_params(const bt_bdaddr_t& bda) {
+void btm_use_preferred_conn_params(const RawAddress& bda) {
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bda, BT_TRANSPORT_LE);
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda);
 
@@ -1204,7 +1204,7 @@
  * Returns          status of the operation
  *
  ******************************************************************************/
-tBTM_STATUS BTM_GetLinkSuperTout(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_GetLinkSuperTout(const RawAddress& remote_bda,
                                  uint16_t* p_timeout) {
   tACL_CONN* p = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
 
@@ -1226,7 +1226,7 @@
  * Returns          status of the operation
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetLinkSuperTout(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_SetLinkSuperTout(const RawAddress& remote_bda,
                                  uint16_t timeout) {
   tACL_CONN* p = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
 
@@ -1257,7 +1257,7 @@
  * Returns          true if connection is up, else false.
  *
  ******************************************************************************/
-bool BTM_IsAclConnectionUp(const bt_bdaddr_t& remote_bda,
+bool BTM_IsAclConnectionUp(const RawAddress& remote_bda,
                            tBT_TRANSPORT transport) {
   tACL_CONN* p;
 
@@ -1318,7 +1318,7 @@
  * Returns          the handle of the connection, or 0xFFFF if none.
  *
  ******************************************************************************/
-uint16_t BTM_GetHCIConnHandle(const bt_bdaddr_t& remote_bda,
+uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda,
                               tBT_TRANSPORT transport) {
   tACL_CONN* p;
   BTM_TRACE_DEBUG("BTM_GetHCIConnHandle");
@@ -1363,9 +1363,9 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_acl_role_changed(uint8_t hci_status, const bt_bdaddr_t* bd_addr,
+void btm_acl_role_changed(uint8_t hci_status, const RawAddress* bd_addr,
                           uint8_t new_role) {
-  const bt_bdaddr_t* p_bda =
+  const RawAddress* p_bda =
       (bd_addr) ? bd_addr : &btm_cb.devcb.switch_role_ref_data.remote_bd_addr;
   tACL_CONN* p = btm_bda_to_acl(*p_bda, BT_TRANSPORT_BR_EDR);
   tBTM_ROLE_SWITCH_CMPL* p_data = &btm_cb.devcb.switch_role_ref_data;
@@ -1562,7 +1562,7 @@
  *                  connection, 0 if connection is not established
  *
  ******************************************************************************/
-uint16_t btm_get_max_packet_size(const bt_bdaddr_t& addr) {
+uint16_t btm_get_max_packet_size(const RawAddress& addr) {
   tACL_CONN* p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
   uint16_t pkt_types = 0;
   uint16_t pkt_size = 0;
@@ -1613,7 +1613,7 @@
  * Returns          If connected report peer device info
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ReadRemoteVersion(const bt_bdaddr_t& addr, uint8_t* lmp_version,
+tBTM_STATUS BTM_ReadRemoteVersion(const RawAddress& addr, uint8_t* lmp_version,
                                   uint16_t* manufacturer,
                                   uint16_t* lmp_sub_version) {
   tACL_CONN* p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
@@ -1636,7 +1636,7 @@
  * Returns          pointer to the remote supported features mask (8 bytes)
  *
  ******************************************************************************/
-uint8_t* BTM_ReadRemoteFeatures(const bt_bdaddr_t& addr) {
+uint8_t* BTM_ReadRemoteFeatures(const RawAddress& addr) {
   tACL_CONN* p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
   BTM_TRACE_DEBUG("BTM_ReadRemoteFeatures");
   if (p == NULL) {
@@ -1654,7 +1654,7 @@
  *                  or NULL if bad page
  *
  ******************************************************************************/
-uint8_t* BTM_ReadRemoteExtendedFeatures(const bt_bdaddr_t& addr,
+uint8_t* BTM_ReadRemoteExtendedFeatures(const RawAddress& addr,
                                         uint8_t page_number) {
   tACL_CONN* p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
   BTM_TRACE_DEBUG("BTM_ReadRemoteExtendedFeatures");
@@ -1678,7 +1678,7 @@
  * Returns          number of features pages read from the remote device.
  *
  ******************************************************************************/
-uint8_t BTM_ReadNumberRemoteFeaturesPages(const bt_bdaddr_t& addr) {
+uint8_t BTM_ReadNumberRemoteFeaturesPages(const RawAddress& addr) {
   tACL_CONN* p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
   BTM_TRACE_DEBUG("BTM_ReadNumberRemoteFeaturesPages");
   if (p == NULL) {
@@ -1695,7 +1695,7 @@
  * Returns          pointer to all features of the remote (24 bytes).
  *
  ******************************************************************************/
-uint8_t* BTM_ReadAllRemoteFeatures(const bt_bdaddr_t& addr) {
+uint8_t* BTM_ReadAllRemoteFeatures(const RawAddress& addr) {
   tACL_CONN* p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
   BTM_TRACE_DEBUG("BTM_ReadAllRemoteFeatures");
   if (p == NULL) {
@@ -1741,7 +1741,7 @@
  * Returns          status of the operation
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetQoS(const bt_bdaddr_t& bd, FLOW_SPEC* p_flow,
+tBTM_STATUS BTM_SetQoS(const RawAddress& bd, FLOW_SPEC* p_flow,
                        tBTM_CMPL_CB* p_cb) {
   tACL_CONN* p = &btm_cb.acl_db[0];
 
@@ -1831,7 +1831,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated or error code
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ReadRSSI(const bt_bdaddr_t& remote_bda, tBTM_CMPL_CB* p_cb) {
+tBTM_STATUS BTM_ReadRSSI(const RawAddress& remote_bda, tBTM_CMPL_CB* p_cb) {
   tACL_CONN* p;
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
   tBT_DEVICE_TYPE dev_type;
@@ -1868,7 +1868,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated or error code
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ReadLinkQuality(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_ReadLinkQuality(const RawAddress& remote_bda,
                                 tBTM_CMPL_CB* p_cb) {
   VLOG(2) << __func__ << ": RemBdAddr: " << remote_bda;
 
@@ -1902,7 +1902,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated or error code
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ReadTxPower(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda,
                             tBT_TRANSPORT transport, tBTM_CMPL_CB* p_cb) {
   tACL_CONN* p;
 #define BTM_READ_RSSI_TYPE_CUR 0x00
@@ -2141,8 +2141,7 @@
  *                  BTM_NO_RESOURCES.
  *
  ******************************************************************************/
-tBTM_STATUS btm_remove_acl(const bt_bdaddr_t& bd_addr,
-                           tBT_TRANSPORT transport) {
+tBTM_STATUS btm_remove_acl(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
   uint16_t hci_handle = BTM_GetHCIConnHandle(bd_addr, transport);
   tBTM_STATUS status = BTM_SUCCESS;
 
@@ -2243,7 +2242,7 @@
      * for both create_conn and rmt_name */
     pp = (uint8_t*)(p_buf + 1) + p_buf->offset + 3;
 
-    bt_bdaddr_t bda;
+    RawAddress bda;
     STREAM_TO_BDADDR(bda, pp);
 
     p_dev_rec = btm_find_or_alloc_dev(bda);
@@ -2281,7 +2280,7 @@
  * Description      send a paging command or queue it in btm_cb
  *
  ******************************************************************************/
-void btm_acl_paging(BT_HDR* p, const bt_bdaddr_t& bda) {
+void btm_acl_paging(BT_HDR* p, const RawAddress& bda) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   VLOG(2) << __func__ << ":" << btm_cb.discing << " , paging:" << btm_cb.paging
@@ -2321,7 +2320,7 @@
  *                  false if no one needs the notification.
  *
  ******************************************************************************/
-bool btm_acl_notif_conn_collision(const bt_bdaddr_t& bda) {
+bool btm_acl_notif_conn_collision(const RawAddress& bda) {
   /* Report possible collision to the upper layer. */
   if (btm_cb.p_bl_changed_cb) {
     VLOG(1) << __func__ << " RemBdAddr: " << bda;
diff --git a/stack/btm/btm_ble.cc b/stack/btm/btm_ble.cc
index f4115c9..332e1ca 100644
--- a/stack/btm/btm_ble.cc
+++ b/stack/btm/btm_ble.cc
@@ -67,7 +67,7 @@
  * Returns          true if added OK, else false
  *
  ******************************************************************************/
-bool BTM_SecAddBleDevice(const bt_bdaddr_t& bd_addr, BD_NAME bd_name,
+bool BTM_SecAddBleDevice(const RawAddress& bd_addr, BD_NAME bd_name,
                          tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) {
   BTM_TRACE_DEBUG("%s: dev_type=0x%x", __func__, dev_type);
 
@@ -127,7 +127,7 @@
  * Returns          true if added OK, else false
  *
  ******************************************************************************/
-bool BTM_SecAddBleKey(const bt_bdaddr_t& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
+bool BTM_SecAddBleKey(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
                       tBTM_LE_KEY_TYPE key_type) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   BTM_TRACE_DEBUG("BTM_SecAddBleKey");
@@ -249,8 +249,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTM_ReadConnectionAddr(const bt_bdaddr_t& remote_bda,
-                            bt_bdaddr_t& local_conn_addr,
+void BTM_ReadConnectionAddr(const RawAddress& remote_bda,
+                            RawAddress& local_conn_addr,
                             tBLE_ADDR_TYPE* p_addr_type) {
   tACL_CONN* p_acl = btm_bda_to_acl(remote_bda, BT_TRANSPORT_LE);
 
@@ -303,8 +303,8 @@
  * Returns        bool, true if connection to remote device exists, else false
  *
  ******************************************************************************/
-bool BTM_ReadRemoteConnectionAddr(const bt_bdaddr_t& pseudo_addr,
-                                  bt_bdaddr_t& conn_addr,
+bool BTM_ReadRemoteConnectionAddr(const RawAddress& pseudo_addr,
+                                  RawAddress& conn_addr,
                                   tBLE_ADDR_TYPE* p_addr_type) {
   bool st = true;
 #if (BLE_PRIVACY_SPT == TRUE)
@@ -343,7 +343,7 @@
  * Returns          None
  *
  ******************************************************************************/
-void BTM_SecurityGrant(const bt_bdaddr_t& bd_addr, uint8_t res) {
+void BTM_SecurityGrant(const RawAddress& bd_addr, uint8_t res) {
   tSMP_STATUS res_smp =
       (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_REPEATED_ATTEMPTS;
   BTM_TRACE_DEBUG("BTM_SecurityGrant");
@@ -366,7 +366,7 @@
  *                                 uint32_t)
  *
  ******************************************************************************/
-void BTM_BlePasskeyReply(const bt_bdaddr_t& bd_addr, uint8_t res,
+void BTM_BlePasskeyReply(const RawAddress& bd_addr, uint8_t res,
                          uint32_t passkey) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   tSMP_STATUS res_smp =
@@ -394,7 +394,7 @@
  *                  res          - comparison result BTM_SUCCESS if success
  *
  ******************************************************************************/
-void BTM_BleConfirmReply(const bt_bdaddr_t& bd_addr, uint8_t res) {
+void BTM_BleConfirmReply(const RawAddress& bd_addr, uint8_t res) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   tSMP_STATUS res_smp =
       (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_PASSKEY_ENTRY_FAIL;
@@ -424,7 +424,7 @@
  *                                "Security Manager TK Value".
  *
  ******************************************************************************/
-void BTM_BleOobDataReply(const bt_bdaddr_t& bd_addr, uint8_t res, uint8_t len,
+void BTM_BleOobDataReply(const RawAddress& bd_addr, uint8_t res, uint8_t len,
                          uint8_t* p_data) {
   tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_OOB_FAIL;
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
@@ -453,7 +453,7 @@
  *                  p_r         - pointer to Randomizer
  *
  ******************************************************************************/
-void BTM_BleSecureConnectionOobDataReply(const bt_bdaddr_t& bd_addr,
+void BTM_BleSecureConnectionOobDataReply(const RawAddress& bd_addr,
                                          uint8_t* p_c, uint8_t* p_r) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
@@ -533,7 +533,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTM_BleSetPrefConnParams(const bt_bdaddr_t& bd_addr, uint16_t min_conn_int,
+void BTM_BleSetPrefConnParams(const RawAddress& bd_addr, uint16_t min_conn_int,
                               uint16_t max_conn_int, uint16_t slave_latency,
                               uint16_t supervision_tout) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
@@ -597,7 +597,7 @@
  *                  p_addr_type: output parameter to read the address type.
  *
  ******************************************************************************/
-void BTM_ReadDevInfo(const bt_bdaddr_t& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
+void BTM_ReadDevInfo(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
                      tBLE_ADDR_TYPE* p_addr_type) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(remote_bda);
   tBTM_INQ_INFO* p_inq_info = BTM_InqDbRead(remote_bda);
@@ -653,7 +653,7 @@
  * Return           true if an active link is identified; false otherwise
  *
  ******************************************************************************/
-bool BTM_ReadConnectedTransportAddress(bt_bdaddr_t* remote_bda,
+bool BTM_ReadConnectedTransportAddress(RawAddress* remote_bda,
                                        tBT_TRANSPORT transport) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(*remote_bda);
 
@@ -757,7 +757,7 @@
  * Returns          true to use LE, false use BR/EDR.
  *
  ******************************************************************************/
-bool BTM_UseLeLink(const bt_bdaddr_t& bd_addr) {
+bool BTM_UseLeLink(const RawAddress& bd_addr) {
   tACL_CONN* p;
   tBT_DEVICE_TYPE dev_type;
   tBLE_ADDR_TYPE addr_type;
@@ -787,7 +787,7 @@
  * Returns          BTM_SUCCESS if success; otherwise failed.
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetBleDataLength(const bt_bdaddr_t& bd_addr,
+tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr,
                                  uint16_t tx_pdu_length) {
   tACL_CONN* p_acl = btm_bda_to_acl(bd_addr, BT_TRANSPORT_LE);
 
@@ -853,7 +853,7 @@
  *
  ******************************************************************************/
 void BTM_BleReadPhy(
-    const bt_bdaddr_t& bd_addr,
+    const RawAddress& bd_addr,
     base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) {
   BTM_TRACE_DEBUG("%s", __func__);
 
@@ -939,7 +939,7 @@
  *                  BTM_WRONG_MODE if Device in wrong mode for request.
  *
  ******************************************************************************/
-void BTM_BleSetPhy(const bt_bdaddr_t& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
+void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
                    uint16_t phy_options) {
   tACL_CONN* p_acl = btm_bda_to_acl(bd_addr, BT_TRANSPORT_LE);
 
@@ -1002,7 +1002,7 @@
  *
  ******************************************************************************/
 tBTM_SEC_ACTION btm_ble_determine_security_act(bool is_originator,
-                                               const bt_bdaddr_t& bdaddr,
+                                               const RawAddress& bdaddr,
                                                uint16_t security_required) {
   tBTM_LE_AUTH_REQ auth_req = 0x00;
 
@@ -1082,7 +1082,7 @@
  *                  false.
  *
  ******************************************************************************/
-bool btm_ble_start_sec_check(const bt_bdaddr_t& bd_addr, uint16_t psm,
+bool btm_ble_start_sec_check(const RawAddress& bd_addr, uint16_t psm,
                              bool is_originator, tBTM_SEC_CALLBACK* p_callback,
                              void* p_ref_data) {
   /* Find the service record for the PSM */
@@ -1188,7 +1188,7 @@
  * Returns         None
  *
  ******************************************************************************/
-void btm_ble_increment_sign_ctr(const bt_bdaddr_t& bd_addr, bool is_local) {
+void btm_ble_increment_sign_ctr(const RawAddress& bd_addr, bool is_local) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   BTM_TRACE_DEBUG("btm_ble_increment_sign_ctr is_local=%d", is_local);
@@ -1215,8 +1215,7 @@
  * Returns          p_key_type: output parameter to carry the key type value.
  *
  ******************************************************************************/
-bool btm_ble_get_enc_key_type(const bt_bdaddr_t& bd_addr,
-                              uint8_t* p_key_types) {
+bool btm_ble_get_enc_key_type(const RawAddress& bd_addr, uint8_t* p_key_types) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   BTM_TRACE_DEBUG("btm_ble_get_enc_key_type");
@@ -1237,7 +1236,7 @@
  *
  * Returns          TURE - if a valid DIV is availavle
  ******************************************************************************/
-bool btm_get_local_div(const bt_bdaddr_t& bd_addr, uint16_t* p_div) {
+bool btm_get_local_div(const RawAddress& bd_addr, uint16_t* p_div) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   bool status = false;
   VLOG(1) << __func__ << " bd_addr: " << bd_addr;
@@ -1268,7 +1267,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sec_save_le_key(const bt_bdaddr_t& bd_addr, tBTM_LE_KEY_TYPE key_type,
+void btm_sec_save_le_key(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type,
                          tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application) {
   tBTM_SEC_DEV_REC* p_rec;
   tBTM_LE_EVT_DATA cb_data;
@@ -1407,7 +1406,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_update_sec_key_size(const bt_bdaddr_t& bd_addr,
+void btm_ble_update_sec_key_size(const RawAddress& bd_addr,
                                  uint8_t enc_key_size) {
   tBTM_SEC_DEV_REC* p_rec;
 
@@ -1429,7 +1428,7 @@
  * Returns          void
  *
  ******************************************************************************/
-uint8_t btm_ble_read_sec_key_size(const bt_bdaddr_t& bd_addr) {
+uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_rec;
 
   p_rec = btm_find_dev(bd_addr);
@@ -1448,7 +1447,7 @@
  * Returns          true: check is OK and the *p_sec_req_act contain the action
  *
  ******************************************************************************/
-void btm_ble_link_sec_check(const bt_bdaddr_t& bd_addr,
+void btm_ble_link_sec_check(const RawAddress& bd_addr,
                             tBTM_LE_AUTH_REQ auth_req,
                             tBTM_BLE_SEC_REQ_ACT* p_sec_req_act) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
@@ -1516,7 +1515,7 @@
  *                  the local device ER is copied into er
  *
  ******************************************************************************/
-tBTM_STATUS btm_ble_set_encryption(const bt_bdaddr_t& bd_addr,
+tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr,
                                    tBTM_BLE_SEC_ACT sec_act,
                                    uint8_t link_role) {
   tBTM_STATUS cmd = BTM_NO_RESOURCES;
@@ -1616,7 +1615,7 @@
  * Returns          BTM_SUCCESS if encryption was started successfully
  *
  ******************************************************************************/
-tBTM_STATUS btm_ble_start_encrypt(const bt_bdaddr_t& bda, bool use_stk,
+tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk,
                                   BT_OCTET16 stk) {
   tBTM_CB* p_cb = &btm_cb;
   tBTM_SEC_DEV_REC* p_rec = btm_find_dev(bda);
@@ -1662,7 +1661,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_link_encrypted(const bt_bdaddr_t& bd_addr, uint8_t encr_enable) {
+void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   bool enc_cback;
 
@@ -1706,7 +1705,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_ltk_request_reply(const bt_bdaddr_t& bda, bool use_stk,
+void btm_ble_ltk_request_reply(const RawAddress& bda, bool use_stk,
                                BT_OCTET16 stk) {
   tBTM_SEC_DEV_REC* p_rec = btm_find_dev(bda);
   tBTM_CB* p_cb = &btm_cb;
@@ -1849,8 +1848,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_connected(const bt_bdaddr_t& bda, uint16_t handle,
-                       uint8_t enc_mode, uint8_t role, tBLE_ADDR_TYPE addr_type,
+void btm_ble_connected(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
+                       uint8_t role, tBLE_ADDR_TYPE addr_type,
                        UNUSED_ATTR bool addr_matched) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
   tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb;
@@ -1912,10 +1911,10 @@
 #if (BLE_PRIVACY_SPT == TRUE)
   uint8_t peer_addr_type;
 #endif
-  bt_bdaddr_t local_rpa, peer_rpa;
+  RawAddress local_rpa, peer_rpa;
   uint8_t role, status, bda_type;
   uint16_t handle;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint16_t conn_interval, conn_latency, conn_timeout;
   bool match = false;
 
@@ -2013,7 +2012,7 @@
  *  Description     This function is the SMP callback handler.
  *
  *****************************************************************************/
-uint8_t btm_proc_smp_cback(tSMP_EVT event, const bt_bdaddr_t& bd_addr,
+uint8_t btm_proc_smp_cback(tSMP_EVT event, const RawAddress& bd_addr,
                            tSMP_EVT_DATA* p_data) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   uint8_t res = 0;
@@ -2147,7 +2146,7 @@
  * Returns          true if signing sucessul, otherwise false.
  *
  ******************************************************************************/
-bool BTM_BleDataSignature(const bt_bdaddr_t& bd_addr, uint8_t* p_text,
+bool BTM_BleDataSignature(const RawAddress& bd_addr, uint8_t* p_text,
                           uint16_t len, BLE_SIGNATURE signature) {
   tBTM_SEC_DEV_REC* p_rec = btm_find_dev(bd_addr);
 
@@ -2208,7 +2207,7 @@
  * Returns          true if signature verified correctly; otherwise false.
  *
  ******************************************************************************/
-bool BTM_BleVerifySignature(const bt_bdaddr_t& bd_addr, uint8_t* p_orig,
+bool BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig,
                             uint16_t len, uint32_t counter, uint8_t* p_comp) {
   bool verified = false;
   tBTM_SEC_DEV_REC* p_rec = btm_find_dev(bd_addr);
@@ -2245,7 +2244,7 @@
  * Returns          bool    true if LE device is found, false otherwise.
  *
  ******************************************************************************/
-bool BTM_GetLeSecurityState(const bt_bdaddr_t& bd_addr,
+bool BTM_GetLeSecurityState(const RawAddress& bd_addr,
                             uint8_t* p_le_dev_sec_flags,
                             uint8_t* p_le_key_size) {
   tBTM_SEC_DEV_REC* p_dev_rec;
@@ -2303,7 +2302,7 @@
  *                  otherwise.
  *
  ******************************************************************************/
-bool BTM_BleSecurityProcedureIsRunning(const bt_bdaddr_t& bd_addr) {
+bool BTM_BleSecurityProcedureIsRunning(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
   if (p_dev_rec == NULL) {
@@ -2327,7 +2326,7 @@
  * Returns          the key size or 0 if the size can't be retrieved.
  *
  ******************************************************************************/
-extern uint8_t BTM_BleGetSupportedKeySize(const bt_bdaddr_t& bd_addr) {
+extern uint8_t BTM_BleGetSupportedKeySize(const RawAddress& bd_addr) {
 #if (L2CAP_LE_COC_INCLUDED == TRUE)
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   tBTM_LE_IO_REQ dev_io_cfg;
@@ -2511,7 +2510,7 @@
 
 /* This function set a random address to local controller. It also temporarily
  * disable scans and adv before sending the command to the controller. */
-void btm_ble_set_random_address(const bt_bdaddr_t& random_bda) {
+void btm_ble_set_random_address(const RawAddress& random_bda) {
   tBTM_LE_RANDOM_CB* p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
   tBTM_BLE_CB* p_ble_cb = &btm_cb.ble_ctr_cb;
   bool adv_mode = btm_cb.ble_ctr_cb.inq_var.adv_mode;
diff --git a/stack/btm/btm_ble_addr.cc b/stack/btm/btm_ble_addr.cc
index 356c3e9..d664440 100644
--- a/stack/btm/btm_ble_addr.cc
+++ b/stack/btm/btm_ble_addr.cc
@@ -133,7 +133,7 @@
   tBTM_BLE_ADDR_CBACK* p_cback = p_cb->p_generate_cback;
   void* p_data = p_cb->p;
   uint8_t* pp;
-  bt_bdaddr_t static_random;
+  RawAddress static_random;
 
   BTM_TRACE_EVENT("btm_gen_non_resolve_paddr_cmpl");
 
@@ -183,7 +183,7 @@
  *
  ******************************************************************************/
 static bool btm_ble_proc_resolve_x(const tSMP_ENC& encrypt_output,
-                                   const bt_bdaddr_t& random_bda) {
+                                   const RawAddress& random_bda) {
   BTM_TRACE_EVENT("btm_ble_proc_resolve_x");
 
   /* compare the hash with 3 LSB of bd address */
@@ -211,7 +211,7 @@
  *
  ******************************************************************************/
 bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
-                              const bt_bdaddr_t& new_pseudo_addr) {
+                              const RawAddress& new_pseudo_addr) {
   if (p_dev_rec->ble.pseudo_addr == bd_addr_empty) {
     p_dev_rec->ble.pseudo_addr = new_pseudo_addr;
     return true;
@@ -230,7 +230,7 @@
  * Returns          true is resolvable; false otherwise.
  *
  ******************************************************************************/
-bool btm_ble_addr_resolvable(const bt_bdaddr_t& rpa,
+bool btm_ble_addr_resolvable(const RawAddress& rpa,
                              tBTM_SEC_DEV_REC* p_dev_rec) {
   bool rt = false;
 
@@ -274,7 +274,7 @@
  *
  ******************************************************************************/
 static bool btm_ble_match_random_bda(void* data, void* context) {
-  bt_bdaddr_t* random_bda = (bt_bdaddr_t*)context;
+  RawAddress* random_bda = (RawAddress*)context;
   /* use the 3 MSB of bd address as prand */
 
   uint8_t rand[3];
@@ -310,7 +310,7 @@
  *                  address is matched to.
  *
  ******************************************************************************/
-tBTM_SEC_DEV_REC* btm_ble_resolve_random_addr(const bt_bdaddr_t& random_bda) {
+tBTM_SEC_DEV_REC* btm_ble_resolve_random_addr(const RawAddress& random_bda) {
   BTM_TRACE_EVENT("%s", __func__);
 
   /* start to resolve random address */
@@ -336,7 +336,7 @@
  * Description      find the security record whose LE static address is matching
  *
  ******************************************************************************/
-tBTM_SEC_DEV_REC* btm_find_dev_by_identity_addr(const bt_bdaddr_t& bd_addr,
+tBTM_SEC_DEV_REC* btm_find_dev_by_identity_addr(const RawAddress& bd_addr,
                                                 uint8_t addr_type) {
 #if (BLE_PRIVACY_SPT == TRUE)
   list_node_t* end = list_end(btm_cb.sec_dev_rec);
@@ -368,7 +368,7 @@
  *                  address in security database.
  *
  ******************************************************************************/
-bool btm_identity_addr_to_random_pseudo(bt_bdaddr_t* bd_addr,
+bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
                                         uint8_t* p_addr_type, bool refresh) {
 #if (BLE_PRIVACY_SPT == TRUE)
   tBTM_SEC_DEV_REC* p_dev_rec =
@@ -401,7 +401,7 @@
  *                  address. random_pseudo is input and output parameter
  *
  ******************************************************************************/
-bool btm_random_pseudo_to_identity_addr(bt_bdaddr_t* random_pseudo,
+bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
                                         uint8_t* p_static_addr_type) {
 #if (BLE_PRIVACY_SPT == TRUE)
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(*random_pseudo);
@@ -428,8 +428,8 @@
  *                  connection address.
  *
  ******************************************************************************/
-void btm_ble_refresh_peer_resolvable_private_addr(const bt_bdaddr_t& pseudo_bda,
-                                                  const bt_bdaddr_t& rpa,
+void btm_ble_refresh_peer_resolvable_private_addr(const RawAddress& pseudo_bda,
+                                                  const RawAddress& rpa,
                                                   uint8_t rra_type) {
 #if (BLE_PRIVACY_SPT == TRUE)
   uint8_t rra_dummy = false;
@@ -490,7 +490,7 @@
  *
  ******************************************************************************/
 void btm_ble_refresh_local_resolvable_private_addr(
-    const bt_bdaddr_t& pseudo_addr, const bt_bdaddr_t& local_rpa) {
+    const RawAddress& pseudo_addr, const RawAddress& local_rpa) {
 #if (BLE_PRIVACY_SPT == TRUE)
   tACL_CONN* p = btm_bda_to_acl(pseudo_addr, BT_TRANSPORT_LE);
 
diff --git a/stack/btm/btm_ble_adv_filter.cc b/stack/btm/btm_ble_adv_filter.cc
index 7a08f22..27fd397 100644
--- a/stack/btm/btm_ble_adv_filter.cc
+++ b/stack/btm/btm_ble_adv_filter.cc
@@ -261,7 +261,7 @@
  *
  ******************************************************************************/
 tBTM_BLE_PF_COUNT* btm_ble_alloc_addr_filter_counter(
-    const bt_bdaddr_t& bd_addr) {
+    const RawAddress& bd_addr) {
   uint8_t i;
   tBTM_BLE_PF_COUNT* p_addr_filter =
       &btm_ble_adv_filt_cb.p_addr_filter_count[1];
diff --git a/stack/btm/btm_ble_bgconn.cc b/stack/btm/btm_ble_bgconn.cc
index b2e1e3a..3c866e9 100644
--- a/stack/btm/btm_ble_bgconn.cc
+++ b/stack/btm/btm_ble_bgconn.cc
@@ -49,7 +49,7 @@
 // peripherals or not.
 // TODO: Move all of this to controller/le/background_list or similar?
 typedef struct background_connection_t {
-  bt_bdaddr_t address;
+  RawAddress address;
   uint8_t addr_type;
 
   bool in_controller_wl;
@@ -59,18 +59,18 @@
 } background_connection_t;
 
 struct BgConnHash {
-  bool operator()(const bt_bdaddr_t& x) const {
+  bool operator()(const RawAddress& x) const {
     const uint8_t* a = x.address;
     return a[0] ^ (a[1] << 8) ^ (a[2] << 16) ^ (a[3] << 24) ^ a[4] ^
            (a[5] << 8);
   }
 };
 
-static std::unordered_map<bt_bdaddr_t, background_connection_t, BgConnHash>
+static std::unordered_map<RawAddress, background_connection_t, BgConnHash>
     background_connections;
 
 static void background_connection_add(uint8_t addr_type,
-                                      const bt_bdaddr_t& address) {
+                                      const RawAddress& address) {
   auto map_iter = background_connections.find(address);
   if (map_iter == background_connections.end()) {
     background_connections[address] =
@@ -82,7 +82,7 @@
   }
 }
 
-static void background_connection_remove(const bt_bdaddr_t& address) {
+static void background_connection_remove(const RawAddress& address) {
   auto map_iter = background_connections.find(address);
   if (map_iter != background_connections.end()) {
     if (map_iter->second.in_controller_wl) {
@@ -154,7 +154,7 @@
  * Parameters       bd_addr: updated device
  *
  ******************************************************************************/
-void btm_ble_bgconn_cancel_if_disconnected(const bt_bdaddr_t& bd_addr) {
+void btm_ble_bgconn_cancel_if_disconnected(const RawAddress& bd_addr) {
   if (btm_cb.ble_ctr_cb.conn_state != BLE_BG_CONN) return;
 
   auto map_it = background_connections.find(bd_addr);
@@ -173,7 +173,7 @@
  *
  * Description      This function load the device into controller white list
  ******************************************************************************/
-bool btm_add_dev_to_controller(bool to_add, const bt_bdaddr_t& bd_addr) {
+bool btm_add_dev_to_controller(bool to_add, const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   bool started = false;
 
@@ -268,7 +268,7 @@
  *                  the white list.
  *
  ******************************************************************************/
-bool btm_update_dev_to_white_list(bool to_add, const bt_bdaddr_t& bd_addr) {
+bool btm_update_dev_to_white_list(bool to_add, const RawAddress& bd_addr) {
   tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb;
 
   if (to_add &&
@@ -348,7 +348,7 @@
 
 void btm_send_hci_create_connection(
     uint16_t scan_int, uint16_t scan_win, uint8_t init_filter_policy,
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer, uint8_t addr_type_own,
+    uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t addr_type_own,
     uint16_t conn_int_min, uint16_t conn_int_max, uint16_t conn_latency,
     uint16_t conn_timeout, uint16_t min_ce_len, uint16_t max_ce_len,
     uint8_t initiating_phys) {
@@ -588,7 +588,7 @@
  * Returns          None.
  *
  ******************************************************************************/
-void btm_ble_dequeue_direct_conn_req(const bt_bdaddr_t& rem_bda) {
+void btm_ble_dequeue_direct_conn_req(const RawAddress& rem_bda) {
   if (fixed_queue_is_empty(btm_cb.ble_ctr_cb.conn_pending_q)) return;
 
   list_t* list = fixed_queue_get_list(btm_cb.ble_ctr_cb.conn_pending_q);
diff --git a/stack/btm/btm_ble_gap.cc b/stack/btm/btm_ble_gap.cc
index df179a6..a8f03f7 100644
--- a/stack/btm/btm_ble_gap.cc
+++ b/stack/btm/btm_ble_gap.cc
@@ -67,7 +67,7 @@
 class AdvertisingCache {
  public:
   /* Set the data to |data| for device |addr_type, addr| */
-  const std::vector<uint8_t>& Set(uint8_t addr_type, const bt_bdaddr_t& addr,
+  const std::vector<uint8_t>& Set(uint8_t addr_type, const RawAddress& addr,
                                   std::vector<uint8_t> data) {
     auto it = Find(addr_type, addr);
     if (it != items.end()) {
@@ -84,7 +84,7 @@
   }
 
   /* Append |data| for device |addr_type, addr| */
-  const std::vector<uint8_t>& Append(uint8_t addr_type, const bt_bdaddr_t& addr,
+  const std::vector<uint8_t>& Append(uint8_t addr_type, const RawAddress& addr,
                                      std::vector<uint8_t> data) {
     auto it = Find(addr_type, addr);
     if (it != items.end()) {
@@ -101,7 +101,7 @@
   }
 
   /* Clear data for device |addr_type, addr| */
-  void Clear(uint8_t addr_type, const bt_bdaddr_t& addr) {
+  void Clear(uint8_t addr_type, const RawAddress& addr) {
     auto it = Find(addr_type, addr);
     if (it != items.end()) {
       items.erase(it);
@@ -111,14 +111,14 @@
  private:
   struct Item {
     uint8_t addr_type;
-    bt_bdaddr_t addr;
+    RawAddress addr;
     std::vector<uint8_t> data;
 
-    Item(uint8_t addr_type, const bt_bdaddr_t& addr, std::vector<uint8_t> data)
+    Item(uint8_t addr_type, const RawAddress& addr, std::vector<uint8_t> data)
         : addr_type(addr_type), addr(addr), data(data) {}
   };
 
-  std::list<Item>::iterator Find(uint8_t addr_type, const bt_bdaddr_t& addr) {
+  std::list<Item>::iterator Find(uint8_t addr_type, const RawAddress& addr) {
     for (auto it = items.begin(); it != items.end(); it++) {
       if (it->addr_type == addr_type && it->addr == addr) {
         return it;
@@ -147,12 +147,12 @@
  ******************************************************************************/
 static void btm_ble_update_adv_flag(uint8_t flag);
 static void btm_ble_process_adv_pkt_cont(
-    uint16_t evt_type, uint8_t addr_type, const bt_bdaddr_t& bda,
+    uint16_t evt_type, uint8_t addr_type, const RawAddress& bda,
     uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
     int8_t tx_power, int8_t rssi, uint16_t periodic_adv_int, uint8_t data_len,
     uint8_t* data);
 static uint8_t btm_set_conn_mode_adv_init_addr(tBTM_BLE_INQ_CB* p_cb,
-                                               bt_bdaddr_t& p_peer_addr_ptr,
+                                               RawAddress& p_peer_addr_ptr,
                                                tBLE_ADDR_TYPE* p_peer_addr_type,
                                                tBLE_ADDR_TYPE* p_own_addr_type);
 static void btm_ble_stop_observe(void);
@@ -360,7 +360,7 @@
 void BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy) {
   tBTM_BLE_INQ_CB* p_cb = &btm_cb.ble_ctr_cb.inq_var;
   tBLE_ADDR_TYPE init_addr_type = BLE_ADDR_PUBLIC;
-  bt_bdaddr_t p_addr_ptr = bd_addr_empty;
+  RawAddress p_addr_ptr = bd_addr_empty;
   uint8_t adv_mode = p_cb->adv_mode;
 
   BTM_TRACE_EVENT("BTM_BleUpdateAdvFilterPolicy");
@@ -745,7 +745,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool BTM_BleUpdateBgConnDev(bool add_remove, const bt_bdaddr_t& remote_bda) {
+bool BTM_BleUpdateBgConnDev(bool add_remove, const RawAddress& remote_bda) {
   BTM_TRACE_EVENT("%s() add=%d", __func__, add_remove);
   return btm_update_dev_to_white_list(add_remove, remote_bda);
 }
@@ -797,7 +797,7 @@
  *
  ******************************************************************************/
 static uint8_t btm_set_conn_mode_adv_init_addr(
-    tBTM_BLE_INQ_CB* p_cb, bt_bdaddr_t& p_peer_addr_ptr,
+    tBTM_BLE_INQ_CB* p_cb, RawAddress& p_peer_addr_ptr,
     tBLE_ADDR_TYPE* p_peer_addr_type, tBLE_ADDR_TYPE* p_own_addr_type) {
   uint8_t evt_type;
 #if (BLE_PRIVACY_SPT == TRUE)
@@ -891,12 +891,12 @@
  *
  ******************************************************************************/
 tBTM_STATUS BTM_BleSetAdvParams(uint16_t adv_int_min, uint16_t adv_int_max,
-                                const bt_bdaddr_t& p_dir_bda,
+                                const RawAddress& p_dir_bda,
                                 tBTM_BLE_ADV_CHNL_MAP chnl_map) {
   tBTM_LE_RANDOM_CB* p_addr_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
   tBTM_BLE_INQ_CB* p_cb = &btm_cb.ble_ctr_cb.inq_var;
   tBTM_STATUS status = BTM_SUCCESS;
-  bt_bdaddr_t p_addr_ptr = bd_addr_empty;
+  RawAddress p_addr_ptr = bd_addr_empty;
   tBLE_ADDR_TYPE init_addr_type = BLE_ADDR_PUBLIC;
   tBLE_ADDR_TYPE own_addr_type = p_addr_cb->own_addr_type;
   uint8_t adv_mode = p_cb->adv_mode;
@@ -1171,7 +1171,7 @@
   uint8_t new_mode = BTM_BLE_ADV_ENABLE;
   uint8_t evt_type;
   tBTM_STATUS status = BTM_SUCCESS;
-  bt_bdaddr_t p_addr_ptr = bd_addr_empty;
+  RawAddress p_addr_ptr = bd_addr_empty;
   tBLE_ADDR_TYPE init_addr_type = BLE_ADDR_PUBLIC,
                  own_addr_type = p_addr_cb->own_addr_type;
   uint16_t adv_int_min, adv_int_max;
@@ -1264,7 +1264,7 @@
   uint8_t new_mode = BTM_BLE_ADV_ENABLE;
   uint8_t evt_type;
   tBTM_STATUS status = BTM_SUCCESS;
-  bt_bdaddr_t p_addr_ptr = bd_addr_empty;
+  RawAddress p_addr_ptr = bd_addr_empty;
   tBLE_ADDR_TYPE peer_addr_type = BLE_ADDR_PUBLIC,
                  own_addr_type = p_addr_cb->own_addr_type;
   uint16_t adv_int_min, adv_int_max;
@@ -1438,7 +1438,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_read_remote_name_cmpl(bool status, const bt_bdaddr_t& bda,
+void btm_ble_read_remote_name_cmpl(bool status, const RawAddress& bda,
                                    uint16_t length, char* p_name) {
   uint8_t hci_status = HCI_SUCCESS;
   BD_NAME bd_name;
@@ -1469,7 +1469,7 @@
  * Returns          void
  *
  ******************************************************************************/
-tBTM_STATUS btm_ble_read_remote_name(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS btm_ble_read_remote_name(const RawAddress& remote_bda,
                                      tBTM_CMPL_CB* p_cb) {
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
 
@@ -1509,7 +1509,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool btm_ble_cancel_remote_name(const bt_bdaddr_t& remote_bda) {
+bool btm_ble_cancel_remote_name(const RawAddress& remote_bda) {
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
   bool status;
 
@@ -1569,7 +1569,7 @@
  * Check ADV flag to make sure device is discoverable and match the search
  * condition
  */
-uint8_t btm_ble_is_discoverable(const bt_bdaddr_t& bda,
+uint8_t btm_ble_is_discoverable(const RawAddress& bda,
                                 std::vector<uint8_t> const& adv_data) {
   uint8_t flag = 0, rt = 0;
   uint8_t data_len;
@@ -1737,7 +1737,7 @@
  * Update adv packet information into inquiry result.
  */
 void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,
-                               const bt_bdaddr_t& bda, uint16_t evt_type,
+                               const RawAddress& bda, uint16_t evt_type,
                                uint8_t primary_phy, uint8_t secondary_phy,
                                uint8_t advertising_sid, int8_t tx_power,
                                int8_t rssi, uint16_t periodic_adv_int,
@@ -1848,7 +1848,7 @@
   }
 }
 
-void btm_ble_process_adv_addr(bt_bdaddr_t& bda, uint8_t addr_type) {
+void btm_ble_process_adv_addr(RawAddress& bda, uint8_t addr_type) {
 #if (BLE_PRIVACY_SPT == TRUE)
   /* map address to security record */
   bool match = btm_identity_addr_to_random_pseudo(&bda, &addr_type, false);
@@ -1878,7 +1878,7 @@
  * entry is discarded.
  */
 void btm_ble_process_ext_adv_pkt(uint8_t data_len, uint8_t* data) {
-  bt_bdaddr_t bda, direct_address;
+  RawAddress bda, direct_address;
   uint8_t* p = data;
   uint8_t addr_type, num_reports, pkt_data_len, primary_phy, secondary_phy,
       advertising_sid;
@@ -1935,7 +1935,7 @@
  * discarded.
  */
 void btm_ble_process_adv_pkt(uint8_t data_len, uint8_t* data) {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t* p = data;
   uint8_t legacy_evt_type, addr_type, num_reports, pkt_data_len;
   int8_t rssi;
@@ -2004,7 +2004,7 @@
  * to process adv packet.
  */
 static void btm_ble_process_adv_pkt_cont(
-    uint16_t evt_type, uint8_t addr_type, const bt_bdaddr_t& bda,
+    uint16_t evt_type, uint8_t addr_type, const RawAddress& bda,
     uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
     int8_t tx_power, int8_t rssi, uint16_t periodic_adv_int, uint8_t data_len,
     uint8_t* data) {
@@ -2379,7 +2379,7 @@
 
   if (p_cb->adv_mode == BTM_BLE_ADV_ENABLE) {
     tBTM_LE_RANDOM_CB* p_addr_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb;
-    bt_bdaddr_t p_addr_ptr = bd_addr_empty;
+    RawAddress p_addr_ptr = bd_addr_empty;
     tBLE_ADDR_TYPE init_addr_type = BLE_ADDR_PUBLIC;
     tBLE_ADDR_TYPE own_addr_type = p_addr_cb->own_addr_type;
 
@@ -2567,8 +2567,8 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_update_mode_operation(uint8_t link_role,
-                                   const bt_bdaddr_t* bd_addr, uint8_t status) {
+void btm_ble_update_mode_operation(uint8_t link_role, const RawAddress* bd_addr,
+                                   uint8_t status) {
   if (status == HCI_ERR_DIRECTED_ADVERTISING_TIMEOUT) {
     btm_cb.ble_ctr_cb.inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
     /* make device fall back into undirected adv mode by default */
diff --git a/stack/btm/btm_ble_int.h b/stack/btm/btm_ble_int.h
index c0f7fe9..895d6ba 100644
--- a/stack/btm/btm_ble_int.h
+++ b/stack/btm/btm_ble_int.h
@@ -41,9 +41,9 @@
 extern void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* p);
 extern void btm_ble_process_ext_adv_pkt(uint8_t len, uint8_t* p);
 extern void btm_ble_proc_scan_rsp_rpt(uint8_t* p);
-extern tBTM_STATUS btm_ble_read_remote_name(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS btm_ble_read_remote_name(const RawAddress& remote_bda,
                                             tBTM_CMPL_CB* p_cb);
-extern bool btm_ble_cancel_remote_name(const bt_bdaddr_t& remote_bda);
+extern bool btm_ble_cancel_remote_name(const RawAddress& remote_bda);
 
 extern tBTM_STATUS btm_ble_set_discoverability(uint16_t combined_mode);
 extern tBTM_STATUS btm_ble_set_connectability(uint16_t combined_mode);
@@ -59,7 +59,7 @@
 extern void btm_ble_stop_scan();
 extern void btm_ble_stop_inquiry(void);
 extern void btm_ble_init(void);
-extern void btm_ble_connected(const bt_bdaddr_t& bda, uint16_t handle,
+extern void btm_ble_connected(const RawAddress& bda, uint16_t handle,
                               uint8_t enc_mode, uint8_t role,
                               tBLE_ADDR_TYPE addr_type, bool addr_matched);
 extern void btm_ble_read_remote_features_complete(uint8_t* p);
@@ -76,48 +76,48 @@
 extern void btm_ble_create_ll_conn_complete(uint8_t status);
 
 /* LE security function from btm_sec.cc */
-extern void btm_ble_link_sec_check(const bt_bdaddr_t& bd_addr,
+extern void btm_ble_link_sec_check(const RawAddress& bd_addr,
                                    tBTM_LE_AUTH_REQ auth_req,
                                    tBTM_BLE_SEC_REQ_ACT* p_sec_req_act);
-extern void btm_ble_ltk_request_reply(const bt_bdaddr_t& bda, bool use_stk,
+extern void btm_ble_ltk_request_reply(const RawAddress& bda, bool use_stk,
                                       BT_OCTET16 stk);
-extern uint8_t btm_proc_smp_cback(tSMP_EVT event, const bt_bdaddr_t& bd_addr,
+extern uint8_t btm_proc_smp_cback(tSMP_EVT event, const RawAddress& bd_addr,
                                   tSMP_EVT_DATA* p_data);
-extern tBTM_STATUS btm_ble_set_encryption(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr,
                                           tBTM_BLE_SEC_ACT sec_act,
                                           uint8_t link_role);
 extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
                                 uint16_t ediv);
-extern tBTM_STATUS btm_ble_start_encrypt(const bt_bdaddr_t& bda, bool use_stk,
+extern tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk,
                                          BT_OCTET16 stk);
-extern void btm_ble_link_encrypted(const bt_bdaddr_t& bd_addr,
+extern void btm_ble_link_encrypted(const RawAddress& bd_addr,
                                    uint8_t encr_enable);
 
 /* LE device management functions */
 extern void btm_ble_reset_id(void);
 
 /* security related functions */
-extern void btm_ble_increment_sign_ctr(const bt_bdaddr_t& bd_addr,
+extern void btm_ble_increment_sign_ctr(const RawAddress& bd_addr,
                                        bool is_local);
-extern bool btm_get_local_div(const bt_bdaddr_t& bd_addr, uint16_t* p_div);
-extern bool btm_ble_get_enc_key_type(const bt_bdaddr_t& bd_addr,
+extern bool btm_get_local_div(const RawAddress& bd_addr, uint16_t* p_div);
+extern bool btm_ble_get_enc_key_type(const RawAddress& bd_addr,
                                      uint8_t* p_key_types);
 
 extern void btm_ble_test_command_complete(uint8_t* p);
 extern void btm_ble_rand_enc_complete(uint8_t* p, uint16_t op_code,
                                       tBTM_RAND_ENC_CB* p_enc_cplt_cback);
 
-extern void btm_sec_save_le_key(const bt_bdaddr_t& bd_addr,
+extern void btm_sec_save_le_key(const RawAddress& bd_addr,
                                 tBTM_LE_KEY_TYPE key_type,
                                 tBTM_LE_KEY_VALUE* p_keys,
                                 bool pass_to_application);
-extern void btm_ble_update_sec_key_size(const bt_bdaddr_t& bd_addr,
+extern void btm_ble_update_sec_key_size(const RawAddress& bd_addr,
                                         uint8_t enc_key_size);
-extern uint8_t btm_ble_read_sec_key_size(const bt_bdaddr_t& bd_addr);
+extern uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr);
 
 /* white list function */
 extern bool btm_update_dev_to_white_list(bool to_add,
-                                         const bt_bdaddr_t& bd_addr);
+                                         const RawAddress& bd_addr);
 extern void btm_update_scanner_filter_policy(tBTM_BLE_SFP scan_policy);
 extern void btm_update_adv_filter_policy(tBTM_BLE_AFP adv_policy);
 extern void btm_ble_clear_white_list(void);
@@ -133,46 +133,46 @@
 extern bool btm_ble_resume_bg_conn(void);
 extern void btm_send_hci_create_connection(
     uint16_t scan_int, uint16_t scan_win, uint8_t init_filter_policy,
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer, uint8_t addr_type_own,
+    uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t addr_type_own,
     uint16_t conn_int_min, uint16_t conn_int_max, uint16_t conn_latency,
     uint16_t conn_timeout, uint16_t min_ce_len, uint16_t max_ce_len,
     uint8_t phy);
 extern bool btm_ble_start_auto_conn(bool start);
 extern bool btm_ble_start_select_conn(bool start);
-extern bool btm_ble_renew_bg_conn_params(bool add, const bt_bdaddr_t& bd_addr);
-extern void btm_write_dir_conn_wl(const bt_bdaddr_t& target_addr);
+extern bool btm_ble_renew_bg_conn_params(bool add, const RawAddress& bd_addr);
+extern void btm_write_dir_conn_wl(const RawAddress& target_addr);
 extern void btm_ble_update_mode_operation(uint8_t link_role,
-                                          const bt_bdaddr_t* bda,
+                                          const RawAddress* bda,
                                           uint8_t status);
 extern bool btm_execute_wl_dev_operation(void);
 extern void btm_ble_update_link_topology_mask(uint8_t role, bool increase);
-extern void btm_ble_bgconn_cancel_if_disconnected(const bt_bdaddr_t& bd_addr);
+extern void btm_ble_bgconn_cancel_if_disconnected(const RawAddress& bd_addr);
 
 /* direct connection utility */
 extern bool btm_send_pending_direct_conn(void);
 extern void btm_ble_enqueue_direct_conn_req(void* p_param);
-extern void btm_ble_dequeue_direct_conn_req(const bt_bdaddr_t& rem_bda);
+extern void btm_ble_dequeue_direct_conn_req(const RawAddress& rem_bda);
 
 /* BLE address management */
 extern void btm_gen_resolvable_private_addr(base::Callback<void(BT_OCTET8)> cb);
 extern void btm_gen_non_resolvable_private_addr(tBTM_BLE_ADDR_CBACK* p_cback,
                                                 void* p);
 extern tBTM_SEC_DEV_REC* btm_ble_resolve_random_addr(
-    const bt_bdaddr_t& random_bda);
+    const RawAddress& random_bda);
 extern void btm_gen_resolve_paddr_low(BT_OCTET8 rand);
 
 /*  privacy function */
 #if (BLE_PRIVACY_SPT == TRUE)
 /* BLE address mapping with CS feature */
-extern bool btm_identity_addr_to_random_pseudo(bt_bdaddr_t* bd_addr,
+extern bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
                                                uint8_t* p_addr_type,
                                                bool refresh);
-extern bool btm_random_pseudo_to_identity_addr(bt_bdaddr_t* random_pseudo,
+extern bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
                                                uint8_t* p_static_addr_type);
 extern void btm_ble_refresh_peer_resolvable_private_addr(
-    const bt_bdaddr_t& pseudo_bda, const bt_bdaddr_t& rra, uint8_t rra_type);
+    const RawAddress& pseudo_bda, const RawAddress& rra, uint8_t rra_type);
 extern void btm_ble_refresh_local_resolvable_private_addr(
-    const bt_bdaddr_t& pseudo_addr, const bt_bdaddr_t& local_rpa);
+    const RawAddress& pseudo_addr, const RawAddress& local_rpa);
 extern void btm_ble_read_resolving_list_entry_complete(uint8_t* p,
                                                        uint16_t evt_len);
 extern void btm_ble_remove_resolving_list_entry_complete(uint8_t* p,
@@ -199,7 +199,7 @@
 extern bool btm_ble_topology_check(tBTM_BLE_STATE_MASK request);
 extern bool btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK request_state);
 extern bool btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK request_state);
-extern void btm_ble_set_random_address(const bt_bdaddr_t& random_bda);
+extern void btm_ble_set_random_address(const RawAddress& random_bda);
 
 #if (BTM_BLE_CONFORMANCE_TESTING == TRUE)
 extern void btm_ble_set_no_disc_if_pair_fail(bool disble_disc);
diff --git a/stack/btm/btm_ble_int_types.h b/stack/btm/btm_ble_int_types.h
index e112cb1..e7a4be3 100644
--- a/stack/btm/btm_ble_int_types.h
+++ b/stack/btm/btm_ble_int_types.h
@@ -81,14 +81,14 @@
 #define BLE_RESOLVE_ADDR_MSB 0x40
 /* bit 6, and bit7 */
 #define BLE_RESOLVE_ADDR_MASK 0xc0
-inline bool BTM_BLE_IS_RESOLVE_BDA(const bt_bdaddr_t& x) {
+inline bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
   return ((x.address)[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB;
 }
 
 #define BLE_PUBLIC_ADDR_MSB_MASK 0xC0
 /*  most significant bit, bit7, bit6 is 10 to be public address*/
 #define BLE_PUBLIC_ADDR_MSB 0x80
-inline bool BTM_IS_PUBLIC_BDA(const bt_bdaddr_t& x) {
+inline bool BTM_IS_PUBLIC_BDA(const RawAddress& x) {
   return ((x.address)[0] & BLE_PUBLIC_ADDR_MSB_MASK) == BLE_PUBLIC_ADDR_MSB;
 }
 
@@ -164,13 +164,13 @@
 /* random address resolving complete callback */
 typedef void(tBTM_BLE_RESOLVE_CBACK)(void* match_rec, void* p);
 
-typedef void(tBTM_BLE_ADDR_CBACK)(const bt_bdaddr_t& static_random, void* p);
+typedef void(tBTM_BLE_ADDR_CBACK)(const RawAddress& static_random, void* p);
 
 /* random address management control block */
 typedef struct {
   tBLE_ADDR_TYPE own_addr_type; /* local device LE address type */
-  bt_bdaddr_t private_addr;
-  bt_bdaddr_t random_bda;
+  RawAddress private_addr;
+  RawAddress random_bda;
   tBTM_BLE_ADDR_CBACK* p_generate_cback;
   void* p;
   alarm_t* refresh_raddr_timer;
@@ -185,7 +185,7 @@
 } tBTM_LE_CONN_PRAMS;
 
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t attr;
   bool is_connected;
   bool in_use;
@@ -253,7 +253,7 @@
 #endif
 
 typedef struct {
-  bt_bdaddr_t* resolve_q_random_pseudo;
+  RawAddress* resolve_q_random_pseudo;
   uint8_t* resolve_q_action;
   uint8_t q_next;
   uint8_t q_pending;
@@ -262,7 +262,7 @@
 typedef struct {
   bool in_use;
   bool to_add;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t attr;
 } tBTM_BLE_WL_OP;
 
diff --git a/stack/btm/btm_ble_multi_adv.cc b/stack/btm/btm_ble_multi_adv.cc
index 4037370..913ee26 100644
--- a/stack/btm/btm_ble_multi_adv.cc
+++ b/stack/btm/btm_ble_multi_adv.cc
@@ -59,7 +59,7 @@
   uint8_t maxExtAdvEvents;
   alarm_t* timeout_timer;
   uint8_t own_address_type;
-  bt_bdaddr_t own_address;
+  RawAddress own_address;
   MultiAdvCb timeout_cb;
   bool address_update_required;
   bool periodic_enabled;
@@ -173,11 +173,11 @@
     }
   }
 
-  void OnRpaGenerationComplete(base::Callback<void(bt_bdaddr_t)> cb,
+  void OnRpaGenerationComplete(base::Callback<void(RawAddress)> cb,
                                uint8_t rand[8]) {
     VLOG(1) << __func__;
 
-    bt_bdaddr_t bda;
+    RawAddress bda;
 
     rand[2] &= (~BLE_RESOLVE_ADDR_MASK);
     rand[2] |= BLE_RESOLVE_ADDR_MSB;
@@ -201,7 +201,7 @@
     cb.Run(bda);
   }
 
-  void GenerateRpa(base::Callback<void(bt_bdaddr_t)> cb) {
+  void GenerateRpa(base::Callback<void(RawAddress)> cb) {
     btm_gen_resolvable_private_addr(
         Bind(&BleAdvertisingManagerImpl::OnRpaGenerationComplete,
              base::Unretained(this), std::move(cb)));
@@ -222,7 +222,7 @@
 
     GenerateRpa(Bind(
         [](AdvertisingInstance* p_inst, MultiAdvCb configuredCb,
-           bt_bdaddr_t bda) {
+           RawAddress bda) {
           /* Connectable advertising set must be disabled when updating RPA */
           bool restart = p_inst->IsEnabled() && p_inst->IsConnectable();
 
@@ -240,7 +240,7 @@
           hci_interface->SetRandomAddress(
               p_inst->inst_id, p_inst->own_address,
               Bind(
-                  [](AdvertisingInstance* p_inst, bt_bdaddr_t bda,
+                  [](AdvertisingInstance* p_inst, RawAddress bda,
                      MultiAdvCb configuredCb, uint8_t status) {
                     p_inst->own_address = bda;
                     configuredCb.Run(0x00);
@@ -272,7 +272,7 @@
             [](AdvertisingInstance* p_inst,
                base::Callback<void(uint8_t /* inst_id */, uint8_t /* status */)>
                    cb,
-               bt_bdaddr_t bda) {
+               RawAddress bda) {
               p_inst->own_address = bda;
 
               alarm_set_on_queue(p_inst->adv_raddr_timer,
@@ -339,7 +339,7 @@
 
         c->self->adv_inst[c->inst_id].tx_power = tx_power;
 
-        const bt_bdaddr_t& rpa = c->self->adv_inst[c->inst_id].own_address;
+        const RawAddress& rpa = c->self->adv_inst[c->inst_id].own_address;
         c->self->GetHciInterface()->SetRandomAddress(c->inst_id, rpa, Bind(
           [](c_type c, uint8_t status) {
             if (status != 0) {
@@ -419,7 +419,7 @@
 
             c->self->adv_inst[c->inst_id].tx_power = tx_power;
 
-            const bt_bdaddr_t& rpa = c->self->adv_inst[c->inst_id].own_address;
+            const RawAddress& rpa = c->self->adv_inst[c->inst_id].own_address;
             c->self->GetHciInterface()->SetRandomAddress(c->inst_id, rpa, Bind(
               [](c_type c, uint8_t status) {
                 if (status != 0) {
@@ -621,7 +621,7 @@
     p_inst->advertising_event_properties =
         p_params->advertising_event_properties;
     p_inst->tx_power = p_params->tx_power;
-    const bt_bdaddr_t& peer_address = bd_addr_empty;
+    const RawAddress& peer_address = bd_addr_empty;
 
     GetHciInterface()->SetParameters(
         p_inst->inst_id, p_params->advertising_event_properties,
diff --git a/stack/btm/btm_ble_privacy.cc b/stack/btm/btm_ble_privacy.cc
index 699000d..6242279 100644
--- a/stack/btm/btm_ble_privacy.cc
+++ b/stack/btm/btm_ble_privacy.cc
@@ -62,7 +62,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_enq_resolving_list_pending(const bt_bdaddr_t& pseudo_bda,
+void btm_ble_enq_resolving_list_pending(const RawAddress& pseudo_bda,
                                         uint8_t op_code) {
   tBTM_BLE_RESOLVE_Q* p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
 
@@ -84,7 +84,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool btm_ble_brcm_find_resolving_pending_entry(const bt_bdaddr_t& pseudo_addr,
+bool btm_ble_brcm_find_resolving_pending_entry(const RawAddress& pseudo_addr,
                                                uint8_t action) {
   tBTM_BLE_RESOLVE_Q* p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
 
@@ -111,7 +111,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool btm_ble_deq_resolving_pending(bt_bdaddr_t& pseudo_addr) {
+bool btm_ble_deq_resolving_pending(RawAddress& pseudo_addr) {
   tBTM_BLE_RESOLVE_Q* p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q;
 
   if (p_q->q_next != p_q->q_pending) {
@@ -184,7 +184,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_ble_update_resolving_list(const bt_bdaddr_t& pseudo_bda, bool add) {
+void btm_ble_update_resolving_list(const RawAddress& pseudo_bda, bool add) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(pseudo_bda);
   if (p_dev_rec == NULL) return;
 
@@ -268,7 +268,7 @@
 
   BTM_TRACE_DEBUG("%s status = %d", __func__, status);
 
-  bt_bdaddr_t pseudo_bda;
+  RawAddress pseudo_bda;
   if (!btm_ble_deq_resolving_pending(pseudo_bda)) {
     BTM_TRACE_DEBUG("no pending resolving list operation");
     return;
@@ -302,7 +302,7 @@
  ******************************************************************************/
 void btm_ble_remove_resolving_list_entry_complete(uint8_t* p,
                                                   uint16_t evt_len) {
-  bt_bdaddr_t pseudo_bda;
+  RawAddress pseudo_bda;
   uint8_t status;
 
   STREAM_TO_UINT8(status, p);
@@ -336,7 +336,7 @@
  ******************************************************************************/
 void btm_ble_read_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len) {
   uint8_t status, rra_type = BTM_BLE_ADDR_PSEUDO;
-  bt_bdaddr_t rra, pseudo_bda;
+  RawAddress rra, pseudo_bda;
 
   STREAM_TO_UINT8(status, p);
 
@@ -873,7 +873,7 @@
 
   if (max_irk_list_sz > 0) {
     p_q->resolve_q_random_pseudo =
-        (bt_bdaddr_t*)osi_malloc(sizeof(bt_bdaddr_t) * max_irk_list_sz);
+        (RawAddress*)osi_malloc(sizeof(RawAddress) * max_irk_list_sz);
     p_q->resolve_q_action = (uint8_t*)osi_malloc(max_irk_list_sz);
 
     /* RPA offloading feature */
diff --git a/stack/btm/btm_dev.cc b/stack/btm/btm_dev.cc
index acae765..0dfc902 100644
--- a/stack/btm/btm_dev.cc
+++ b/stack/btm/btm_dev.cc
@@ -58,7 +58,7 @@
  * Returns          true if added OK, else false
  *
  ******************************************************************************/
-bool BTM_SecAddDevice(const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class,
+bool BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                       BD_NAME bd_name, uint8_t* features,
                       uint32_t trusted_mask[], LINK_KEY link_key,
                       uint8_t key_type, tBTM_IO_CAP io_cap,
@@ -158,7 +158,7 @@
  * Returns          true if removed OK, false if not found or ACL link is active
  *
  ******************************************************************************/
-bool BTM_SecDeleteDevice(const bt_bdaddr_t& bd_addr) {
+bool BTM_SecDeleteDevice(const RawAddress& bd_addr) {
   if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE) ||
       BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_BR_EDR)) {
     BTM_TRACE_WARNING("%s FAILED: Cannot Delete when connection is active",
@@ -184,7 +184,7 @@
  *                  remove device.
  *
  ******************************************************************************/
-extern void BTM_SecClearSecurityFlags(const bt_bdaddr_t& bd_addr) {
+extern void BTM_SecClearSecurityFlags(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   if (p_dev_rec == NULL) return;
 
@@ -203,7 +203,7 @@
  * Returns          Pointer to the name or NULL
  *
  ******************************************************************************/
-char* BTM_SecReadDevName(const bt_bdaddr_t& bd_addr) {
+char* BTM_SecReadDevName(const RawAddress& bd_addr) {
   char* p_name = NULL;
   tBTM_SEC_DEV_REC* p_srec;
 
@@ -223,7 +223,7 @@
  * Returns          Pointer to the record or NULL
  *
  ******************************************************************************/
-tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const bt_bdaddr_t& bd_addr) {
+tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr) {
   tBTM_INQ_INFO* p_inq_info;
   BTM_TRACE_EVENT("btm_sec_alloc_dev");
 
@@ -276,7 +276,7 @@
  * Returns          true if device is known and role switch is supported
  *
  ******************************************************************************/
-bool btm_dev_support_switch(const bt_bdaddr_t& bd_addr) {
+bool btm_dev_support_switch(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   uint8_t xx;
   bool feature_empty = true;
@@ -341,7 +341,7 @@
 
 bool is_address_equal(void* data, void* context) {
   tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data);
-  const bt_bdaddr_t* bd_addr = ((bt_bdaddr_t*)context);
+  const RawAddress* bd_addr = ((RawAddress*)context);
 
   if (p_dev_rec->bd_addr == *bd_addr) return false;
   // If a LE random address is looking for device record
@@ -361,7 +361,7 @@
  * Returns          Pointer to the record or NULL
  *
  ******************************************************************************/
-tBTM_SEC_DEV_REC* btm_find_dev(const bt_bdaddr_t& bd_addr) {
+tBTM_SEC_DEV_REC* btm_find_dev(const RawAddress& bd_addr) {
   list_node_t* n =
       list_foreach(btm_cb.sec_dev_rec, is_address_equal, (void*)&bd_addr);
   if (n) return static_cast<tBTM_SEC_DEV_REC*>(list_node(n));
@@ -434,7 +434,7 @@
  * Returns          Pointer to the record or NULL
  *
  ******************************************************************************/
-tBTM_SEC_DEV_REC* btm_find_or_alloc_dev(const bt_bdaddr_t& bd_addr) {
+tBTM_SEC_DEV_REC* btm_find_or_alloc_dev(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   BTM_TRACE_EVENT("btm_find_or_alloc_dev");
   p_dev_rec = btm_find_dev(bd_addr);
@@ -533,7 +533,7 @@
  * Returns          The device bond type if known, otherwise BOND_TYPE_UNKNOWN
  *
  ******************************************************************************/
-tBTM_BOND_TYPE btm_get_bond_type_dev(const bt_bdaddr_t& bd_addr) {
+tBTM_BOND_TYPE btm_get_bond_type_dev(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
   if (p_dev_rec == NULL) return BOND_TYPE_UNKNOWN;
@@ -551,7 +551,7 @@
  * Returns          true on success, otherwise false
  *
  ******************************************************************************/
-bool btm_set_bond_type_dev(const bt_bdaddr_t& bd_addr,
+bool btm_set_bond_type_dev(const RawAddress& bd_addr,
                            tBTM_BOND_TYPE bond_type) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
diff --git a/stack/btm/btm_devctl.cc b/stack/btm/btm_devctl.cc
index 3411f12..d782320 100644
--- a/stack/btm/btm_devctl.cc
+++ b/stack/btm/btm_devctl.cc
@@ -768,7 +768,7 @@
  *                                 the results
  *
  ******************************************************************************/
-tBTM_STATUS BTM_DeleteStoredLinkKey(const bt_bdaddr_t* bd_addr,
+tBTM_STATUS BTM_DeleteStoredLinkKey(const RawAddress* bd_addr,
                                     tBTM_CMPL_CB* p_cb) {
   /* Check if the previous command is completed */
   if (btm_cb.devcb.p_stored_link_key_cmpl_cb) return (BTM_BUSY);
@@ -782,7 +782,7 @@
   if (!bd_addr) {
     /* This is to delete all link keys */
     /* We don't care the BD address. Just pass a non zero pointer */
-    bt_bdaddr_t local_bd_addr = bd_addr_empty;
+    RawAddress local_bd_addr = bd_addr_empty;
     btsnd_hcic_delete_stored_key(local_bd_addr, delete_all_flag);
   } else {
     btsnd_hcic_delete_stored_key(*bd_addr, delete_all_flag);
diff --git a/stack/btm/btm_inq.cc b/stack/btm/btm_inq.cc
index 74dadd5..0ba9fab 100644
--- a/stack/btm/btm_inq.cc
+++ b/stack/btm/btm_inq.cc
@@ -954,7 +954,7 @@
  *                  BTM_WRONG_MODE if the device is not up.
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ReadRemoteDeviceName(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_ReadRemoteDeviceName(const RawAddress& remote_bda,
                                      tBTM_CMPL_CB* p_cb,
                                      tBT_TRANSPORT transport) {
   VLOG(1) << __func__ << ": bd addr " << remote_bda;
@@ -1016,7 +1016,7 @@
  * Returns          pointer to entry, or NULL if not found
  *
  ******************************************************************************/
-tBTM_INQ_INFO* BTM_InqDbRead(const bt_bdaddr_t& p_bda) {
+tBTM_INQ_INFO* BTM_InqDbRead(const RawAddress& p_bda) {
   VLOG(1) << __func__ << ": bd addr " << p_bda;
 
   tINQ_DB_ENT* p_ent = btm_inq_db_find(p_bda);
@@ -1094,7 +1094,7 @@
  *                          is active, otherwise BTM_SUCCESS
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ClearInqDb(const bt_bdaddr_t* p_bda) {
+tBTM_STATUS BTM_ClearInqDb(const RawAddress* p_bda) {
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
 
   /* If an inquiry or remote name is in progress return busy */
@@ -1290,7 +1290,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_clr_inq_db(const bt_bdaddr_t* p_bda) {
+void btm_clr_inq_db(const RawAddress* p_bda) {
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
   tINQ_DB_ENT* p_ent = p_inq->inq_db;
   uint16_t xx;
@@ -1341,7 +1341,7 @@
  * Returns          true if found, else false (new entry)
  *
  ******************************************************************************/
-bool btm_inq_find_bdaddr(const bt_bdaddr_t& p_bda) {
+bool btm_inq_find_bdaddr(const RawAddress& p_bda) {
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
   tINQ_BDADDR* p_db = &p_inq->p_bd_db[0];
   uint16_t xx;
@@ -1375,7 +1375,7 @@
  * Returns          pointer to entry, or NULL if not found
  *
  ******************************************************************************/
-tINQ_DB_ENT* btm_inq_db_find(const bt_bdaddr_t& p_bda) {
+tINQ_DB_ENT* btm_inq_db_find(const RawAddress& p_bda) {
   uint16_t xx;
   tINQ_DB_ENT* p_ent = btm_cb.btm_inq_vars.inq_db;
 
@@ -1399,7 +1399,7 @@
  * Returns          pointer to entry
  *
  ******************************************************************************/
-tINQ_DB_ENT* btm_inq_db_new(const bt_bdaddr_t& p_bda) {
+tINQ_DB_ENT* btm_inq_db_new(const RawAddress& p_bda) {
   uint16_t xx;
   tINQ_DB_ENT* p_ent = btm_cb.btm_inq_vars.inq_db;
   tINQ_DB_ENT* p_old = btm_cb.btm_inq_vars.inq_db;
@@ -1683,7 +1683,7 @@
  ******************************************************************************/
 void btm_process_inq_results(uint8_t* p, uint8_t inq_res_mode) {
   uint8_t num_resp, xx;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tINQ_DB_ENT* p_i;
   tBTM_INQ_RESULTS* p_cur = NULL;
   bool is_new = true;
@@ -2053,7 +2053,7 @@
  *                  BTM_WRONG_MODE if the device is not up.
  *
  ******************************************************************************/
-tBTM_STATUS btm_initiate_rem_name(const bt_bdaddr_t& remote_bda, uint8_t origin,
+tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint8_t origin,
                                   period_ms_t timeout_ms, tBTM_CMPL_CB* p_cb) {
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
 
@@ -2113,7 +2113,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_process_remote_name(const bt_bdaddr_t* bda, BD_NAME bdn,
+void btm_process_remote_name(const RawAddress* bda, BD_NAME bdn,
                              uint16_t evt_len, uint8_t hci_status) {
   tBTM_REMOTE_DEV_NAME rem_name;
   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;
diff --git a/stack/btm/btm_int.h b/stack/btm/btm_int.h
index 89541ae..ce1f5d4 100644
--- a/stack/btm/btm_int.h
+++ b/stack/btm/btm_int.h
@@ -51,17 +51,17 @@
 /* Internal functions provided by btm_inq.cc
  ******************************************
 */
-extern tBTM_STATUS btm_initiate_rem_name(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda,
                                          uint8_t origin, period_ms_t timeout_ms,
                                          tBTM_CMPL_CB* p_cb);
 
-extern void btm_process_remote_name(const bt_bdaddr_t* bda, BD_NAME name,
+extern void btm_process_remote_name(const RawAddress* bda, BD_NAME name,
                                     uint16_t evt_len, uint8_t hci_status);
 extern void btm_inq_rmt_name_failed(void);
 extern void btm_inq_remote_name_timer_timeout(void* data);
 
 /* Inquiry related functions */
-extern void btm_clr_inq_db(const bt_bdaddr_t* p_bda);
+extern void btm_clr_inq_db(const RawAddress* p_bda);
 extern void btm_inq_db_init(void);
 extern void btm_process_inq_results(uint8_t* p, uint8_t inq_res_mode);
 extern void btm_process_inq_complete(uint8_t status, uint8_t mode);
@@ -69,17 +69,17 @@
 extern void btm_event_filter_complete(uint8_t* p);
 extern void btm_inq_stop_on_ssp(void);
 extern void btm_inq_clear_ssp(void);
-extern tINQ_DB_ENT* btm_inq_db_find(const bt_bdaddr_t& p_bda);
-extern bool btm_inq_find_bdaddr(const bt_bdaddr_t& p_bda);
+extern tINQ_DB_ENT* btm_inq_db_find(const RawAddress& p_bda);
+extern bool btm_inq_find_bdaddr(const RawAddress& p_bda);
 
 /* Internal functions provided by btm_acl.cc
  *******************************************
 */
 extern void btm_acl_init(void);
-extern void btm_acl_created(const bt_bdaddr_t& bda, DEV_CLASS dc, BD_NAME bdn,
+extern void btm_acl_created(const RawAddress& bda, DEV_CLASS dc, BD_NAME bdn,
                             uint16_t hci_handle, uint8_t link_role,
                             tBT_TRANSPORT transport);
-extern void btm_acl_removed(const bt_bdaddr_t& bda, tBT_TRANSPORT transport);
+extern void btm_acl_removed(const RawAddress& bda, tBT_TRANSPORT transport);
 extern void btm_acl_device_down(void);
 extern void btm_acl_update_busy_level(tBTM_BLI_EVENT event);
 
@@ -101,12 +101,12 @@
 extern tBTM_STATUS btm_set_packet_types(tACL_CONN* p, uint16_t pkt_types);
 extern void btm_process_clk_off_comp_evt(uint16_t hci_handle,
                                          uint16_t clock_offset);
-extern void btm_acl_role_changed(uint8_t hci_status, const bt_bdaddr_t* bd_addr,
+extern void btm_acl_role_changed(uint8_t hci_status, const RawAddress* bd_addr,
                                  uint8_t new_role);
 extern void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
                                    uint8_t encr_enable);
 extern uint16_t btm_get_acl_disc_reason_code(void);
-extern tBTM_STATUS btm_remove_acl(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS btm_remove_acl(const RawAddress& bd_addr,
                                   tBT_TRANSPORT transport);
 extern void btm_read_remote_features_complete(uint8_t* p);
 extern void btm_read_remote_ext_features_complete(uint8_t* p);
@@ -118,12 +118,12 @@
 extern void btm_acl_chk_peer_pkt_type_support(tACL_CONN* p,
                                               uint16_t* p_pkt_type);
 /* Read maximum data packet that can be sent over current connection */
-extern uint16_t btm_get_max_packet_size(const bt_bdaddr_t& addr);
-extern tACL_CONN* btm_bda_to_acl(const bt_bdaddr_t& bda,
+extern uint16_t btm_get_max_packet_size(const RawAddress& addr);
+extern tACL_CONN* btm_bda_to_acl(const RawAddress& bda,
                                  tBT_TRANSPORT transport);
-extern bool btm_acl_notif_conn_collision(const bt_bdaddr_t& bda);
+extern bool btm_acl_notif_conn_collision(const RawAddress& bda);
 extern void btm_acl_update_conn_addr(uint8_t conn_handle,
-                                     const bt_bdaddr_t& address);
+                                     const RawAddress& address);
 
 extern void btm_pm_reset(void);
 extern void btm_pm_sm_alloc(uint8_t ind);
@@ -131,7 +131,7 @@
 extern void btm_pm_proc_mode_change(uint8_t hci_status, uint16_t hci_handle,
                                     uint8_t mode, uint16_t interval);
 extern void btm_pm_proc_ssr_evt(uint8_t* p, uint16_t evt_len);
-extern tBTM_STATUS btm_read_power_mode_state(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS btm_read_power_mode_state(const RawAddress& remote_bda,
                                              tBTM_PM_STATE* pmState);
 #if (BTM_SCO_INCLUDED == TRUE)
 extern void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle);
@@ -147,19 +147,19 @@
  *******************************************
 */
 extern void btm_sco_init(void);
-extern void btm_sco_connected(uint8_t hci_status, const bt_bdaddr_t* bda,
+extern void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,
                               uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data);
 extern void btm_esco_proc_conn_chg(uint8_t status, uint16_t handle,
                                    uint8_t tx_interval, uint8_t retrans_window,
                                    uint16_t rx_pkt_len, uint16_t tx_pkt_len);
-extern void btm_sco_conn_req(const bt_bdaddr_t& bda, DEV_CLASS dev_class,
+extern void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class,
                              uint8_t link_type);
 extern void btm_sco_removed(uint16_t hci_handle, uint8_t reason);
-extern void btm_sco_acl_removed(const bt_bdaddr_t* bda);
+extern void btm_sco_acl_removed(const RawAddress* bda);
 extern void btm_route_sco_data(BT_HDR* p_msg);
 extern bool btm_is_sco_active(uint16_t handle);
-extern void btm_remove_sco_links(const bt_bdaddr_t& bda);
-extern bool btm_is_sco_active_by_bdaddr(const bt_bdaddr_t& remote_bda);
+extern void btm_remove_sco_links(const RawAddress& bda);
+extern bool btm_is_sco_active_by_bdaddr(const RawAddress& remote_bda);
 
 extern void btm_read_def_esco_mode(enh_esco_params_t* p_parms);
 extern uint16_t btm_find_scb_by_handle(uint16_t handle);
@@ -176,7 +176,7 @@
 extern void btm_ble_remove_from_white_list_complete(uint8_t* p,
                                                     uint16_t evt_len);
 extern void btm_ble_clear_white_list_complete(uint8_t* p, uint16_t evt_len);
-extern bool btm_ble_addr_resolvable(const bt_bdaddr_t& rpa,
+extern bool btm_ble_addr_resolvable(const RawAddress& rpa,
                                     tBTM_SEC_DEV_REC* p_dev_rec);
 extern tBTM_STATUS btm_ble_read_resolving_list_entry(
     tBTM_SEC_DEV_REC* p_dev_rec);
@@ -194,34 +194,34 @@
 /* Internal functions provided by btm_dev.cc
  *********************************************
 */
-extern bool btm_dev_support_switch(const bt_bdaddr_t& bd_addr);
+extern bool btm_dev_support_switch(const RawAddress& bd_addr);
 
 extern tBTM_SEC_DEV_REC* btm_sec_allocate_dev_rec(void);
-extern tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const bt_bdaddr_t& bd_addr);
+extern tBTM_SEC_DEV_REC* btm_sec_alloc_dev(const RawAddress& bd_addr);
 extern void btm_sec_free_dev(tBTM_SEC_DEV_REC* p_dev_rec);
-extern tBTM_SEC_DEV_REC* btm_find_dev(const bt_bdaddr_t& bd_addr);
-extern tBTM_SEC_DEV_REC* btm_find_or_alloc_dev(const bt_bdaddr_t& bd_addr);
+extern tBTM_SEC_DEV_REC* btm_find_dev(const RawAddress& bd_addr);
+extern tBTM_SEC_DEV_REC* btm_find_or_alloc_dev(const RawAddress& bd_addr);
 extern tBTM_SEC_DEV_REC* btm_find_dev_by_handle(uint16_t handle);
-extern tBTM_BOND_TYPE btm_get_bond_type_dev(const bt_bdaddr_t& bd_addr);
-extern bool btm_set_bond_type_dev(const bt_bdaddr_t& bd_addr,
+extern tBTM_BOND_TYPE btm_get_bond_type_dev(const RawAddress& bd_addr);
+extern bool btm_set_bond_type_dev(const RawAddress& bd_addr,
                                   tBTM_BOND_TYPE bond_type);
 
 /* Internal functions provided by btm_sec.cc
  *********************************************
 */
-extern bool btm_dev_support_switch(const bt_bdaddr_t& bd_addr);
-extern tBTM_STATUS btm_sec_l2cap_access_req(const bt_bdaddr_t& bd_addr,
+extern bool btm_dev_support_switch(const RawAddress& bd_addr);
+extern tBTM_STATUS btm_sec_l2cap_access_req(const RawAddress& bd_addr,
                                             uint16_t psm, uint16_t handle,
                                             CONNECTION_TYPE conn_type,
                                             tBTM_SEC_CALLBACK* p_callback,
                                             void* p_ref_data);
-extern tBTM_STATUS btm_sec_mx_access_request(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
                                              uint16_t psm, bool is_originator,
                                              uint32_t mx_proto_id,
                                              uint32_t mx_chan_id,
                                              tBTM_SEC_CALLBACK* p_callback,
                                              void* p_ref_data);
-extern void btm_sec_conn_req(const bt_bdaddr_t& bda, uint8_t* dc);
+extern void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc);
 extern void btm_create_conn_cancel_complete(uint8_t* p);
 
 extern void btm_read_inq_tx_power_timeout(void* data);
@@ -229,27 +229,27 @@
 
 extern void btm_sec_init(uint8_t sec_mode);
 extern void btm_sec_dev_reset(void);
-extern void btm_sec_abort_access_req(const bt_bdaddr_t& bd_addr);
+extern void btm_sec_abort_access_req(const RawAddress& bd_addr);
 extern void btm_sec_auth_complete(uint16_t handle, uint8_t status);
 extern void btm_sec_encrypt_change(uint16_t handle, uint8_t status,
                                    uint8_t encr_enable);
-extern void btm_sec_connected(const bt_bdaddr_t& bda, uint16_t handle,
+extern void btm_sec_connected(const RawAddress& bda, uint16_t handle,
                               uint8_t status, uint8_t enc_mode);
 extern tBTM_STATUS btm_sec_disconnect(uint16_t handle, uint8_t reason);
 extern void btm_sec_disconnected(uint16_t handle, uint8_t reason);
-extern void btm_sec_rmt_name_request_complete(const bt_bdaddr_t* bd_addr,
+extern void btm_sec_rmt_name_request_complete(const RawAddress* bd_addr,
                                               uint8_t* bd_name, uint8_t status);
 extern void btm_sec_rmt_host_support_feat_evt(uint8_t* p);
-extern void btm_io_capabilities_req(const bt_bdaddr_t& p);
+extern void btm_io_capabilities_req(const RawAddress& p);
 extern void btm_io_capabilities_rsp(uint8_t* p);
 extern void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p);
 extern void btm_keypress_notif_evt(uint8_t* p);
 extern void btm_simple_pair_complete(uint8_t* p);
-extern void btm_sec_link_key_notification(const bt_bdaddr_t& p_bda,
+extern void btm_sec_link_key_notification(const RawAddress& p_bda,
                                           uint8_t* p_link_key,
                                           uint8_t key_type);
-extern void btm_sec_link_key_request(const bt_bdaddr_t& p_bda);
-extern void btm_sec_pin_code_request(const bt_bdaddr_t& p_bda);
+extern void btm_sec_link_key_request(const RawAddress& p_bda);
+extern void btm_sec_pin_code_request(const RawAddress& p_bda);
 extern void btm_sec_update_clock_offset(uint16_t handle, uint16_t clock_offset);
 extern void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec,
                                         uint8_t res, bool is_le_trasnport);
@@ -257,27 +257,27 @@
                                       tBTM_SEC_DEV_REC* p_dev_rec);
 
 extern void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec);
-extern bool btm_sec_is_a_bonded_dev(const bt_bdaddr_t& bda);
+extern bool btm_sec_is_a_bonded_dev(const RawAddress& bda);
 extern void btm_consolidate_dev(tBTM_SEC_DEV_REC* p_target_rec);
-extern bool btm_sec_is_le_capable_dev(const bt_bdaddr_t& bda);
+extern bool btm_sec_is_le_capable_dev(const RawAddress& bda);
 extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
-                                     const bt_bdaddr_t& new_pseudo_addr);
+                                     const RawAddress& new_pseudo_addr);
 extern tBTM_SEC_SERV_REC* btm_sec_find_first_serv(CONNECTION_TYPE conn_type,
                                                   uint16_t psm);
-extern bool btm_ble_start_sec_check(const bt_bdaddr_t& bd_addr, uint16_t psm,
+extern bool btm_ble_start_sec_check(const RawAddress& bd_addr, uint16_t psm,
                                     bool is_originator,
                                     tBTM_SEC_CALLBACK* p_callback,
                                     void* p_ref_data);
 
-extern tINQ_DB_ENT* btm_inq_db_new(const bt_bdaddr_t& p_bda);
+extern tINQ_DB_ENT* btm_inq_db_new(const RawAddress& p_bda);
 
 extern void btm_rem_oob_req(uint8_t* p);
 extern void btm_read_local_oob_complete(uint8_t* p);
 
 extern void btm_acl_resubmit_page(void);
 extern void btm_acl_reset_paging(void);
-extern void btm_acl_paging(BT_HDR* p, const bt_bdaddr_t& dest);
+extern void btm_acl_paging(BT_HDR* p, const RawAddress& dest);
 extern uint8_t btm_sec_clr_service_by_psm(uint16_t psm);
-extern void btm_sec_clr_temp_auth_service(const bt_bdaddr_t& bda);
+extern void btm_sec_clr_temp_auth_service(const RawAddress& bda);
 
 #endif
diff --git a/stack/btm/btm_int_types.h b/stack/btm/btm_int_types.h
index 50a5c77..3ec66e0 100644
--- a/stack/btm/btm_int_types.h
+++ b/stack/btm/btm_int_types.h
@@ -63,7 +63,7 @@
   uint16_t hci_handle;
   uint16_t pkt_types_mask;
   uint16_t clock_offset;
-  bt_bdaddr_t remote_addr;
+  RawAddress remote_addr;
   DEV_CLASS remote_dc;
   BD_NAME remote_name;
 
@@ -97,9 +97,9 @@
   uint8_t encrypt_state;                   /* overall BTM encryption state */
 
   tBT_TRANSPORT transport;
-  bt_bdaddr_t conn_addr;  /* local device address used for this connection */
+  RawAddress conn_addr;   /* local device address used for this connection */
   uint8_t conn_addr_type; /* local device address type for this connection */
-  bt_bdaddr_t active_remote_addr;  /* remote address used on this connection */
+  RawAddress active_remote_addr;   /* remote address used on this connection */
   uint8_t active_remote_addr_type; /* local device address type for this
                                       connection */
   BD_FEATURES peer_le_features; /* Peer LE Used features mask for the device */
@@ -148,7 +148,7 @@
       p_le_test_cmd_cmpl_cb; /* Callback function to be called when
                              LE test mode command has been sent successfully */
 
-  bt_bdaddr_t read_tx_pwr_addr; /* read TX power target address     */
+  RawAddress read_tx_pwr_addr; /* read TX power target address     */
 
 #define BTM_LE_SUPPORT_STATE_SIZE 8
   uint8_t le_supported_states[BTM_LE_SUPPORT_STATE_SIZE];
@@ -190,7 +190,7 @@
   /* received for the current inquiry operation. (We do not   */
   /* want to flood the caller with multiple responses from    */
   /* the same device.                                         */
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 } tINQ_BDADDR;
 
 typedef struct {
@@ -226,7 +226,7 @@
   uint16_t page_scan_type; /* current page scan type */
   tBTM_INQ_TYPE scan_type;
 
-  bt_bdaddr_t remname_bda; /* Name of bd addr for active remote name request */
+  RawAddress remname_bda; /* Name of bd addr for active remote name request */
 #define BTM_RMT_NAME_INACTIVE 0
 #define BTM_RMT_NAME_EXT 0x1 /* Initiated through API */
 #define BTM_RMT_NAME_SEC 0x2 /* Initiated internally by security manager */
@@ -435,18 +435,18 @@
 } tBTM_SEC_BLE_KEYS;
 
 typedef struct {
-  bt_bdaddr_t pseudo_addr; /* LE pseudo address of the device if different from
+  RawAddress pseudo_addr; /* LE pseudo address of the device if different from
                           device address  */
   tBLE_ADDR_TYPE ble_addr_type; /* LE device type: public or random address */
   tBLE_ADDR_TYPE static_addr_type; /* static address type */
-  bt_bdaddr_t static_addr;         /* static address */
+  RawAddress static_addr;          /* static address */
 
 #define BTM_WHITE_LIST_BIT 0x01
 #define BTM_RESOLVING_LIST_BIT 0x02
   uint8_t in_controller_list; /* in controller resolving list or not */
   uint8_t resolving_list_index;
 #if (BLE_PRIVACY_SPT == TRUE)
-  bt_bdaddr_t cur_rand_addr; /* current random address */
+  RawAddress cur_rand_addr; /* current random address */
 
 #define BTM_BLE_ADDR_PSEUDO 0 /* address index device record */
 #define BTM_BLE_ADDR_RRA 1    /* cur_rand_addr */
@@ -475,7 +475,7 @@
                                                         services     */
   uint16_t hci_handle;     /* Handle to connection when exists   */
   uint16_t clock_offset;   /* Latest known clock offset          */
-  bt_bdaddr_t bd_addr;     /* BD_ADDR of the device              */
+  RawAddress bd_addr;      /* BD_ADDR of the device              */
   DEV_CLASS dev_class;     /* DEV_CLASS of the device            */
   LINK_KEY link_key;       /* Device link key                    */
   uint8_t pin_code_length; /* Length of the pin_code used for paring */
@@ -719,7 +719,7 @@
 
 typedef struct {
   bool is_mux;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t psm;
   bool is_orig;
   tBTM_SEC_CALLBACK* p_callback;
@@ -833,7 +833,7 @@
   PIN_CODE pin_code;                /* for legacy devices */
   tBTM_PAIRING_STATE pairing_state; /* The current pairing state    */
   uint8_t pairing_flags;            /* The current pairing flags    */
-  bt_bdaddr_t pairing_bda;          /* The device currently pairing */
+  RawAddress pairing_bda;           /* The device currently pairing */
   alarm_t* pairing_timer;           /* Timer for pairing process    */
   uint16_t disc_handle;             /* for legacy devices */
   uint8_t disc_reason;              /* for legacy devices */
@@ -842,7 +842,7 @@
   tBTM_SEC_SERV_REC* p_out_serv;
   tBTM_MKEY_CALLBACK* mkey_cback;
 
-  bt_bdaddr_t connecting_bda;
+  RawAddress connecting_bda;
   DEV_CLASS connecting_dc;
 
   uint8_t acl_disc_reason;
diff --git a/stack/btm/btm_pm.cc b/stack/btm/btm_pm.cc
index 8af5707..aeb5170 100644
--- a/stack/btm/btm_pm.cc
+++ b/stack/btm/btm_pm.cc
@@ -72,7 +72,7 @@
         BTM_PM_GET_MD1,  BTM_PM_GET_MD2,  BTM_PM_GET_COMP};
 
 /* function prototype */
-static int btm_pm_find_acl_ind(const bt_bdaddr_t& remote_bda);
+static int btm_pm_find_acl_ind(const RawAddress& remote_bda);
 static tBTM_STATUS btm_pm_snd_md_req(uint8_t pm_id, int link_ind,
                                      tBTM_PM_PWR_MD* p_mode);
 static const char* mode_to_string(tBTM_PM_MODE mode);
@@ -143,7 +143,7 @@
  *                  BTM_UNKNOWN_ADDR if bd addr is not active or bad
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
                              tBTM_PM_PWR_MD* p_mode) {
   uint8_t* p_features;
   int ind, acl_ind;
@@ -246,7 +246,7 @@
  *                  BTM_UNKNOWN_ADDR if bd addr is not active or bad
  *
  ******************************************************************************/
-tBTM_STATUS BTM_ReadPowerMode(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS BTM_ReadPowerMode(const RawAddress& remote_bda,
                               tBTM_PM_MODE* p_mode) {
   int acl_ind;
 
@@ -278,7 +278,7 @@
  *                  BTM_UNKNOWN_ADDR if bd addr is not active or bad
  *
  ******************************************************************************/
-tBTM_STATUS btm_read_power_mode_state(const bt_bdaddr_t& remote_bda,
+tBTM_STATUS btm_read_power_mode_state(const RawAddress& remote_bda,
                                       tBTM_PM_STATE* pmState) {
   int acl_ind = btm_pm_find_acl_ind(remote_bda);
 
@@ -306,7 +306,7 @@
  *                  BTM_CMD_STORED if the command is stored
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetSsrParams(const bt_bdaddr_t& remote_bda, uint16_t max_lat,
+tBTM_STATUS BTM_SetSsrParams(const RawAddress& remote_bda, uint16_t max_lat,
                              uint16_t min_rmt_to, uint16_t min_loc_to) {
 #if (BTM_SSR_INCLUDED == TRUE)
   int acl_ind;
@@ -392,7 +392,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static int btm_pm_find_acl_ind(const bt_bdaddr_t& remote_bda) {
+static int btm_pm_find_acl_ind(const RawAddress& remote_bda) {
   tACL_CONN* p = &btm_cb.acl_db[0];
   uint8_t xx;
 
diff --git a/stack/btm/btm_sco.cc b/stack/btm/btm_sco.cc
index 1acec30..bb60c61 100644
--- a/stack/btm/btm_sco.cc
+++ b/stack/btm/btm_sco.cc
@@ -122,7 +122,7 @@
  *
  ******************************************************************************/
 static void btm_esco_conn_rsp(uint16_t sco_inx, uint8_t hci_status,
-                              const bt_bdaddr_t& bda,
+                              const RawAddress& bda,
                               enh_esco_params_t* p_parms) {
 #if (BTM_MAX_SCO_LINKS > 0)
   tSCO_CONN* p_sco = NULL;
@@ -541,7 +541,7 @@
  *                                   with the sco index used for the connection.
  *
  ******************************************************************************/
-tBTM_STATUS BTM_CreateSco(const bt_bdaddr_t* remote_bda, bool is_orig,
+tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig,
                           uint16_t pkt_types, uint16_t* p_sco_inx,
                           tBTM_SCO_CB* p_conn_cb, tBTM_SCO_CB* p_disc_cb) {
 #if (BTM_MAX_SCO_LINKS > 0)
@@ -794,7 +794,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sco_conn_req(const bt_bdaddr_t& bda, DEV_CLASS dev_class,
+void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class,
                       uint8_t link_type) {
 #if (BTM_MAX_SCO_LINKS > 0)
   tSCO_CB* p_sco = &btm_cb.sco_cb;
@@ -887,7 +887,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sco_connected(uint8_t hci_status, const bt_bdaddr_t* bda,
+void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,
                        uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data) {
 #if (BTM_MAX_SCO_LINKS > 0)
   tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
@@ -1042,7 +1042,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_remove_sco_links(const bt_bdaddr_t& bda) {
+void btm_remove_sco_links(const RawAddress& bda) {
 #if (BTM_MAX_SCO_LINKS > 0)
   tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
   uint16_t xx;
@@ -1105,7 +1105,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sco_acl_removed(const bt_bdaddr_t* bda) {
+void btm_sco_acl_removed(const RawAddress* bda) {
 #if (BTM_MAX_SCO_LINKS > 0)
   tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
   uint16_t xx;
@@ -1280,7 +1280,7 @@
  * Returns          pointer to BD address or NULL if not known
  *
  ******************************************************************************/
-const bt_bdaddr_t* BTM_ReadScoBdAddr(uint16_t sco_inx) {
+const RawAddress* BTM_ReadScoBdAddr(uint16_t sco_inx) {
 #if (BTM_MAX_SCO_LINKS > 0)
   tSCO_CONN* p = &btm_cb.sco_cb.sco_db[sco_inx];
 
@@ -1667,7 +1667,7 @@
  * Returns          bool
  *
  ******************************************************************************/
-bool btm_is_sco_active_by_bdaddr(const bt_bdaddr_t& remote_bda) {
+bool btm_is_sco_active_by_bdaddr(const RawAddress& remote_bda) {
 #if (BTM_MAX_SCO_LINKS > 0)
   uint8_t xx;
   tSCO_CONN* p = &btm_cb.sco_cb.sco_db[0];
@@ -1791,7 +1791,7 @@
 
 #else /* SCO_EXCLUDED == TRUE (Link in stubs) */
 
-tBTM_STATUS BTM_CreateSco(const bt_bdaddr_t* remote_bda, bool is_orig,
+tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig,
                           uint16_t pkt_types, uint16_t* p_sco_inx,
                           tBTM_SCO_CB* p_conn_cb, tBTM_SCO_CB* p_disc_cb) {
   return (BTM_NO_RESOURCES);
@@ -1805,7 +1805,7 @@
 uint16_t BTM_ReadScoHandle(uint16_t sco_inx) {
   return (BTM_INVALID_HCI_HANDLE);
 }
-const bt_bdaddr_t* BTM_ReadScoBdAddr(uint16_t sco_inx) {
+const RawAddress* BTM_ReadScoBdAddr(uint16_t sco_inx) {
   return ((uint8_t*)NULL);
 }
 uint16_t BTM_ReadScoDiscReason(void) { return (BTM_INVALID_SCO_DISC_REASON); }
diff --git a/stack/btm/btm_sec.cc b/stack/btm/btm_sec.cc
index aff5dff..188224f 100644
--- a/stack/btm/btm_sec.cc
+++ b/stack/btm/btm_sec.cc
@@ -47,7 +47,7 @@
 extern fixed_queue_t* btu_general_alarm_queue;
 
 #ifdef APPL_AUTH_WRITE_EXCEPTION
-bool(APPL_AUTH_WRITE_EXCEPTION)(const bt_bdaddr_t& bd_addr);
+bool(APPL_AUTH_WRITE_EXCEPTION)(const RawAddress& bd_addr);
 #endif
 
 /*******************************************************************************
@@ -73,7 +73,7 @@
 static const char* btm_pair_state_descr(tBTM_PAIRING_STATE state);
 
 static void btm_sec_check_pending_reqs(void);
-static bool btm_sec_queue_mx_request(const bt_bdaddr_t& bd_addr, uint16_t psm,
+static bool btm_sec_queue_mx_request(const RawAddress& bd_addr, uint16_t psm,
                                      bool is_orig, uint32_t mx_proto_id,
                                      uint32_t mx_chan_id,
                                      tBTM_SEC_CALLBACK* p_callback,
@@ -106,7 +106,7 @@
 static uint16_t btm_sec_set_serv_level4_flags(uint16_t cur_security,
                                               bool is_originator);
 
-static bool btm_sec_queue_encrypt_request(const bt_bdaddr_t& bd_addr,
+static bool btm_sec_queue_encrypt_request(const RawAddress& bd_addr,
                                           tBT_TRANSPORT transport,
                                           tBTM_SEC_CALLBACK* p_callback,
                                           void* p_ref_data,
@@ -322,7 +322,7 @@
  * Returns          bool    true or false is device found
  *
  ******************************************************************************/
-bool BTM_GetSecurityFlags(const bt_bdaddr_t& bd_addr, uint8_t* p_sec_flags) {
+bool BTM_GetSecurityFlags(const RawAddress& bd_addr, uint8_t* p_sec_flags) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   p_dev_rec = btm_find_dev(bd_addr);
@@ -343,7 +343,7 @@
  * Returns          bool    true or false is device found
  *
  ******************************************************************************/
-bool BTM_GetSecurityFlagsByTransport(const bt_bdaddr_t& bd_addr,
+bool BTM_GetSecurityFlagsByTransport(const RawAddress& bd_addr,
                                      uint8_t* p_sec_flags,
                                      tBT_TRANSPORT transport) {
   tBTM_SEC_DEV_REC* p_dev_rec;
@@ -782,7 +782,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-void btm_sec_clr_temp_auth_service(const bt_bdaddr_t& bda) {
+void btm_sec_clr_temp_auth_service(const RawAddress& bda) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   p_dev_rec = btm_find_dev(bda);
@@ -818,7 +818,7 @@
  *                                 (array of uint32_t)
  *
  ******************************************************************************/
-void BTM_PINCodeReply(const bt_bdaddr_t& bd_addr, uint8_t res, uint8_t pin_len,
+void BTM_PINCodeReply(const RawAddress& bd_addr, uint8_t res, uint8_t pin_len,
                       uint8_t* p_pin, uint32_t trusted_mask[]) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
@@ -940,7 +940,7 @@
  *
  *  Note: After 2.1 parameters are not used and preserved here not to change API
  ******************************************************************************/
-tBTM_STATUS btm_sec_bond_by_transport(const bt_bdaddr_t& bd_addr,
+tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr,
                                       tBT_TRANSPORT transport, uint8_t pin_len,
                                       uint8_t* p_pin, uint32_t trusted_mask[]) {
   tBTM_SEC_DEV_REC* p_dev_rec;
@@ -1117,7 +1117,7 @@
  *
  *  Note: After 2.1 parameters are not used and preserved here not to change API
  ******************************************************************************/
-tBTM_STATUS BTM_SecBondByTransport(const bt_bdaddr_t& bd_addr,
+tBTM_STATUS BTM_SecBondByTransport(const RawAddress& bd_addr,
                                    tBT_TRANSPORT transport, uint8_t pin_len,
                                    uint8_t* p_pin, uint32_t trusted_mask[]) {
   tBT_DEVICE_TYPE dev_type;
@@ -1150,7 +1150,7 @@
  *
  *  Note: After 2.1 parameters are not used and preserved here not to change API
  ******************************************************************************/
-tBTM_STATUS BTM_SecBond(const bt_bdaddr_t& bd_addr, uint8_t pin_len,
+tBTM_STATUS BTM_SecBond(const RawAddress& bd_addr, uint8_t pin_len,
                         uint8_t* p_pin, uint32_t trusted_mask[]) {
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
   if (BTM_UseLeLink(bd_addr)) transport = BT_TRANSPORT_LE;
@@ -1168,7 +1168,7 @@
  *                  transport    - false for BR/EDR link; true for LE link
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SecBondCancel(const bt_bdaddr_t& bd_addr) {
+tBTM_STATUS BTM_SecBondCancel(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   BTM_TRACE_API("BTM_SecBondCancel()  State: %s flags:0x%x",
@@ -1248,7 +1248,7 @@
  *                  link_key     - Link Key is copied into this array
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SecGetDeviceLinkKey(const bt_bdaddr_t& bd_addr,
+tBTM_STATUS BTM_SecGetDeviceLinkKey(const RawAddress& bd_addr,
                                     LINK_KEY link_key) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   p_dev_rec = btm_find_dev(bd_addr);
@@ -1273,7 +1273,7 @@
  *                  otherwise.
  *
  ******************************************************************************/
-tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType(const bt_bdaddr_t& bd_addr) {
+tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
   if ((p_dev_rec != NULL) && (p_dev_rec->sec_flags & BTM_SEC_LINK_KEY_KNOWN)) {
@@ -1309,7 +1309,7 @@
  *                  BTM_MODE_UNSUPPORTED - if security manager not linked in.
  *
  ******************************************************************************/
-tBTM_STATUS BTM_SetEncryption(const bt_bdaddr_t& bd_addr,
+tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr,
                               tBT_TRANSPORT transport,
                               tBTM_SEC_CBACK* p_callback, void* p_ref_data,
                               tBTM_BLE_SEC_ACT sec_act) {
@@ -1456,7 +1456,7 @@
  *                  bd_addr       - Address of the peer device
  *
  ******************************************************************************/
-void BTM_ConfirmReqReply(tBTM_STATUS res, const bt_bdaddr_t& bd_addr) {
+void BTM_ConfirmReqReply(tBTM_STATUS res, const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   BTM_TRACE_EVENT("BTM_ConfirmReqReply() State: %s  Res: %u",
@@ -1504,7 +1504,7 @@
  *
  ******************************************************************************/
 #if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
-void BTM_PasskeyReqReply(tBTM_STATUS res, const bt_bdaddr_t& bd_addr,
+void BTM_PasskeyReqReply(tBTM_STATUS res, const RawAddress& bd_addr,
                          uint32_t passkey) {
   BTM_TRACE_API("BTM_PasskeyReqReply: State: %s  res:%d",
                 btm_pair_state_descr(btm_cb.pairing_state), res);
@@ -1567,7 +1567,7 @@
  *
  ******************************************************************************/
 #if (BTM_LOCAL_IO_CAPS != BTM_IO_CAP_NONE)
-void BTM_SendKeypressNotif(const bt_bdaddr_t& bd_addr, tBTM_SP_KEY_TYPE type) {
+void BTM_SendKeypressNotif(const RawAddress& bd_addr, tBTM_SP_KEY_TYPE type) {
   /* This API only make sense between PASSKEY_REQ and SP complete */
   if (btm_cb.pairing_state == BTM_PAIR_STATE_KEY_ENTRY)
     btsnd_hcic_send_keypress_notif(bd_addr, type);
@@ -1589,7 +1589,7 @@
  *                  auth_req- MITM protection required or not.
  *
  ******************************************************************************/
-void BTM_IoCapRsp(const bt_bdaddr_t& bd_addr, tBTM_IO_CAP io_cap,
+void BTM_IoCapRsp(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
                   tBTM_OOB_DATA oob, tBTM_AUTH_REQ auth_req) {
   BTM_TRACE_EVENT("BTM_IoCapRsp: state: %s  oob: %d io_cap: %d",
                   btm_pair_state_descr(btm_cb.pairing_state), oob, io_cap);
@@ -1631,7 +1631,7 @@
  *                  r           - simple pairing Randomizer  C.
  *
  ******************************************************************************/
-void BTM_RemoteOobDataReply(tBTM_STATUS res, const bt_bdaddr_t& bd_addr,
+void BTM_RemoteOobDataReply(tBTM_STATUS res, const RawAddress& bd_addr,
                             BT_OCTET16 c, BT_OCTET16 r) {
   BTM_TRACE_EVENT("%s() - State: %s res: %d", __func__,
                   btm_pair_state_descr(btm_cb.pairing_state), res);
@@ -1750,7 +1750,7 @@
  *                  local and the remote device, else false.
  *
  ******************************************************************************/
-bool BTM_BothEndsSupportSecureConnections(const bt_bdaddr_t& bd_addr) {
+bool BTM_BothEndsSupportSecureConnections(const RawAddress& bd_addr) {
   return ((controller_get_interface()->supports_secure_connections()) &&
           (BTM_PeerSupportsSecureConnections(bd_addr)));
 }
@@ -1768,7 +1768,7 @@
  *                  else false.
  *
  ******************************************************************************/
-bool BTM_PeerSupportsSecureConnections(const bt_bdaddr_t& bd_addr) {
+bool BTM_PeerSupportsSecureConnections(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   p_dev_rec = btm_find_dev(bd_addr);
@@ -1852,7 +1852,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void BTM_SetOutService(const bt_bdaddr_t& bd_addr, uint8_t service_id,
+void BTM_SetOutService(const RawAddress& bd_addr, uint8_t service_id,
                        uint32_t mx_chan_id) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   tBTM_SEC_SERV_REC* p_serv_rec = &btm_cb.sec_serv_rec[0];
@@ -1996,7 +1996,7 @@
  * Returns          tBTM_STATUS
  *
  ******************************************************************************/
-tBTM_STATUS btm_sec_l2cap_access_req(const bt_bdaddr_t& bd_addr, uint16_t psm,
+tBTM_STATUS btm_sec_l2cap_access_req(const RawAddress& bd_addr, uint16_t psm,
                                      uint16_t handle, CONNECTION_TYPE conn_type,
                                      tBTM_SEC_CALLBACK* p_callback,
                                      void* p_ref_data) {
@@ -2411,7 +2411,7 @@
  * Returns          BTM_CMD_STARTED
  *
  ******************************************************************************/
-tBTM_STATUS btm_sec_mx_access_request(const bt_bdaddr_t& bd_addr, uint16_t psm,
+tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr, uint16_t psm,
                                       bool is_originator, uint32_t mx_proto_id,
                                       uint32_t mx_chan_id,
                                       tBTM_SEC_CALLBACK* p_callback,
@@ -2641,7 +2641,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sec_conn_req(const bt_bdaddr_t& bda, uint8_t* dc) {
+void btm_sec_conn_req(const RawAddress& bda, uint8_t* dc) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
 
   /* Some device may request a connection before we are done with the HCI_Reset
@@ -2890,7 +2890,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sec_abort_access_req(const bt_bdaddr_t& bd_addr) {
+void btm_sec_abort_access_req(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
 
   if (!p_dev_rec) return;
@@ -2972,7 +2972,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sec_rmt_name_request_complete(const bt_bdaddr_t* p_bd_addr,
+void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,
                                        uint8_t* p_bd_name, uint8_t status) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   int i;
@@ -3228,7 +3228,7 @@
  ******************************************************************************/
 void btm_sec_rmt_host_support_feat_evt(uint8_t* p) {
   tBTM_SEC_DEV_REC* p_dev_rec;
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   BD_FEATURES features;
 
   STREAM_TO_BDADDR(bd_addr, p);
@@ -3260,7 +3260,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_io_capabilities_req(const bt_bdaddr_t& p) {
+void btm_io_capabilities_req(const RawAddress& p) {
   tBTM_SP_IO_REQ evt_data;
   uint8_t err_code = 0;
   tBTM_SEC_DEV_REC* p_dev_rec;
@@ -3514,7 +3514,7 @@
 void btm_proc_sp_req_evt(tBTM_SP_EVT event, uint8_t* p) {
   tBTM_STATUS status = BTM_ERR_PROCESSING;
   tBTM_SP_EVT_DATA evt_data;
-  bt_bdaddr_t& p_bda = evt_data.cfm_req.bd_addr;
+  RawAddress& p_bda = evt_data.cfm_req.bd_addr;
   tBTM_SEC_DEV_REC* p_dev_rec;
 
   /* All events start with bd_addr */
@@ -3659,7 +3659,7 @@
 
   /* parse & report BTM_SP_KEYPRESS_EVT */
   if (btm_cb.api.p_sp_callback) {
-    bt_bdaddr_t& p_bda = evt_data.bd_addr;
+    RawAddress& p_bda = evt_data.bd_addr;
 
     STREAM_TO_BDADDR(p_bda, p);
     evt_data.notif_type = *p;
@@ -3760,7 +3760,7 @@
   BT_OCTET16 c;
   BT_OCTET16 r;
 
-  bt_bdaddr_t& p_bda = evt_data.bd_addr;
+  RawAddress& p_bda = evt_data.bd_addr;
 
   STREAM_TO_BDADDR(p_bda, p);
 
@@ -4238,7 +4238,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void btm_sec_connected(const bt_bdaddr_t& bda, uint16_t handle, uint8_t status,
+void btm_sec_connected(const RawAddress& bda, uint16_t handle, uint8_t status,
                        uint8_t enc_mode) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
   uint8_t res;
@@ -4680,8 +4680,8 @@
  * Returns          Pointer to the record or NULL
  *
  ******************************************************************************/
-void btm_sec_link_key_notification(const bt_bdaddr_t& p_bda,
-                                   uint8_t* p_link_key, uint8_t key_type) {
+void btm_sec_link_key_notification(const RawAddress& p_bda, uint8_t* p_link_key,
+                                   uint8_t key_type) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(p_bda);
   bool we_are_bonding = false;
   bool ltk_derived_lk = false;
@@ -4810,7 +4810,7 @@
  * Returns          Pointer to the record or NULL
  *
  ******************************************************************************/
-void btm_sec_link_key_request(const bt_bdaddr_t& bda) {
+void btm_sec_link_key_request(const RawAddress& bda) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda);
 
   VLOG(2) << __func__ << " bda: " << bda;
@@ -4960,7 +4960,7 @@
  * Returns          Pointer to the record or NULL
  *
  ******************************************************************************/
-void btm_sec_pin_code_request(const bt_bdaddr_t& p_bda) {
+void btm_sec_pin_code_request(const RawAddress& p_bda) {
   tBTM_SEC_DEV_REC* p_dev_rec;
   tBTM_CB* p_cb = &btm_cb;
 
@@ -5545,7 +5545,7 @@
  *                  otherwise, the trusted mask
  *
  ******************************************************************************/
-uint32_t* BTM_ReadTrustedMask(const bt_bdaddr_t& bd_addr) {
+uint32_t* BTM_ReadTrustedMask(const RawAddress& bd_addr) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
   if (p_dev_rec != NULL) return (p_dev_rec->trusted_mask);
   return NULL;
@@ -5715,7 +5715,7 @@
  * Description      Return state description for tracing
  *
  ******************************************************************************/
-static bool btm_sec_queue_mx_request(const bt_bdaddr_t& bd_addr, uint16_t psm,
+static bool btm_sec_queue_mx_request(const RawAddress& bd_addr, uint16_t psm,
                                      bool is_orig, uint32_t mx_proto_id,
                                      uint32_t mx_chan_id,
                                      tBTM_SEC_CALLBACK* p_callback,
@@ -5821,7 +5821,7 @@
  *                  process pending.
  *
  ******************************************************************************/
-static bool btm_sec_queue_encrypt_request(const bt_bdaddr_t& bd_addr,
+static bool btm_sec_queue_encrypt_request(const RawAddress& bd_addr,
                                           tBT_TRANSPORT transport,
                                           tBTM_SEC_CALLBACK* p_callback,
                                           void* p_ref_data,
@@ -5981,7 +5981,7 @@
  * Returns          true - dev is bonded
  *
  ******************************************************************************/
-bool btm_sec_is_a_bonded_dev(const bt_bdaddr_t& bda) {
+bool btm_sec_is_a_bonded_dev(const RawAddress& bda) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
   bool is_bonded = false;
 
@@ -6003,7 +6003,7 @@
  * Returns          true - dev is a dual mode
  *
  ******************************************************************************/
-bool btm_sec_is_le_capable_dev(const bt_bdaddr_t& bda) {
+bool btm_sec_is_le_capable_dev(const RawAddress& bda) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
   bool le_capable = false;
 
diff --git a/stack/btu/btu_hcif.cc b/stack/btu/btu_hcif.cc
index 1864aa3..4c91a7f 100644
--- a/stack/btu/btu_hcif.cc
+++ b/stack/btu/btu_hcif.cc
@@ -573,7 +573,7 @@
 static void btu_hcif_connection_comp_evt(uint8_t* p) {
   uint8_t status;
   uint16_t handle;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t link_type;
   uint8_t enc_mode;
 #if (BTM_SCO_INCLUDED == TRUE)
@@ -613,7 +613,7 @@
  *
  ******************************************************************************/
 static void btu_hcif_connection_request_evt(uint8_t* p) {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   DEV_CLASS dc;
   uint8_t link_type;
 
@@ -693,7 +693,7 @@
  ******************************************************************************/
 static void btu_hcif_rmt_name_request_comp_evt(uint8_t* p, uint16_t evt_len) {
   uint8_t status;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
 
   STREAM_TO_UINT8(status, p);
   STREAM_TO_BDADDR(bd_addr, p);
@@ -816,7 +816,7 @@
 #if (BTM_SCO_INCLUDED == TRUE)
   tBTM_ESCO_DATA data;
   uint16_t handle;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t status;
 
   STREAM_TO_UINT8(status, p);
@@ -1027,7 +1027,7 @@
 static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status,
                                         uint8_t* p_cmd,
                                         void* p_vsc_status_cback) {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t handle;
 #if (BTM_SCO_INCLUDED == TRUE)
   tBTM_ESCO_DATA esco_data;
@@ -1230,7 +1230,7 @@
  ******************************************************************************/
 static void btu_hcif_role_change_evt(uint8_t* p) {
   uint8_t status;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t role;
 
   STREAM_TO_UINT8(status, p);
@@ -1313,7 +1313,7 @@
  *
  ******************************************************************************/
 static void btu_hcif_pin_code_request_evt(uint8_t* p) {
-  bt_bdaddr_t bda;
+  RawAddress bda;
 
   STREAM_TO_BDADDR(bda, p);
 
@@ -1334,7 +1334,7 @@
  *
  ******************************************************************************/
 static void btu_hcif_link_key_request_evt(uint8_t* p) {
-  bt_bdaddr_t bda;
+  RawAddress bda;
 
   STREAM_TO_BDADDR(bda, p);
   btm_sec_link_key_request(bda);
@@ -1350,7 +1350,7 @@
  *
  ******************************************************************************/
 static void btu_hcif_link_key_notification_evt(uint8_t* p) {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   LINK_KEY key;
   uint8_t key_type;
 
@@ -1501,7 +1501,7 @@
  *
  ******************************************************************************/
 static void btu_hcif_io_cap_request_evt(uint8_t* p) {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   STREAM_TO_BDADDR(bda, p);
   btm_io_capabilities_req(bda);
 }
diff --git a/stack/gap/gap_ble.cc b/stack/gap/gap_ble.cc
index 1075725..2247a14 100644
--- a/stack/gap/gap_ble.cc
+++ b/stack/gap/gap_ble.cc
@@ -35,7 +35,7 @@
 } tGAP_REQUEST;
 
 typedef struct {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tGAP_BLE_CMPL_CBACK* p_cback;
   uint16_t conn_id;
   uint16_t cl_op_uuid;
@@ -51,7 +51,7 @@
 
 void server_attr_request_cback(uint16_t, uint32_t, tGATTS_REQ_TYPE,
                                tGATTS_DATA*);
-void client_connect_cback(tGATT_IF, const bt_bdaddr_t&, uint16_t, bool,
+void client_connect_cback(tGATT_IF, const RawAddress&, uint16_t, bool,
                           tGATT_DISCONN_REASON, tGATT_TRANSPORT);
 void client_cmpl_cback(uint16_t, tGATTC_OPTYPE, tGATT_STATUS,
                        tGATT_CL_COMPLETE*);
@@ -75,7 +75,7 @@
 tGATT_IF gatt_if;
 
 /** returns LCB with macthing bd address, or nullptr */
-tGAP_CLCB* find_clcb_by_bd_addr(const bt_bdaddr_t& bda) {
+tGAP_CLCB* find_clcb_by_bd_addr(const RawAddress& bda) {
   for (auto& cb : gap_clcbs)
     if (cb.bda == bda) return &cb;
 
@@ -91,7 +91,7 @@
 }
 
 /** allocates a GAP connection link control block */
-tGAP_CLCB* clcb_alloc(const bt_bdaddr_t& bda) {
+tGAP_CLCB* clcb_alloc(const RawAddress& bda) {
   gap_clcbs.emplace_back();
   tGAP_CLCB& cb = gap_clcbs.back();
   cb.bda = bda;
@@ -284,7 +284,7 @@
 }
 
 /** Client connection callback */
-void client_connect_cback(tGATT_IF, const bt_bdaddr_t& bda, uint16_t conn_id,
+void client_connect_cback(tGATT_IF, const RawAddress& bda, uint16_t conn_id,
                           bool connected, tGATT_DISCONN_REASON reason,
                           tGATT_TRANSPORT) {
   tGAP_CLCB* p_clcb = find_clcb_by_bd_addr(bda);
@@ -353,7 +353,7 @@
   }
 }
 
-bool accept_client_operation(const bt_bdaddr_t& peer_bda, uint16_t uuid,
+bool accept_client_operation(const RawAddress& peer_bda, uint16_t uuid,
                              tGAP_BLE_CMPL_CBACK* p_cback) {
   if (p_cback == NULL && uuid != GATT_UUID_GAP_PREF_CONN_PARAM) return false;
 
@@ -513,7 +513,7 @@
  * Returns          true if read started, else false if GAP is busy
  *
  ******************************************************************************/
-bool GAP_BleReadPeerPrefConnParams(const bt_bdaddr_t& peer_bda) {
+bool GAP_BleReadPeerPrefConnParams(const RawAddress& peer_bda) {
   return accept_client_operation(peer_bda, GATT_UUID_GAP_PREF_CONN_PARAM, NULL);
 }
 
@@ -527,7 +527,7 @@
  * Returns          true if request accepted
  *
  ******************************************************************************/
-bool GAP_BleReadPeerDevName(const bt_bdaddr_t& peer_bda,
+bool GAP_BleReadPeerDevName(const RawAddress& peer_bda,
                             tGAP_BLE_CMPL_CBACK* p_cback) {
   return accept_client_operation(peer_bda, GATT_UUID_GAP_DEVICE_NAME, p_cback);
 }
@@ -541,7 +541,7 @@
  * Returns          true if request accepted
  *
  ******************************************************************************/
-bool GAP_BleReadPeerAddressResolutionCap(const bt_bdaddr_t& peer_bda,
+bool GAP_BleReadPeerAddressResolutionCap(const RawAddress& peer_bda,
                                          tGAP_BLE_CMPL_CBACK* p_cback) {
   return accept_client_operation(peer_bda, GATT_UUID_GAP_CENTRAL_ADDR_RESOL,
                                  p_cback);
@@ -556,7 +556,7 @@
  * Returns          true if request accepted
  *
  ******************************************************************************/
-bool GAP_BleCancelReadPeerDevName(const bt_bdaddr_t& peer_bda) {
+bool GAP_BleCancelReadPeerDevName(const RawAddress& peer_bda) {
   tGAP_CLCB* p_clcb = find_clcb_by_bd_addr(peer_bda);
 
   DVLOG(1) << __func__ << ": BDA: " << peer_bda
diff --git a/stack/gap/gap_conn.cc b/stack/gap/gap_conn.cc
index e4c6644..5ff63f0 100644
--- a/stack/gap/gap_conn.cc
+++ b/stack/gap/gap_conn.cc
@@ -52,7 +52,7 @@
   uint16_t connection_id; /* L2CAP CID */
   bool rem_addr_specified;
   uint8_t chan_mode_mask; /* Supported channel modes (FCR) */
-  bt_bdaddr_t rem_dev_address;
+  RawAddress rem_dev_address;
   uint16_t psm;
   uint16_t rem_mtu_size;
 
@@ -83,7 +83,7 @@
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
 /******************************************************************************/
-static void gap_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t l2cap_cid,
+static void gap_connect_ind(const RawAddress& bd_addr, uint16_t l2cap_cid,
                             uint16_t psm, uint8_t l2cap_id);
 static void gap_connect_cfm(uint16_t l2cap_cid, uint16_t result);
 static void gap_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg);
@@ -160,11 +160,10 @@
  *
  ******************************************************************************/
 uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id,
-                      bool is_server, const bt_bdaddr_t* p_rem_bda,
-                      uint16_t psm, tL2CAP_CFG_INFO* p_cfg,
-                      tL2CAP_ERTM_INFO* ertm_info, uint16_t security,
-                      uint8_t chan_mode_mask, tGAP_CONN_CALLBACK* p_cb,
-                      tBT_TRANSPORT transport) {
+                      bool is_server, const RawAddress* p_rem_bda, uint16_t psm,
+                      tL2CAP_CFG_INFO* p_cfg, tL2CAP_ERTM_INFO* ertm_info,
+                      uint16_t security, uint8_t chan_mode_mask,
+                      tGAP_CONN_CALLBACK* p_cb, tBT_TRANSPORT transport) {
   tGAP_CCB* p_ccb;
   uint16_t cid;
 
@@ -605,7 +604,7 @@
  *                  GAP_ERR_BAD_HANDLE  - invalid handle
  *
  ******************************************************************************/
-const bt_bdaddr_t* GAP_ConnGetRemoteAddr(uint16_t gap_handle) {
+const RawAddress* GAP_ConnGetRemoteAddr(uint16_t gap_handle) {
   tGAP_CCB* p_ccb = gap_find_ccb_by_handle(gap_handle);
 
   DVLOG(1) << __func__ << " gap_handle = " << gap_handle;
@@ -692,7 +691,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void gap_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t l2cap_cid,
+static void gap_connect_ind(const RawAddress& bd_addr, uint16_t l2cap_cid,
                             uint16_t psm, uint8_t l2cap_id) {
   uint16_t xx;
   tGAP_CCB* p_ccb;
@@ -781,7 +780,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void gap_sec_check_complete(const bt_bdaddr_t*, tBT_TRANSPORT,
+static void gap_sec_check_complete(const RawAddress*, tBT_TRANSPORT,
                                    void* p_ref_data, uint8_t res) {
   tGAP_CCB* p_ccb = (tGAP_CCB*)p_ref_data;
 
diff --git a/stack/gatt/gatt_api.cc b/stack/gatt/gatt_api.cc
index e459274..5627f0d 100644
--- a/stack/gatt/gatt_api.cc
+++ b/stack/gatt/gatt_api.cc
@@ -952,7 +952,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void GATT_SetIdleTimeout(const bt_bdaddr_t& bd_addr, uint16_t idle_tout,
+void GATT_SetIdleTimeout(const RawAddress& bd_addr, uint16_t idle_tout,
                          tBT_TRANSPORT transport) {
   tGATT_TCB* p_tcb;
   bool status = false;
@@ -1107,7 +1107,7 @@
 void GATT_StartIf(tGATT_IF gatt_if) {
   tGATT_REG* p_reg;
   tGATT_TCB* p_tcb;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t start_idx, found_idx;
   uint16_t conn_id;
   tGATT_TRANSPORT transport;
@@ -1144,14 +1144,14 @@
  *                  failure.
  *
  ******************************************************************************/
-bool GATT_Connect(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr, bool is_direct,
+bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, bool is_direct,
                   tBT_TRANSPORT transport, bool opportunistic) {
   uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
   return GATT_Connect(gatt_if, bd_addr, is_direct, transport, opportunistic,
                       phy);
 }
 
-bool GATT_Connect(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr, bool is_direct,
+bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr, bool is_direct,
                   tBT_TRANSPORT transport, bool opportunistic,
                   uint8_t initiating_phys) {
   tGATT_REG* p_reg;
@@ -1195,7 +1195,7 @@
  * Returns          true if the connection started; false otherwise.
  *
  ******************************************************************************/
-bool GATT_CancelConnect(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr,
+bool GATT_CancelConnect(tGATT_IF gatt_if, const RawAddress& bd_addr,
                         bool is_direct) {
   LOG(INFO) << __func__ << ": gatt_if=" << +gatt_if;
 
@@ -1286,7 +1286,7 @@
  *
  ******************************************************************************/
 bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if,
-                             bt_bdaddr_t& bd_addr, tBT_TRANSPORT* p_transport) {
+                             RawAddress& bd_addr, tBT_TRANSPORT* p_transport) {
   tGATT_IF gatt_if = GATT_GET_GATT_IF(conn_id);
   tGATT_REG* p_reg = gatt_get_regcb(gatt_if);
   uint8_t tcb_idx = GATT_GET_TCB_IDX(conn_id);
@@ -1319,7 +1319,7 @@
  * Returns          true the logical link is connected
  *
  ******************************************************************************/
-bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr,
+bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, const RawAddress& bd_addr,
                                uint16_t* p_conn_id, tBT_TRANSPORT transport) {
   tGATT_REG* p_reg = gatt_get_regcb(gatt_if);
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(bd_addr, transport);
diff --git a/stack/gatt/gatt_attr.cc b/stack/gatt/gatt_attr.cc
index fefd5de..f4e028a 100644
--- a/stack/gatt/gatt_attr.cc
+++ b/stack/gatt/gatt_attr.cc
@@ -47,7 +47,7 @@
 static void gatt_request_cback(uint16_t conn_id, uint32_t trans_id,
                                uint8_t op_code, tGATTS_DATA* p_data);
 static void gatt_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
-                               const bt_bdaddr_t& bda, uint16_t conn_id,
+                               const RawAddress& bda, uint16_t conn_id,
                                bool connected, tGATT_DISCONN_REASON reason,
                                tBT_TRANSPORT transport);
 static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type,
@@ -80,7 +80,7 @@
  * Returns          Connection ID
  *
  ******************************************************************************/
-uint16_t gatt_profile_find_conn_id_by_bd_addr(const bt_bdaddr_t& remote_bda) {
+uint16_t gatt_profile_find_conn_id_by_bd_addr(const RawAddress& remote_bda) {
   uint16_t conn_id = GATT_INVALID_CONN_ID;
   GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id,
                             BT_TRANSPORT_LE);
@@ -118,7 +118,7 @@
  *
  ******************************************************************************/
 static tGATT_PROFILE_CLCB* gatt_profile_find_clcb_by_bd_addr(
-    const bt_bdaddr_t& bda, tBT_TRANSPORT transport) {
+    const RawAddress& bda, tBT_TRANSPORT transport) {
   uint8_t i_clcb;
   tGATT_PROFILE_CLCB* p_clcb = NULL;
 
@@ -144,7 +144,7 @@
  *
  ******************************************************************************/
 tGATT_PROFILE_CLCB* gatt_profile_clcb_alloc(uint16_t conn_id,
-                                            const bt_bdaddr_t& bda,
+                                            const RawAddress& bda,
                                             tBT_TRANSPORT tranport) {
   uint8_t i_clcb = 0;
   tGATT_PROFILE_CLCB* p_clcb = NULL;
@@ -237,7 +237,7 @@
  *
  ******************************************************************************/
 static void gatt_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
-                               const bt_bdaddr_t& bda, uint16_t conn_id,
+                               const RawAddress& bda, uint16_t conn_id,
                                bool connected, tGATT_DISCONN_REASON reason,
                                tBT_TRANSPORT transport) {
   VLOG(1) << __func__ << ": from " << bda
@@ -435,7 +435,7 @@
  * Returns          none
  *
  ******************************************************************************/
-void GATT_ConfigServiceChangeCCC(const bt_bdaddr_t& remote_bda, bool enable,
+void GATT_ConfigServiceChangeCCC(const RawAddress& remote_bda, bool enable,
                                  tBT_TRANSPORT transport) {
   tGATT_PROFILE_CLCB* p_clcb =
       gatt_profile_find_clcb_by_bd_addr(remote_bda, transport);
diff --git a/stack/gatt/gatt_auth.cc b/stack/gatt/gatt_auth.cc
index bfdadb2..b91b56c 100644
--- a/stack/gatt/gatt_auth.cc
+++ b/stack/gatt/gatt_auth.cc
@@ -150,7 +150,7 @@
  * Returns
  *
  ******************************************************************************/
-void gatt_enc_cmpl_cback(const bt_bdaddr_t* bd_addr, tBT_TRANSPORT transport,
+void gatt_enc_cmpl_cback(const RawAddress* bd_addr, tBT_TRANSPORT transport,
                          UNUSED_ATTR void* p_ref_data, tBTM_STATUS result) {
   VLOG(1) << StringPrintf("gatt_enc_cmpl_cback");
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(*bd_addr, transport);
@@ -205,7 +205,7 @@
  * Returns
  *
  ******************************************************************************/
-void gatt_notify_enc_cmpl(const bt_bdaddr_t& bd_addr) {
+void gatt_notify_enc_cmpl(const RawAddress& bd_addr) {
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
   if (!p_tcb) {
     VLOG(1) << StringPrintf(
diff --git a/stack/gatt/gatt_int.h b/stack/gatt/gatt_int.h
index 622988e..cb0ad3e 100644
--- a/stack/gatt/gatt_int.h
+++ b/stack/gatt/gatt_int.h
@@ -266,7 +266,7 @@
 typedef struct {
   std::queue<tGATT_CLCB*> pending_enc_clcb; /* pending encryption channel q */
   tGATT_SEC_ACTION sec_act;
-  bt_bdaddr_t peer_bda;
+  RawAddress peer_bda;
   tBT_TRANSPORT transport;
   uint32_t trans_id;
 
@@ -333,7 +333,7 @@
 
 typedef struct {
   std::unordered_set<tGATT_IF> gatt_if;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
 } tGATT_BG_CONN_DEV;
 
 #define GATT_SVC_CHANGED_CONNECTING 1     /* wait for connection */
@@ -346,7 +346,7 @@
   uint16_t conn_id;
   bool in_use;
   bool connected;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tBT_TRANSPORT transport;
 
   /* GATT service change CCC related variables */
@@ -401,10 +401,10 @@
 
 /* from gatt_main.cc */
 extern bool gatt_disconnect(tGATT_TCB* p_tcb);
-extern bool gatt_act_connect(tGATT_REG* p_reg, const bt_bdaddr_t& bd_addr,
+extern bool gatt_act_connect(tGATT_REG* p_reg, const RawAddress& bd_addr,
                              tBT_TRANSPORT transport, bool opportunistic,
                              int8_t initiating_phys);
-extern bool gatt_connect(const bt_bdaddr_t& rem_bda, tGATT_TCB* p_tcb,
+extern bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb,
                          tBT_TRANSPORT transport, uint8_t initiating_phys);
 extern void gatt_data_process(tGATT_TCB& p_tcb, BT_HDR* p_buf);
 extern void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
@@ -415,12 +415,12 @@
 extern tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb);
 extern void gatt_init_srv_chg(void);
 extern void gatt_proc_srv_chg(void);
-extern void gatt_send_srv_chg_ind(const bt_bdaddr_t& peer_bda);
+extern void gatt_send_srv_chg_ind(const RawAddress& peer_bda);
 extern void gatt_chk_srv_chg(tGATTS_SRV_CHG* p_srv_chg_clt);
-extern void gatt_add_a_bonded_dev_for_srv_chg(const bt_bdaddr_t& bda);
+extern void gatt_add_a_bonded_dev_for_srv_chg(const RawAddress& bda);
 
 /* from gatt_attr.cc */
-extern uint16_t gatt_profile_find_conn_id_by_bd_addr(const bt_bdaddr_t& bda);
+extern uint16_t gatt_profile_find_conn_id_by_bd_addr(const RawAddress& bda);
 
 /* Functions provided by att_protocol.cc */
 extern tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb,
@@ -440,7 +440,7 @@
 extern bool gatt_uuid_compare(tBT_UUID src, tBT_UUID tar);
 extern void gatt_convert_uuid32_to_uuid128(uint8_t uuid_128[LEN_UUID_128],
                                            uint32_t uuid_32);
-extern void gatt_sr_get_sec_info(const bt_bdaddr_t& rem_bda,
+extern void gatt_sr_get_sec_info(const RawAddress& rem_bda,
                                  tBT_TRANSPORT transport, uint8_t* p_sec_flag,
                                  uint8_t* p_key_size);
 extern void gatt_start_rsp_timer(tGATT_CLCB* p_clcb);
@@ -456,13 +456,13 @@
 
 extern bool gatt_is_srv_chg_ind_pending(tGATT_TCB* p_tcb);
 extern tGATTS_SRV_CHG* gatt_is_bda_in_the_srv_chg_clt_list(
-    const bt_bdaddr_t& bda);
+    const RawAddress& bda);
 
-extern bool gatt_find_the_connected_bda(uint8_t start_idx, bt_bdaddr_t& bda,
+extern bool gatt_find_the_connected_bda(uint8_t start_idx, RawAddress& bda,
                                         uint8_t* p_found_idx,
                                         tBT_TRANSPORT* p_transport);
 extern void gatt_set_srv_chg(void);
-extern void gatt_delete_dev_from_srv_chg_clt_list(const bt_bdaddr_t& bd_addr);
+extern void gatt_delete_dev_from_srv_chg_clt_list(const RawAddress& bd_addr);
 extern tGATT_VALUE* gatt_add_pending_ind(tGATT_TCB* p_tcb, tGATT_VALUE* p_ind);
 extern void gatt_free_srvc_db_buffer_app_id(tBT_UUID* p_app_id);
 extern bool gatt_cl_send_next_cmd_inq(tGATT_TCB& tcb);
@@ -475,12 +475,12 @@
 
 /* for background connection */
 extern bool gatt_update_auto_connect_dev(tGATT_IF gatt_if, bool add,
-                                         const bt_bdaddr_t& bd_addr);
+                                         const RawAddress& bd_addr);
 extern bool gatt_is_bg_dev_for_app(tGATT_BG_CONN_DEV* p_dev, tGATT_IF gatt_if);
 extern bool gatt_remove_bg_dev_for_app(tGATT_IF gatt_if,
-                                       const bt_bdaddr_t& bd_addr);
-extern uint8_t gatt_clear_bg_dev_for_addr(const bt_bdaddr_t& bd_addr);
-extern tGATT_BG_CONN_DEV* gatt_find_bg_dev(const bt_bdaddr_t& remote_bda);
+                                       const RawAddress& bd_addr);
+extern uint8_t gatt_clear_bg_dev_for_addr(const RawAddress& bd_addr);
+extern tGATT_BG_CONN_DEV* gatt_find_bg_dev(const RawAddress& remote_bda);
 extern void gatt_deregister_bgdev_list(tGATT_IF gatt_if);
 
 /* server function */
@@ -499,7 +499,7 @@
                                       uint8_t op_code, tGATTS_DATA* p_req_data);
 extern uint32_t gatt_sr_enqueue_cmd(tGATT_TCB& tcb, uint8_t op_code,
                                     uint16_t handle);
-extern bool gatt_cancel_open(tGATT_IF gatt_if, const bt_bdaddr_t& bda);
+extern bool gatt_cancel_open(tGATT_IF gatt_if, const RawAddress& bda);
 extern void gatt_notify_phy_updated(tGATT_TCB* p_tcb, uint8_t tx_phy,
                                     uint8_t rx_phy, uint8_t status);
 
@@ -520,14 +520,14 @@
 extern void gatt_sr_update_prep_cnt(tGATT_TCB& tcb, tGATT_IF gatt_if,
                                     bool is_inc, bool is_reset_first);
 
-extern uint8_t gatt_num_clcb_by_bd_addr(const bt_bdaddr_t& bda);
+extern uint8_t gatt_num_clcb_by_bd_addr(const RawAddress& bda);
 extern tGATT_TCB* gatt_find_tcb_by_cid(uint16_t lcid);
-extern tGATT_TCB* gatt_allocate_tcb_by_bdaddr(const bt_bdaddr_t& bda,
+extern tGATT_TCB* gatt_allocate_tcb_by_bdaddr(const RawAddress& bda,
                                               tBT_TRANSPORT transport);
 extern tGATT_TCB* gatt_get_tcb_by_idx(uint8_t tcb_idx);
-extern tGATT_TCB* gatt_find_tcb_by_addr(const bt_bdaddr_t& bda,
+extern tGATT_TCB* gatt_find_tcb_by_addr(const RawAddress& bda,
                                         tBT_TRANSPORT transport);
-extern bool gatt_send_ble_burst_data(const bt_bdaddr_t& remote_bda,
+extern bool gatt_send_ble_burst_data(const RawAddress& remote_bda,
                                      BT_HDR* p_buf);
 
 /* GATT client functions */
@@ -536,7 +536,7 @@
                                    uint8_t op_code, uint16_t handle,
                                    uint16_t len, uint16_t offset,
                                    uint8_t* p_data);
-extern void gatt_cleanup_upon_disc(const bt_bdaddr_t& bda, uint16_t reason,
+extern void gatt_cleanup_upon_disc(const RawAddress& bda, uint16_t reason,
                                    tBT_TRANSPORT transport);
 extern void gatt_end_operation(tGATT_CLCB* p_clcb, tGATT_STATUS status,
                                void* p_data);
diff --git a/stack/gatt/gatt_main.cc b/stack/gatt/gatt_main.cc
index b69ca6c..3556b43 100644
--- a/stack/gatt/gatt_main.cc
+++ b/stack/gatt/gatt_main.cc
@@ -47,14 +47,14 @@
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
 /******************************************************************************/
-static void gatt_le_connect_cback(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void gatt_le_connect_cback(uint16_t chan, const RawAddress& bd_addr,
                                   bool connected, uint16_t reason,
                                   tBT_TRANSPORT transport);
-static void gatt_le_data_ind(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void gatt_le_data_ind(uint16_t chan, const RawAddress& bd_addr,
                              BT_HDR* p_buf);
-static void gatt_le_cong_cback(const bt_bdaddr_t& remote_bda, bool congest);
+static void gatt_le_cong_cback(const RawAddress& remote_bda, bool congest);
 
-static void gatt_l2cif_connect_ind_cback(const bt_bdaddr_t& bd_addr,
+static void gatt_l2cif_connect_ind_cback(const RawAddress& bd_addr,
                                          uint16_t l2cap_cid, uint16_t psm,
                                          uint8_t l2cap_id);
 static void gatt_l2cif_connect_cfm_cback(uint16_t l2cap_cid, uint16_t result);
@@ -190,7 +190,7 @@
  * Returns          true if connection is started, otherwise return false.
  *
  ******************************************************************************/
-bool gatt_connect(const bt_bdaddr_t& rem_bda, tGATT_TCB* p_tcb,
+bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb,
                   tBT_TRANSPORT transport, uint8_t initiating_phys) {
   bool gatt_ret = false;
 
@@ -345,7 +345,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-bool gatt_act_connect(tGATT_REG* p_reg, const bt_bdaddr_t& bd_addr,
+bool gatt_act_connect(tGATT_REG* p_reg, const RawAddress& bd_addr,
                       tBT_TRANSPORT transport, bool opportunistic,
                       int8_t initiating_phys) {
   bool ret = false;
@@ -401,7 +401,7 @@
  *                      connected (conn = true)/disconnected (conn = false).
  *
  ******************************************************************************/
-static void gatt_le_connect_cback(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void gatt_le_connect_cback(uint16_t chan, const RawAddress& bd_addr,
                                   bool connected, uint16_t reason,
                                   tBT_TRANSPORT transport) {
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(bd_addr, transport);
@@ -534,7 +534,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void gatt_le_cong_cback(const bt_bdaddr_t& remote_bda, bool congested) {
+static void gatt_le_cong_cback(const RawAddress& remote_bda, bool congested) {
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(remote_bda, BT_TRANSPORT_LE);
 
   /* if uncongested, check to see if there is any more pending data */
@@ -559,7 +559,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void gatt_le_data_ind(uint16_t chan, const bt_bdaddr_t& bd_addr,
+static void gatt_le_data_ind(uint16_t chan, const RawAddress& bd_addr,
                              BT_HDR* p_buf) {
   tGATT_TCB* p_tcb;
 
@@ -586,7 +586,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void gatt_l2cif_connect_ind_cback(const bt_bdaddr_t& bd_addr,
+static void gatt_l2cif_connect_ind_cback(const RawAddress& bd_addr,
                                          uint16_t lcid,
                                          UNUSED_ATTR uint16_t psm, uint8_t id) {
   /* do we already have a control channel for this peer? */
@@ -981,7 +981,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void gatt_add_a_bonded_dev_for_srv_chg(const bt_bdaddr_t& bda) {
+void gatt_add_a_bonded_dev_for_srv_chg(const RawAddress& bda) {
   tGATTS_SRV_CHG_REQ req;
   tGATTS_SRV_CHG srv_chg_clt;
 
@@ -1006,7 +1006,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void gatt_send_srv_chg_ind(const bt_bdaddr_t& peer_bda) {
+void gatt_send_srv_chg_ind(const RawAddress& peer_bda) {
   uint8_t handle_range[GATT_SIZE_OF_SRV_CHG_HNDL_RANGE];
   uint8_t* p = handle_range;
   uint16_t conn_id;
@@ -1101,7 +1101,7 @@
  ******************************************************************************/
 void gatt_proc_srv_chg(void) {
   uint8_t start_idx, found_idx;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   tGATT_TCB* p_tcb;
   tBT_TRANSPORT transport;
 
diff --git a/stack/gatt/gatt_utils.cc b/stack/gatt/gatt_utils.cc
index ecc97aa..dc20e65 100644
--- a/stack/gatt/gatt_utils.cc
+++ b/stack/gatt/gatt_utils.cc
@@ -112,7 +112,7 @@
  * Returns       None
  *
  ******************************************************************************/
-void gatt_delete_dev_from_srv_chg_clt_list(const bt_bdaddr_t& bd_addr) {
+void gatt_delete_dev_from_srv_chg_clt_list(const RawAddress& bd_addr) {
   VLOG(1) << __func__;
 
   tGATTS_SRV_CHG* p_buf = gatt_is_bda_in_the_srv_chg_clt_list(bd_addr);
@@ -261,7 +261,7 @@
  * Returns           true if found
  *
  ******************************************************************************/
-bool gatt_find_the_connected_bda(uint8_t start_idx, bt_bdaddr_t& bda,
+bool gatt_find_the_connected_bda(uint8_t start_idx, RawAddress& bda,
                                  uint8_t* p_found_idx,
                                  tBT_TRANSPORT* p_transport) {
   uint8_t i;
@@ -326,7 +326,7 @@
  * Returns         pointer to the found elemenet otherwise NULL
  *
  ******************************************************************************/
-tGATTS_SRV_CHG* gatt_is_bda_in_the_srv_chg_clt_list(const bt_bdaddr_t& bda) {
+tGATTS_SRV_CHG* gatt_is_bda_in_the_srv_chg_clt_list(const RawAddress& bda) {
   tGATTS_SRV_CHG* p_buf = NULL;
 
   VLOG(1) << __func__ << ": " << bda;
@@ -355,7 +355,7 @@
  * Returns          GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
  *
  ******************************************************************************/
-bool gatt_is_bda_connected(const bt_bdaddr_t& bda) {
+bool gatt_is_bda_connected(const RawAddress& bda) {
   uint8_t i = 0;
   bool connected = false;
 
@@ -377,7 +377,7 @@
  * Returns          GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
  *
  ******************************************************************************/
-uint8_t gatt_find_i_tcb_by_addr(const bt_bdaddr_t& bda,
+uint8_t gatt_find_i_tcb_by_addr(const RawAddress& bda,
                                 tBT_TRANSPORT transport) {
   uint8_t i = 0;
 
@@ -417,7 +417,7 @@
  * Returns          NULL if not found. Otherwise index to the tcb.
  *
  ******************************************************************************/
-tGATT_TCB* gatt_find_tcb_by_addr(const bt_bdaddr_t& bda,
+tGATT_TCB* gatt_find_tcb_by_addr(const RawAddress& bda,
                                  tBT_TRANSPORT transport) {
   tGATT_TCB* p_tcb = NULL;
   uint8_t i = 0;
@@ -437,7 +437,7 @@
  * Returns          GATT_INDEX_INVALID if not found. Otherwise index to the tcb.
  *
  ******************************************************************************/
-tGATT_TCB* gatt_allocate_tcb_by_bdaddr(const bt_bdaddr_t& bda,
+tGATT_TCB* gatt_allocate_tcb_by_bdaddr(const RawAddress& bda,
                                        tBT_TRANSPORT transport) {
   /* search for existing tcb with matching bda    */
   uint8_t j = gatt_find_i_tcb_by_addr(bda, transport);
@@ -802,7 +802,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void gatt_sr_get_sec_info(const bt_bdaddr_t& rem_bda, tBT_TRANSPORT transport,
+void gatt_sr_get_sec_info(const RawAddress& rem_bda, tBT_TRANSPORT transport,
                           uint8_t* p_sec_flag, uint8_t* p_key_size) {
   uint8_t sec_flag = 0;
 
@@ -1091,7 +1091,7 @@
  * Returns          total number of clcb found.
  *
  ******************************************************************************/
-uint8_t gatt_num_clcb_by_bd_addr(const bt_bdaddr_t& bda) {
+uint8_t gatt_num_clcb_by_bd_addr(const RawAddress& bda) {
   uint8_t i, num = 0;
 
   for (i = 0; i < GATT_CL_MAX_LCB; i++) {
@@ -1236,7 +1236,7 @@
  * Returns         Boolean
  *
  ******************************************************************************/
-bool gatt_cancel_open(tGATT_IF gatt_if, const bt_bdaddr_t& bda) {
+bool gatt_cancel_open(tGATT_IF gatt_if, const RawAddress& bda) {
   tGATT_TCB* p_tcb = NULL;
   bool status = true;
 
@@ -1373,7 +1373,7 @@
 }
 
 /** This function cleans up the control blocks when L2CAP channel disconnect */
-void gatt_cleanup_upon_disc(const bt_bdaddr_t& bda, uint16_t reason,
+void gatt_cleanup_upon_disc(const RawAddress& bda, uint16_t reason,
                             tBT_TRANSPORT transport) {
   VLOG(1) << __func__;
 
@@ -1485,7 +1485,7 @@
 
 /** background connection device from the list. Returns pointer to the device
  * record, or nullptr if not found */
-tGATT_BG_CONN_DEV* gatt_find_bg_dev(const bt_bdaddr_t& remote_bda) {
+tGATT_BG_CONN_DEV* gatt_find_bg_dev(const RawAddress& remote_bda) {
   for (tGATT_BG_CONN_DEV& dev : gatt_cb.bgconn_dev) {
     if (dev.remote_bda == remote_bda) {
       return &dev;
@@ -1495,7 +1495,7 @@
 }
 
 std::list<tGATT_BG_CONN_DEV>::iterator gatt_find_bg_dev_it(
-    const bt_bdaddr_t& remote_bda) {
+    const RawAddress& remote_bda) {
   auto& list = gatt_cb.bgconn_dev;
   for (auto it = list.begin(); it != list.end(); it++) {
     if (it->remote_bda == remote_bda) {
@@ -1507,7 +1507,7 @@
 
 /** Add a device from the background connection list.  Returns true if device
  * added to the list, or already in list, false otherwise */
-bool gatt_add_bg_dev_list(tGATT_REG* p_reg, const bt_bdaddr_t& bd_addr) {
+bool gatt_add_bg_dev_list(tGATT_REG* p_reg, const RawAddress& bd_addr) {
   tGATT_IF gatt_if = p_reg->gatt_if;
 
   tGATT_BG_CONN_DEV* p_dev = gatt_find_bg_dev(bd_addr);
@@ -1531,7 +1531,7 @@
 }
 
 /** Remove the application interface for the specified background device */
-bool gatt_remove_bg_dev_for_app(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr) {
+bool gatt_remove_bg_dev_for_app(tGATT_IF gatt_if, const RawAddress& bd_addr) {
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
   bool status;
 
@@ -1542,7 +1542,7 @@
 
 /** Removes all registrations for background connection for given device.
  * Returns true if anything was removed, false otherwise */
-uint8_t gatt_clear_bg_dev_for_addr(const bt_bdaddr_t& bd_addr) {
+uint8_t gatt_clear_bg_dev_for_addr(const RawAddress& bd_addr) {
   auto dev_it = gatt_find_bg_dev_it(bd_addr);
   if (dev_it == gatt_cb.bgconn_dev.end()) return false;
 
@@ -1554,8 +1554,7 @@
 /** Remove device from the background connection device list or listening to
  * advertising list.  Returns true if device was on the list and was succesfully
  * removed */
-bool gatt_remove_bg_dev_from_list(tGATT_REG* p_reg,
-                                  const bt_bdaddr_t& bd_addr) {
+bool gatt_remove_bg_dev_from_list(tGATT_REG* p_reg, const RawAddress& bd_addr) {
   tGATT_IF gatt_if = p_reg->gatt_if;
   auto dev_it = gatt_find_bg_dev_it(bd_addr);
   if (dev_it == gatt_cb.bgconn_dev.end()) return false;
@@ -1611,7 +1610,7 @@
  *
  ******************************************************************************/
 bool gatt_update_auto_connect_dev(tGATT_IF gatt_if, bool add,
-                                  const bt_bdaddr_t& bd_addr) {
+                                  const RawAddress& bd_addr) {
   bool ret = false;
   tGATT_REG* p_reg;
   tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
diff --git a/stack/hcic/hciblecmds.cc b/stack/hcic/hciblecmds.cc
index 9bb0b3e..041d1e0 100644
--- a/stack/hcic/hciblecmds.cc
+++ b/stack/hcic/hciblecmds.cc
@@ -46,7 +46,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_ble_set_random_addr(const bt_bdaddr_t& random_bda) {
+void btsnd_hcic_ble_set_random_addr(const RawAddress& random_bda) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -64,7 +64,7 @@
 void btsnd_hcic_ble_write_adv_params(uint16_t adv_int_min, uint16_t adv_int_max,
                                      uint8_t adv_type, uint8_t addr_type_own,
                                      uint8_t addr_type_dir,
-                                     const bt_bdaddr_t& direct_bda,
+                                     const RawAddress& direct_bda,
                                      uint8_t channel_map,
                                      uint8_t adv_filter_policy) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
@@ -200,7 +200,7 @@
 /* link layer connection management commands */
 void btsnd_hcic_ble_create_ll_conn(
     uint16_t scan_int, uint16_t scan_win, uint8_t init_filter_policy,
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer, uint8_t addr_type_own,
+    uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t addr_type_own,
     uint16_t conn_int_min, uint16_t conn_int_max, uint16_t conn_latency,
     uint16_t conn_timeout, uint16_t min_ce_len, uint16_t max_ce_len) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
@@ -257,7 +257,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_ble_add_white_list(uint8_t addr_type, const bt_bdaddr_t& bda) {
+void btsnd_hcic_ble_add_white_list(uint8_t addr_type, const RawAddress& bda) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -274,7 +274,7 @@
 }
 
 void btsnd_hcic_ble_remove_from_white_list(uint8_t addr_type,
-                                           const bt_bdaddr_t& bda) {
+                                           const RawAddress& bda) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -561,7 +561,7 @@
 #endif
 
 void btsnd_hcic_ble_add_device_resolving_list(
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer,
+    uint8_t addr_type_peer, const RawAddress& bda_peer,
     uint8_t irk_peer[HCIC_BLE_IRK_SIZE], uint8_t irk_local[HCIC_BLE_IRK_SIZE]) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -580,7 +580,7 @@
 }
 
 void btsnd_hcic_ble_rm_device_resolving_list(uint8_t addr_type_peer,
-                                             const bt_bdaddr_t& bda_peer) {
+                                             const RawAddress& bda_peer) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -596,7 +596,7 @@
 }
 
 void btsnd_hcic_ble_set_privacy_mode(uint8_t addr_type_peer,
-                                     const bt_bdaddr_t& bda_peer,
+                                     const RawAddress& bda_peer,
                                      uint8_t privacy_type) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -627,7 +627,7 @@
 }
 
 void btsnd_hcic_ble_read_resolvable_addr_peer(uint8_t addr_type_peer,
-                                              const bt_bdaddr_t& bda_peer) {
+                                              const RawAddress& bda_peer) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -643,7 +643,7 @@
 }
 
 void btsnd_hcic_ble_read_resolvable_addr_local(uint8_t addr_type_peer,
-                                               const bt_bdaddr_t& bda_peer) {
+                                               const RawAddress& bda_peer) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -795,7 +795,7 @@
 void btsnd_hcic_ble_ext_create_conn(uint8_t init_filter_policy,
                                     uint8_t addr_type_own,
                                     uint8_t addr_type_peer,
-                                    const bt_bdaddr_t& bda_peer,
+                                    const RawAddress& bda_peer,
                                     uint8_t initiating_phys,
                                     EXT_CONN_PHY_CFG* phy_cfg) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
diff --git a/stack/hcic/hcicmds.cc b/stack/hcic/hcicmds.cc
index 36de93c..c8f8444 100644
--- a/stack/hcic/hcicmds.cc
+++ b/stack/hcic/hcicmds.cc
@@ -97,7 +97,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_create_conn(const bt_bdaddr_t& dest, uint16_t packet_types,
+void btsnd_hcic_create_conn(const RawAddress& dest, uint16_t packet_types,
                             uint8_t page_scan_rep_mode, uint8_t page_scan_mode,
                             uint16_t clock_offset, uint8_t allow_switch) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
@@ -160,7 +160,7 @@
 }
 #endif /* BTM_SCO_INCLUDED */
 
-void btsnd_hcic_create_conn_cancel(const bt_bdaddr_t& dest) {
+void btsnd_hcic_create_conn_cancel(const RawAddress& dest) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -175,7 +175,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_accept_conn(const bt_bdaddr_t& dest, uint8_t role) {
+void btsnd_hcic_accept_conn(const RawAddress& dest, uint8_t role) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -190,7 +190,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_reject_conn(const bt_bdaddr_t& dest, uint8_t reason) {
+void btsnd_hcic_reject_conn(const RawAddress& dest, uint8_t reason) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -206,7 +206,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_link_key_req_reply(const bt_bdaddr_t& bd_addr,
+void btsnd_hcic_link_key_req_reply(const RawAddress& bd_addr,
                                    LINK_KEY link_key) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -223,7 +223,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_link_key_neg_reply(const bt_bdaddr_t& bd_addr) {
+void btsnd_hcic_link_key_neg_reply(const RawAddress& bd_addr) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -238,7 +238,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_pin_code_req_reply(const bt_bdaddr_t& bd_addr,
+void btsnd_hcic_pin_code_req_reply(const RawAddress& bd_addr,
                                    uint8_t pin_code_len, PIN_CODE pin_code) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -260,7 +260,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_pin_code_neg_reply(const bt_bdaddr_t& bd_addr) {
+void btsnd_hcic_pin_code_neg_reply(const RawAddress& bd_addr) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -322,7 +322,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_rmt_name_req(const bt_bdaddr_t& bd_addr,
+void btsnd_hcic_rmt_name_req(const RawAddress& bd_addr,
                              uint8_t page_scan_rep_mode, uint8_t page_scan_mode,
                              uint16_t clock_offset) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
@@ -342,7 +342,7 @@
   btm_acl_paging(p, bd_addr);
 }
 
-void btsnd_hcic_rmt_name_req_cancel(const bt_bdaddr_t& bd_addr) {
+void btsnd_hcic_rmt_name_req_cancel(const RawAddress& bd_addr) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -457,7 +457,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_accept_esco_conn(const bt_bdaddr_t& bd_addr,
+void btsnd_hcic_accept_esco_conn(const RawAddress& bd_addr,
                                  uint32_t transmit_bandwidth,
                                  uint32_t receive_bandwidth,
                                  uint16_t max_latency, uint16_t content_fmt,
@@ -483,7 +483,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_reject_esco_conn(const bt_bdaddr_t& bd_addr, uint8_t reason) {
+void btsnd_hcic_reject_esco_conn(const RawAddress& bd_addr, uint8_t reason) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -609,7 +609,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_switch_role(const bt_bdaddr_t& bd_addr, uint8_t role) {
+void btsnd_hcic_switch_role(const RawAddress& bd_addr, uint8_t role) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -678,7 +678,7 @@
 
       filt_cond_len -= (2 * DEV_CLASS_LEN);
     } else if (filt_cond_type == HCI_FILTER_COND_BD_ADDR) {
-      BDADDR_TO_STREAM(pp, *((bt_bdaddr_t*)filt_cond));
+      BDADDR_TO_STREAM(pp, *((RawAddress*)filt_cond));
       filt_cond += BD_ADDR_LEN;
 
       filt_cond_len -= BD_ADDR_LEN;
@@ -710,7 +710,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_delete_stored_key(const bt_bdaddr_t& bd_addr,
+void btsnd_hcic_delete_stored_key(const RawAddress& bd_addr,
                                   bool delete_all_flag) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -996,7 +996,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_io_cap_req_reply(const bt_bdaddr_t& bd_addr, uint8_t capability,
+void btsnd_hcic_io_cap_req_reply(const RawAddress& bd_addr, uint8_t capability,
                                  uint8_t oob_present, uint8_t auth_req) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -1065,7 +1065,7 @@
 }
 
 void btsnd_hcic_enhanced_accept_synchronous_connection(
-    const bt_bdaddr_t& bd_addr, enh_esco_params_t* p_params) {
+    const RawAddress& bd_addr, enh_esco_params_t* p_params) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -1113,7 +1113,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_io_cap_req_neg_reply(const bt_bdaddr_t& bd_addr,
+void btsnd_hcic_io_cap_req_neg_reply(const RawAddress& bd_addr,
                                      uint8_t err_code) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -1143,7 +1143,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_user_conf_reply(const bt_bdaddr_t& bd_addr, bool is_yes) {
+void btsnd_hcic_user_conf_reply(const RawAddress& bd_addr, bool is_yes) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -1165,7 +1165,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_user_passkey_reply(const bt_bdaddr_t& bd_addr, uint32_t value) {
+void btsnd_hcic_user_passkey_reply(const RawAddress& bd_addr, uint32_t value) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -1181,7 +1181,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_user_passkey_neg_reply(const bt_bdaddr_t& bd_addr) {
+void btsnd_hcic_user_passkey_neg_reply(const RawAddress& bd_addr) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -1196,7 +1196,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_rem_oob_reply(const bt_bdaddr_t& bd_addr, uint8_t* p_c,
+void btsnd_hcic_rem_oob_reply(const RawAddress& bd_addr, uint8_t* p_c,
                               uint8_t* p_r) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
@@ -1214,7 +1214,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_rem_oob_neg_reply(const bt_bdaddr_t& bd_addr) {
+void btsnd_hcic_rem_oob_neg_reply(const RawAddress& bd_addr) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
@@ -1242,7 +1242,7 @@
   btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
 }
 
-void btsnd_hcic_send_keypress_notif(const bt_bdaddr_t& bd_addr, uint8_t notif) {
+void btsnd_hcic_send_keypress_notif(const RawAddress& bd_addr, uint8_t notif) {
   BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
   uint8_t* pp = (uint8_t*)(p + 1);
 
diff --git a/stack/hid/hidd_api.cc b/stack/hid/hidd_api.cc
index 9ea8920..8ae70c3 100644
--- a/stack/hid/hidd_api.cc
+++ b/stack/hid/hidd_api.cc
@@ -424,7 +424,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-tHID_STATUS HID_DevPlugDevice(const bt_bdaddr_t& addr) {
+tHID_STATUS HID_DevPlugDevice(const RawAddress& addr) {
   hd_cb.device.in_use = TRUE;
   hd_cb.device.addr = addr;
 
@@ -440,7 +440,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-tHID_STATUS HID_DevUnplugDevice(const bt_bdaddr_t& addr) {
+tHID_STATUS HID_DevUnplugDevice(const RawAddress& addr) {
   if (hd_cb.device.addr == addr) {
     hd_cb.device.in_use = FALSE;
     hd_cb.device.conn.conn_state = HID_CONN_STATE_UNUSED;
@@ -566,7 +566,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-tHID_STATUS HID_DevGetDevice(bt_bdaddr_t* addr) {
+tHID_STATUS HID_DevGetDevice(RawAddress* addr) {
   HIDD_TRACE_API("%s", __func__);
 
   if (hd_cb.device.in_use) {
diff --git a/stack/hid/hidd_conn.cc b/stack/hid/hidd_conn.cc
index e82176c..cb08715 100644
--- a/stack/hid/hidd_conn.cc
+++ b/stack/hid/hidd_conn.cc
@@ -44,7 +44,7 @@
 
 #include "osi/include/osi.h"
 
-static void hidd_l2cif_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t cid,
+static void hidd_l2cif_connect_ind(const RawAddress& bd_addr, uint16_t cid,
                                    uint16_t psm, uint8_t id);
 static void hidd_l2cif_connect_cfm(uint16_t cid, uint16_t result);
 static void hidd_l2cif_config_ind(uint16_t cid, tL2CAP_CFG_INFO* p_cfg);
@@ -107,7 +107,7 @@
  *                  send security block L2C connection response.
  *
  ******************************************************************************/
-static void hidd_sec_check_complete(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+static void hidd_sec_check_complete(UNUSED_ATTR const RawAddress* bd_addr,
                                     UNUSED_ATTR tBT_TRANSPORT transport,
                                     void* p_ref_data, uint8_t res) {
   tHID_DEV_DEV_CTB* p_dev = (tHID_DEV_DEV_CTB*)p_ref_data;
@@ -140,7 +140,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void hidd_sec_check_complete_orig(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+void hidd_sec_check_complete_orig(UNUSED_ATTR const RawAddress* bd_addr,
                                   UNUSED_ATTR tBT_TRANSPORT transport,
                                   void* p_ref_data, uint8_t res) {
   tHID_DEV_DEV_CTB* p_dev = (tHID_DEV_DEV_CTB*)p_ref_data;
@@ -173,7 +173,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void hidd_l2cif_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t cid,
+static void hidd_l2cif_connect_ind(const RawAddress& bd_addr, uint16_t cid,
                                    uint16_t psm, uint8_t id) {
   tHID_CONN* p_hcon;
   tHID_DEV_DEV_CTB* p_dev;
diff --git a/stack/hid/hidd_int.h b/stack/hid/hidd_int.h
index d8a7ffa..81e60ca 100644
--- a/stack/hid/hidd_int.h
+++ b/stack/hid/hidd_int.h
@@ -34,7 +34,7 @@
 
 typedef struct device_ctb {
   bool in_use;
-  bt_bdaddr_t addr;
+  RawAddress addr;
 
   uint8_t state;
 
diff --git a/stack/hid/hidh_api.cc b/stack/hid/hidh_api.cc
index 106cf47..704426f 100644
--- a/stack/hid/hidh_api.cc
+++ b/stack/hid/hidh_api.cc
@@ -48,7 +48,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-tHID_STATUS HID_HostGetSDPRecord(const bt_bdaddr_t& addr,
+tHID_STATUS HID_HostGetSDPRecord(const RawAddress& addr,
                                  tSDP_DISCOVERY_DB* p_db, uint32_t db_len,
                                  tHID_HOST_SDP_CALLBACK* sdp_cback) {
   tSDP_UUID uuid_list;
@@ -317,7 +317,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-tHID_STATUS HID_HostAddDev(const bt_bdaddr_t& addr, uint16_t attr_mask,
+tHID_STATUS HID_HostAddDev(const RawAddress& addr, uint16_t attr_mask,
                            uint8_t* handle) {
   int i;
   /* Find an entry for this device in hh_cb.devices array */
@@ -519,7 +519,7 @@
  * Returns          true if device is HID Device else false
  *
  ******************************************************************************/
-bool hid_known_hid_device(const bt_bdaddr_t& bd_addr) {
+bool hid_known_hid_device(const RawAddress& bd_addr) {
   uint8_t i;
   tBTM_INQ_INFO* p_inq_info = BTM_InqDbRead(bd_addr);
 
diff --git a/stack/hid/hidh_conn.cc b/stack/hid/hidh_conn.cc
index 3873bc7..18723bc 100644
--- a/stack/hid/hidh_conn.cc
+++ b/stack/hid/hidh_conn.cc
@@ -52,7 +52,7 @@
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
 /******************************************************************************/
-static void hidh_l2cif_connect_ind(const bt_bdaddr_t& bd_addr,
+static void hidh_l2cif_connect_ind(const RawAddress& bd_addr,
                                    uint16_t l2cap_cid, uint16_t psm,
                                    uint8_t l2cap_id);
 static void hidh_l2cif_connect_cfm(uint16_t l2cap_cid, uint16_t result);
@@ -159,7 +159,7 @@
  *                  send security block L2C connection response.
  *
  ******************************************************************************/
-void hidh_sec_check_complete_term(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+void hidh_sec_check_complete_term(UNUSED_ATTR const RawAddress* bd_addr,
                                   UNUSED_ATTR tBT_TRANSPORT transport,
                                   void* p_ref_data, uint8_t res) {
   tHID_HOST_DEV_CTB* p_dev = (tHID_HOST_DEV_CTB*)p_ref_data;
@@ -200,7 +200,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void hidh_l2cif_connect_ind(const bt_bdaddr_t& bd_addr,
+static void hidh_l2cif_connect_ind(const RawAddress& bd_addr,
                                    uint16_t l2cap_cid, uint16_t psm,
                                    uint8_t l2cap_id) {
   tHID_CONN* p_hcon;
@@ -323,7 +323,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void hidh_sec_check_complete_orig(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+void hidh_sec_check_complete_orig(UNUSED_ATTR const RawAddress* bd_addr,
                                   UNUSED_ATTR tBT_TRANSPORT transport,
                                   void* p_ref_data, uint8_t res) {
   tHID_HOST_DEV_CTB* p_dev = (tHID_HOST_DEV_CTB*)p_ref_data;
diff --git a/stack/hid/hidh_int.h b/stack/hid/hidh_int.h
index 6d093c1..c332403 100644
--- a/stack/hid/hidh_int.h
+++ b/stack/hid/hidh_int.h
@@ -33,7 +33,7 @@
 
 typedef struct per_device_ctb {
   bool in_use;
-  bt_bdaddr_t addr;   /* BD-Addr of the host device */
+  RawAddress addr;    /* BD-Addr of the host device */
   uint16_t attr_mask; /* 0x01- virtual_cable; 0x02- normally_connectable; 0x03-
                          reconn_initiate;
                                  0x04- sdp_disable; */
diff --git a/stack/include/a2dp_api.h b/stack/include/a2dp_api.h
index 7e955d8..2ea3e1f 100644
--- a/stack/include/a2dp_api.h
+++ b/stack/include/a2dp_api.h
@@ -157,7 +157,7 @@
  *
  *****************************************************************************/
 extern tA2DP_STATUS A2DP_FindService(uint16_t service_uuid,
-                                     const bt_bdaddr_t& bd_addr,
+                                     const RawAddress& bd_addr,
                                      tA2DP_SDP_DB_PARAMS* p_db,
                                      tA2DP_FIND_CBACK* p_cback);
 
diff --git a/stack/include/a2dp_codec_api.h b/stack/include/a2dp_codec_api.h
index 8162628..a13e4aa 100644
--- a/stack/include/a2dp_codec_api.h
+++ b/stack/include/a2dp_codec_api.h
@@ -409,8 +409,8 @@
 
  private:
   struct CompareBtBdaddr
-      : public std::binary_function<bt_bdaddr_t, bt_bdaddr_t, bool> {
-    bool operator()(const bt_bdaddr_t& lhs, const bt_bdaddr_t& rhs) const {
+      : public std::binary_function<RawAddress, RawAddress, bool> {
+    bool operator()(const RawAddress& lhs, const RawAddress& rhs) const {
       return (memcmp(&lhs, &rhs, sizeof(lhs)) < 0);
     }
   };
@@ -430,7 +430,7 @@
   // A2DP Sink codecs ordered by priority
   std::list<A2dpCodecConfig*> ordered_sink_codecs_;
 
-  std::map<bt_bdaddr_t, IndexedCodecs*, CompareBtBdaddr> peer_codecs_;
+  std::map<RawAddress, IndexedCodecs*, CompareBtBdaddr> peer_codecs_;
 };
 
 /**
diff --git a/stack/include/avct_api.h b/stack/include/avct_api.h
index 0e44449..a0380b3 100644
--- a/stack/include/avct_api.h
+++ b/stack/include/avct_api.h
@@ -102,7 +102,7 @@
 
 /* Control callback function. */
 typedef void(tAVCT_CTRL_CBACK)(uint8_t handle, uint8_t event, uint16_t result,
-                               const bt_bdaddr_t* peer_addr);
+                               const RawAddress* peer_addr);
 
 /* Message callback function */
 /* p_pkt->layer_specific is AVCT_DATA_CTRL or AVCT_DATA_BROWSE */
@@ -172,7 +172,7 @@
  *
  ******************************************************************************/
 extern uint16_t AVCT_CreateConn(uint8_t* p_handle, tAVCT_CC* p_cc,
-                                const bt_bdaddr_t& peer_addr);
+                                const RawAddress& peer_addr);
 
 /*******************************************************************************
  *
diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h
index 6643934..fec0089 100644
--- a/stack/include/avdt_api.h
+++ b/stack/include/avdt_api.h
@@ -384,7 +384,7 @@
  * endpoints and for the AVDT_DiscoverReq() and AVDT_GetCapReq() functions.
  *
 */
-typedef void(tAVDT_CTRL_CBACK)(uint8_t handle, const bt_bdaddr_t* bd_addr,
+typedef void(tAVDT_CTRL_CBACK)(uint8_t handle, const RawAddress* bd_addr,
                                uint8_t event, tAVDT_CTRL* p_data);
 
 /* This is the data callback function.  It is executed when AVDTP has a media
@@ -403,7 +403,7 @@
                                  tAVDT_REPORT_DATA* p_data);
 #endif
 
-typedef uint16_t(tAVDT_GETCAP_REQ)(const bt_bdaddr_t& bd_addr, uint8_t seid,
+typedef uint16_t(tAVDT_GETCAP_REQ)(const RawAddress& bd_addr, uint8_t seid,
                                    tAVDT_CFG* p_cfg, tAVDT_CTRL_CBACK* p_cback);
 
 /* This structure contains information required when a stream is created.
@@ -533,7 +533,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern uint16_t AVDT_DiscoverReq(const bt_bdaddr_t& bd_addr,
+extern uint16_t AVDT_DiscoverReq(const RawAddress& bd_addr,
                                  tAVDT_SEP_INFO* p_sep_info, uint8_t max_seps,
                                  tAVDT_CTRL_CBACK* p_cback);
 
@@ -561,7 +561,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern uint16_t AVDT_GetCapReq(const bt_bdaddr_t& bd_addr, uint8_t seid,
+extern uint16_t AVDT_GetCapReq(const RawAddress& bd_addr, uint8_t seid,
                                tAVDT_CFG* p_cfg, tAVDT_CTRL_CBACK* p_cback);
 
 /*******************************************************************************
@@ -588,7 +588,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern uint16_t AVDT_GetAllCapReq(const bt_bdaddr_t& bd_addr, uint8_t seid,
+extern uint16_t AVDT_GetAllCapReq(const RawAddress& bd_addr, uint8_t seid,
                                   tAVDT_CFG* p_cfg, tAVDT_CTRL_CBACK* p_cback);
 
 /*******************************************************************************
@@ -618,7 +618,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern uint16_t AVDT_OpenReq(uint8_t handle, const bt_bdaddr_t& bd_addr,
+extern uint16_t AVDT_OpenReq(uint8_t handle, const RawAddress& bd_addr,
                              uint8_t seid, tAVDT_CFG* p_cfg);
 
 /*******************************************************************************
@@ -845,7 +845,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern uint16_t AVDT_ConnectReq(const bt_bdaddr_t& bd_addr, uint8_t sec_mask,
+extern uint16_t AVDT_ConnectReq(const RawAddress& bd_addr, uint8_t sec_mask,
                                 tAVDT_CTRL_CBACK* p_cback);
 
 /*******************************************************************************
@@ -860,7 +860,7 @@
  * Returns          AVDT_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern uint16_t AVDT_DisconnectReq(const bt_bdaddr_t& bd_addr,
+extern uint16_t AVDT_DisconnectReq(const RawAddress& bd_addr,
                                    tAVDT_CTRL_CBACK* p_cback);
 
 /*******************************************************************************
@@ -885,7 +885,7 @@
  *
  ******************************************************************************/
 extern uint16_t AVDT_GetSignalChannel(uint8_t handle,
-                                      const bt_bdaddr_t& bd_addr);
+                                      const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
diff --git a/stack/include/avdtc_api.h b/stack/include/avdtc_api.h
index df108a4..60a7c5f 100644
--- a/stack/include/avdtc_api.h
+++ b/stack/include/avdtc_api.h
@@ -69,7 +69,7 @@
   tAVDT_MULTI suspend_ind;
 } tAVDTC_CTRL;
 
-typedef void tAVDTC_CTRL_CBACK(uint8_t handle, const bt_bdaddr_t& bd_addr,
+typedef void tAVDTC_CTRL_CBACK(uint8_t handle, const RawAddress& bd_addr,
                                uint8_t event, tAVDTC_CTRL* p_data);
 
 /*******************************************************************************
@@ -94,7 +94,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void AVDTC_DiscoverRsp(const bt_bdaddr_t& bd_addr, uint8_t label,
+extern void AVDTC_DiscoverRsp(const RawAddress& bd_addr, uint8_t label,
                               tAVDT_SEP_INFO sep_info[], uint8_t num_seps);
 
 /*******************************************************************************
@@ -106,7 +106,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void AVDTC_GetCapRsp(const bt_bdaddr_t& bd_addr, uint8_t label,
+extern void AVDTC_GetCapRsp(const RawAddress& bd_addr, uint8_t label,
                             tAVDT_CFG* p_cap);
 
 /*******************************************************************************
@@ -118,7 +118,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void AVDTC_GetAllCapRsp(const bt_bdaddr_t& bd_addr, uint8_t label,
+extern void AVDTC_GetAllCapRsp(const RawAddress& bd_addr, uint8_t label,
                                tAVDT_CFG* p_cap);
 
 /*******************************************************************************
@@ -231,7 +231,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void AVDTC_Rej(uint8_t handle, const bt_bdaddr_t& bd_addr, uint8_t cmd,
+extern void AVDTC_Rej(uint8_t handle, const RawAddress& bd_addr, uint8_t cmd,
                       uint8_t label, uint8_t err_code, uint8_t err_param);
 
 #endif /* AVDT_CAPI_H */
diff --git a/stack/include/avrc_api.h b/stack/include/avrc_api.h
index e63fb16..cfac8d7 100644
--- a/stack/include/avrc_api.h
+++ b/stack/include/avrc_api.h
@@ -166,7 +166,7 @@
 /* This is the control callback function.  This function passes events
  * listed in Table 20 to the application. */
 typedef void(tAVRC_CTRL_CBACK)(uint8_t handle, uint8_t event, uint16_t result,
-                               const bt_bdaddr_t* peer_addr);
+                               const RawAddress* peer_addr);
 
 /* This is the message callback function.  It is executed when AVCTP has
  * a message packet ready for the application.  The implementation of this
@@ -272,7 +272,7 @@
  *
  *****************************************************************************/
 extern uint16_t AVRC_FindService(uint16_t service_uuid,
-                                 const bt_bdaddr_t& bd_addr,
+                                 const RawAddress& bd_addr,
                                  tAVRC_SDP_DB_PARAMS* p_db,
                                  tAVRC_FIND_CBACK* p_cback);
 
@@ -325,7 +325,7 @@
  *
  *****************************************************************************/
 extern uint16_t AVRC_Open(uint8_t* p_handle, tAVRC_CONN_CB* p_ccb,
-                          const bt_bdaddr_t& peer_addr);
+                          const RawAddress& peer_addr);
 
 /******************************************************************************
  *
diff --git a/stack/include/ble_advertiser.h b/stack/include/ble_advertiser.h
index 1fd8615..5452881 100644
--- a/stack/include/ble_advertiser.h
+++ b/stack/include/ble_advertiser.h
@@ -35,7 +35,7 @@
 void btm_ble_update_dmt_flag_bits(uint8_t* flag_value,
                                   const uint16_t connect_mode,
                                   const uint16_t disc_mode);
-void btm_acl_update_conn_addr(uint8_t conn_handle, const bt_bdaddr_t& address);
+void btm_acl_update_conn_addr(uint8_t conn_handle, const RawAddress& address);
 
 // methods we expose to c code:
 void btm_ble_multi_adv_cleanup(void);
@@ -153,7 +153,7 @@
       uint8_t num_completed_extended_adv_events) = 0;
 
   using GetAddressCallback =
-      base::Callback<void(uint8_t /* address_type*/, bt_bdaddr_t /*address*/)>;
+      base::Callback<void(uint8_t /* address_type*/, RawAddress /*address*/)>;
   virtual void GetOwnAddress(uint8_t inst_id, GetAddressCallback cb) = 0;
 };
 
diff --git a/stack/include/bnep_api.h b/stack/include/bnep_api.h
index 7a6bd4f..4116ac9 100644
--- a/stack/include/bnep_api.h
+++ b/stack/include/bnep_api.h
@@ -81,7 +81,7 @@
  *                  All values are used to indicate the reason for failure
  *              Flag to indicate if it is just a role change
 */
-typedef void(tBNEP_CONN_STATE_CB)(uint16_t handle, const bt_bdaddr_t& rem_bda,
+typedef void(tBNEP_CONN_STATE_CB)(uint16_t handle, const RawAddress& rem_bda,
                                   tBNEP_RESULT result, bool is_role_change);
 
 /* Connection indication callback prototype. Parameters are
@@ -90,7 +90,7 @@
  *              When BNEP calls this function profile should
  *              use BNEP_ConnectResp call to accept or reject the request
 */
-typedef void(tBNEP_CONNECT_IND_CB)(uint16_t handle, const bt_bdaddr_t& bd_addr,
+typedef void(tBNEP_CONNECT_IND_CB)(uint16_t handle, const RawAddress& bd_addr,
                                    tBT_UUID* remote_uuid, tBT_UUID* local_uuid,
                                    bool is_role_change);
 
@@ -103,8 +103,8 @@
  *              Flag to indicate whether extension headers to be forwarded are
  *                present
  */
-typedef void(tBNEP_DATA_BUF_CB)(uint16_t handle, const bt_bdaddr_t& src,
-                                const bt_bdaddr_t& dst, uint16_t protocol,
+typedef void(tBNEP_DATA_BUF_CB)(uint16_t handle, const RawAddress& src,
+                                const RawAddress& dst, uint16_t protocol,
                                 BT_HDR* p_buf, bool fw_ext_present);
 
 /* Data received indication callback prototype. Parameters are
@@ -117,8 +117,8 @@
  *              Flag to indicate whether extension headers to be forwarded are
  *                present
  */
-typedef void(tBNEP_DATA_IND_CB)(uint16_t handle, const bt_bdaddr_t& src,
-                                const bt_bdaddr_t& dst, uint16_t protocol,
+typedef void(tBNEP_DATA_IND_CB)(uint16_t handle, const RawAddress& src,
+                                const RawAddress& dst, uint16_t protocol,
                                 uint8_t* p_data, uint16_t len,
                                 bool fw_ext_present);
 
@@ -182,7 +182,7 @@
   uint8_t con_status;
 
   uint16_t l2cap_cid;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
   uint16_t rem_mtu_size;
   uint16_t xmit_q_depth;
 
@@ -245,7 +245,7 @@
  *                  BNEP_NO_RESOURCES           if no resources
  *
  ******************************************************************************/
-extern tBNEP_RESULT BNEP_Connect(const bt_bdaddr_t& p_rem_bda,
+extern tBNEP_RESULT BNEP_Connect(const RawAddress& p_rem_bda,
                                  tBT_UUID* src_uuid, tBT_UUID* dst_uuid,
                                  uint16_t* p_handle);
 
@@ -304,9 +304,9 @@
  *
  ******************************************************************************/
 extern tBNEP_RESULT BNEP_WriteBuf(uint16_t handle,
-                                  const bt_bdaddr_t& p_dest_addr, BT_HDR* p_buf,
+                                  const RawAddress& p_dest_addr, BT_HDR* p_buf,
                                   uint16_t protocol,
-                                  const bt_bdaddr_t* p_src_addr,
+                                  const RawAddress* p_src_addr,
                                   bool fw_ext_present);
 
 /*******************************************************************************
@@ -333,9 +333,9 @@
  *                  BNEP_SUCCESS            - If written successfully
  *
  ******************************************************************************/
-extern tBNEP_RESULT BNEP_Write(uint16_t handle, const bt_bdaddr_t& p_dest_addr,
+extern tBNEP_RESULT BNEP_Write(uint16_t handle, const RawAddress& p_dest_addr,
                                uint8_t* p_data, uint16_t len, uint16_t protocol,
-                               const bt_bdaddr_t* p_src_addr,
+                               const RawAddress* p_src_addr,
                                bool fw_ext_present);
 
 /*******************************************************************************
diff --git a/stack/include/bt_types.h b/stack/include/bt_types.h
index 7b92074..7da2c42 100644
--- a/stack/include/bt_types.h
+++ b/stack/include/bt_types.h
@@ -530,27 +530,27 @@
 #include <base/strings/stringprintf.h>
 #include <hardware/bluetooth.h>
 
-inline bool operator==(const bt_bdaddr_t& lhs, const bt_bdaddr_t& rhs) {
+inline bool operator==(const RawAddress& lhs, const RawAddress& rhs) {
   return memcmp(&lhs, &rhs, sizeof(lhs)) == 0;
 }
 
-inline bool operator!=(const bt_bdaddr_t& lhs, const bt_bdaddr_t& rhs) {
+inline bool operator!=(const RawAddress& lhs, const RawAddress& rhs) {
   return !(lhs == rhs);
 }
 
-inline std::ostream& operator<<(std::ostream& os, const bt_bdaddr_t& a) {
+inline std::ostream& operator<<(std::ostream& os, const RawAddress& a) {
   os << base::StringPrintf("%02x:%02x:%02x:%02x:%02x:%02x", a.address[0],
                            a.address[1], a.address[2], a.address[3],
                            a.address[4], a.address[5]);
   return os;
 }
 
-inline void BDADDR_TO_STREAM(uint8_t*& p, const bt_bdaddr_t& a) {
+inline void BDADDR_TO_STREAM(uint8_t*& p, const RawAddress& a) {
   for (int ijk = 0; ijk < BD_ADDR_LEN; ijk++)
     *(p)++ = (uint8_t)(a.address)[BD_ADDR_LEN - 1 - ijk];
 }
 
-inline void STREAM_TO_BDADDR(bt_bdaddr_t& a, uint8_t*& p) {
+inline void STREAM_TO_BDADDR(RawAddress& a, uint8_t*& p) {
   uint8_t* pbda = (uint8_t*)(a.address) + BD_ADDR_LEN - 1;
   for (int ijk = 0; ijk < BD_ADDR_LEN; ijk++) *pbda-- = *(p)++;
 }
@@ -761,7 +761,7 @@
 #ifdef __cplusplus
 struct tBLE_BD_ADDR {
   tBLE_ADDR_TYPE type;
-  bt_bdaddr_t bda;
+  RawAddress bda;
 };
 #endif
 
@@ -953,10 +953,10 @@
 
 /* global constant for "any" bd addr */
 #ifdef __cplusplus
-static const bt_bdaddr_t bd_addr_any = {
+static const RawAddress bd_addr_any = {
     .address = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}};
 
-static const bt_bdaddr_t bd_addr_empty = {
+static const RawAddress bd_addr_empty = {
     .address = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
 
 #endif
diff --git a/stack/include/btm_api.h b/stack/include/btm_api.h
index 2b5d714..e94b0e7 100644
--- a/stack/include/btm_api.h
+++ b/stack/include/btm_api.h
@@ -534,7 +534,7 @@
  *                  BTM_WRONG_MODE if the device is not up.
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ReadRemoteDeviceName(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_ReadRemoteDeviceName(const RawAddress& remote_bda,
                                             tBTM_CMPL_CB* p_cb,
                                             tBT_TRANSPORT transport);
 
@@ -566,7 +566,7 @@
  * Returns          BTM_SUCCESS if successful, otherwise an error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ReadRemoteVersion(const bt_bdaddr_t& addr,
+extern tBTM_STATUS BTM_ReadRemoteVersion(const RawAddress& addr,
                                          uint8_t* lmp_version,
                                          uint16_t* manufacturer,
                                          uint16_t* lmp_sub_version);
@@ -584,7 +584,7 @@
  * Returns          pointer to the remote supported features mask
  *
  ******************************************************************************/
-extern uint8_t* BTM_ReadRemoteFeatures(const bt_bdaddr_t& addr);
+extern uint8_t* BTM_ReadRemoteFeatures(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -603,7 +603,7 @@
  *                  or NULL if page_number is not valid
  *
  ******************************************************************************/
-extern uint8_t* BTM_ReadRemoteExtendedFeatures(const bt_bdaddr_t& addr,
+extern uint8_t* BTM_ReadRemoteExtendedFeatures(const RawAddress& addr,
                                                uint8_t page_number);
 
 /*******************************************************************************
@@ -616,7 +616,7 @@
  * Returns          number of features pages read from the remote device
  *
  ******************************************************************************/
-extern uint8_t BTM_ReadNumberRemoteFeaturesPages(const bt_bdaddr_t& addr);
+extern uint8_t BTM_ReadNumberRemoteFeaturesPages(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -631,7 +631,7 @@
  *                  BTM_FEATURE_BYTES_PER_PAGE * (BTM_EXT_FEATURES_PAGE_MAX + 1)
  *
  ******************************************************************************/
-extern uint8_t* BTM_ReadAllRemoteFeatures(const bt_bdaddr_t& addr);
+extern uint8_t* BTM_ReadAllRemoteFeatures(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -645,7 +645,7 @@
  * Returns          pointer to entry, or NULL if not found
  *
  ******************************************************************************/
-extern tBTM_INQ_INFO* BTM_InqDbRead(const bt_bdaddr_t& p_bda);
+extern tBTM_INQ_INFO* BTM_InqDbRead(const RawAddress& p_bda);
 
 /*******************************************************************************
  *
@@ -688,7 +688,7 @@
  *                          is active, otherwise BTM_SUCCESS
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ClearInqDb(const bt_bdaddr_t* p_bda);
+extern tBTM_STATUS BTM_ClearInqDb(const RawAddress* p_bda);
 
 /*******************************************************************************
  *
@@ -716,7 +716,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated, otherwise error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetLinkPolicy(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_SetLinkPolicy(const RawAddress& remote_bda,
                                      uint16_t* settings);
 
 /*******************************************************************************
@@ -752,7 +752,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated, otherwise error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetLinkSuperTout(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_SetLinkSuperTout(const RawAddress& remote_bda,
                                         uint16_t timeout);
 /*******************************************************************************
  *
@@ -763,7 +763,7 @@
  * Returns          status of the operation
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_GetLinkSuperTout(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_GetLinkSuperTout(const RawAddress& remote_bda,
                                         uint16_t* p_timeout);
 
 /*******************************************************************************
@@ -776,7 +776,7 @@
  * Returns          true if connection is up, else false.
  *
  ******************************************************************************/
-extern bool BTM_IsAclConnectionUp(const bt_bdaddr_t& remote_bda,
+extern bool BTM_IsAclConnectionUp(const RawAddress& remote_bda,
                                   tBT_TRANSPORT transport);
 
 /*******************************************************************************
@@ -790,7 +790,7 @@
  *                  BTM_UNKNOWN_ADDR if no active link with bd addr specified
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_GetRole(const bt_bdaddr_t& remote_bd_addr,
+extern tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr,
                                uint8_t* p_role);
 
 /*******************************************************************************
@@ -811,7 +811,7 @@
  *                                       role switching
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SwitchRole(const bt_bdaddr_t& remote_bd_addr,
+extern tBTM_STATUS BTM_SwitchRole(const RawAddress& remote_bd_addr,
                                   uint8_t new_role, tBTM_CMPL_CB* p_cb);
 
 /*******************************************************************************
@@ -829,7 +829,7 @@
  *                  BTM_BUSY if command is already in progress
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ReadRSSI(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_ReadRSSI(const RawAddress& remote_bda,
                                 tBTM_CMPL_CB* p_cb);
 
 /*******************************************************************************
@@ -848,7 +848,7 @@
  *                  BTM_BUSY if command is already in progress
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ReadTxPower(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda,
                                    tBT_TRANSPORT transport, tBTM_CMPL_CB* p_cb);
 
 /*******************************************************************************
@@ -866,7 +866,7 @@
  *                  BTM_BUSY if command is already in progress
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ReadLinkQuality(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_ReadLinkQuality(const RawAddress& remote_bda,
                                        tBTM_CMPL_CB* p_cb);
 
 /*******************************************************************************
@@ -916,7 +916,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated, otherwise error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetQoS(const bt_bdaddr_t& bd, FLOW_SPEC* p_flow,
+extern tBTM_STATUS BTM_SetQoS(const RawAddress& bd, FLOW_SPEC* p_flow,
                               tBTM_CMPL_CB* p_cb);
 
 /*****************************************************************************
@@ -939,7 +939,7 @@
  *                                   with the sco index used for the connection.
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_CreateSco(const bt_bdaddr_t* remote_bda, bool is_orig,
+extern tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig,
                                  uint16_t pkt_types, uint16_t* p_sco_inx,
                                  tBTM_SCO_CB* p_conn_cb,
                                  tBTM_SCO_CB* p_disc_cb);
@@ -1030,7 +1030,7 @@
  * Returns          pointer to BD address or NULL if not known
  *
  ******************************************************************************/
-extern const bt_bdaddr_t* BTM_ReadScoBdAddr(uint16_t sco_inx);
+extern const RawAddress* BTM_ReadScoBdAddr(uint16_t sco_inx);
 
 /*******************************************************************************
  *
@@ -1232,7 +1232,7 @@
  * Returns          bool    true or false is device found
  *
  ******************************************************************************/
-extern bool BTM_GetSecurityFlags(const bt_bdaddr_t& bd_addr,
+extern bool BTM_GetSecurityFlags(const RawAddress& bd_addr,
                                  uint8_t* p_sec_flags);
 
 /*******************************************************************************
@@ -1250,7 +1250,7 @@
  * Returns          bool    true or false is device found
  *
  ******************************************************************************/
-extern bool BTM_GetSecurityFlagsByTransport(const bt_bdaddr_t& bd_addr,
+extern bool BTM_GetSecurityFlagsByTransport(const RawAddress& bd_addr,
                                             uint8_t* p_sec_flags,
                                             tBT_TRANSPORT transport);
 
@@ -1264,7 +1264,7 @@
  *                  otherwise, the trusted mask
  *
  ******************************************************************************/
-extern uint32_t* BTM_ReadTrustedMask(const bt_bdaddr_t& bd_addr);
+extern uint32_t* BTM_ReadTrustedMask(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1339,7 +1339,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTM_SetOutService(const bt_bdaddr_t& bd_addr, uint8_t service_id,
+extern void BTM_SetOutService(const RawAddress& bd_addr, uint8_t service_id,
                               uint32_t mx_chan_id);
 
 /*******************************************************************************
@@ -1369,7 +1369,7 @@
  * Returns          true if added OK, else false
  *
  ******************************************************************************/
-extern bool BTM_SecAddDevice(const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class,
+extern bool BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                              BD_NAME bd_name, uint8_t* features,
                              uint32_t trusted_mask[], LINK_KEY link_key,
                              uint8_t key_type, tBTM_IO_CAP io_cap,
@@ -1384,7 +1384,7 @@
  * Returns          true if rmoved OK, false if not found
  *
  ******************************************************************************/
-extern bool BTM_SecDeleteDevice(const bt_bdaddr_t& bd_addr);
+extern bool BTM_SecDeleteDevice(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1394,7 +1394,7 @@
  *                  remove device.
  *
  ******************************************************************************/
-extern void BTM_SecClearSecurityFlags(const bt_bdaddr_t& bd_addr);
+extern void BTM_SecClearSecurityFlags(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1408,7 +1408,7 @@
  * Returns          BTM_SUCCESS if successful, otherwise error code
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SecGetDeviceLinkKey(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS BTM_SecGetDeviceLinkKey(const RawAddress& bd_addr,
                                            LINK_KEY link_key);
 
 /*******************************************************************************
@@ -1426,7 +1426,7 @@
  *
  ******************************************************************************/
 extern tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType(
-    const bt_bdaddr_t& bd_addr);
+    const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1447,7 +1447,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTM_PINCodeReply(const bt_bdaddr_t& bd_addr, uint8_t res,
+extern void BTM_PINCodeReply(const RawAddress& bd_addr, uint8_t res,
                              uint8_t pin_len, uint8_t* p_pin,
                              uint32_t trusted_mask[]);
 
@@ -1465,7 +1465,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated, otherwise error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SecBond(const bt_bdaddr_t& bd_addr, uint8_t pin_len,
+extern tBTM_STATUS BTM_SecBond(const RawAddress& bd_addr, uint8_t pin_len,
                                uint8_t* p_pin, uint32_t trusted_mask[]);
 
 /*******************************************************************************
@@ -1485,7 +1485,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated, otherwise error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SecBondByTransport(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS BTM_SecBondByTransport(const RawAddress& bd_addr,
                                           tBT_TRANSPORT transport,
                                           uint8_t pin_len, uint8_t* p_pin,
                                           uint32_t trusted_mask[]);
@@ -1500,7 +1500,7 @@
  * Returns          BTM_CMD_STARTED if successfully initiated, otherwise error
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SecBondCancel(const bt_bdaddr_t& bd_addr);
+extern tBTM_STATUS BTM_SecBondCancel(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1530,7 +1530,7 @@
  *                  BTM_MODE_UNSUPPORTED - if security manager not linked in.
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetEncryption(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr,
                                      tBT_TRANSPORT transport,
                                      tBTM_SEC_CBACK* p_callback,
                                      void* p_ref_data,
@@ -1548,7 +1548,7 @@
  *                  bd_addr       - Address of the peer device
  *
  ******************************************************************************/
-extern void BTM_ConfirmReqReply(tBTM_STATUS res, const bt_bdaddr_t& bd_addr);
+extern void BTM_ConfirmReqReply(tBTM_STATUS res, const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1564,7 +1564,7 @@
  *                                  0 - 999999(0xF423F).
  *
  ******************************************************************************/
-extern void BTM_PasskeyReqReply(tBTM_STATUS res, const bt_bdaddr_t& bd_addr,
+extern void BTM_PasskeyReqReply(tBTM_STATUS res, const RawAddress& bd_addr,
                                 uint32_t passkey);
 
 /*******************************************************************************
@@ -1581,7 +1581,7 @@
  *                  type - notification type
  *
  ******************************************************************************/
-extern void BTM_SendKeypressNotif(const bt_bdaddr_t& bd_addr,
+extern void BTM_SendKeypressNotif(const RawAddress& bd_addr,
                                   tBTM_SP_KEY_TYPE type);
 
 /*******************************************************************************
@@ -1599,7 +1599,7 @@
  *                  auth_req- MITM protection required or not.
  *
  ******************************************************************************/
-extern void BTM_IoCapRsp(const bt_bdaddr_t& bd_addr, tBTM_IO_CAP io_cap,
+extern void BTM_IoCapRsp(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
                          tBTM_OOB_DATA oob, tBTM_AUTH_REQ auth_req);
 
 /*******************************************************************************
@@ -1624,7 +1624,7 @@
  *                  r           - simple pairing Randomizer  C.
  *
  ******************************************************************************/
-extern void BTM_RemoteOobDataReply(tBTM_STATUS res, const bt_bdaddr_t& bd_addr,
+extern void BTM_RemoteOobDataReply(tBTM_STATUS res, const RawAddress& bd_addr,
                                    BT_OCTET16 c, BT_OCTET16 r);
 
 /*******************************************************************************
@@ -1663,7 +1663,7 @@
  *                  else false.
  *
  ******************************************************************************/
-extern bool BTM_BothEndsSupportSecureConnections(const bt_bdaddr_t& bd_addr);
+extern bool BTM_BothEndsSupportSecureConnections(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1678,7 +1678,7 @@
  *                  else false.
  *
  ******************************************************************************/
-extern bool BTM_PeerSupportsSecureConnections(const bt_bdaddr_t& bd_addr);
+extern bool BTM_PeerSupportsSecureConnections(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1708,7 +1708,7 @@
  * Returns          Pointer to the name or NULL
  *
  ******************************************************************************/
-extern char* BTM_SecReadDevName(const bt_bdaddr_t& bd_addr);
+extern char* BTM_SecReadDevName(const RawAddress& bd_addr);
 
 /*****************************************************************************
  *  POWER MANAGEMENT FUNCTIONS
@@ -1738,8 +1738,7 @@
  *                  BTM_UNKNOWN_ADDR if bd addr is not active or bad
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id,
-                                    const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
                                     tBTM_PM_PWR_MD* p_mode);
 
 /*******************************************************************************
@@ -1762,7 +1761,7 @@
  *                  BTM_UNKNOWN_ADDR if bd addr is not active or bad
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_ReadPowerMode(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_ReadPowerMode(const RawAddress& remote_bda,
                                      tBTM_PM_MODE* p_mode);
 
 /*******************************************************************************
@@ -1783,7 +1782,7 @@
  *                  BTM_CMD_STORED if the command is stored
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetSsrParams(const bt_bdaddr_t& remote_bda,
+extern tBTM_STATUS BTM_SetSsrParams(const RawAddress& remote_bda,
                                     uint16_t max_lat, uint16_t min_rmt_to,
                                     uint16_t min_loc_to);
 
@@ -1797,7 +1796,7 @@
  * Returns          the handle of the connection, or 0xFFFF if none.
  *
  ******************************************************************************/
-extern uint16_t BTM_GetHCIConnHandle(const bt_bdaddr_t& remote_bda,
+extern uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda,
                                      tBT_TRANSPORT transport);
 
 /*******************************************************************************
@@ -1813,7 +1812,7 @@
  *                                 the results
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_DeleteStoredLinkKey(const bt_bdaddr_t* bd_addr,
+extern tBTM_STATUS BTM_DeleteStoredLinkKey(const RawAddress* bd_addr,
                                            tBTM_CMPL_CB* p_cb);
 
 /*******************************************************************************
diff --git a/stack/include/btm_api_types.h b/stack/include/btm_api_types.h
index a0ceb45..61f5f1e 100644
--- a/stack/include/btm_api_types.h
+++ b/stack/include/btm_api_types.h
@@ -131,7 +131,7 @@
  * Parameters are the BD Address of remote and the Dev Class of remote. If the
  * app returns none zero, the connection or inquiry result will be dropped.
 */
-typedef uint8_t(tBTM_FILTER_CB)(const bt_bdaddr_t& bd_addr, DEV_CLASS dc);
+typedef uint8_t(tBTM_FILTER_CB)(const RawAddress& bd_addr, DEV_CLASS dc);
 
 /*****************************************************************************
  *  DEVICE DISCOVERY - Inquiry, Remote Name, Discovery, Class of Device
@@ -594,7 +594,7 @@
 
 typedef union /* contains the inquiry filter condition */
 {
-  bt_bdaddr_t bdaddr_cond;
+  RawAddress bdaddr_cond;
   tBTM_COD_COND cod_cond;
 } tBTM_INQ_FILT_COND;
 
@@ -635,7 +635,7 @@
 */
 typedef struct {
   uint16_t clock_offset;
-  bt_bdaddr_t remote_bd_addr;
+  RawAddress remote_bd_addr;
   DEV_CLASS dev_class;
   uint8_t page_scan_rep_mode;
   uint8_t page_scan_per_mode;
@@ -684,7 +684,7 @@
 /* Structure returned with remote name  request */
 typedef struct {
   uint16_t status;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t length;
   BD_NAME remote_bd_name;
 } tBTM_REMOTE_DEV_NAME;
@@ -755,7 +755,7 @@
 typedef struct {
   uint8_t hci_status;     /* HCI status returned with the event */
   uint8_t role;           /* BTM_ROLE_MASTER or BTM_ROLE_SLAVE */
-  bt_bdaddr_t remote_bd_addr; /* Remote BD addr involved with the switch */
+  RawAddress remote_bd_addr; /* Remote BD addr involved with the switch */
 } tBTM_ROLE_SWITCH_CMPL;
 
 /* Structure returned with QoS information (in tBTM_CMPL_CB callback function)
@@ -774,7 +774,7 @@
   tBTM_STATUS status;
   uint8_t hci_status;
   int8_t rssi;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
 } tBTM_RSSI_RESULTS;
 
 /* Structure returned with read current TX power event (in tBTM_CMPL_CB callback
@@ -784,7 +784,7 @@
   tBTM_STATUS status;
   uint8_t hci_status;
   int8_t tx_power;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
 } tBTM_TX_POWER_RESULTS;
 
 /* Structure returned with read link quality event (in tBTM_CMPL_CB callback
@@ -794,7 +794,7 @@
   tBTM_STATUS status;
   uint8_t hci_status;
   uint8_t link_quality;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
 } tBTM_LINK_QUALITY_RESULTS;
 
 /* Structure returned with read inq tx power quality event (in tBTM_CMPL_CB
@@ -828,7 +828,7 @@
 /* the data type associated with BTM_BL_CONN_EVT */
 typedef struct {
   tBTM_BL_EVENT event;     /* The event reported. */
-  const bt_bdaddr_t* p_bda; /* The address of the newly connected device */
+  const RawAddress* p_bda; /* The address of the newly connected device */
   DEV_CLASS_PTR p_dc;      /* The device class */
   BD_NAME_PTR p_bdn;       /* The device name */
   uint8_t* p_features;     /* pointer to the remote device's features page[0]
@@ -840,7 +840,7 @@
 /* the data type associated with BTM_BL_DISCN_EVT */
 typedef struct {
   tBTM_BL_EVENT event;     /* The event reported. */
-  const bt_bdaddr_t* p_bda; /* The address of the disconnected device */
+  const RawAddress* p_bda; /* The address of the disconnected device */
   uint16_t handle;         /* disconnected connection handle */
   tBT_TRANSPORT transport; /* link is LE link or not */
 } tBTM_BL_DISCN_DATA;
@@ -864,7 +864,7 @@
 /* the data type associated with BTM_BL_ROLE_CHG_EVT */
 typedef struct {
   tBTM_BL_EVENT event; /* The event reported. */
-  const bt_bdaddr_t* p_bda; /* The address of the peer connected device */
+  const RawAddress* p_bda; /* The address of the peer connected device */
   uint8_t new_role;
   uint8_t hci_status; /* HCI status returned with the event */
 } tBTM_BL_ROLE_CHG_DATA;
@@ -890,7 +890,7 @@
  * changes. First param is BD address, second is if added or removed.
  * Registered through BTM_AclRegisterForChanges call.
 */
-typedef void(tBTM_ACL_DB_CHANGE_CB)(const bt_bdaddr_t& p_bda, DEV_CLASS p_dc,
+typedef void(tBTM_ACL_DB_CHANGE_CB)(const RawAddress& p_bda, DEV_CLASS p_dc,
                                     BD_NAME p_bdn, uint8_t* features,
                                     bool is_new, uint16_t handle,
                                     tBT_TRANSPORT transport);
@@ -988,7 +988,7 @@
 typedef struct {
   uint16_t rx_pkt_len;
   uint16_t tx_pkt_len;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t link_type; /* BTM_LINK_TYPE_SCO or BTM_LINK_TYPE_ESCO */
   uint8_t tx_interval;
   uint8_t retrans_window;
@@ -999,7 +999,7 @@
   uint16_t sco_inx;
   uint16_t rx_pkt_len;
   uint16_t tx_pkt_len;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t hci_status;
   uint8_t tx_interval;
   uint8_t retrans_window;
@@ -1007,7 +1007,7 @@
 
 typedef struct {
   uint16_t sco_inx;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   DEV_CLASS dev_class;
   tBTM_SCO_TYPE link_type;
 } tBTM_ESCO_CONN_REQ_EVT_DATA;
@@ -1302,7 +1302,7 @@
  *              Result of the operation
 */
 typedef uint8_t(tBTM_AUTHORIZE_CALLBACK)(
-    const bt_bdaddr_t& bd_addr, DEV_CLASS dev_class, tBTM_BD_NAME bd_name,
+    const RawAddress& bd_addr, DEV_CLASS dev_class, tBTM_BD_NAME bd_name,
     uint8_t* service_name, uint8_t service_id, bool is_originator);
 
 /* Get PIN for the connection.  Parameters are
@@ -1311,7 +1311,7 @@
  *              BD Name of remote
  *              Flag indicating the minimum pin code length to be 16 digits
 */
-typedef uint8_t(tBTM_PIN_CALLBACK)(const bt_bdaddr_t& bd_addr,
+typedef uint8_t(tBTM_PIN_CALLBACK)(const RawAddress& bd_addr,
                                    DEV_CLASS dev_class, tBTM_BD_NAME bd_name,
                                    bool min_16_digit);
 
@@ -1320,7 +1320,7 @@
  *              Link Key
  *              Key Type: Combination, Local Unit, or Remote Unit
 */
-typedef uint8_t(tBTM_LINK_KEY_CALLBACK)(const bt_bdaddr_t& bd_addr,
+typedef uint8_t(tBTM_LINK_KEY_CALLBACK)(const RawAddress& bd_addr,
                                         DEV_CLASS dev_class,
                                         tBTM_BD_NAME bd_name, uint8_t* key,
                                         uint8_t key_type);
@@ -1329,7 +1329,7 @@
  *              BD Address of remote
  *              BD Name of remote
 */
-typedef void(tBTM_RMT_NAME_CALLBACK)(const bt_bdaddr_t& bd_addr, DEV_CLASS dc,
+typedef void(tBTM_RMT_NAME_CALLBACK)(const RawAddress& bd_addr, DEV_CLASS dc,
                                      tBTM_BD_NAME bd_name);
 
 /* Authentication complete for the connection.  Parameters are
@@ -1338,7 +1338,7 @@
  *              BD Name of remote
  *
 */
-typedef uint8_t(tBTM_AUTH_COMPLETE_CALLBACK)(const bt_bdaddr_t& bd_addr,
+typedef uint8_t(tBTM_AUTH_COMPLETE_CALLBACK)(const RawAddress& bd_addr,
                                              DEV_CLASS dev_class,
                                              tBTM_BD_NAME bd_name, int result);
 
@@ -1406,7 +1406,7 @@
 
 /* data type for BTM_SP_IO_REQ_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;    /* peer address */
+  RawAddress bd_addr;     /* peer address */
   tBTM_IO_CAP io_cap;     /* local IO capabilities */
   tBTM_OOB_DATA oob_data; /* OOB data present (locally) for the peer device */
   tBTM_AUTH_REQ auth_req; /* Authentication required (for local device) */
@@ -1415,7 +1415,7 @@
 
 /* data type for BTM_SP_IO_RSP_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   tBTM_IO_CAP io_cap; /* peer IO capabilities */
   tBTM_OOB_DATA
       oob_data; /* OOB data present at peer device for the local device */
@@ -1424,7 +1424,7 @@
 
 /* data type for BTM_SP_CFM_REQ_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;  /* peer address */
+  RawAddress bd_addr;   /* peer address */
   DEV_CLASS dev_class;  /* peer CoD */
   tBTM_BD_NAME bd_name; /* peer device name */
   uint32_t num_val; /* the numeric value for comparison. If just_works, do not
@@ -1438,14 +1438,14 @@
 
 /* data type for BTM_SP_KEY_REQ_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;  /* peer address */
+  RawAddress bd_addr;   /* peer address */
   DEV_CLASS dev_class;  /* peer CoD */
   tBTM_BD_NAME bd_name; /* peer device name */
 } tBTM_SP_KEY_REQ;
 
 /* data type for BTM_SP_KEY_NOTIF_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;  /* peer address */
+  RawAddress bd_addr;   /* peer address */
   DEV_CLASS dev_class;  /* peer CoD */
   tBTM_BD_NAME bd_name; /* peer device name */
   uint32_t passkey;     /* passkey */
@@ -1463,7 +1463,7 @@
 
 /* data type for BTM_SP_KEYPRESS_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   tBTM_SP_KEY_TYPE notif_type;
 } tBTM_SP_KEYPRESS;
 
@@ -1476,14 +1476,14 @@
 
 /* data type for BTM_SP_RMT_OOB_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;  /* peer address */
+  RawAddress bd_addr;   /* peer address */
   DEV_CLASS dev_class;  /* peer CoD */
   tBTM_BD_NAME bd_name; /* peer device name */
 } tBTM_SP_RMT_OOB;
 
 /* data type for BTM_SP_COMPLT_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr;  /* peer address */
+  RawAddress bd_addr;   /* peer address */
   DEV_CLASS dev_class;  /* peer CoD */
   tBTM_BD_NAME bd_name; /* peer device name */
   tBTM_STATUS status;   /* status of the simple pairing process */
@@ -1491,7 +1491,7 @@
 
 /* data type for BTM_SP_UPGRADE_EVT */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* peer address */
+  RawAddress bd_addr; /* peer address */
   bool upgrade;    /* true, to upgrade the link key */
 } tBTM_SP_UPGRADE;
 
@@ -1513,7 +1513,7 @@
 */
 typedef uint8_t(tBTM_SP_CALLBACK)(tBTM_SP_EVT event, tBTM_SP_EVT_DATA* p_data);
 
-typedef void(tBTM_MKEY_CALLBACK)(const bt_bdaddr_t& bd_addr, uint8_t status,
+typedef void(tBTM_MKEY_CALLBACK)(const RawAddress& bd_addr, uint8_t status,
                                  uint8_t key_flag);
 
 /* Encryption enabled/disabled complete: Optionally passed with
@@ -1523,9 +1523,8 @@
  *              optional data passed in by BTM_SetEncryption
  *              tBTM_STATUS - result of the operation
 */
-typedef void(tBTM_SEC_CBACK)(const bt_bdaddr_t* bd_addr,
-                             tBT_TRANSPORT trasnport, void* p_ref_data,
-                             tBTM_STATUS result);
+typedef void(tBTM_SEC_CBACK)(const RawAddress* bd_addr, tBT_TRANSPORT trasnport,
+                             void* p_ref_data, tBTM_STATUS result);
 
 /* Bond Cancel complete. Parameters are
  *              Result of the cancel operation
@@ -1655,7 +1654,7 @@
 typedef struct {
   BT_OCTET16 irk;
   tBLE_ADDR_TYPE addr_type;
-  bt_bdaddr_t static_addr;
+  RawAddress static_addr;
 } tBTM_LE_PID_KEYS;
 
 typedef union {
@@ -1687,7 +1686,7 @@
 /* Simple Pairing Events.  Called by the stack when Simple Pairing related
  * events occur.
 */
-typedef uint8_t(tBTM_LE_CALLBACK)(tBTM_LE_EVT event, const bt_bdaddr_t& bda,
+typedef uint8_t(tBTM_LE_CALLBACK)(tBTM_LE_EVT event, const RawAddress& bda,
                                   tBTM_LE_EVT_DATA* p_data);
 
 #define BTM_BLE_KEY_TYPE_ID 1
@@ -1729,7 +1728,7 @@
 /* Callback function for when a link supervision timeout event occurs.
  * This asynchronous event is enabled/disabled by calling BTM_RegForLstoEvt().
 */
-typedef void(tBTM_LSTO_CBACK)(const bt_bdaddr_t& remote_bda, uint16_t timeout);
+typedef void(tBTM_LSTO_CBACK)(const RawAddress& remote_bda, uint16_t timeout);
 
 /*****************************************************************************
  *  POWER MANAGEMENT
@@ -1783,7 +1782,7 @@
 /*************************************
  *  Power Manager Callback Functions
  *************************************/
-typedef void(tBTM_PM_STATUS_CBACK)(const bt_bdaddr_t& p_bda,
+typedef void(tBTM_PM_STATUS_CBACK)(const RawAddress& p_bda,
                                    tBTM_PM_STATUS status, uint16_t value,
                                    uint8_t hci_status);
 
@@ -1810,7 +1809,7 @@
 
 typedef struct {
   tBTM_MIP_EVT event;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint16_t mip_id;
 } tBTM_MIP_MODE_CHANGE;
 
@@ -1831,7 +1830,7 @@
 
 typedef struct {
   tBTM_MIP_EVT event;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t data[11]; /* data[0] shows Vender-specific device type */
 } tBTM_MIP_EIR_HANDSHAKE;
 
@@ -1853,7 +1852,7 @@
 typedef void(tBTM_MIP_EVENTS_CB)(tBTM_MIP_EVT event, tBTM_MIP_EVENT_DATA data);
 
 /* MIP Device query callback function  */
-typedef bool(tBTM_MIP_QUERY_CB)(const bt_bdaddr_t& dev_addr, uint8_t* p_mode,
+typedef bool(tBTM_MIP_QUERY_CB)(const RawAddress& dev_addr, uint8_t* p_mode,
                                 LINK_KEY link_key);
 
 /* ACL link on, SCO link ongoing, sniff mode */
diff --git a/stack/include/btm_ble_api.h b/stack/include/btm_ble_api.h
index 39da46e..36c8128 100644
--- a/stack/include/btm_ble_api.h
+++ b/stack/include/btm_ble_api.h
@@ -52,7 +52,7 @@
  * Returns          true if added OK, else false
  *
  ******************************************************************************/
-extern bool BTM_SecAddBleDevice(const bt_bdaddr_t& bd_addr, BD_NAME bd_name,
+extern bool BTM_SecAddBleDevice(const RawAddress& bd_addr, BD_NAME bd_name,
                                 tBT_DEVICE_TYPE dev_type,
                                 tBLE_ADDR_TYPE addr_type);
 
@@ -71,7 +71,7 @@
  * Returns          true if added OK, else false
  *
  ******************************************************************************/
-extern bool BTM_SecAddBleKey(const bt_bdaddr_t& bd_addr,
+extern bool BTM_SecAddBleKey(const RawAddress& bd_addr,
                              tBTM_LE_KEY_VALUE* p_le_key,
                              tBTM_LE_KEY_TYPE key_type);
 
@@ -248,7 +248,7 @@
  * Returns          None
  *
  ******************************************************************************/
-extern void BTM_SecurityGrant(const bt_bdaddr_t& bd_addr, uint8_t res);
+extern void BTM_SecurityGrant(const RawAddress& bd_addr, uint8_t res);
 
 /*******************************************************************************
  *
@@ -265,7 +265,7 @@
  *                               BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
  *
  ******************************************************************************/
-extern void BTM_BlePasskeyReply(const bt_bdaddr_t& bd_addr, uint8_t res,
+extern void BTM_BlePasskeyReply(const RawAddress& bd_addr, uint8_t res,
                                 uint32_t passkey);
 
 /*******************************************************************************
@@ -280,7 +280,7 @@
  *                  res          - comparison result BTM_SUCCESS if success
  *
  ******************************************************************************/
-extern void BTM_BleConfirmReply(const bt_bdaddr_t& bd_addr, uint8_t res);
+extern void BTM_BleConfirmReply(const RawAddress& bd_addr, uint8_t res);
 
 /*******************************************************************************
  *
@@ -294,7 +294,7 @@
  *                  p_data      - simple pairing Randomizer  C.
  *
  ******************************************************************************/
-extern void BTM_BleOobDataReply(const bt_bdaddr_t& bd_addr, uint8_t res,
+extern void BTM_BleOobDataReply(const RawAddress& bd_addr, uint8_t res,
                                 uint8_t len, uint8_t* p_data);
 
 /*******************************************************************************
@@ -310,7 +310,7 @@
  *                  p_r         - pointer to Randomizer.
  *
  ******************************************************************************/
-extern void BTM_BleSecureConnectionOobDataReply(const bt_bdaddr_t& bd_addr,
+extern void BTM_BleSecureConnectionOobDataReply(const RawAddress& bd_addr,
                                                 uint8_t* p_c, uint8_t* p_r);
 
 /*******************************************************************************
@@ -329,7 +329,7 @@
  * Returns          true if signing sucessul, otherwise false.
  *
  ******************************************************************************/
-extern bool BTM_BleDataSignature(const bt_bdaddr_t& bd_addr, uint8_t* p_text,
+extern bool BTM_BleDataSignature(const RawAddress& bd_addr, uint8_t* p_text,
                                  uint16_t len, BLE_SIGNATURE signature);
 
 /*******************************************************************************
@@ -347,7 +347,7 @@
  * Returns          true if signature verified correctly; otherwise false.
  *
  ******************************************************************************/
-extern bool BTM_BleVerifySignature(const bt_bdaddr_t& bd_addr, uint8_t* p_orig,
+extern bool BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig,
                                    uint16_t len, uint32_t counter,
                                    uint8_t* p_comp);
 
@@ -360,8 +360,8 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTM_ReadConnectionAddr(const bt_bdaddr_t& remote_bda,
-                                   bt_bdaddr_t& local_conn_addr,
+extern void BTM_ReadConnectionAddr(const RawAddress& remote_bda,
+                                   RawAddress& local_conn_addr,
                                    tBLE_ADDR_TYPE* p_addr_type);
 
 /*******************************************************************************
@@ -373,8 +373,8 @@
  * Returns          void
  *
  ******************************************************************************/
-extern bool BTM_ReadRemoteConnectionAddr(const bt_bdaddr_t& pseudo_addr,
-                                         bt_bdaddr_t& conn_addr,
+extern bool BTM_ReadRemoteConnectionAddr(const RawAddress& pseudo_addr,
+                                         RawAddress& conn_addr,
                                          tBLE_ADDR_TYPE* p_addr_type);
 
 /*******************************************************************************
@@ -415,7 +415,7 @@
  *
  ******************************************************************************/
 extern bool BTM_BleUpdateBgConnDev(bool add_remove,
-                                   const bt_bdaddr_t& remote_bda);
+                                   const RawAddress& remote_bda);
 
 /*******************************************************************************
  *
@@ -450,7 +450,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTM_BleSetPrefConnParams(const bt_bdaddr_t& bd_addr,
+extern void BTM_BleSetPrefConnParams(const RawAddress& bd_addr,
                                      uint16_t min_conn_int,
                                      uint16_t max_conn_int,
                                      uint16_t slave_latency,
@@ -523,7 +523,7 @@
  *                  p_addr_type: output parameter to read the address type.
  *
  ******************************************************************************/
-extern void BTM_ReadDevInfo(const bt_bdaddr_t& remote_bda,
+extern void BTM_ReadDevInfo(const RawAddress& remote_bda,
                             tBT_DEVICE_TYPE* p_dev_type,
                             tBLE_ADDR_TYPE* p_addr_type);
 
@@ -541,7 +541,7 @@
  * Return           true if an active link is identified; false otherwise
  *
  ******************************************************************************/
-extern bool BTM_ReadConnectedTransportAddress(bt_bdaddr_t* remote_bda,
+extern bool BTM_ReadConnectedTransportAddress(RawAddress* remote_bda,
                                               tBT_TRANSPORT transport);
 
 /*******************************************************************************
@@ -628,7 +628,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void BTM_BleTurnOnPrivacyOnRemote(const bt_bdaddr_t& bd_addr,
+extern void BTM_BleTurnOnPrivacyOnRemote(const RawAddress& bd_addr,
                                          bool privacy_on);
 
 /*******************************************************************************
@@ -692,7 +692,7 @@
  * Returns          true to use LE, false use BR/EDR.
  *
  ******************************************************************************/
-extern bool BTM_UseLeLink(const bt_bdaddr_t& bd_addr);
+extern bool BTM_UseLeLink(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -718,7 +718,7 @@
  * Returns          bool    true if LE device is found, false otherwise.
  *
  ******************************************************************************/
-extern bool BTM_GetLeSecurityState(const bt_bdaddr_t& bd_addr,
+extern bool BTM_GetLeSecurityState(const RawAddress& bd_addr,
                                    uint8_t* p_le_dev_sec_flags,
                                    uint8_t* p_le_key_size);
 
@@ -732,7 +732,7 @@
  * Returns          bool true if security procedure is running, false otherwise.
  *
  ******************************************************************************/
-extern bool BTM_BleSecurityProcedureIsRunning(const bt_bdaddr_t& bd_addr);
+extern bool BTM_BleSecurityProcedureIsRunning(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -745,7 +745,7 @@
  * Returns          the key size or 0 if the size can't be retrieved.
  *
  ******************************************************************************/
-extern uint8_t BTM_BleGetSupportedKeySize(const bt_bdaddr_t& bd_addr);
+extern uint8_t BTM_BleGetSupportedKeySize(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -828,7 +828,7 @@
  * Returns          BTM_SUCCESS if success; otherwise failed.
  *
  ******************************************************************************/
-extern tBTM_STATUS BTM_SetBleDataLength(const bt_bdaddr_t& bd_addr,
+extern tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr,
                                         uint16_t tx_pdu_length);
 
 /*******************************************************************************
@@ -842,7 +842,7 @@
  *
  ******************************************************************************/
 extern void BTM_BleReadPhy(
-    const bt_bdaddr_t& bd_addr,
+    const RawAddress& bd_addr,
     base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb);
 
 /*******************************************************************************
@@ -868,7 +868,7 @@
  * Returns          BTM_SUCCESS if success; otherwise failed.
  *
  ******************************************************************************/
-extern void BTM_BleSetPhy(const bt_bdaddr_t& bd_addr, uint8_t tx_phys,
+extern void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys,
                           uint8_t rx_phys, uint16_t phy_options);
 
 extern void btm_ble_multi_adv_cleanup(void);
diff --git a/stack/include/btm_ble_api_types.h b/stack/include/btm_ble_api_types.h
index 04c4f61..57ef0d1 100644
--- a/stack/include/btm_ble_api_types.h
+++ b/stack/include/btm_ble_api_types.h
@@ -474,7 +474,7 @@
 
 typedef struct {
   bool in_use;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   uint8_t pf_counter[BTM_BLE_PF_TYPE_MAX]; /* number of filter indexed by
                                               tBTM_BLE_PF_COND_TYPE */
 } tBTM_BLE_PF_COUNT;
diff --git a/stack/include/gap_api.h b/stack/include/gap_api.h
index 98d5b27..d9a7217 100644
--- a/stack/include/gap_api.h
+++ b/stack/include/gap_api.h
@@ -122,7 +122,7 @@
 /* Definition of the GAP_FindAddrByName results structure */
 typedef struct {
   uint16_t status;
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   tBTM_BD_NAME devname;
 } tGAP_FINDADDR_RESULTS;
 
@@ -135,14 +135,14 @@
 
 typedef union {
   tGAP_BLE_PREF_PARAM conn_param;
-  bt_bdaddr_t reconn_bda;
+  RawAddress reconn_bda;
   uint16_t icon;
   uint8_t* p_dev_name;
   uint8_t addr_resolution;
 
 } tGAP_BLE_ATTR_VALUE;
 
-typedef void(tGAP_BLE_CMPL_CBACK)(bool status, const bt_bdaddr_t& addr,
+typedef void(tGAP_BLE_CMPL_CBACK)(bool status, const RawAddress& addr,
                                   uint16_t length, char* p_name);
 
 /*****************************************************************************
@@ -162,7 +162,7 @@
  *
  ******************************************************************************/
 extern uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id,
-                             bool is_server, const bt_bdaddr_t* p_rem_bda,
+                             bool is_server, const RawAddress* p_rem_bda,
                              uint16_t psm, tL2CAP_CFG_INFO* p_cfg,
                              tL2CAP_ERTM_INFO* ertm_info, uint16_t security,
                              uint8_t chan_mode_mask, tGAP_CONN_CALLBACK* p_cb,
@@ -283,7 +283,7 @@
  *                  GAP_ERR_BAD_HANDLE  - invalid handle
  *
  ******************************************************************************/
-extern const bt_bdaddr_t* GAP_ConnGetRemoteAddr(uint16_t gap_handle);
+extern const RawAddress* GAP_ConnGetRemoteAddr(uint16_t gap_handle);
 
 /*******************************************************************************
  *
@@ -346,7 +346,7 @@
  * Returns          true if read started, else false if GAP is busy
  *
  ******************************************************************************/
-extern bool GAP_BleReadPeerPrefConnParams(const bt_bdaddr_t& peer_bda);
+extern bool GAP_BleReadPeerPrefConnParams(const RawAddress& peer_bda);
 
 /*******************************************************************************
  *
@@ -358,7 +358,7 @@
  * Returns          true if request accepted
  *
  ******************************************************************************/
-extern bool GAP_BleReadPeerDevName(const bt_bdaddr_t& peer_bda,
+extern bool GAP_BleReadPeerDevName(const RawAddress& peer_bda,
                                    tGAP_BLE_CMPL_CBACK* p_cback);
 
 /*******************************************************************************
@@ -370,7 +370,7 @@
  * Returns          true if request accepted
  *
  ******************************************************************************/
-extern bool GAP_BleReadPeerAddressResolutionCap(const bt_bdaddr_t& peer_bda,
+extern bool GAP_BleReadPeerAddressResolutionCap(const RawAddress& peer_bda,
                                                 tGAP_BLE_CMPL_CBACK* p_cback);
 
 /*******************************************************************************
@@ -382,6 +382,6 @@
  * Returns          true if request accepted
  *
  ******************************************************************************/
-extern bool GAP_BleCancelReadPeerDevName(const bt_bdaddr_t& peer_bda);
+extern bool GAP_BleCancelReadPeerDevName(const RawAddress& peer_bda);
 
 #endif /* GAP_API_H */
diff --git a/stack/include/gatt_api.h b/stack/include/gatt_api.h
index a7123e9..48ca8e3 100644
--- a/stack/include/gatt_api.h
+++ b/stack/include/gatt_api.h
@@ -561,7 +561,7 @@
                                tGATT_STATUS status, tGATT_CL_COMPLETE* p_data);
 
 /* Define a callback function when an initialized connection is established. */
-typedef void(tGATT_CONN_CBACK)(tGATT_IF gatt_if, const bt_bdaddr_t& bda,
+typedef void(tGATT_CONN_CBACK)(tGATT_IF gatt_if, const RawAddress& bda,
                                uint16_t conn_id, bool connected,
                                tGATT_DISCONN_REASON reason,
                                tBT_TRANSPORT transport);
@@ -574,7 +574,7 @@
 typedef void(tGATT_CONGESTION_CBACK)(uint16_t conn_id, bool congested);
 
 /* Define a callback function when encryption is established. */
-typedef void(tGATT_ENC_CMPL_CB)(tGATT_IF gatt_if, const bt_bdaddr_t& bda);
+typedef void(tGATT_ENC_CMPL_CB)(tGATT_IF gatt_if, const RawAddress& bda);
 
 /* Define a callback function when phy is updated. */
 typedef void(tGATT_PHY_UPDATE_CB)(tGATT_IF gatt_if, uint16_t conn_id,
@@ -620,7 +620,7 @@
 typedef uint8_t tGATTS_SRV_CHG_CMD;
 
 typedef struct {
-  bt_bdaddr_t bda;
+  RawAddress bda;
   bool srv_changed;
 } tGATTS_SRV_CHG;
 
@@ -914,7 +914,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern void GATT_SetIdleTimeout(const bt_bdaddr_t& bd_addr, uint16_t idle_tout,
+extern void GATT_SetIdleTimeout(const RawAddress& bd_addr, uint16_t idle_tout,
                                 tGATT_TRANSPORT transport);
 
 /*******************************************************************************
@@ -981,10 +981,10 @@
  * Returns          true if connection started; else false
  *
  ******************************************************************************/
-extern bool GATT_Connect(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr,
+extern bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr,
                          bool is_direct, tBT_TRANSPORT transport,
                          bool opportunistic);
-extern bool GATT_Connect(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr,
+extern bool GATT_Connect(tGATT_IF gatt_if, const RawAddress& bd_addr,
                          bool is_direct, tBT_TRANSPORT transport,
                          bool opportunistic, uint8_t initiating_phys);
 
@@ -1005,7 +1005,7 @@
  * Returns          true if connection started; else false
  *
  ******************************************************************************/
-extern bool GATT_CancelConnect(tGATT_IF gatt_if, const bt_bdaddr_t& bd_addr,
+extern bool GATT_CancelConnect(tGATT_IF gatt_if, const RawAddress& bd_addr,
                                bool is_direct);
 
 /*******************************************************************************
@@ -1038,7 +1038,7 @@
  *
  ******************************************************************************/
 extern bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if,
-                                    bt_bdaddr_t& bd_addr,
+                                    RawAddress& bd_addr,
                                     tBT_TRANSPORT* p_transport);
 
 /*******************************************************************************
@@ -1058,7 +1058,7 @@
  *
  ******************************************************************************/
 extern bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if,
-                                      const bt_bdaddr_t& bd_addr,
+                                      const RawAddress& bd_addr,
                                       uint16_t* p_conn_id,
                                       tBT_TRANSPORT transport);
 
@@ -1071,7 +1071,7 @@
  * Returns          None.
  *
  ******************************************************************************/
-extern void GATT_ConfigServiceChangeCCC(const bt_bdaddr_t& remote_bda,
+extern void GATT_ConfigServiceChangeCCC(const RawAddress& remote_bda,
                                         bool enable, tBT_TRANSPORT transport);
 
 // Enables the GATT profile on the device.
@@ -1083,7 +1083,7 @@
 
 // Link encryption complete notification for all encryption process
 // initiated outside GATT.
-extern void gatt_notify_enc_cmpl(const bt_bdaddr_t& bd_addr);
+extern void gatt_notify_enc_cmpl(const RawAddress& bd_addr);
 
 // Reset bg device list.
 extern void gatt_reset_bgdev_list(void);
diff --git a/stack/include/hcimsgs.h b/stack/include/hcimsgs.h
index d0087b9..6bd84ec 100644
--- a/stack/include/hcimsgs.h
+++ b/stack/include/hcimsgs.h
@@ -64,7 +64,7 @@
 
 #define HCIC_PARAM_SIZE_EXIT_PER_INQ 0
 /* Create Connection */
-extern void btsnd_hcic_create_conn(const bt_bdaddr_t& dest,
+extern void btsnd_hcic_create_conn(const RawAddress& dest,
                                    uint16_t packet_types,
                                    uint8_t page_scan_rep_mode,
                                    uint8_t page_scan_mode,
@@ -101,7 +101,7 @@
 /* Add SCO Connection */
 
 /* Create Connection Cancel */
-extern void btsnd_hcic_create_conn_cancel(const bt_bdaddr_t& dest);
+extern void btsnd_hcic_create_conn_cancel(const RawAddress& dest);
 
 #define HCIC_PARAM_SIZE_CREATE_CONN_CANCEL 6
 
@@ -109,7 +109,7 @@
 /* Create Connection Cancel */
 
 /* Accept Connection Request */
-extern void btsnd_hcic_accept_conn(const bt_bdaddr_t& bd_addr, uint8_t role);
+extern void btsnd_hcic_accept_conn(const RawAddress& bd_addr, uint8_t role);
 
 #define HCIC_PARAM_SIZE_ACCEPT_CONN 7
 
@@ -118,7 +118,7 @@
 /* Accept Connection Request */
 
 /* Reject Connection Request */
-extern void btsnd_hcic_reject_conn(const bt_bdaddr_t& bd_addr, uint8_t reason);
+extern void btsnd_hcic_reject_conn(const RawAddress& bd_addr, uint8_t reason);
 
 #define HCIC_PARAM_SIZE_REJECT_CONN 7
 
@@ -127,7 +127,7 @@
 /* Reject Connection Request */
 
 /* Link Key Request Reply */
-extern void btsnd_hcic_link_key_req_reply(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_link_key_req_reply(const RawAddress& bd_addr,
                                           LINK_KEY link_key);
 
 #define HCIC_PARAM_SIZE_LINK_KEY_REQ_REPLY 22
@@ -137,7 +137,7 @@
 /* Link Key Request Reply  */
 
 /* Link Key Request Neg Reply */
-extern void btsnd_hcic_link_key_neg_reply(const bt_bdaddr_t& bd_addr);
+extern void btsnd_hcic_link_key_neg_reply(const RawAddress& bd_addr);
 
 #define HCIC_PARAM_SIZE_LINK_KEY_NEG_REPLY 6
 
@@ -145,7 +145,7 @@
 /* Link Key Request Neg Reply  */
 
 /* PIN Code Request Reply */
-extern void btsnd_hcic_pin_code_req_reply(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_pin_code_req_reply(const RawAddress& bd_addr,
                                           uint8_t pin_code_len,
                                           PIN_CODE pin_code);
 
@@ -157,7 +157,7 @@
 /* PIN Code Request Reply  */
 
 /* Link Key Request Neg Reply */
-extern void btsnd_hcic_pin_code_neg_reply(const bt_bdaddr_t& bd_addr);
+extern void btsnd_hcic_pin_code_neg_reply(const RawAddress& bd_addr);
 
 #define HCIC_PARAM_SIZE_PIN_CODE_NEG_REPLY 6
 
@@ -189,7 +189,7 @@
 /* Set Connection Encryption */
 
 /* Remote Name Request */
-extern void btsnd_hcic_rmt_name_req(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_rmt_name_req(const RawAddress& bd_addr,
                                     uint8_t page_scan_rep_mode,
                                     uint8_t page_scan_mode,
                                     uint16_t clock_offset);
@@ -203,7 +203,7 @@
 /* Remote Name Request */
 
 /* Remote Name Request Cancel */
-extern void btsnd_hcic_rmt_name_req_cancel(const bt_bdaddr_t& bd_addr);
+extern void btsnd_hcic_rmt_name_req_cancel(const RawAddress& bd_addr);
 
 #define HCIC_PARAM_SIZE_RMT_NAME_REQ_CANCEL 6
 
@@ -244,7 +244,7 @@
 #define HCI_SETUP_ESCO_PKT_TYPES_OFF 15
 
 extern void btsnd_hcic_accept_esco_conn(
-    const bt_bdaddr_t& bd_addr, uint32_t transmit_bandwidth,
+    const RawAddress& bd_addr, uint32_t transmit_bandwidth,
     uint32_t receive_bandwidth, uint16_t max_latency, uint16_t content_fmt,
     uint8_t retrans_effort, uint16_t packet_types);
 #define HCIC_PARAM_SIZE_ACCEPT_ESCO 21
@@ -257,7 +257,7 @@
 #define HCI_ACCEPT_ESCO_RETRAN_EFF_OFF 18
 #define HCI_ACCEPT_ESCO_PKT_TYPES_OFF 19
 
-extern void btsnd_hcic_reject_esco_conn(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_reject_esco_conn(const RawAddress& bd_addr,
                                         uint8_t reason);
 #define HCIC_PARAM_SIZE_REJECT_ESCO 7
 
@@ -323,7 +323,7 @@
 /* QoS Setup */
 
 /* Switch Role Request */
-extern void btsnd_hcic_switch_role(const bt_bdaddr_t& bd_addr, uint8_t role);
+extern void btsnd_hcic_switch_role(const RawAddress& bd_addr, uint8_t role);
 
 #define HCIC_PARAM_SIZE_SWITCH_ROLE 7
 
@@ -382,7 +382,7 @@
 #define HCIC_EXT_INQ_RESP_FEC_OFF 0
 #define HCIC_EXT_INQ_RESP_RESPONSE 1
 /* IO Capabilities Response */
-extern void btsnd_hcic_io_cap_req_reply(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_io_cap_req_reply(const RawAddress& bd_addr,
                                         uint8_t capability, uint8_t oob_present,
                                         uint8_t auth_req);
 
@@ -394,7 +394,7 @@
 #define HCI_IO_CAP_AUTH_REQ_OFF 8
 
 /* IO Capabilities Req Neg Reply */
-extern void btsnd_hcic_io_cap_req_neg_reply(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_io_cap_req_neg_reply(const RawAddress& bd_addr,
                                             uint8_t err_code);
 
 #define HCIC_PARAM_SIZE_IO_CAP_NEG_REPLY 7
@@ -407,13 +407,13 @@
 
 #define HCIC_PARAM_SIZE_R_LOCAL_OOB 0
 
-extern void btsnd_hcic_user_conf_reply(const bt_bdaddr_t& bd_addr, bool is_yes);
+extern void btsnd_hcic_user_conf_reply(const RawAddress& bd_addr, bool is_yes);
 
 #define HCIC_PARAM_SIZE_UCONF_REPLY 6
 
 #define HCI_USER_CONF_BD_ADDR_OFF 0
 
-extern void btsnd_hcic_user_passkey_reply(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_user_passkey_reply(const RawAddress& bd_addr,
                                           uint32_t value);
 
 #define HCIC_PARAM_SIZE_U_PKEY_REPLY 10
@@ -421,14 +421,14 @@
 #define HCI_USER_PASSKEY_BD_ADDR_OFF 0
 #define HCI_USER_PASSKEY_VALUE_OFF 6
 
-extern void btsnd_hcic_user_passkey_neg_reply(const bt_bdaddr_t& bd_addr);
+extern void btsnd_hcic_user_passkey_neg_reply(const RawAddress& bd_addr);
 
 #define HCIC_PARAM_SIZE_U_PKEY_NEG_REPLY 6
 
 #define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0
 
 /* Remote OOB Data Request Reply */
-extern void btsnd_hcic_rem_oob_reply(const bt_bdaddr_t& bd_addr, uint8_t* p_c,
+extern void btsnd_hcic_rem_oob_reply(const RawAddress& bd_addr, uint8_t* p_c,
                                      uint8_t* p_r);
 
 #define HCIC_PARAM_SIZE_REM_OOB_REPLY 38
@@ -438,7 +438,7 @@
 #define HCI_REM_OOB_DATA_R_OFF 22
 
 /* Remote OOB Data Request Negative Reply */
-extern void btsnd_hcic_rem_oob_neg_reply(const bt_bdaddr_t& bd_addr);
+extern void btsnd_hcic_rem_oob_neg_reply(const RawAddress& bd_addr);
 
 #define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6
 
@@ -460,7 +460,7 @@
 #define HCIC_PARAM_SIZE_ENHANCED_FLUSH 3
 #endif
 
-extern void btsnd_hcic_send_keypress_notif(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_send_keypress_notif(const RawAddress& bd_addr,
                                            uint8_t notif);
 
 #define HCIC_PARAM_SIZE_SEND_KEYPRESS_NOTIF 7
@@ -486,7 +486,7 @@
 /* Set Event Filter */
 
 /* Delete Stored Key */
-extern void btsnd_hcic_delete_stored_key(const bt_bdaddr_t& bd_addr,
+extern void btsnd_hcic_delete_stored_key(const RawAddress& bd_addr,
                                          bool delete_all_flag);
 
 #define HCIC_PARAM_SIZE_DELETE_STORED_KEY 7
@@ -627,7 +627,7 @@
 
 /* Enhanced accept SCO connection request (CSA2) */
 extern void btsnd_hcic_enhanced_accept_synchronous_connection(
-    const bt_bdaddr_t& bd_addr, enh_esco_params_t* p_parms);
+    const RawAddress& bd_addr, enh_esco_params_t* p_parms);
 
 #define HCI_DATA_HANDLE_MASK 0x0FFF
 
@@ -724,11 +724,11 @@
 
 extern void btsnd_hcic_ble_set_local_used_feat(uint8_t feat_set[8]);
 
-extern void btsnd_hcic_ble_set_random_addr(const bt_bdaddr_t& random_addr);
+extern void btsnd_hcic_ble_set_random_addr(const RawAddress& random_addr);
 
 extern void btsnd_hcic_ble_write_adv_params(
     uint16_t adv_int_min, uint16_t adv_int_max, uint8_t adv_type,
-    uint8_t addr_type_own, uint8_t addr_type_dir, const bt_bdaddr_t& direct_bda,
+    uint8_t addr_type_own, uint8_t addr_type_dir, const RawAddress& direct_bda,
     uint8_t channel_map, uint8_t adv_filter_policy);
 
 extern void btsnd_hcic_ble_read_adv_chnl_tx_power(void);
@@ -749,7 +749,7 @@
 
 extern void btsnd_hcic_ble_create_ll_conn(
     uint16_t scan_int, uint16_t scan_win, uint8_t init_filter_policy,
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer, uint8_t addr_type_own,
+    uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t addr_type_own,
     uint16_t conn_int_min, uint16_t conn_int_max, uint16_t conn_latency,
     uint16_t conn_timeout, uint16_t min_ce_len, uint16_t max_ce_len);
 
@@ -760,10 +760,10 @@
 extern void btsnd_hcic_ble_clear_white_list(void);
 
 extern void btsnd_hcic_ble_add_white_list(uint8_t addr_type,
-                                          const bt_bdaddr_t& bda);
+                                          const RawAddress& bda);
 
 extern void btsnd_hcic_ble_remove_from_white_list(uint8_t addr_type,
-                                                  const bt_bdaddr_t& bda);
+                                                  const RawAddress& bda);
 
 extern void btsnd_hcic_ble_upd_ll_conn_params(
     uint16_t handle, uint16_t conn_int_min, uint16_t conn_int_max,
@@ -826,7 +826,7 @@
                                            uint16_t tx_time);
 
 extern void btsnd_hcic_ble_add_device_resolving_list(
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer,
+    uint8_t addr_type_peer, const RawAddress& bda_peer,
     uint8_t irk_peer[HCIC_BLE_IRK_SIZE], uint8_t irk_local[HCIC_BLE_IRK_SIZE]);
 
 struct scanning_phy_cfg {
@@ -858,28 +858,28 @@
 extern void btsnd_hcic_ble_ext_create_conn(uint8_t init_filter_policy,
                                            uint8_t addr_type_own,
                                            uint8_t addr_type_peer,
-                                           const bt_bdaddr_t& bda_peer,
+                                           const RawAddress& bda_peer,
                                            uint8_t initiating_phys,
                                            EXT_CONN_PHY_CFG* phy_cfg);
 
 extern void btsnd_hcic_ble_add_device_resolving_list(
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer,
+    uint8_t addr_type_peer, const RawAddress& bda_peer,
     uint8_t irk_peer[HCIC_BLE_IRK_SIZE], uint8_t irk_local[HCIC_BLE_IRK_SIZE]);
 
-extern void btsnd_hcic_ble_rm_device_resolving_list(
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer);
+extern void btsnd_hcic_ble_rm_device_resolving_list(uint8_t addr_type_peer,
+                                                    const RawAddress& bda_peer);
 
 extern void btsnd_hcic_ble_set_privacy_mode(uint8_t addr_type_peer,
-                                            const bt_bdaddr_t& bda_peer,
+                                            const RawAddress& bda_peer,
                                             uint8_t privacy_type);
 
 extern void btsnd_hcic_ble_clear_resolving_list(void);
 
 extern void btsnd_hcic_ble_read_resolvable_addr_peer(
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer);
+    uint8_t addr_type_peer, const RawAddress& bda_peer);
 
 extern void btsnd_hcic_ble_read_resolvable_addr_local(
-    uint8_t addr_type_peer, const bt_bdaddr_t& bda_peer);
+    uint8_t addr_type_peer, const RawAddress& bda_peer);
 
 extern void btsnd_hcic_ble_set_addr_resolution_enable(
     uint8_t addr_resolution_enable);
diff --git a/stack/include/hidd_api.h b/stack/include/hidd_api.h
index c729e0f..85785e8 100644
--- a/stack/include/hidd_api.h
+++ b/stack/include/hidd_api.h
@@ -47,7 +47,7 @@
   HID_DHOST_EVT_SUSPEND,
   HID_DHOST_EVT_EXIT_SUSPEND,
 };
-typedef void(tHID_DEV_HOST_CALLBACK)(const bt_bdaddr_t& bd_addr, uint8_t event,
+typedef void(tHID_DEV_HOST_CALLBACK)(const RawAddress& bd_addr, uint8_t event,
                                      uint32_t data, BT_HDR* p_buf);
 
 /*****************************************************************************
@@ -147,7 +147,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-extern tHID_STATUS HID_DevPlugDevice(const bt_bdaddr_t& addr);
+extern tHID_STATUS HID_DevPlugDevice(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -158,7 +158,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-extern tHID_STATUS HID_DevUnplugDevice(const bt_bdaddr_t& addr);
+extern tHID_STATUS HID_DevUnplugDevice(const RawAddress& addr);
 
 /*******************************************************************************
  *
@@ -213,7 +213,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-extern tHID_STATUS HID_DevGetDevice(bt_bdaddr_t* addr);
+extern tHID_STATUS HID_DevGetDevice(RawAddress* addr);
 
 /*******************************************************************************
  *
diff --git a/stack/include/hidh_api.h b/stack/include/hidh_api.h
index a688a2e..5b43b44 100644
--- a/stack/include/hidh_api.h
+++ b/stack/include/hidh_api.h
@@ -81,7 +81,7 @@
   HID_HDEV_EVT_VC_UNPLUG
 };
 typedef void(tHID_HOST_DEV_CALLBACK)(
-    uint8_t dev_handle, const bt_bdaddr_t& addr,
+    uint8_t dev_handle, const RawAddress& addr,
     uint8_t event,  /* Event from HID-DEVICE. */
     uint32_t data,  /* Integer data corresponding to the event.*/
     BT_HDR* p_buf); /* Pointer data corresponding to the event. */
@@ -99,7 +99,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-extern tHID_STATUS HID_HostGetSDPRecord(const bt_bdaddr_t& addr,
+extern tHID_STATUS HID_HostGetSDPRecord(const RawAddress& addr,
                                         tSDP_DISCOVERY_DB* p_db,
                                         uint32_t db_len,
                                         tHID_HOST_SDP_CALLBACK* sdp_cback);
@@ -135,7 +135,7 @@
  * Returns          tHID_STATUS
  *
  ******************************************************************************/
-extern tHID_STATUS HID_HostAddDev(const bt_bdaddr_t& addr, uint16_t attr_mask,
+extern tHID_STATUS HID_HostAddDev(const RawAddress& addr, uint16_t attr_mask,
                                   uint8_t* handle);
 
 /*******************************************************************************
@@ -215,7 +215,7 @@
  * Returns          true if device exists else false
  *
  ******************************************************************************/
-bool hid_known_hid_device(const bt_bdaddr_t& bd_addr);
+bool hid_known_hid_device(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h
index df57450..b420f8b 100644
--- a/stack/include/l2c_api.h
+++ b/stack/include/l2c_api.h
@@ -198,7 +198,7 @@
  *              PSM that the remote wants to connect to
  *              Identifier that the remote sent
  */
-typedef void(tL2CA_CONNECT_IND_CB)(const bt_bdaddr_t&, uint16_t, uint16_t,
+typedef void(tL2CA_CONNECT_IND_CB)(const RawAddress&, uint16_t, uint16_t,
                                    uint8_t);
 
 /* Connection confirmation callback prototype. Parameters are
@@ -239,7 +239,7 @@
 /* QOS Violation indication callback prototype. Parameters are
  *              BD Address of violating device
  */
-typedef void(tL2CA_QOS_VIOLATION_IND_CB)(const bt_bdaddr_t&);
+typedef void(tL2CA_QOS_VIOLATION_IND_CB)(const RawAddress&);
 
 /* Data received indication callback prototype. Parameters are
  *              Local CID
@@ -256,7 +256,7 @@
 
 /* Callback function prototype to pass broadcom specific echo response  */
 /* to the upper layer                                                   */
-typedef void(tL2CA_ECHO_DATA_CB)(const bt_bdaddr_t&, uint16_t, uint8_t*);
+typedef void(tL2CA_ECHO_DATA_CB)(const RawAddress&, uint16_t, uint8_t*);
 
 /* Congestion status callback protype. This callback is optional. If
  * an application tries to send data when the transmit queue is full,
@@ -273,7 +273,7 @@
  * The parameter is:
  *          peer BD_ADDR
  */
-typedef void(tL2CA_NOCP_CB)(const bt_bdaddr_t&);
+typedef void(tL2CA_NOCP_CB)(const RawAddress&);
 
 /* Transmit complete callback protype. This callback is optional. If
  * set, L2CAP will call it when packets are sent or flushed. If the
@@ -390,7 +390,7 @@
  * Returns          the CID of the connection, or 0 if it failed to start
  *
  ******************************************************************************/
-extern uint16_t L2CA_ConnectReq(uint16_t psm, const bt_bdaddr_t& p_bd_addr);
+extern uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr);
 
 /*******************************************************************************
  *
@@ -403,7 +403,7 @@
  * Returns          true for success, false for failure
  *
  ******************************************************************************/
-extern bool L2CA_ConnectRsp(const bt_bdaddr_t& p_bd_addr, uint8_t id,
+extern bool L2CA_ConnectRsp(const RawAddress& p_bd_addr, uint8_t id,
                             uint16_t lcid, uint16_t result, uint16_t status);
 
 /*******************************************************************************
@@ -419,7 +419,7 @@
  * Returns          the CID of the connection, or 0 if it failed to start
  *
  ******************************************************************************/
-extern uint16_t L2CA_ErtmConnectReq(uint16_t psm, const bt_bdaddr_t& p_bd_addr,
+extern uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr,
                                     tL2CAP_ERTM_INFO* p_ertm_info);
 
 /*******************************************************************************
@@ -462,7 +462,7 @@
  * Returns          the CID of the connection, or 0 if it failed to start
  *
  ******************************************************************************/
-extern uint16_t L2CA_ConnectLECocReq(uint16_t psm, const bt_bdaddr_t& p_bd_addr,
+extern uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr,
                                      tL2CAP_LE_CFG_INFO* p_cfg);
 
 /*******************************************************************************
@@ -476,7 +476,7 @@
  * Returns          true for success, false for failure
  *
  ******************************************************************************/
-extern bool L2CA_ConnectLECocRsp(const bt_bdaddr_t& p_bd_addr, uint8_t id,
+extern bool L2CA_ConnectLECocRsp(const RawAddress& p_bd_addr, uint8_t id,
                                  uint16_t lcid, uint16_t result,
                                  uint16_t status, tL2CAP_LE_CFG_INFO* p_cfg);
 
@@ -512,7 +512,7 @@
  * Returns          true for success, false for failure
  *
  ******************************************************************************/
-extern bool L2CA_ErtmConnectRsp(const bt_bdaddr_t& p_bd_addr, uint8_t id,
+extern bool L2CA_ErtmConnectRsp(const RawAddress& p_bd_addr, uint8_t id,
                                 uint16_t lcid, uint16_t result, uint16_t status,
                                 tL2CAP_ERTM_INFO* p_ertm_info);
 
@@ -585,7 +585,7 @@
  * Returns          true if echo request sent, else false.
  *
  ******************************************************************************/
-extern bool L2CA_Ping(const bt_bdaddr_t& p_bd_addr, tL2CA_ECHO_RSP_CB* p_cb);
+extern bool L2CA_Ping(const RawAddress& p_bd_addr, tL2CA_ECHO_RSP_CB* p_cb);
 
 /*******************************************************************************
  *
@@ -597,7 +597,7 @@
  * Returns          true if echo request sent, else false.
  *
  ******************************************************************************/
-extern bool L2CA_Echo(const bt_bdaddr_t& p_bd_addr, BT_HDR* p_data,
+extern bool L2CA_Echo(const RawAddress& p_bd_addr, BT_HDR* p_data,
                       tL2CA_ECHO_DATA_CB* p_callback);
 
 // Given a local channel identifier, |lcid|, this function returns the bound
@@ -643,7 +643,7 @@
  * NOTE             This timeout applies to all logical channels active on the
  *                  ACL link.
  ******************************************************************************/
-extern bool L2CA_SetIdleTimeoutByBdAddr(const bt_bdaddr_t& bd_addr,
+extern bool L2CA_SetIdleTimeoutByBdAddr(const RawAddress& bd_addr,
                                         uint16_t timeout,
                                         tBT_TRANSPORT transport);
 
@@ -688,7 +688,7 @@
  *
  ******************************************************************************/
 extern uint16_t L2CA_LocalLoopbackReq(uint16_t psm, uint16_t handle,
-                                      const bt_bdaddr_t& p_bd_addr);
+                                      const RawAddress& p_bd_addr);
 
 /*******************************************************************************
  *
@@ -717,7 +717,7 @@
  * Returns          true if a valid channel, else false
  *
  ******************************************************************************/
-extern bool L2CA_SetAclPriority(const bt_bdaddr_t& bd_addr, uint8_t priority);
+extern bool L2CA_SetAclPriority(const RawAddress& bd_addr, uint8_t priority);
 
 /*******************************************************************************
  *
@@ -767,7 +767,7 @@
  * Returns
  *
  ******************************************************************************/
-extern bool L2CA_RegForNoCPEvt(tL2CA_NOCP_CB* p_cb, const bt_bdaddr_t& p_bda);
+extern bool L2CA_RegForNoCPEvt(tL2CA_NOCP_CB* p_cb, const RawAddress& p_bda);
 
 /*******************************************************************************
  *
@@ -807,7 +807,7 @@
  * NOTE             This flush timeout applies to all logical channels active on
  *                  the ACL link.
  ******************************************************************************/
-extern bool L2CA_SetFlushTimeout(const bt_bdaddr_t& bd_addr,
+extern bool L2CA_SetFlushTimeout(const RawAddress& bd_addr,
                                  uint16_t flush_tout);
 
 /*******************************************************************************
@@ -852,7 +852,7 @@
  *  Return value:    true if peer is connected
  *
  ******************************************************************************/
-extern bool L2CA_GetPeerFeatures(const bt_bdaddr_t& bd_addr,
+extern bool L2CA_GetPeerFeatures(const RawAddress& bd_addr,
                                  uint32_t* p_ext_feat, uint8_t* p_chnl_mask);
 
 /*******************************************************************************
@@ -867,7 +867,7 @@
  *  Return value:    true if found lcb for the given handle, false otherwise
  *
  ******************************************************************************/
-extern bool L2CA_GetBDAddrbyHandle(uint16_t handle, bt_bdaddr_t& bd_addr);
+extern bool L2CA_GetBDAddrbyHandle(uint16_t handle, RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -896,13 +896,13 @@
 #define L2CAP_UCD_INFO_TYPE_RECEPTION 0x01
 #define L2CAP_UCD_INFO_TYPE_MTU 0x02
 
-typedef void(tL2CA_UCD_DISCOVER_CB)(const bt_bdaddr_t&, uint8_t, uint32_t);
+typedef void(tL2CA_UCD_DISCOVER_CB)(const RawAddress&, uint8_t, uint32_t);
 
 /* UCD data received. Parameters are
  *      BD Address of remote
  *      Pointer to buffer with data
  */
-typedef void(tL2CA_UCD_DATA_CB)(const bt_bdaddr_t&, BT_HDR*);
+typedef void(tL2CA_UCD_DATA_CB)(const RawAddress&, BT_HDR*);
 
 /* Congestion status callback protype. This callback is optional. If
  * an application tries to send data when the transmit queue is full,
@@ -910,7 +910,7 @@
  *              remote BD_ADDR
  *              true if congested, false if uncongested
  */
-typedef void(tL2CA_UCD_CONGESTION_STATUS_CB)(const bt_bdaddr_t&, bool);
+typedef void(tL2CA_UCD_CONGESTION_STATUS_CB)(const RawAddress&, bool);
 
 /* UCD registration info (the callback addresses and PSM)
  */
@@ -961,7 +961,7 @@
  *  Return value:   true if successs
  *
  ******************************************************************************/
-extern bool L2CA_UcdDiscover(uint16_t psm, const bt_bdaddr_t& rem_bda,
+extern bool L2CA_UcdDiscover(uint16_t psm, const RawAddress& rem_bda,
                              uint8_t info_type);
 
 /*******************************************************************************
@@ -981,7 +981,7 @@
  *                  L2CAP_DW_FAILED,  if error
  *
  ******************************************************************************/
-extern uint16_t L2CA_UcdDataWrite(uint16_t psm, const bt_bdaddr_t& rem_bda,
+extern uint16_t L2CA_UcdDataWrite(uint16_t psm, const RawAddress& rem_bda,
                                   BT_HDR* p_buf, uint16_t flags);
 
 /*******************************************************************************
@@ -996,8 +996,7 @@
  *  Return value:   true if successs
  *
  ******************************************************************************/
-extern bool L2CA_UcdSetIdleTimeout(const bt_bdaddr_t& rem_bda,
-                                   uint16_t timeout);
+extern bool L2CA_UcdSetIdleTimeout(const RawAddress& rem_bda, uint16_t timeout);
 
 /*******************************************************************************
  *
@@ -1008,7 +1007,7 @@
  * Returns          true if a valid channel, else false
  *
  ******************************************************************************/
-extern bool L2CA_UCDSetTxPriority(const bt_bdaddr_t& rem_bda,
+extern bool L2CA_UCDSetTxPriority(const RawAddress& rem_bda,
                                   tL2CAP_CHNL_PRIORITY priority);
 
 /*******************************************************************************
@@ -1024,7 +1023,7 @@
  *      Reason for connection failure
  *      transport : physical transport, BR/EDR or LE
  */
-typedef void(tL2CA_FIXED_CHNL_CB)(uint16_t, const bt_bdaddr_t&, bool, uint16_t,
+typedef void(tL2CA_FIXED_CHNL_CB)(uint16_t, const RawAddress&, bool, uint16_t,
                                   tBT_TRANSPORT);
 
 /* Signalling data received. Parameters are
@@ -1032,7 +1031,7 @@
  *      BD Address of remote
  *      Pointer to buffer with data
  */
-typedef void(tL2CA_FIXED_DATA_CB)(uint16_t, const bt_bdaddr_t&, BT_HDR*);
+typedef void(tL2CA_FIXED_DATA_CB)(uint16_t, const RawAddress&, BT_HDR*);
 
 /* Congestion status callback protype. This callback is optional. If
  * an application tries to send data when the transmit queue is full,
@@ -1040,7 +1039,7 @@
  *      remote BD_ADDR
  *      true if congested, false if uncongested
  */
-typedef void(tL2CA_FIXED_CONGESTION_STATUS_CB)(const bt_bdaddr_t&, bool);
+typedef void(tL2CA_FIXED_CONGESTION_STATUS_CB)(const RawAddress&, bool);
 
 /* Fixed channel registration info (the callback addresses and channel config)
  */
@@ -1084,9 +1083,8 @@
  *
  ******************************************************************************/
 extern bool L2CA_ConnectFixedChnl(uint16_t fixed_cid,
-                                  const bt_bdaddr_t& bd_addr);
-extern bool L2CA_ConnectFixedChnl(uint16_t fixed_cid,
-                                  const bt_bdaddr_t& bd_addr,
+                                  const RawAddress& bd_addr);
+extern bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& bd_addr,
                                   uint8_t initiating_phys);
 
 /*******************************************************************************
@@ -1104,7 +1102,7 @@
  *
  ******************************************************************************/
 extern uint16_t L2CA_SendFixedChnlData(uint16_t fixed_cid,
-                                       const bt_bdaddr_t& rem_bda,
+                                       const RawAddress& rem_bda,
                                        BT_HDR* p_buf);
 
 /*******************************************************************************
@@ -1120,8 +1118,7 @@
  *  Return value:   true if channel removed
  *
  ******************************************************************************/
-extern bool L2CA_RemoveFixedChnl(uint16_t fixed_cid,
-                                 const bt_bdaddr_t& rem_bda);
+extern bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda);
 
 /*******************************************************************************
  *
@@ -1140,7 +1137,7 @@
  * Returns          true if command succeeded, false if failed
  *
  ******************************************************************************/
-extern bool L2CA_SetFixedChannelTout(const bt_bdaddr_t& rem_bda,
+extern bool L2CA_SetFixedChannelTout(const RawAddress& rem_bda,
                                      uint16_t fixed_cid, uint16_t idle_tout);
 
 #endif /* (L2CAP_NUM_FIXED_CHNLS > 0) */
@@ -1187,7 +1184,7 @@
  *  Return value:   true if connection was cancelled
  *
  ******************************************************************************/
-extern bool L2CA_CancelBleConnectReq(const bt_bdaddr_t& rem_bda);
+extern bool L2CA_CancelBleConnectReq(const RawAddress& rem_bda);
 
 /*******************************************************************************
  *
@@ -1200,7 +1197,7 @@
  *  Return value:   true if update started
  *
  ******************************************************************************/
-extern bool L2CA_UpdateBleConnParams(const bt_bdaddr_t& rem_bdRa,
+extern bool L2CA_UpdateBleConnParams(const RawAddress& rem_bdRa,
                                      uint16_t min_int, uint16_t max_int,
                                      uint16_t latency, uint16_t timeout);
 
@@ -1216,7 +1213,7 @@
  *  Return value:   true if update started
  *
  ******************************************************************************/
-extern bool L2CA_EnableUpdateBleConnParams(const bt_bdaddr_t& rem_bda,
+extern bool L2CA_EnableUpdateBleConnParams(const RawAddress& rem_bda,
                                            bool enable);
 
 /*******************************************************************************
@@ -1228,7 +1225,7 @@
  * Returns          link role.
  *
  ******************************************************************************/
-extern uint8_t L2CA_GetBleConnRole(const bt_bdaddr_t& bd_addr);
+extern uint8_t L2CA_GetBleConnRole(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -1242,7 +1239,7 @@
  * Returns          disconnect reason
  *
  ******************************************************************************/
-extern uint16_t L2CA_GetDisconnectReason(const bt_bdaddr_t& remote_bda,
+extern uint16_t L2CA_GetDisconnectReason(const RawAddress& remote_bda,
                                          tBT_TRANSPORT transport);
 
 #endif /* L2C_API_H */
diff --git a/stack/include/l2cap_client.h b/stack/include/l2cap_client.h
index 898f5b4..fb4e922 100644
--- a/stack/include/l2cap_client.h
+++ b/stack/include/l2cap_client.h
@@ -60,7 +60,7 @@
 // while |l2cap_client_is_connected|. |client| and |remote_bdaddr| must not be
 // NULL. |psm| must be greater than zero.
 bool l2cap_client_connect(l2cap_client_t* client,
-                          const bt_bdaddr_t& remote_bdaddr, uint16_t psm);
+                          const RawAddress& remote_bdaddr, uint16_t psm);
 
 // Disconnects a connected |client|. This function is asynchronous and
 // idempotent. It will indicate completion with a 'disconnected' callback.
diff --git a/stack/include/mca_api.h b/stack/include/mca_api.h
index c7dd907..3c962d0 100644
--- a/stack/include/mca_api.h
+++ b/stack/include/mca_api.h
@@ -165,13 +165,13 @@
 
 /* This data structure is associated with MCA_CONNECT_IND_EVT. */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* The peer address */
+  RawAddress bd_addr; /* The peer address */
   uint16_t mtu;    /* peer mtu */
 } tMCA_CONNECT_IND;
 
 /* This data structure is associated with MCA_DISCONNECT_IND_EVT. */
 typedef struct {
-  bt_bdaddr_t bd_addr; /* The peer address */
+  RawAddress bd_addr; /* The peer address */
   uint16_t reason; /* disconnect reason given by L2CAP */
 } tMCA_DISCONNECT_IND;
 
@@ -332,9 +332,8 @@
  * Returns          MCA_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-extern tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle,
-                                  const bt_bdaddr_t& bd_addr, uint16_t ctrl_psm,
-                                  uint16_t sec_mask);
+extern tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, const RawAddress& bd_addr,
+                                  uint16_t ctrl_psm, uint16_t sec_mask);
 
 /*******************************************************************************
  *
@@ -526,7 +525,7 @@
   tMCA_RESULT (*create_mdep)(tMCA_HANDLE handle, tMCA_DEP* p_dep,
                              tMCA_CS* p_cs);
   tMCA_RESULT (*delete_mdep)(tMCA_HANDLE handle, tMCA_DEP dep);
-  tMCA_RESULT (*connect_mcl)(tMCA_HANDLE handle, const bt_bdaddr_t& bd_addr,
+  tMCA_RESULT (*connect_mcl)(tMCA_HANDLE handle, const RawAddress& bd_addr,
                              uint16_t ctrl_psm, uint16_t sec_mask);
   tMCA_RESULT (*disconnect_mcl)(tMCA_CL mcl);
   tMCA_RESULT (*create_mdl_request)(tMCA_CL mcl, tMCA_DEP dep,
diff --git a/stack/include/pan_api.h b/stack/include/pan_api.h
index c29bd2e..d46aa3f 100644
--- a/stack/include/pan_api.h
+++ b/stack/include/pan_api.h
@@ -96,7 +96,7 @@
  *      to the application. The second parameter true means
  *      to create the bridge and false means to remove it.
 */
-typedef void(tPAN_CONN_STATE_CB)(uint16_t handle, const bt_bdaddr_t& bd_addr,
+typedef void(tPAN_CONN_STATE_CB)(uint16_t handle, const RawAddress& bd_addr,
                                  tPAN_RESULT state, bool is_role_change,
                                  uint8_t src_role, uint8_t dst_role);
 
@@ -105,7 +105,7 @@
  *      whether to create the bridge or remove it. true means
  *      to create the bridge and false means to remove it.
 */
-typedef void(tPAN_BRIDGE_REQ_CB)(const bt_bdaddr_t& bd_addr, bool state);
+typedef void(tPAN_BRIDGE_REQ_CB)(const RawAddress& bd_addr, bool state);
 
 /* Data received indication callback prototype. Parameters are
  *              Source BD/Ethernet Address
@@ -118,8 +118,8 @@
  *                      false - Use it for internal stack
  *                      true  - Send it across the ethernet as well
 */
-typedef void(tPAN_DATA_IND_CB)(uint16_t handle, const bt_bdaddr_t& src,
-                               const bt_bdaddr_t& dst, uint16_t protocol,
+typedef void(tPAN_DATA_IND_CB)(uint16_t handle, const RawAddress& src,
+                               const RawAddress& dst, uint16_t protocol,
                                uint8_t* p_data, uint16_t len, bool ext,
                                bool forward);
 
@@ -133,8 +133,8 @@
  *                      false - Use it for internal stack
  *                      true  - Send it across the ethernet as well
 */
-typedef void(tPAN_DATA_BUF_IND_CB)(uint16_t handle, const bt_bdaddr_t& src,
-                                   const bt_bdaddr_t& dst, uint16_t protocol,
+typedef void(tPAN_DATA_BUF_IND_CB)(uint16_t handle, const RawAddress& src,
+                                   const RawAddress& dst, uint16_t protocol,
                                    BT_HDR* p_buf, bool ext, bool forward);
 
 /* Flow control callback for TX data. Parameters are
@@ -283,7 +283,7 @@
  *                                     allowed at that point of time
  *
  ******************************************************************************/
-extern tPAN_RESULT PAN_Connect(const bt_bdaddr_t& rem_bda, uint8_t src_role,
+extern tPAN_RESULT PAN_Connect(const RawAddress& rem_bda, uint8_t src_role,
                                uint8_t dst_role, uint16_t* handle);
 
 /*******************************************************************************
@@ -324,8 +324,8 @@
  *                                           there is an error in sending data
  *
  ******************************************************************************/
-extern tPAN_RESULT PAN_Write(uint16_t handle, const bt_bdaddr_t& dst,
-                             const bt_bdaddr_t& src, uint16_t protocol,
+extern tPAN_RESULT PAN_Write(uint16_t handle, const RawAddress& dst,
+                             const RawAddress& src, uint16_t protocol,
                              uint8_t* p_data, uint16_t len, bool ext);
 
 /*******************************************************************************
@@ -350,8 +350,8 @@
  *                                           there is an error in sending data
  *
  ******************************************************************************/
-extern tPAN_RESULT PAN_WriteBuf(uint16_t handle, const bt_bdaddr_t& dst,
-                                const bt_bdaddr_t& src, uint16_t protocol,
+extern tPAN_RESULT PAN_WriteBuf(uint16_t handle, const RawAddress& dst,
+                                const RawAddress& src, uint16_t protocol,
                                 BT_HDR* p_buf, bool ext);
 
 /*******************************************************************************
diff --git a/stack/include/port_api.h b/stack/include/port_api.h
index 92ddb21..7971235 100644
--- a/stack/include/port_api.h
+++ b/stack/include/port_api.h
@@ -214,7 +214,7 @@
  *
  ******************************************************************************/
 extern int RFCOMM_CreateConnection(uint16_t uuid, uint8_t scn, bool is_server,
-                                   uint16_t mtu, const bt_bdaddr_t& bd_addr,
+                                   uint16_t mtu, const RawAddress& bd_addr,
                                    uint16_t* p_handle,
                                    tPORT_CALLBACK* p_mgmt_cb);
 
@@ -309,7 +309,7 @@
  *                  p_lcid     - OUT L2CAP's LCID
  *
  ******************************************************************************/
-extern int PORT_CheckConnection(uint16_t handle, bt_bdaddr_t& bd_addr,
+extern int PORT_CheckConnection(uint16_t handle, RawAddress& bd_addr,
                                 uint16_t* p_lcid);
 
 /*******************************************************************************
@@ -323,7 +323,7 @@
  *                  bd_addr    - bd_addr of the peer
  *
  ******************************************************************************/
-extern bool PORT_IsOpening(bt_bdaddr_t& bd_addr);
+extern bool PORT_IsOpening(RawAddress& bd_addr);
 
 /*******************************************************************************
  *
diff --git a/stack/include/sdp_api.h b/stack/include/sdp_api.h
index 4240d18..72ccd0e 100644
--- a/stack/include/sdp_api.h
+++ b/stack/include/sdp_api.h
@@ -72,7 +72,7 @@
 typedef void(tSDP_DISC_CMPL_CB2)(uint16_t result, void* user_data);
 
 typedef struct {
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   uint16_t peer_mtu;
 } tSDP_DR_OPEN;
 
@@ -112,7 +112,7 @@
   tSDP_DISC_ATTR* p_first_attr;      /* First attribute of record    */
   struct t_sdp_disc_rec* p_next_rec; /* Addr of next linked record   */
   uint32_t time_read;                /* The time the record was read */
-  bt_bdaddr_t remote_bd_addr;        /* Remote BD address            */
+  RawAddress remote_bd_addr;         /* Remote BD address            */
 } tSDP_DISC_REC;
 
 typedef struct {
@@ -200,7 +200,7 @@
  * Returns          true if discovery started, false if failed.
  *
  ******************************************************************************/
-bool SDP_ServiceSearchRequest(const bt_bdaddr_t& p_bd_addr,
+bool SDP_ServiceSearchRequest(const RawAddress& p_bd_addr,
                               tSDP_DISCOVERY_DB* p_db, tSDP_DISC_CMPL_CB* p_cb);
 
 /*******************************************************************************
@@ -216,7 +216,7 @@
  * Returns          true if discovery started, false if failed.
  *
  ******************************************************************************/
-bool SDP_ServiceSearchAttributeRequest(const bt_bdaddr_t& p_bd_addr,
+bool SDP_ServiceSearchAttributeRequest(const RawAddress& p_bd_addr,
                                        tSDP_DISCOVERY_DB* p_db,
                                        tSDP_DISC_CMPL_CB* p_cb);
 
@@ -234,7 +234,7 @@
  * Returns          true if discovery started, false if failed.
  *
  ******************************************************************************/
-bool SDP_ServiceSearchAttributeRequest2(const bt_bdaddr_t& p_bd_addr,
+bool SDP_ServiceSearchAttributeRequest2(const RawAddress& p_bd_addr,
                                         tSDP_DISCOVERY_DB* p_db,
                                         tSDP_DISC_CMPL_CB2* p_cb,
                                         void* user_data);
@@ -583,7 +583,7 @@
  * Returns          SDP_SUCCESS if query started successfully, else error
  *
  ******************************************************************************/
-uint16_t SDP_DiDiscover(const bt_bdaddr_t& remote_device,
+uint16_t SDP_DiDiscover(const RawAddress& remote_device,
                         tSDP_DISCOVERY_DB* p_db, uint32_t len,
                         tSDP_DISC_CMPL_CB* p_cb);
 
diff --git a/stack/include/smp_api.h b/stack/include/smp_api.h
index c029a38..10cff74 100644
--- a/stack/include/smp_api.h
+++ b/stack/include/smp_api.h
@@ -75,7 +75,7 @@
  * Returns          SMP_STARTED if bond started, else otherwise exception.
  *
  ******************************************************************************/
-extern tSMP_STATUS SMP_Pair(const bt_bdaddr_t& bd_addr);
+extern tSMP_STATUS SMP_Pair(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -87,7 +87,7 @@
  *                  failure.
  *
  ******************************************************************************/
-extern tSMP_STATUS SMP_BR_PairWith(const bt_bdaddr_t& bd_addr);
+extern tSMP_STATUS SMP_BR_PairWith(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -98,7 +98,7 @@
  * Returns          true - pairing cancelled
  *
  ******************************************************************************/
-extern bool SMP_PairCancel(const bt_bdaddr_t& bd_addr);
+extern bool SMP_PairCancel(const RawAddress& bd_addr);
 
 /*******************************************************************************
  *
@@ -114,7 +114,7 @@
  * Returns          None
  *
  ******************************************************************************/
-extern void SMP_SecurityGrant(const bt_bdaddr_t& bd_addr, uint8_t res);
+extern void SMP_SecurityGrant(const RawAddress& bd_addr, uint8_t res);
 
 /*******************************************************************************
  *
@@ -130,7 +130,7 @@
  *                             BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
  *
  ******************************************************************************/
-extern void SMP_PasskeyReply(const bt_bdaddr_t& bd_addr, uint8_t res,
+extern void SMP_PasskeyReply(const RawAddress& bd_addr, uint8_t res,
                              uint32_t passkey);
 
 /*******************************************************************************
@@ -145,7 +145,7 @@
  *                  res          - comparison result SMP_SUCCESS if success
  *
  ******************************************************************************/
-extern void SMP_ConfirmReply(const bt_bdaddr_t& bd_addr, uint8_t res);
+extern void SMP_ConfirmReply(const RawAddress& bd_addr, uint8_t res);
 
 /*******************************************************************************
  *
@@ -159,7 +159,7 @@
  *                  p_data      - SM Randomizer  C.
  *
  ******************************************************************************/
-extern void SMP_OobDataReply(const bt_bdaddr_t& bd_addr, tSMP_STATUS res,
+extern void SMP_OobDataReply(const RawAddress& bd_addr, tSMP_STATUS res,
                              uint8_t len, uint8_t* p_data);
 
 /*******************************************************************************
@@ -203,7 +203,7 @@
  *                  value        - keypress notification parameter value
  *
  ******************************************************************************/
-extern void SMP_KeypressNotification(const bt_bdaddr_t& bd_addr, uint8_t value);
+extern void SMP_KeypressNotification(const RawAddress& bd_addr, uint8_t value);
 
 /*******************************************************************************
  *
@@ -221,11 +221,11 @@
     tBLE_BD_ADDR* addr_to_send_to);
 
 // Called when LTK request is received from controller.
-extern bool smp_proc_ltk_request(const bt_bdaddr_t& bda);
+extern bool smp_proc_ltk_request(const RawAddress& bda);
 
 // Called when link is encrypted and notified to slave device.
 // Proceed to send LTK, DIV and ER to master if bonding the devices.
-extern void smp_link_encrypted(const bt_bdaddr_t& bda, uint8_t encr_enable);
+extern void smp_link_encrypted(const RawAddress& bda, uint8_t encr_enable);
 
 //
 // The AES-CMAC Generation Function with tlen implemented.
diff --git a/stack/include/smp_api_types.h b/stack/include/smp_api_types.h
index 75ac3fc..a21af4b 100644
--- a/stack/include/smp_api_types.h
+++ b/stack/include/smp_api_types.h
@@ -270,7 +270,7 @@
 
 /* Security Manager events - Called by the stack when Security Manager related
  * events occur.*/
-typedef uint8_t(tSMP_CALLBACK)(tSMP_EVT event, const bt_bdaddr_t& bd_addr,
+typedef uint8_t(tSMP_CALLBACK)(tSMP_EVT event, const RawAddress& bd_addr,
                                tSMP_EVT_DATA* p_data);
 
 /* callback function for CMAC algorithm
diff --git a/stack/include/srvc_api.h b/stack/include/srvc_api.h
index c0655a5..9f0e1aa 100644
--- a/stack/include/srvc_api.h
+++ b/stack/include/srvc_api.h
@@ -75,13 +75,13 @@
   uint8_t* data_string[DIS_MAX_STRING_DATA];
 } tDIS_VALUE;
 
-typedef void(tDIS_READ_CBACK)(const bt_bdaddr_t& addr, tDIS_VALUE* p_dis_value);
+typedef void(tDIS_READ_CBACK)(const RawAddress& addr, tDIS_VALUE* p_dis_value);
 
 /*****************************************************************************
  *  Data structure used by Battery Service
  ****************************************************************************/
 typedef struct {
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   bool need_rsp;
   uint16_t clt_cfg;
 } tBA_WRITE_DATA;
@@ -162,7 +162,7 @@
  * Returns          void
  *
  ******************************************************************************/
-extern bool DIS_ReadDISInfo(const bt_bdaddr_t& peer_bda,
+extern bool DIS_ReadDISInfo(const RawAddress& peer_bda,
                             tDIS_READ_CBACK* p_cback, tDIS_ATTR_MASK mask);
 
 /*******************************************************************************
@@ -193,7 +193,7 @@
  * Description      Send battery level notification
  *
  ******************************************************************************/
-extern void Battery_Notify(uint8_t app_id, const bt_bdaddr_t& remote_bda,
+extern void Battery_Notify(uint8_t app_id, const RawAddress& remote_bda,
                            uint8_t battery_level);
 
 #endif
diff --git a/stack/l2cap/l2c_api.cc b/stack/l2cap/l2c_api.cc
index f5db6d0..6e70a4e 100644
--- a/stack/l2cap/l2c_api.cc
+++ b/stack/l2cap/l2c_api.cc
@@ -207,7 +207,7 @@
  * Returns          the CID of the connection, or 0 if it failed to start
  *
  ******************************************************************************/
-uint16_t L2CA_ConnectReq(uint16_t psm, const bt_bdaddr_t& p_bd_addr) {
+uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr) {
   return L2CA_ErtmConnectReq(psm, p_bd_addr, NULL);
 }
 
@@ -228,7 +228,7 @@
  * Returns          the CID of the connection, or 0 if it failed to start
  *
  ******************************************************************************/
-uint16_t L2CA_ErtmConnectReq(uint16_t psm, const bt_bdaddr_t& p_bd_addr,
+uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr,
                              tL2CAP_ERTM_INFO* p_ertm_info) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
@@ -442,7 +442,7 @@
  * Returns          the CID of the connection, or 0 if it failed to start
  *
  ******************************************************************************/
-uint16_t L2CA_ConnectLECocReq(uint16_t psm, const bt_bdaddr_t& p_bd_addr,
+uint16_t L2CA_ConnectLECocReq(uint16_t psm, const RawAddress& p_bd_addr,
                               tL2CAP_LE_CFG_INFO* p_cfg) {
   VLOG(1) << __func__ << " BDA: " << p_bd_addr
           << StringPrintf(" PSM: 0x%04x", psm);
@@ -526,7 +526,7 @@
  * Returns          true for success, false for failure
  *
  ******************************************************************************/
-bool L2CA_ConnectLECocRsp(const bt_bdaddr_t& p_bd_addr, uint8_t id,
+bool L2CA_ConnectLECocRsp(const RawAddress& p_bd_addr, uint8_t id,
                           uint16_t lcid, uint16_t result, uint16_t status,
                           tL2CAP_LE_CFG_INFO* p_cfg) {
   VLOG(1) << __func__ << " BDA: " << p_bd_addr
@@ -647,7 +647,7 @@
  * Returns          true for success, false for failure
  *
  ******************************************************************************/
-bool L2CA_ConnectRsp(const bt_bdaddr_t& p_bd_addr, uint8_t id, uint16_t lcid,
+bool L2CA_ConnectRsp(const RawAddress& p_bd_addr, uint8_t id, uint16_t lcid,
                      uint16_t result, uint16_t status) {
   return L2CA_ErtmConnectRsp(p_bd_addr, id, lcid, result, status, NULL);
 }
@@ -663,8 +663,8 @@
  * Returns          true for success, false for failure
  *
  ******************************************************************************/
-bool L2CA_ErtmConnectRsp(const bt_bdaddr_t& p_bd_addr, uint8_t id,
-                         uint16_t lcid, uint16_t result, uint16_t status,
+bool L2CA_ErtmConnectRsp(const RawAddress& p_bd_addr, uint8_t id, uint16_t lcid,
+                         uint16_t result, uint16_t status,
                          tL2CAP_ERTM_INFO* p_ertm_info) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
@@ -889,7 +889,7 @@
  * Returns          true if echo request sent, else false.
  *
  ******************************************************************************/
-bool L2CA_Ping(const bt_bdaddr_t& p_bd_addr, tL2CA_ECHO_RSP_CB* p_callback) {
+bool L2CA_Ping(const RawAddress& p_bd_addr, tL2CA_ECHO_RSP_CB* p_callback) {
   tL2C_LCB* p_lcb;
 
   VLOG(1) << __func__ << " BDA: " << p_bd_addr;
@@ -951,7 +951,7 @@
  * Returns          true if echo request sent, else false.
  *
  ******************************************************************************/
-bool L2CA_Echo(const bt_bdaddr_t& p_bd_addr, BT_HDR* p_data,
+bool L2CA_Echo(const RawAddress& p_bd_addr, BT_HDR* p_data,
                tL2CA_ECHO_DATA_CB* p_callback) {
   tL2C_LCB* p_lcb;
   uint8_t* pp;
@@ -1066,7 +1066,7 @@
  * NOTE             This timeout applies to all logical channels active on the
  *                  ACL link.
  ******************************************************************************/
-bool L2CA_SetIdleTimeoutByBdAddr(const bt_bdaddr_t& bd_addr, uint16_t timeout,
+bool L2CA_SetIdleTimeoutByBdAddr(const RawAddress& bd_addr, uint16_t timeout,
                                  tBT_TRANSPORT transport) {
   tL2C_LCB* p_lcb;
 
@@ -1157,7 +1157,7 @@
  *
  ******************************************************************************/
 uint16_t L2CA_LocalLoopbackReq(uint16_t psm, uint16_t handle,
-                               const bt_bdaddr_t& p_bd_addr) {
+                               const RawAddress& p_bd_addr) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
   tL2C_RCB* p_rcb;
@@ -1215,7 +1215,7 @@
  * Returns          true if a valid channel, else false
  *
  ******************************************************************************/
-bool L2CA_SetAclPriority(const bt_bdaddr_t& bd_addr, uint8_t priority) {
+bool L2CA_SetAclPriority(const RawAddress& bd_addr, uint8_t priority) {
   VLOG(1) << __func__ << " BDA: " << bd_addr << ", priority: " << priority;
   return (l2cu_set_acl_priority(bd_addr, priority, false));
 }
@@ -1387,7 +1387,7 @@
  * NOTE             This flush timeout applies to all logical channels active on
  *                  the ACL link.
  ******************************************************************************/
-bool L2CA_SetFlushTimeout(const bt_bdaddr_t& bd_addr, uint16_t flush_tout) {
+bool L2CA_SetFlushTimeout(const RawAddress& bd_addr, uint16_t flush_tout) {
   tL2C_LCB* p_lcb;
   uint16_t hci_flush_to;
   uint32_t temp;
@@ -1470,7 +1470,7 @@
  *  Return value:    true if peer is connected
  *
  ******************************************************************************/
-bool L2CA_GetPeerFeatures(const bt_bdaddr_t& bd_addr, uint32_t* p_ext_feat,
+bool L2CA_GetPeerFeatures(const RawAddress& bd_addr, uint32_t* p_ext_feat,
                           uint8_t* p_chnl_mask) {
   tL2C_LCB* p_lcb;
 
@@ -1504,7 +1504,7 @@
  *  Return value:    true if found lcb for the given handle, false otherwise
  *
  ******************************************************************************/
-bool L2CA_GetBDAddrbyHandle(uint16_t handle, bt_bdaddr_t& bd_addr) {
+bool L2CA_GetBDAddrbyHandle(uint16_t handle, RawAddress& bd_addr) {
   tL2C_LCB* p_lcb = NULL;
   bool found_dev = false;
 
@@ -1580,12 +1580,12 @@
  *  Return value:   true if connection started
  *
  ******************************************************************************/
-bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const bt_bdaddr_t& rem_bda) {
+bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda) {
   uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
   return L2CA_ConnectFixedChnl(fixed_cid, rem_bda, phy);
 }
 
-bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const bt_bdaddr_t& rem_bda,
+bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda,
                            uint8_t initiating_phys) {
   tL2C_LCB* p_lcb;
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
@@ -1693,7 +1693,7 @@
  *                  L2CAP_DW_FAILED,  if error
  *
  ******************************************************************************/
-uint16_t L2CA_SendFixedChnlData(uint16_t fixed_cid, const bt_bdaddr_t& rem_bda,
+uint16_t L2CA_SendFixedChnlData(uint16_t fixed_cid, const RawAddress& rem_bda,
                                 BT_HDR* p_buf) {
   tL2C_LCB* p_lcb;
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
@@ -1807,7 +1807,7 @@
  *  Return value:   true if channel removed
  *
  ******************************************************************************/
-bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const bt_bdaddr_t& rem_bda) {
+bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
@@ -1873,7 +1873,7 @@
  * Returns          true if command succeeded, false if failed
  *
  ******************************************************************************/
-bool L2CA_SetFixedChannelTout(const bt_bdaddr_t& rem_bda, uint16_t fixed_cid,
+bool L2CA_SetFixedChannelTout(const RawAddress& rem_bda, uint16_t fixed_cid,
                               uint16_t idle_tout) {
   tL2C_LCB* p_lcb;
   tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
@@ -1994,7 +1994,7 @@
  * Returns          true if registered OK, else false
  *
  ******************************************************************************/
-bool L2CA_RegForNoCPEvt(tL2CA_NOCP_CB* p_cb, const bt_bdaddr_t& p_bda) {
+bool L2CA_RegForNoCPEvt(tL2CA_NOCP_CB* p_cb, const RawAddress& p_bda) {
   tL2C_LCB* p_lcb;
 
   /* Find the link that is associated with this remote bdaddr */
diff --git a/stack/l2cap/l2c_ble.cc b/stack/l2cap/l2c_ble.cc
index 8b2ce9c..02c3e49 100644
--- a/stack/l2cap/l2c_ble.cc
+++ b/stack/l2cap/l2c_ble.cc
@@ -53,7 +53,7 @@
  *  Return value:   true if connection was cancelled
  *
  ******************************************************************************/
-bool L2CA_CancelBleConnectReq(const bt_bdaddr_t& rem_bda) {
+bool L2CA_CancelBleConnectReq(const RawAddress& rem_bda) {
   tL2C_LCB* p_lcb;
 
   /* There can be only one BLE connection request outstanding at a time */
@@ -98,7 +98,7 @@
  *  Return value:   true if update started
  *
  ******************************************************************************/
-bool L2CA_UpdateBleConnParams(const bt_bdaddr_t& rem_bda, uint16_t min_int,
+bool L2CA_UpdateBleConnParams(const RawAddress& rem_bda, uint16_t min_int,
                               uint16_t max_int, uint16_t latency,
                               uint16_t timeout) {
   tL2C_LCB* p_lcb;
@@ -140,7 +140,7 @@
  *  Return value:   true if update started
  *
  ******************************************************************************/
-bool L2CA_EnableUpdateBleConnParams(const bt_bdaddr_t& rem_bda, bool enable) {
+bool L2CA_EnableUpdateBleConnParams(const RawAddress& rem_bda, bool enable) {
   if (stack_config_get_interface()->get_pts_conn_updates_disabled())
     return false;
 
@@ -183,7 +183,7 @@
  * Returns          link role.
  *
  ******************************************************************************/
-uint8_t L2CA_GetBleConnRole(const bt_bdaddr_t& bd_addr) {
+uint8_t L2CA_GetBleConnRole(const RawAddress& bd_addr) {
   uint8_t role = HCI_ROLE_UNKNOWN;
 
   tL2C_LCB* p_lcb;
@@ -202,7 +202,7 @@
  * Returns          disconnect reason
  *
  ******************************************************************************/
-uint16_t L2CA_GetDisconnectReason(const bt_bdaddr_t& remote_bda,
+uint16_t L2CA_GetDisconnectReason(const RawAddress& remote_bda,
                                   tBT_TRANSPORT transport) {
   tL2C_LCB* p_lcb;
   uint16_t reason = 0;
@@ -224,7 +224,7 @@
  * Returns none
  *
  ******************************************************************************/
-void l2cble_notify_le_connection(const bt_bdaddr_t& bda) {
+void l2cble_notify_le_connection(const RawAddress& bda) {
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bda, BT_TRANSPORT_LE);
   tACL_CONN* p_acl = btm_bda_to_acl(bda, BT_TRANSPORT_LE);
   tL2C_CCB* p_ccb;
@@ -257,7 +257,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2cble_scanner_conn_comp(uint16_t handle, const bt_bdaddr_t& bda,
+void l2cble_scanner_conn_comp(uint16_t handle, const RawAddress& bda,
                               tBLE_ADDR_TYPE type, uint16_t conn_interval,
                               uint16_t conn_latency, uint16_t conn_timeout) {
   tL2C_LCB* p_lcb;
@@ -340,7 +340,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2cble_advertiser_conn_comp(uint16_t handle, const bt_bdaddr_t& bda,
+void l2cble_advertiser_conn_comp(uint16_t handle, const RawAddress& bda,
                                  UNUSED_ATTR tBLE_ADDR_TYPE type,
                                  UNUSED_ATTR uint16_t conn_interval,
                                  UNUSED_ATTR uint16_t conn_latency,
@@ -420,7 +420,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2cble_conn_comp(uint16_t handle, uint8_t role, const bt_bdaddr_t& bda,
+void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda,
                       tBLE_ADDR_TYPE type, uint16_t conn_interval,
                       uint16_t conn_latency, uint16_t conn_timeout) {
   btm_ble_update_link_topology_mask(role, true);
@@ -832,7 +832,7 @@
   tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb;
   uint16_t scan_int;
   uint16_t scan_win;
-  bt_bdaddr_t peer_addr;
+  RawAddress peer_addr;
   uint8_t peer_addr_type = BLE_ADDR_PUBLIC;
   uint8_t own_addr_type = BLE_ADDR_PUBLIC;
 
@@ -1186,7 +1186,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2cble_set_fixed_channel_tx_data_length(const bt_bdaddr_t& remote_bda,
+void l2cble_set_fixed_channel_tx_data_length(const RawAddress& remote_bda,
                                              uint16_t fix_cid,
                                              uint16_t tx_mtu) {
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(remote_bda, BT_TRANSPORT_LE);
@@ -1310,9 +1310,9 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2cble_sec_comp(const bt_bdaddr_t* bda, tBT_TRANSPORT transport,
+void l2cble_sec_comp(const RawAddress* bda, tBT_TRANSPORT transport,
                      void* p_ref_data, uint8_t status) {
-  const bt_bdaddr_t& p_bda = *bda;
+  const RawAddress& p_bda = *bda;
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bda, BT_TRANSPORT_LE);
   tL2CAP_SEC_DATA* p_buf = NULL;
   uint8_t sec_flag;
@@ -1387,7 +1387,7 @@
  *                  false - failure
  *
  ******************************************************************************/
-bool l2ble_sec_access_req(const bt_bdaddr_t& bd_addr, uint16_t psm,
+bool l2ble_sec_access_req(const RawAddress& bd_addr, uint16_t psm,
                           bool is_originator, tL2CAP_SEC_CBACK* p_callback,
                           void* p_ref_data) {
   L2CAP_TRACE_DEBUG("%s", __func__);
diff --git a/stack/l2cap/l2c_int.h b/stack/l2cap/l2c_int.h
index c846dff..14eb1e5 100644
--- a/stack/l2cap/l2c_int.h
+++ b/stack/l2cap/l2c_int.h
@@ -256,7 +256,7 @@
 #define L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA 100
 #endif
 
-typedef void(tL2CAP_SEC_CBACK)(const bt_bdaddr_t& bd_addr,
+typedef void(tL2CAP_SEC_CBACK)(const RawAddress& bd_addr,
                                tBT_TRANSPORT trasnport, void* p_ref_data,
                                tBTM_STATUS result);
 
@@ -393,7 +393,7 @@
 
   tL2C_CCB* p_pending_ccb;  /* ccb of waiting channel during link disconnect */
   alarm_t* info_resp_timer; /* Timer entry for info resp timeout evt */
-  bt_bdaddr_t remote_bd_addr; /* The BD address of the remote */
+  RawAddress remote_bd_addr; /* The BD address of the remote */
 
   uint8_t link_role; /* Master or slave */
   uint8_t id;
@@ -513,7 +513,7 @@
 
   uint16_t num_ble_links_active; /* Number of LE links active */
   bool is_ble_connecting;
-  bt_bdaddr_t ble_connecting_bda;
+  RawAddress ble_connecting_bda;
   uint16_t controller_le_xmit_window; /* Total ACL window for all links */
   tL2C_BLE_FIXED_CHNLS_MASK l2c_ble_fixed_chnls_mask;  // LE fixed channels mask
   uint16_t num_lm_ble_bufs;         /* # of ACL buffers on controller */
@@ -537,7 +537,7 @@
  * fields will always be filled in.
 */
 typedef struct {
-  bt_bdaddr_t bd_addr;   /* Remote BD address */
+  RawAddress bd_addr;    /* Remote BD address */
   uint8_t status;        /* Connection status */
   uint16_t psm;          /* PSM of the connection */
   uint16_t l2cap_result; /* L2CAP result */
@@ -590,18 +590,18 @@
  ***********************************
 */
 extern bool l2cu_can_allocate_lcb(void);
-extern tL2C_LCB* l2cu_allocate_lcb(const bt_bdaddr_t& p_bd_addr,
-                                   bool is_bonding, tBT_TRANSPORT transport);
+extern tL2C_LCB* l2cu_allocate_lcb(const RawAddress& p_bd_addr, bool is_bonding,
+                                   tBT_TRANSPORT transport);
 extern bool l2cu_start_post_bond_timer(uint16_t handle);
 extern void l2cu_release_lcb(tL2C_LCB* p_lcb);
-extern tL2C_LCB* l2cu_find_lcb_by_bd_addr(const bt_bdaddr_t& p_bd_addr,
+extern tL2C_LCB* l2cu_find_lcb_by_bd_addr(const RawAddress& p_bd_addr,
                                           tBT_TRANSPORT transport);
 extern tL2C_LCB* l2cu_find_lcb_by_handle(uint16_t handle);
-extern void l2cu_update_lcb_4_bonding(const bt_bdaddr_t& p_bd_addr,
+extern void l2cu_update_lcb_4_bonding(const RawAddress& p_bd_addr,
                                       bool is_bonding);
 
 extern uint8_t l2cu_get_conn_role(tL2C_LCB* p_this_lcb);
-extern bool l2cu_set_acl_priority(const bt_bdaddr_t& bd_addr, uint8_t priority,
+extern bool l2cu_set_acl_priority(const RawAddress& bd_addr, uint8_t priority,
                                   bool reset_after_rs);
 
 extern void l2cu_enqueue_ccb(tL2C_CCB* p_ccb);
@@ -715,16 +715,16 @@
 extern bool l2cu_create_conn_after_switch(tL2C_LCB* p_lcb);
 extern BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb,
                                             tL2C_TX_COMPLETE_CB_INFO* p_cbi);
-extern void l2cu_resubmit_pending_sec_req(const bt_bdaddr_t* p_bda);
+extern void l2cu_resubmit_pending_sec_req(const RawAddress* p_bda);
 extern void l2cu_initialize_amp_ccb(tL2C_LCB* p_lcb);
 extern void l2cu_adjust_out_mps(tL2C_CCB* p_ccb);
 
 /* Functions provided by l2c_link.cc
  ***********************************
 */
-extern bool l2c_link_hci_conn_req(const bt_bdaddr_t& bd_addr);
+extern bool l2c_link_hci_conn_req(const RawAddress& bd_addr);
 extern bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
-                                   const bt_bdaddr_t& p_bda);
+                                   const RawAddress& p_bda);
 extern bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason);
 extern bool l2c_link_hci_qos_violation(uint16_t handle);
 extern void l2c_link_timeout(tL2C_LCB* p_lcb);
@@ -737,15 +737,14 @@
                                                   uint8_t* p, uint16_t evt_len);
 extern void l2c_link_processs_num_bufs(uint16_t num_lm_acl_bufs);
 extern uint8_t l2c_link_pkts_rcvd(uint16_t* num_pkts, uint16_t* handles);
-extern void l2c_link_role_changed(const bt_bdaddr_t* bd_addr, uint8_t new_role,
+extern void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
                                   uint8_t hci_status);
-extern void l2c_link_sec_comp(const bt_bdaddr_t* p_bda, tBT_TRANSPORT trasnport,
+extern void l2c_link_sec_comp(const RawAddress* p_bda, tBT_TRANSPORT trasnport,
                               void* p_ref_data, uint8_t status);
-extern void l2c_link_sec_comp2(const bt_bdaddr_t& p_bda,
-                               tBT_TRANSPORT trasnport, void* p_ref_data,
-                               uint8_t status);
+extern void l2c_link_sec_comp2(const RawAddress& p_bda, tBT_TRANSPORT trasnport,
+                               void* p_ref_data, uint8_t status);
 extern void l2c_link_segments_xmitted(BT_HDR* p_msg);
-extern void l2c_pin_code_request(const bt_bdaddr_t& bd_addr);
+extern void l2c_pin_code_request(const RawAddress& bd_addr);
 extern void l2c_link_adjust_chnl_allocation(void);
 
 extern void l2c_link_processs_ble_num_bufs(uint16_t num_lm_acl_bufs);
@@ -807,11 +806,11 @@
 extern void l2cble_process_sig_cmd(tL2C_LCB* p_lcb, uint8_t* p,
                                    uint16_t pkt_len);
 extern void l2cble_conn_comp(uint16_t handle, uint8_t role,
-                             const bt_bdaddr_t& bda, tBLE_ADDR_TYPE type,
+                             const RawAddress& bda, tBLE_ADDR_TYPE type,
                              uint16_t conn_interval, uint16_t conn_latency,
                              uint16_t conn_timeout);
 extern bool l2cble_init_direct_conn(tL2C_LCB* p_lcb);
-extern void l2cble_notify_le_connection(const bt_bdaddr_t& bda);
+extern void l2cble_notify_le_connection(const RawAddress& bda);
 extern void l2c_ble_link_adjust_allocation(void);
 extern void l2cble_process_conn_update_evt(uint16_t handle, uint8_t status,
                                            uint16_t interval, uint16_t latency,
@@ -822,7 +821,7 @@
 extern void l2cble_send_peer_disc_req(tL2C_CCB* p_ccb);
 extern void l2cble_send_flow_control_credit(tL2C_CCB* p_ccb,
                                             uint16_t credit_value);
-extern bool l2ble_sec_access_req(const bt_bdaddr_t& bd_addr, uint16_t psm,
+extern bool l2ble_sec_access_req(const RawAddress& bd_addr, uint16_t psm,
                                  bool is_originator,
                                  tL2CAP_SEC_CBACK* p_callback,
                                  void* p_ref_data);
@@ -837,7 +836,7 @@
 
 extern void l2cble_update_data_length(tL2C_LCB* p_lcb);
 extern void l2cble_set_fixed_channel_tx_data_length(
-    const bt_bdaddr_t& remote_bda, uint16_t fix_cid, uint16_t tx_mtu);
+    const RawAddress& remote_bda, uint16_t fix_cid, uint16_t tx_mtu);
 extern void l2cble_process_data_length_change_event(uint16_t handle,
                                                     uint16_t tx_data_len,
                                                     uint16_t rx_data_len);
diff --git a/stack/l2cap/l2c_link.cc b/stack/l2cap/l2c_link.cc
index 91a6ca5..0846673 100644
--- a/stack/l2cap/l2c_link.cc
+++ b/stack/l2cap/l2c_link.cc
@@ -58,7 +58,7 @@
  * Returns          true, if accept conn
  *
  ******************************************************************************/
-bool l2c_link_hci_conn_req(const bt_bdaddr_t& bd_addr) {
+bool l2c_link_hci_conn_req(const RawAddress& bd_addr) {
   tL2C_LCB* p_lcb;
   tL2C_LCB* p_lcb_cur;
   int xx;
@@ -147,7 +147,7 @@
  *
  ******************************************************************************/
 bool l2c_link_hci_conn_comp(uint8_t status, uint16_t handle,
-                            const bt_bdaddr_t& p_bda) {
+                            const RawAddress& p_bda) {
   tL2C_CONN_INFO ci;
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
@@ -273,13 +273,13 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2c_link_sec_comp(const bt_bdaddr_t* p_bda,
+void l2c_link_sec_comp(const RawAddress* p_bda,
                        UNUSED_ATTR tBT_TRANSPORT transport, void* p_ref_data,
                        uint8_t status) {
   l2c_link_sec_comp2(*p_bda, transport, p_ref_data, status);
 }
 
-void l2c_link_sec_comp2(const bt_bdaddr_t& p_bda,
+void l2c_link_sec_comp2(const RawAddress& p_bda,
                         UNUSED_ATTR tBT_TRANSPORT transport, void* p_ref_data,
                         uint8_t status) {
   tL2C_CONN_INFO ci;
@@ -432,7 +432,7 @@
                   "link_role = %d is_bonding = %d disc_reason = %d transport = "
                   "%d",
                   __func__, xx,
-                  bdaddr_to_string((bt_bdaddr_t*)&p_lcb->remote_bd_addr,
+                  bdaddr_to_string((RawAddress*)&p_lcb->remote_bd_addr,
                                    bd_addr_str, sizeof(bd_addr_str)),
                   p_lcb, p_lcb->in_use, p_lcb->link_state, p_lcb->handle,
                   p_lcb->link_role, p_lcb->is_bonding, p_lcb->disc_reason,
@@ -856,7 +856,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2c_link_role_changed(const bt_bdaddr_t* bd_addr, uint8_t new_role,
+void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
                            uint8_t hci_status) {
   tL2C_LCB* p_lcb;
   int xx;
@@ -896,7 +896,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2c_pin_code_request(const bt_bdaddr_t& bd_addr) {
+void l2c_pin_code_request(const RawAddress& bd_addr) {
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_BR_EDR);
 
   if ((p_lcb) && (!p_lcb->ccb_queue.p_first_ccb)) {
diff --git a/stack/l2cap/l2c_ucd.cc b/stack/l2cap/l2c_ucd.cc
index aa3e784..e52b90b 100644
--- a/stack/l2cap/l2c_ucd.cc
+++ b/stack/l2cap/l2c_ucd.cc
@@ -40,7 +40,7 @@
 
 extern fixed_queue_t* btu_bta_alarm_queue;
 
-static bool l2c_ucd_connect(const bt_bdaddr_t& rem_bda);
+static bool l2c_ucd_connect(const RawAddress& rem_bda);
 
 /*******************************************************************************
  *
@@ -51,8 +51,8 @@
  * Returns          void
  *
  ******************************************************************************/
-static void l2c_ucd_discover_cback(const bt_bdaddr_t& rem_bda,
-                                   uint8_t info_type, uint32_t data) {
+static void l2c_ucd_discover_cback(const RawAddress& rem_bda, uint8_t info_type,
+                                   uint32_t data) {
   tL2C_RCB* p_rcb = &l2cb.rcb_pool[0];
   uint16_t xx;
 
@@ -86,7 +86,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void l2c_ucd_data_ind_cback(const bt_bdaddr_t& rem_bda, BT_HDR* p_buf) {
+static void l2c_ucd_data_ind_cback(const RawAddress& rem_bda, BT_HDR* p_buf) {
   uint8_t* p;
   uint16_t psm;
   tL2C_RCB* p_rcb;
@@ -118,7 +118,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void l2c_ucd_congestion_status_cback(const bt_bdaddr_t& rem_bda,
+static void l2c_ucd_congestion_status_cback(const RawAddress& rem_bda,
                                             bool is_congested) {
   tL2C_RCB* p_rcb = &l2cb.rcb_pool[0];
   uint16_t xx;
@@ -309,7 +309,7 @@
  *  Return value:   true if successs
  *
  ******************************************************************************/
-bool L2CA_UcdDiscover(uint16_t psm, const bt_bdaddr_t& rem_bda,
+bool L2CA_UcdDiscover(uint16_t psm, const RawAddress& rem_bda,
                       uint8_t info_type) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
@@ -374,7 +374,7 @@
  *                  L2CAP_DW_FAILED,  if error
  *
  ******************************************************************************/
-uint16_t L2CA_UcdDataWrite(uint16_t psm, const bt_bdaddr_t& rem_bda,
+uint16_t L2CA_UcdDataWrite(uint16_t psm, const RawAddress& rem_bda,
                            BT_HDR* p_buf, uint16_t flags) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
@@ -470,7 +470,7 @@
  *  Return value:   true if successs
  *
  ******************************************************************************/
-bool L2CA_UcdSetIdleTimeout(const bt_bdaddr_t& rem_bda, uint16_t timeout) {
+bool L2CA_UcdSetIdleTimeout(const RawAddress& rem_bda, uint16_t timeout) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
 
@@ -502,7 +502,7 @@
  * Returns          true if a valid channel, else false
  *
  ******************************************************************************/
-bool L2CA_UCDSetTxPriority(const bt_bdaddr_t& rem_bda,
+bool L2CA_UCDSetTxPriority(const RawAddress& rem_bda,
                            tL2CAP_CHNL_PRIORITY priority) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
@@ -543,7 +543,7 @@
  *  Return value:   true if successs
  *
  ******************************************************************************/
-static bool l2c_ucd_connect(const bt_bdaddr_t& rem_bda) {
+static bool l2c_ucd_connect(const RawAddress& rem_bda) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
   tL2C_RCB* p_rcb;
diff --git a/stack/l2cap/l2c_utils.cc b/stack/l2cap/l2c_utils.cc
index 45e0a93..c8f1696 100644
--- a/stack/l2cap/l2c_utils.cc
+++ b/stack/l2cap/l2c_utils.cc
@@ -66,7 +66,7 @@
  * Returns          LCB address or NULL if none found
  *
  ******************************************************************************/
-tL2C_LCB* l2cu_allocate_lcb(const bt_bdaddr_t& p_bd_addr, bool is_bonding,
+tL2C_LCB* l2cu_allocate_lcb(const RawAddress& p_bd_addr, bool is_bonding,
                             tBT_TRANSPORT transport) {
   int xx;
   tL2C_LCB* p_lcb = &l2cb.lcb_pool[0];
@@ -123,7 +123,7 @@
  * Returns          Nothing
  *
  ******************************************************************************/
-void l2cu_update_lcb_4_bonding(const bt_bdaddr_t& p_bd_addr, bool is_bonding) {
+void l2cu_update_lcb_4_bonding(const RawAddress& p_bd_addr, bool is_bonding) {
   tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_BR_EDR);
 
   if (p_lcb) {
@@ -258,7 +258,7 @@
  * Returns          pointer to matched LCB, or NULL if no match
  *
  ******************************************************************************/
-tL2C_LCB* l2cu_find_lcb_by_bd_addr(const bt_bdaddr_t& p_bd_addr,
+tL2C_LCB* l2cu_find_lcb_by_bd_addr(const RawAddress& p_bd_addr,
                                    tBT_TRANSPORT transport) {
   int xx;
   tL2C_LCB* p_lcb = &l2cb.lcb_pool[0];
@@ -2358,7 +2358,7 @@
  *
  ******************************************************************************/
 
-bool l2cu_set_acl_priority(const bt_bdaddr_t& bd_addr, uint8_t priority,
+bool l2cu_set_acl_priority(const RawAddress& bd_addr, uint8_t priority,
                            bool reset_after_rs) {
   tL2C_LCB* p_lcb;
   uint8_t* pp;
@@ -2430,7 +2430,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void l2cu_resubmit_pending_sec_req(const bt_bdaddr_t* p_bda) {
+void l2cu_resubmit_pending_sec_req(const RawAddress* p_bda) {
   tL2C_LCB* p_lcb;
   tL2C_CCB* p_ccb;
   tL2C_CCB* p_next_ccb;
diff --git a/stack/l2cap/l2cap_client.cc b/stack/l2cap/l2cap_client.cc
index 1638a15..f20d3d9 100644
--- a/stack/l2cap/l2cap_client.cc
+++ b/stack/l2cap/l2cap_client.cc
@@ -127,7 +127,7 @@
 }
 
 bool l2cap_client_connect(l2cap_client_t* client,
-                          const bt_bdaddr_t& remote_bdaddr, uint16_t psm) {
+                          const RawAddress& remote_bdaddr, uint16_t psm) {
   CHECK(client != NULL);
   CHECK(psm != 0);
   CHECK(!bdaddr_is_empty(&remote_bdaddr));
diff --git a/stack/mcap/mca_api.cc b/stack/mcap/mca_api.cc
index d671ef6..565cebb 100644
--- a/stack/mcap/mca_api.cc
+++ b/stack/mcap/mca_api.cc
@@ -302,7 +302,7 @@
  * Returns          MCA_SUCCESS if successful, otherwise error.
  *
  ******************************************************************************/
-tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, const bt_bdaddr_t& bd_addr,
+tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, const RawAddress& bd_addr,
                            uint16_t ctrl_psm, uint16_t sec_mask) {
   tMCA_RESULT result = MCA_BAD_HANDLE;
   tMCA_CCB* p_ccb;
diff --git a/stack/mcap/mca_csm.cc b/stack/mcap/mca_csm.cc
index 4c5500d..9ff1915 100644
--- a/stack/mcap/mca_csm.cc
+++ b/stack/mcap/mca_csm.cc
@@ -178,7 +178,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-tMCA_CCB* mca_ccb_by_bd(tMCA_HANDLE handle, const bt_bdaddr_t& bd_addr) {
+tMCA_CCB* mca_ccb_by_bd(tMCA_HANDLE handle, const RawAddress& bd_addr) {
   tMCA_CCB* p_ccb = NULL;
   tMCA_RCB* p_rcb = mca_rcb_by_handle(handle);
   tMCA_CCB* p_ccb_tmp;
@@ -209,7 +209,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-tMCA_CCB* mca_ccb_alloc(tMCA_HANDLE handle, const bt_bdaddr_t& bd_addr) {
+tMCA_CCB* mca_ccb_alloc(tMCA_HANDLE handle, const RawAddress& bd_addr) {
   tMCA_CCB* p_ccb = NULL;
   tMCA_RCB* p_rcb = mca_rcb_by_handle(handle);
   tMCA_CCB* p_ccb_tmp;
diff --git a/stack/mcap/mca_int.h b/stack/mcap/mca_int.h
index 448e2c1..55765fd 100644
--- a/stack/mcap/mca_int.h
+++ b/stack/mcap/mca_int.h
@@ -218,7 +218,7 @@
   alarm_t* mca_ccb_timer; /* MCA CCB timer entry */
   tMCA_CCB_MSG* p_tx_req; /* Current request being sent/awaiting response */
   tMCA_CCB_MSG* p_rx_msg; /* Current message received/being processed */
-  bt_bdaddr_t peer_addr;  /* BD address of peer */
+  RawAddress peer_addr;   /* BD address of peer */
   uint16_t sec_mask;      /* Security mask for connections as initiator */
   uint16_t ctrl_vpsm;     /* The virtual PSM that peer is listening for control
                              channel */
@@ -278,8 +278,8 @@
 
 /* csm functions */
 extern void mca_ccb_event(tMCA_CCB* p_ccb, uint8_t event, tMCA_CCB_EVT* p_data);
-extern tMCA_CCB* mca_ccb_by_bd(tMCA_HANDLE handle, const bt_bdaddr_t& bd_addr);
-extern tMCA_CCB* mca_ccb_alloc(tMCA_HANDLE handle, const bt_bdaddr_t& bd_addr);
+extern tMCA_CCB* mca_ccb_by_bd(tMCA_HANDLE handle, const RawAddress& bd_addr);
+extern tMCA_CCB* mca_ccb_alloc(tMCA_HANDLE handle, const RawAddress& bd_addr);
 extern void mca_ccb_rsp_tout(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data);
 extern void mca_ccb_dealloc(tMCA_CCB* p_ccb, tMCA_CCB_EVT* p_data);
 extern tMCA_CL mca_ccb_to_hdl(tMCA_CCB* p_ccb);
@@ -337,13 +337,13 @@
 extern void mca_stop_timer(tMCA_CCB* p_ccb);
 
 /* l2c functions */
-extern uint16_t mca_l2c_open_req(const bt_bdaddr_t& bd_addr, uint16_t PSM,
+extern uint16_t mca_l2c_open_req(const RawAddress& bd_addr, uint16_t PSM,
                                  const tMCA_CHNL_CFG* p_chnl_cfg);
 
 /* callback function declarations */
-extern void mca_l2c_cconn_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+extern void mca_l2c_cconn_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                     uint16_t psm, uint8_t id);
-extern void mca_l2c_dconn_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+extern void mca_l2c_dconn_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                     uint16_t psm, uint8_t id);
 extern void mca_l2c_connect_cfm_cback(uint16_t lcid, uint16_t result);
 extern void mca_l2c_config_cfm_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
diff --git a/stack/mcap/mca_l2c.cc b/stack/mcap/mca_l2c.cc
index ae5c3e4..78a17ae 100644
--- a/stack/mcap/mca_l2c.cc
+++ b/stack/mcap/mca_l2c.cc
@@ -66,7 +66,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void mca_sec_check_complete_term(const bt_bdaddr_t* bd_addr,
+static void mca_sec_check_complete_term(const RawAddress* bd_addr,
                                         UNUSED_ATTR tBT_TRANSPORT transport,
                                         void* p_ref_data, uint8_t res) {
   tMCA_TC_TBL* p_tbl = (tMCA_TC_TBL*)p_ref_data;
@@ -111,7 +111,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void mca_sec_check_complete_orig(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+static void mca_sec_check_complete_orig(UNUSED_ATTR const RawAddress* bd_addr,
                                         UNUSED_ATTR tBT_TRANSPORT transport,
                                         void* p_ref_data, uint8_t res) {
   tMCA_TC_TBL* p_tbl = (tMCA_TC_TBL*)p_ref_data;
@@ -140,7 +140,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void mca_l2c_cconn_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void mca_l2c_cconn_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                              uint16_t psm, uint8_t id) {
   tMCA_HANDLE handle = mca_handle_by_cpsm(psm);
   tMCA_CCB* p_ccb;
@@ -213,7 +213,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void mca_l2c_dconn_ind_cback(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void mca_l2c_dconn_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                              uint16_t psm, uint8_t id) {
   tMCA_HANDLE handle = mca_handle_by_dpsm(psm);
   tMCA_CCB* p_ccb;
@@ -515,7 +515,7 @@
  * Returns          void.
  *
  ******************************************************************************/
-uint16_t mca_l2c_open_req(const bt_bdaddr_t& bd_addr, uint16_t psm,
+uint16_t mca_l2c_open_req(const RawAddress& bd_addr, uint16_t psm,
                           const tMCA_CHNL_CFG* p_chnl_cfg) {
   tL2CAP_ERTM_INFO ertm_info;
 
diff --git a/stack/pan/pan_api.cc b/stack/pan/pan_api.cc
index 9df44b5..a36793c 100644
--- a/stack/pan/pan_api.cc
+++ b/stack/pan/pan_api.cc
@@ -264,7 +264,7 @@
  *                                     allowed at that point of time
  *
  ******************************************************************************/
-tPAN_RESULT PAN_Connect(const bt_bdaddr_t& rem_bda, uint8_t src_role,
+tPAN_RESULT PAN_Connect(const RawAddress& rem_bda, uint8_t src_role,
                         uint8_t dst_role, uint16_t* handle) {
   tPAN_CONN* pcb;
   tBNEP_RESULT result;
@@ -447,9 +447,9 @@
  *                                           there is an error in sending data
  *
  ******************************************************************************/
-tPAN_RESULT PAN_Write(uint16_t handle, const bt_bdaddr_t& dst,
-                      const bt_bdaddr_t& src, uint16_t protocol,
-                      uint8_t* p_data, uint16_t len, bool ext) {
+tPAN_RESULT PAN_Write(uint16_t handle, const RawAddress& dst,
+                      const RawAddress& src, uint16_t protocol, uint8_t* p_data,
+                      uint16_t len, bool ext) {
   if (pan_cb.role == PAN_ROLE_INACTIVE || !pan_cb.num_conns) {
     PAN_TRACE_ERROR("%s PAN is not active, data write failed.", __func__);
     return PAN_FAILURE;
@@ -500,8 +500,8 @@
  *                                           there is an error in sending data
  *
  ******************************************************************************/
-tPAN_RESULT PAN_WriteBuf(uint16_t handle, const bt_bdaddr_t& dst,
-                         const bt_bdaddr_t& src, uint16_t protocol,
+tPAN_RESULT PAN_WriteBuf(uint16_t handle, const RawAddress& dst,
+                         const RawAddress& src, uint16_t protocol,
                          BT_HDR* p_buf, bool ext) {
   tPAN_CONN* pcb;
   uint16_t i;
diff --git a/stack/pan/pan_int.h b/stack/pan/pan_int.h
index cf426e8..27fe666 100644
--- a/stack/pan/pan_int.h
+++ b/stack/pan/pan_int.h
@@ -51,7 +51,7 @@
   uint8_t con_flags;
 
   uint16_t handle;
-  bt_bdaddr_t rem_bda;
+  RawAddress rem_bda;
 
   uint16_t bad_pkts_rcvd;
   uint16_t src_uuid;
@@ -97,16 +97,16 @@
 
 /******************************************************************************/
 extern void pan_register_with_bnep(void);
-extern void pan_conn_ind_cb(uint16_t handle, const bt_bdaddr_t& p_bda,
+extern void pan_conn_ind_cb(uint16_t handle, const RawAddress& p_bda,
                             tBT_UUID* remote_uuid, tBT_UUID* local_uuid,
                             bool is_role_change);
-extern void pan_connect_state_cb(uint16_t handle, const bt_bdaddr_t& rem_bda,
+extern void pan_connect_state_cb(uint16_t handle, const RawAddress& rem_bda,
                                  tBNEP_RESULT result, bool is_role_change);
-extern void pan_data_ind_cb(uint16_t handle, const bt_bdaddr_t& src,
-                            const bt_bdaddr_t& dst, uint16_t protocol,
+extern void pan_data_ind_cb(uint16_t handle, const RawAddress& src,
+                            const RawAddress& dst, uint16_t protocol,
                             uint8_t* p_data, uint16_t len, bool fw_ext_present);
-extern void pan_data_buf_ind_cb(uint16_t handle, const bt_bdaddr_t& src,
-                                const bt_bdaddr_t& dst, uint16_t protocol,
+extern void pan_data_buf_ind_cb(uint16_t handle, const RawAddress& src,
+                                const RawAddress& dst, uint16_t protocol,
                                 BT_HDR* p_buf, bool ext);
 extern void pan_tx_data_flow_cb(uint16_t handle, tBNEP_RESULT event);
 void pan_proto_filt_ind_cb(uint16_t handle, bool indication,
@@ -117,9 +117,9 @@
                            uint8_t* p_filters);
 extern uint32_t pan_register_with_sdp(uint16_t uuid, uint8_t sec_mask,
                                       const char* p_name, const char* p_desc);
-extern tPAN_CONN* pan_allocate_pcb(const bt_bdaddr_t& p_bda, uint16_t handle);
+extern tPAN_CONN* pan_allocate_pcb(const RawAddress& p_bda, uint16_t handle);
 extern tPAN_CONN* pan_get_pcb_by_handle(uint16_t handle);
-extern tPAN_CONN* pan_get_pcb_by_addr(const bt_bdaddr_t& p_bda);
+extern tPAN_CONN* pan_get_pcb_by_addr(const RawAddress& p_bda);
 extern void pan_close_all_connections(void);
 extern void pan_release_pcb(tPAN_CONN* p_pcb);
 extern void pan_dump_status(void);
diff --git a/stack/pan/pan_main.cc b/stack/pan/pan_main.cc
index c38e2e4..8817c4e 100644
--- a/stack/pan/pan_main.cc
+++ b/stack/pan/pan_main.cc
@@ -89,7 +89,7 @@
  * Returns          none
  *
  ******************************************************************************/
-void pan_conn_ind_cb(uint16_t handle, const bt_bdaddr_t& p_bda,
+void pan_conn_ind_cb(uint16_t handle, const RawAddress& p_bda,
                      tBT_UUID* remote_uuid, tBT_UUID* local_uuid,
                      bool is_role_change) {
   tPAN_CONN* pcb;
@@ -315,7 +315,7 @@
  *
  ******************************************************************************/
 void pan_connect_state_cb(uint16_t handle,
-                          UNUSED_ATTR const bt_bdaddr_t& rem_bda,
+                          UNUSED_ATTR const RawAddress& rem_bda,
                           tBNEP_RESULT result, bool is_role_change) {
   tPAN_CONN* pcb;
   uint8_t peer_role;
@@ -414,8 +414,8 @@
  * Returns          none
  *
  ******************************************************************************/
-void pan_data_ind_cb(uint16_t handle, const bt_bdaddr_t& src,
-                     const bt_bdaddr_t& dst, uint16_t protocol, uint8_t* p_data,
+void pan_data_ind_cb(uint16_t handle, const RawAddress& src,
+                     const RawAddress& dst, uint16_t protocol, uint8_t* p_data,
                      uint16_t len, bool ext) {
   tPAN_CONN* pcb;
   uint16_t i;
@@ -508,8 +508,8 @@
  * Returns          none
  *
  ******************************************************************************/
-void pan_data_buf_ind_cb(uint16_t handle, const bt_bdaddr_t& src,
-                         const bt_bdaddr_t& dst, uint16_t protocol,
+void pan_data_buf_ind_cb(uint16_t handle, const RawAddress& src,
+                         const RawAddress& dst, uint16_t protocol,
                          BT_HDR* p_buf, bool ext) {
   tPAN_CONN *pcb, *dst_pcb;
   tBNEP_RESULT result;
diff --git a/stack/pan/pan_utils.cc b/stack/pan/pan_utils.cc
index 215e310..b2eed2d 100644
--- a/stack/pan/pan_utils.cc
+++ b/stack/pan/pan_utils.cc
@@ -175,7 +175,7 @@
  * Returns
  *
  ******************************************************************************/
-tPAN_CONN* pan_allocate_pcb(const bt_bdaddr_t& p_bda, uint16_t handle) {
+tPAN_CONN* pan_allocate_pcb(const RawAddress& p_bda, uint16_t handle) {
   uint16_t i;
 
   for (i = 0; i < MAX_PAN_CONNS; i++) {
@@ -231,7 +231,7 @@
  * Returns
  *
  ******************************************************************************/
-tPAN_CONN* pan_get_pcb_by_addr(const bt_bdaddr_t& p_bda) {
+tPAN_CONN* pan_get_pcb_by_addr(const RawAddress& p_bda) {
   uint16_t i;
 
   for (i = 0; i < MAX_PAN_CONNS; i++) {
diff --git a/stack/rfcomm/port_api.cc b/stack/rfcomm/port_api.cc
index 6988b2f..808b567 100644
--- a/stack/rfcomm/port_api.cc
+++ b/stack/rfcomm/port_api.cc
@@ -113,7 +113,7 @@
  *
  ******************************************************************************/
 int RFCOMM_CreateConnection(uint16_t uuid, uint8_t scn, bool is_server,
-                            uint16_t mtu, const bt_bdaddr_t& bd_addr,
+                            uint16_t mtu, const RawAddress& bd_addr,
                             uint16_t* p_handle, tPORT_CALLBACK* p_mgmt_cb) {
   tPORT* p_port;
   uint8_t dlci;
@@ -480,7 +480,7 @@
  *                  p_lcid     - OUT L2CAP's LCID
  *
  ******************************************************************************/
-int PORT_CheckConnection(uint16_t handle, bt_bdaddr_t& bd_addr,
+int PORT_CheckConnection(uint16_t handle, RawAddress& bd_addr,
                          uint16_t* p_lcid) {
   tPORT* p_port;
 
@@ -519,7 +519,7 @@
  *                  bd_addr    - bd_addr of the peer
  *
  ******************************************************************************/
-bool PORT_IsOpening(bt_bdaddr_t& bd_addr) {
+bool PORT_IsOpening(RawAddress& bd_addr) {
   uint8_t xx, yy;
   tRFC_MCB* p_mcb = NULL;
   tPORT* p_port;
diff --git a/stack/rfcomm/port_int.h b/stack/rfcomm/port_int.h
index 532db43..018a9fa 100644
--- a/stack/rfcomm/port_int.h
+++ b/stack/rfcomm/port_int.h
@@ -92,7 +92,7 @@
   fixed_queue_t* cmd_q; /* Queue for command messages on this mux */
   uint8_t port_inx[RFCOMM_MAX_DLCI + 1]; /* Array for quick access to  */
                                          /* tPORT based on dlci        */
-  bt_bdaddr_t bd_addr;                   /* BD ADDR of the peer if initiator */
+  RawAddress bd_addr;                    /* BD ADDR of the peer if initiator */
   uint16_t lcid;                         /* Local cid used for this channel */
   uint16_t peer_l2cap_mtu; /* Max frame that can be sent to peer L2CAP */
   uint8_t state;           /* Current multiplexer channel state */
@@ -152,7 +152,7 @@
   uint8_t scn;   /* Service channel number */
   uint16_t uuid; /* Service UUID */
 
-  bt_bdaddr_t bd_addr; /* BD ADDR of the device for the multiplexer channel */
+  RawAddress bd_addr; /* BD ADDR of the device for the multiplexer channel */
   bool is_server;  /* true if the server application */
   uint8_t dlci;    /* DLCI of the connection */
 
@@ -215,14 +215,14 @@
 /*
  * Functions provided by the port_utils.cc
 */
-extern tPORT* port_allocate_port(uint8_t dlci, const bt_bdaddr_t& bd_addr);
+extern tPORT* port_allocate_port(uint8_t dlci, const RawAddress& bd_addr);
 extern void port_set_defaults(tPORT* p_port);
 extern void port_select_mtu(tPORT* p_port);
 extern void port_release_port(tPORT* p_port);
 extern tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci);
-extern tRFC_MCB* port_find_mcb(const bt_bdaddr_t& bd_addr);
+extern tRFC_MCB* port_find_mcb(const RawAddress& bd_addr);
 extern tPORT* port_find_dlci_port(uint8_t dlci);
-extern tPORT* port_find_port(uint8_t dlci, const bt_bdaddr_t& bd_addr);
+extern tPORT* port_find_port(uint8_t dlci, const RawAddress& bd_addr);
 extern uint32_t port_get_signal_changes(tPORT* p_port, uint8_t old_signals,
                                         uint8_t signal);
 extern uint32_t port_flow_control_user(tPORT* p_port);
diff --git a/stack/rfcomm/port_utils.cc b/stack/rfcomm/port_utils.cc
index 65c518c..a1b23ff 100644
--- a/stack/rfcomm/port_utils.cc
+++ b/stack/rfcomm/port_utils.cc
@@ -60,7 +60,7 @@
  * Returns          Pointer to the PORT or NULL if not found
  *
  ******************************************************************************/
-tPORT* port_allocate_port(uint8_t dlci, const bt_bdaddr_t& bd_addr) {
+tPORT* port_allocate_port(uint8_t dlci, const RawAddress& bd_addr) {
   tPORT* p_port = &rfc_cb.port.port[0];
   uint8_t xx, yy;
 
@@ -272,7 +272,7 @@
  *                  the address.
  *
  ******************************************************************************/
-tRFC_MCB* port_find_mcb(const bt_bdaddr_t& bd_addr) {
+tRFC_MCB* port_find_mcb(const RawAddress& bd_addr) {
   int i;
 
   for (i = 0; i < MAX_BD_CONNECTIONS; i++) {
@@ -356,7 +356,7 @@
  * Returns          Pointer to the PORT or NULL if not found
  *
  ******************************************************************************/
-tPORT* port_find_port(uint8_t dlci, const bt_bdaddr_t& bd_addr) {
+tPORT* port_find_port(uint8_t dlci, const RawAddress& bd_addr) {
   uint16_t i;
   tPORT* p_port;
 
diff --git a/stack/rfcomm/rfc_int.h b/stack/rfcomm/rfc_int.h
index c9fd290..93da38a 100644
--- a/stack/rfcomm/rfc_int.h
+++ b/stack/rfcomm/rfc_int.h
@@ -295,7 +295,7 @@
 /*
  * Functions provided by the rfc_utils.cc
 */
-tRFC_MCB* rfc_alloc_multiplexer_channel(const bt_bdaddr_t& bd_addr,
+tRFC_MCB* rfc_alloc_multiplexer_channel(const RawAddress& bd_addr,
                                         bool is_initiator);
 extern void rfc_release_multiplexer_channel(tRFC_MCB* p_rfc_mcb);
 extern void rfc_timer_start(tRFC_MCB* p_rfc_mcb, uint16_t timeout);
@@ -309,7 +309,7 @@
 extern void rfc_save_lcid_mcb(tRFC_MCB* p_rfc_mcb, uint16_t lcid);
 extern void rfc_check_mcb_active(tRFC_MCB* p_mcb);
 extern void rfc_port_closed(tPORT* p_port);
-extern void rfc_sec_check_complete(const bt_bdaddr_t* bd_addr,
+extern void rfc_sec_check_complete(const RawAddress* bd_addr,
                                    tBT_TRANSPORT transport, void* p_ref_data,
                                    uint8_t res);
 extern void rfc_inc_credit(tPORT* p_port, uint8_t credit);
diff --git a/stack/rfcomm/rfc_l2cap_if.cc b/stack/rfcomm/rfc_l2cap_if.cc
index 488d52b..f90f8da 100644
--- a/stack/rfcomm/rfc_l2cap_if.cc
+++ b/stack/rfcomm/rfc_l2cap_if.cc
@@ -40,13 +40,13 @@
 /*
  * Define Callback functions to be called by L2CAP
 */
-static void RFCOMM_ConnectInd(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+static void RFCOMM_ConnectInd(const RawAddress& bd_addr, uint16_t lcid,
                               uint16_t psm, uint8_t id);
 static void RFCOMM_ConnectCnf(uint16_t lcid, uint16_t err);
 static void RFCOMM_ConfigInd(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
 static void RFCOMM_ConfigCnf(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg);
 static void RFCOMM_DisconnectInd(uint16_t lcid, bool is_clear);
-static void RFCOMM_QoSViolationInd(UNUSED_ATTR const bt_bdaddr_t& bd_addr);
+static void RFCOMM_QoSViolationInd(UNUSED_ATTR const RawAddress& bd_addr);
 static void RFCOMM_BufDataInd(uint16_t lcid, BT_HDR* p_buf);
 static void RFCOMM_CongestionStatusInd(uint16_t lcid, bool is_congested);
 
@@ -85,7 +85,7 @@
  *                  block and dispatch the event to it.
  *
  ******************************************************************************/
-void RFCOMM_ConnectInd(const bt_bdaddr_t& bd_addr, uint16_t lcid,
+void RFCOMM_ConnectInd(const RawAddress& bd_addr, uint16_t lcid,
                        UNUSED_ATTR uint16_t psm, uint8_t id) {
   tRFC_MCB* p_mcb = rfc_alloc_multiplexer_channel(bd_addr, false);
 
@@ -246,7 +246,7 @@
  *                  FSM.
  *
  ******************************************************************************/
-void RFCOMM_QoSViolationInd(UNUSED_ATTR const bt_bdaddr_t& bd_addr) {}
+void RFCOMM_QoSViolationInd(UNUSED_ATTR const RawAddress& bd_addr) {}
 
 /*******************************************************************************
  *
diff --git a/stack/rfcomm/rfc_utils.cc b/stack/rfcomm/rfc_utils.cc
index 3daa27f..d4f209c 100644
--- a/stack/rfcomm/rfc_utils.cc
+++ b/stack/rfcomm/rfc_utils.cc
@@ -132,7 +132,7 @@
  *                  the address.
  *
  ******************************************************************************/
-tRFC_MCB* rfc_alloc_multiplexer_channel(const bt_bdaddr_t& bd_addr,
+tRFC_MCB* rfc_alloc_multiplexer_channel(const RawAddress& bd_addr,
                                         bool is_initiator) {
   int i, j;
   tRFC_MCB* p_mcb = NULL;
@@ -324,7 +324,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void rfc_sec_check_complete(UNUSED_ATTR const bt_bdaddr_t* bd_addr,
+void rfc_sec_check_complete(UNUSED_ATTR const RawAddress* bd_addr,
                             UNUSED_ATTR tBT_TRANSPORT transport,
                             void* p_ref_data, uint8_t res) {
   tPORT* p_port = (tPORT*)p_ref_data;
diff --git a/stack/sdp/sdp_api.cc b/stack/sdp/sdp_api.cc
index 7f3cf78..c89eca5 100644
--- a/stack/sdp/sdp_api.cc
+++ b/stack/sdp/sdp_api.cc
@@ -129,7 +129,7 @@
  * Returns          true if discovery started, false if failed.
  *
  ******************************************************************************/
-bool SDP_ServiceSearchRequest(const bt_bdaddr_t& p_bd_addr,
+bool SDP_ServiceSearchRequest(const RawAddress& p_bd_addr,
                               tSDP_DISCOVERY_DB* p_db,
                               tSDP_DISC_CMPL_CB* p_cb) {
   tCONN_CB* p_ccb;
@@ -160,7 +160,7 @@
  * Returns          true if discovery started, false if failed.
  *
  ******************************************************************************/
-bool SDP_ServiceSearchAttributeRequest(const bt_bdaddr_t& p_bd_addr,
+bool SDP_ServiceSearchAttributeRequest(const RawAddress& p_bd_addr,
                                        tSDP_DISCOVERY_DB* p_db,
                                        tSDP_DISC_CMPL_CB* p_cb) {
   tCONN_CB* p_ccb;
@@ -192,7 +192,7 @@
  * Returns          true if discovery started, false if failed.
  *
  ******************************************************************************/
-bool SDP_ServiceSearchAttributeRequest2(const bt_bdaddr_t& p_bd_addr,
+bool SDP_ServiceSearchAttributeRequest2(const RawAddress& p_bd_addr,
                                         tSDP_DISCOVERY_DB* p_db,
                                         tSDP_DISC_CMPL_CB2* p_cb2,
                                         void* user_data) {
@@ -821,7 +821,7 @@
  * Returns          SDP_SUCCESS if query started successfully, else error
  *
  ******************************************************************************/
-uint16_t SDP_DiDiscover(const bt_bdaddr_t& remote_device,
+uint16_t SDP_DiDiscover(const RawAddress& remote_device,
                         tSDP_DISCOVERY_DB* p_db, uint32_t len,
                         tSDP_DISC_CMPL_CB* p_cb) {
   uint16_t result = SDP_DI_DISC_FAILED;
diff --git a/stack/sdp/sdp_discovery.cc b/stack/sdp/sdp_discovery.cc
index 2e8c365..d3d7f76 100644
--- a/stack/sdp/sdp_discovery.cc
+++ b/stack/sdp/sdp_discovery.cc
@@ -48,7 +48,7 @@
 static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply);
 static uint8_t* save_attr_seq(tCONN_CB* p_ccb, uint8_t* p, uint8_t* p_msg_end);
 static tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db,
-                                 const bt_bdaddr_t& p_bda);
+                                 const RawAddress& p_bda);
 static uint8_t* add_attr(uint8_t* p, tSDP_DISCOVERY_DB* p_db,
                          tSDP_DISC_REC* p_rec, uint16_t attr_id,
                          tSDP_DISC_ATTR* p_parent_attr, uint8_t nest_level);
@@ -728,7 +728,7 @@
  * Returns          pointer to next byte in data stream
  *
  ******************************************************************************/
-tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db, const bt_bdaddr_t& p_bda) {
+tSDP_DISC_REC* add_record(tSDP_DISCOVERY_DB* p_db, const RawAddress& p_bda) {
   tSDP_DISC_REC* p_rec;
 
   /* See if there is enough space in the database */
diff --git a/stack/sdp/sdp_main.cc b/stack/sdp/sdp_main.cc
index 95c50a0..8cbc3e8 100644
--- a/stack/sdp/sdp_main.cc
+++ b/stack/sdp/sdp_main.cc
@@ -52,7 +52,7 @@
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
 /******************************************************************************/
-static void sdp_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t l2cap_cid,
+static void sdp_connect_ind(const RawAddress& bd_addr, uint16_t l2cap_cid,
                             UNUSED_ATTR uint16_t psm, uint8_t l2cap_id);
 static void sdp_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg);
 static void sdp_config_cfm(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg);
@@ -155,7 +155,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void sdp_connect_ind(const bt_bdaddr_t& bd_addr, uint16_t l2cap_cid,
+static void sdp_connect_ind(const RawAddress& bd_addr, uint16_t l2cap_cid,
                             UNUSED_ATTR uint16_t psm, uint8_t l2cap_id) {
 #if (SDP_SERVER_ENABLED == TRUE)
   tCONN_CB* p_ccb;
@@ -505,7 +505,7 @@
  * Returns          void
  *
  ******************************************************************************/
-tCONN_CB* sdp_conn_originate(const bt_bdaddr_t& p_bd_addr) {
+tCONN_CB* sdp_conn_originate(const RawAddress& p_bd_addr) {
   tCONN_CB* p_ccb;
   uint16_t cid;
 
diff --git a/stack/sdp/sdpint.h b/stack/sdp/sdpint.h
index 3f07e68..3a046b6 100644
--- a/stack/sdp/sdpint.h
+++ b/stack/sdp/sdpint.h
@@ -165,7 +165,7 @@
 #define SDP_FLAGS_MY_CFG_DONE 0x04
   uint8_t con_flags;
 
-  bt_bdaddr_t device_address;
+  RawAddress device_address;
   alarm_t* sdp_conn_timer;
   uint16_t rem_mtu_size;
   uint16_t connection_id;
@@ -241,7 +241,7 @@
 extern void sdp_conn_rcv_l2e_data(BT_HDR* p_msg);
 extern void sdp_conn_timer_timeout(void* data);
 
-extern tCONN_CB* sdp_conn_originate(const bt_bdaddr_t& p_bd_addr);
+extern tCONN_CB* sdp_conn_originate(const RawAddress& p_bd_addr);
 
 /* Functions provided by sdp_utils.cc
 */
diff --git a/stack/smp/smp_act.cc b/stack/smp/smp_act.cc
index e0e3063..808c885 100644
--- a/stack/smp/smp_act.cc
+++ b/stack/smp/smp_act.cc
@@ -33,7 +33,7 @@
                                        smp_generate_csrk,
                                        smp_set_derive_link_key};
 
-static bool lmp_version_below(const bt_bdaddr_t& bda, uint8_t version) {
+static bool lmp_version_below(const RawAddress& bda, uint8_t version) {
   tACL_CONN* acl = btm_bda_to_acl(bda, BT_TRANSPORT_LE);
   if (acl == NULL || acl->lmp_version == 0) {
     SMP_TRACE_WARNING("%s cannot retrieve LMP version...", __func__);
@@ -170,7 +170,7 @@
           if (!(p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ||
               lmp_version_below(p_cb->pairing_bda, HCI_PROTO_VERSION_4_2) ||
               interop_match_addr(INTEROP_DISABLE_LE_SECURE_CONNECTIONS,
-                                 (const bt_bdaddr_t*)&p_cb->pairing_bda)) {
+                                 (const RawAddress*)&p_cb->pairing_bda)) {
             p_cb->loc_auth_req &= ~SMP_KP_SUPPORT_BIT;
             p_cb->local_i_key &= ~SMP_SEC_KEY_TYPE_LK;
             p_cb->local_r_key &= ~SMP_SEC_KEY_TYPE_LK;
@@ -1832,7 +1832,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void smp_link_encrypted(const bt_bdaddr_t& bda, uint8_t encr_enable) {
+void smp_link_encrypted(const RawAddress& bda, uint8_t encr_enable) {
   tSMP_CB* p_cb = &smp_cb;
 
   SMP_TRACE_DEBUG("%s: encr_enable=%d", __func__, encr_enable);
@@ -1859,7 +1859,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool smp_proc_ltk_request(const bt_bdaddr_t& bda) {
+bool smp_proc_ltk_request(const RawAddress& bda) {
   SMP_TRACE_DEBUG("%s state = %d", __func__, smp_cb.state);
   bool match = false;
 
diff --git a/stack/smp/smp_api.cc b/stack/smp/smp_api.cc
index 7d6fcd3..f6a87dd 100644
--- a/stack/smp/smp_api.cc
+++ b/stack/smp/smp_api.cc
@@ -130,7 +130,7 @@
  * Returns          None
  *
  ******************************************************************************/
-tSMP_STATUS SMP_Pair(const bt_bdaddr_t& bd_addr) {
+tSMP_STATUS SMP_Pair(const RawAddress& bd_addr) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t status = SMP_PAIR_INTERNAL_ERR;
 
@@ -167,7 +167,7 @@
  *                  failure.
  *
  ******************************************************************************/
-tSMP_STATUS SMP_BR_PairWith(const bt_bdaddr_t& bd_addr) {
+tSMP_STATUS SMP_BR_PairWith(const RawAddress& bd_addr) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t status = SMP_PAIR_INTERNAL_ERR;
 
@@ -205,7 +205,7 @@
  * Returns          true - Pairining is cancelled
  *
  ******************************************************************************/
-bool SMP_PairCancel(const bt_bdaddr_t& bd_addr) {
+bool SMP_PairCancel(const RawAddress& bd_addr) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t err_code = SMP_PAIR_FAIL_UNKNOWN;
   bool status = false;
@@ -240,7 +240,7 @@
  * Returns          None
  *
  ******************************************************************************/
-void SMP_SecurityGrant(const bt_bdaddr_t& bd_addr, uint8_t res) {
+void SMP_SecurityGrant(const RawAddress& bd_addr, uint8_t res) {
   SMP_TRACE_EVENT("SMP_SecurityGrant ");
 
   if (smp_cb.smp_over_br) {
@@ -280,7 +280,7 @@
  *                            BTM_MAX_PASSKEY_VAL(999999(0xF423F)).
  *
  ******************************************************************************/
-void SMP_PasskeyReply(const bt_bdaddr_t& bd_addr, uint8_t res,
+void SMP_PasskeyReply(const RawAddress& bd_addr, uint8_t res,
                       uint32_t passkey) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t failure = SMP_PASSKEY_ENTRY_FAIL;
@@ -332,7 +332,7 @@
  *                  res          - comparison result SMP_SUCCESS if success
  *
  ******************************************************************************/
-void SMP_ConfirmReply(const bt_bdaddr_t& bd_addr, uint8_t res) {
+void SMP_ConfirmReply(const RawAddress& bd_addr, uint8_t res) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t failure = SMP_NUMERIC_COMPAR_FAIL;
 
@@ -375,7 +375,7 @@
  *                  p_data      - simple pairing Randomizer  C.
  *
  ******************************************************************************/
-void SMP_OobDataReply(const bt_bdaddr_t& bd_addr, tSMP_STATUS res, uint8_t len,
+void SMP_OobDataReply(const RawAddress& bd_addr, tSMP_STATUS res, uint8_t len,
                       uint8_t* p_data) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t failure = SMP_OOB_FAIL;
@@ -497,7 +497,7 @@
  *                 value        Keypress notification parameter value
  *
  ******************************************************************************/
-void SMP_KeypressNotification(const bt_bdaddr_t& bd_addr, uint8_t value) {
+void SMP_KeypressNotification(const RawAddress& bd_addr, uint8_t value) {
   tSMP_CB* p_cb = &smp_cb;
 
   SMP_TRACE_EVENT("%s: Value: %d", __func__, value);
diff --git a/stack/smp/smp_int.h b/stack/smp/smp_int.h
index 5134ddf..fc8717f 100644
--- a/stack/smp/smp_int.h
+++ b/stack/smp/smp_int.h
@@ -248,7 +248,7 @@
 #define SMP_ECNCRPYT_STATUS HCI_SUCCESS
 
 typedef struct {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   BT_HDR* p_copy;
 } tSMP_REQ_Q_ENTRY;
 
@@ -257,12 +257,12 @@
   tSMP_CALLBACK* p_callback;
   alarm_t* smp_rsp_timer_ent;
   uint8_t trace_level;
-  bt_bdaddr_t pairing_bda;
+  RawAddress pairing_bda;
   tSMP_STATE state;
   bool derive_lk;
   bool id_addr_rcvd;
   tBLE_ADDR_TYPE id_addr_type;
-  bt_bdaddr_t id_addr;
+  RawAddress id_addr;
   bool smp_over_br;
   tSMP_BR_STATE br_state; /* if SMP over BR/ERD has priority over SMP */
   uint8_t failure;
@@ -321,7 +321,7 @@
   uint16_t ediv;
   BT_OCTET8 enc_rand;
   uint8_t addr_type;
-  bt_bdaddr_t local_bda;
+  RawAddress local_bda;
   bool is_pair_cancel;
   bool discard_sec_req;
   uint8_t rcvd_cmd_code;
@@ -464,7 +464,7 @@
 
 /* smp_l2c */
 extern void smp_l2cap_if_init(void);
-extern void smp_data_ind(const bt_bdaddr_t& bd_addr, BT_HDR* p_buf);
+extern void smp_data_ind(const RawAddress& bd_addr, BT_HDR* p_buf);
 
 /* smp_util.cc */
 extern bool smp_send_cmd(uint8_t cmd_code, tSMP_CB* p_cb);
@@ -479,7 +479,7 @@
 extern bool smp_encrypt_data(uint8_t* key, uint8_t key_len, uint8_t* plain_text,
                              uint8_t pt_len, tSMP_ENC* p_out);
 extern bool smp_command_has_invalid_parameters(tSMP_CB* p_cb);
-extern void smp_reject_unexpected_pairing_command(const bt_bdaddr_t& bd_addr);
+extern void smp_reject_unexpected_pairing_command(const RawAddress& bd_addr);
 extern tSMP_ASSO_MODEL smp_select_association_model(tSMP_CB* p_cb);
 extern void smp_reverse_array(uint8_t* arr, uint8_t len);
 extern uint8_t smp_calculate_random_input(uint8_t* random, uint8_t round);
diff --git a/stack/smp/smp_keys.cc b/stack/smp/smp_keys.cc
index da44483..06e4d87 100644
--- a/stack/smp/smp_keys.cc
+++ b/stack/smp/smp_keys.cc
@@ -393,7 +393,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void smp_gen_p2_4_confirm(tSMP_CB* p_cb, const bt_bdaddr_t& remote_bda,
+void smp_gen_p2_4_confirm(tSMP_CB* p_cb, const RawAddress& remote_bda,
                           BT_OCTET16 p2) {
   SMP_TRACE_DEBUG("%s", __func__);
   uint8_t* p = (uint8_t*)p2;
@@ -425,7 +425,7 @@
 tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, BT_OCTET16 rand,
                                   tSMP_ENC* output) {
   SMP_TRACE_DEBUG("%s", __func__);
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBLE_ADDR_TYPE remote_bd_addr_type = 0;
   /* get remote connection specific bluetooth address */
   if (!BTM_ReadRemoteConnectionAddr(p_cb->pairing_bda, remote_bda,
@@ -1633,7 +1633,7 @@
  ******************************************************************************/
 bool smp_calculate_link_key_from_long_term_key(tSMP_CB* p_cb) {
   tBTM_SEC_DEV_REC* p_dev_rec;
-  bt_bdaddr_t bda_for_lk;
+  RawAddress bda_for_lk;
   tBLE_ADDR_TYPE conn_addr_type;
   BT_OCTET16 salt = {0x31, 0x70, 0x6D, 0x74, 0x00, 0x00, 0x00, 0x00,
                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/stack/smp/smp_l2c.cc b/stack/smp/smp_l2c.cc
index 48a8c91..2700792 100644
--- a/stack/smp/smp_l2c.cc
+++ b/stack/smp/smp_l2c.cc
@@ -34,16 +34,16 @@
 
 static void smp_tx_complete_callback(uint16_t cid, uint16_t num_pkt);
 
-static void smp_connect_callback(uint16_t channel, const bt_bdaddr_t& bd_addr,
+static void smp_connect_callback(uint16_t channel, const RawAddress& bd_addr,
                                  bool connected, uint16_t reason,
                                  tBT_TRANSPORT transport);
-static void smp_data_received(uint16_t channel, const bt_bdaddr_t& bd_addr,
+static void smp_data_received(uint16_t channel, const RawAddress& bd_addr,
                               BT_HDR* p_buf);
 
-static void smp_br_connect_callback(uint16_t channel,
-                                    const bt_bdaddr_t& bd_addr, bool connected,
-                                    uint16_t reason, tBT_TRANSPORT transport);
-static void smp_br_data_received(uint16_t channel, const bt_bdaddr_t& bd_addr,
+static void smp_br_connect_callback(uint16_t channel, const RawAddress& bd_addr,
+                                    bool connected, uint16_t reason,
+                                    tBT_TRANSPORT transport);
+static void smp_br_data_received(uint16_t channel, const RawAddress& bd_addr,
                                  BT_HDR* p_buf);
 
 /*******************************************************************************
@@ -90,7 +90,7 @@
  *                      connected (conn = true)/disconnected (conn = false).
  *
  ******************************************************************************/
-static void smp_connect_callback(uint16_t channel, const bt_bdaddr_t& bd_addr,
+static void smp_connect_callback(uint16_t channel, const RawAddress& bd_addr,
                                  bool connected, uint16_t reason,
                                  tBT_TRANSPORT transport) {
   tSMP_CB* p_cb = &smp_cb;
@@ -135,7 +135,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void smp_data_received(uint16_t channel, const bt_bdaddr_t& bd_addr,
+static void smp_data_received(uint16_t channel, const RawAddress& bd_addr,
                               BT_HDR* p_buf) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t* p = (uint8_t*)(p_buf + 1) + p_buf->offset;
@@ -224,9 +224,9 @@
  *                      connected (conn = true)/disconnected (conn = false).
  *
  ******************************************************************************/
-static void smp_br_connect_callback(uint16_t channel,
-                                    const bt_bdaddr_t& bd_addr, bool connected,
-                                    uint16_t reason, tBT_TRANSPORT transport) {
+static void smp_br_connect_callback(uint16_t channel, const RawAddress& bd_addr,
+                                    bool connected, uint16_t reason,
+                                    tBT_TRANSPORT transport) {
   tSMP_CB* p_cb = &smp_cb;
   tSMP_INT_DATA int_data;
 
@@ -269,7 +269,7 @@
  * Returns          void
  *
  ******************************************************************************/
-static void smp_br_data_received(uint16_t channel, const bt_bdaddr_t& bd_addr,
+static void smp_br_data_received(uint16_t channel, const RawAddress& bd_addr,
                                  BT_HDR* p_buf) {
   tSMP_CB* p_cb = &smp_cb;
   uint8_t* p = (uint8_t*)(p_buf + 1) + p_buf->offset;
diff --git a/stack/smp/smp_utils.cc b/stack/smp/smp_utils.cc
index 92a1ec0..c935e08 100644
--- a/stack/smp/smp_utils.cc
+++ b/stack/smp/smp_utils.cc
@@ -303,7 +303,7 @@
  * Description      Send message to L2CAP.
  *
  ******************************************************************************/
-bool smp_send_msg_to_L2CAP(const bt_bdaddr_t& rem_bda, BT_HDR* p_toL2CAP) {
+bool smp_send_msg_to_L2CAP(const RawAddress& rem_bda, BT_HDR* p_toL2CAP) {
   uint16_t l2cap_ret;
   uint16_t fixed_cid = L2CAP_SMP_CID;
 
@@ -932,7 +932,7 @@
   SMP_TRACE_DEBUG("send SMP_COMPLT_EVT reason=0x%0x sec_level=0x%0x",
                   evt_data.cmplt.reason, evt_data.cmplt.sec_level);
 
-  bt_bdaddr_t pairing_bda = p_cb->pairing_bda;
+  RawAddress pairing_bda = p_cb->pairing_bda;
 
   smp_reset_control_value(p_cb);
 
@@ -1120,7 +1120,7 @@
  * Returns          void
  *
  ******************************************************************************/
-void smp_reject_unexpected_pairing_command(const bt_bdaddr_t& bd_addr) {
+void smp_reject_unexpected_pairing_command(const RawAddress& bd_addr) {
   uint8_t* p;
   BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR) + SMP_PAIR_FAIL_SIZE +
                                       L2CAP_MIN_OFFSET);
@@ -1353,7 +1353,7 @@
  ******************************************************************************/
 void smp_collect_local_ble_address(uint8_t* le_addr, tSMP_CB* p_cb) {
   tBLE_ADDR_TYPE addr_type = 0;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t* p = le_addr;
 
   SMP_TRACE_DEBUG("%s", __func__);
@@ -1375,7 +1375,7 @@
  ******************************************************************************/
 void smp_collect_peer_ble_address(uint8_t* le_addr, tSMP_CB* p_cb) {
   tBLE_ADDR_TYPE addr_type = 0;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint8_t* p = le_addr;
 
   SMP_TRACE_DEBUG("%s", __func__);
diff --git a/stack/srvc/srvc_battery.cc b/stack/srvc/srvc_battery.cc
index f644627..2d9fe18 100644
--- a/stack/srvc/srvc_battery.cc
+++ b/stack/srvc/srvc_battery.cc
@@ -334,7 +334,7 @@
  * Description      Send battery level notification
  *
  ******************************************************************************/
-void Battery_Notify(uint8_t app_id, const bt_bdaddr_t& remote_bda,
+void Battery_Notify(uint8_t app_id, const RawAddress& remote_bda,
                     uint8_t battery_level) {
   tBA_INST* p_inst = &battery_cb.battery_inst[0];
   uint8_t i = 0;
@@ -357,7 +357,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool Battery_ReadBatteryLevel(const bt_bdaddr_t&) {
+bool Battery_ReadBatteryLevel(const RawAddress&) {
   /* to be implemented */
   return true;
 }
diff --git a/stack/srvc/srvc_dis.cc b/stack/srvc/srvc_dis.cc
index dbc4368..85de4b4 100644
--- a/stack/srvc/srvc_dis.cc
+++ b/stack/srvc/srvc_dis.cc
@@ -439,7 +439,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool DIS_ReadDISInfo(const bt_bdaddr_t& peer_bda, tDIS_READ_CBACK* p_cback,
+bool DIS_ReadDISInfo(const RawAddress& peer_bda, tDIS_READ_CBACK* p_cback,
                      tDIS_ATTR_MASK mask) {
   uint16_t conn_id;
 
diff --git a/stack/srvc/srvc_eng.cc b/stack/srvc/srvc_eng.cc
index 28c026f..f054f67 100644
--- a/stack/srvc/srvc_eng.cc
+++ b/stack/srvc/srvc_eng.cc
@@ -30,7 +30,7 @@
 static void srvc_eng_s_request_cback(uint16_t conn_id, uint32_t trans_id,
                                      uint8_t op_code, tGATTS_DATA* p_data);
 static void srvc_eng_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
-                                   const bt_bdaddr_t& bda, uint16_t conn_id,
+                                   const RawAddress& bda, uint16_t conn_id,
                                    bool connected, tGATT_DISCONN_REASON reason,
                                    tBT_TRANSPORT transport);
 static void srvc_eng_c_cmpl_cback(uint16_t conn_id, tGATTC_OPTYPE op,
@@ -66,7 +66,7 @@
  * Returns          total number of clcb found.
  *
  ******************************************************************************/
-uint16_t srvc_eng_find_conn_id_by_bd_addr(const bt_bdaddr_t& bda) {
+uint16_t srvc_eng_find_conn_id_by_bd_addr(const RawAddress& bda) {
   uint8_t i_clcb;
   tSRVC_CLCB* p_clcb = NULL;
 
@@ -89,7 +89,7 @@
  * Returns          Pointer to the found link conenction control block.
  *
  ******************************************************************************/
-tSRVC_CLCB* srvc_eng_find_clcb_by_bd_addr(const bt_bdaddr_t& bda) {
+tSRVC_CLCB* srvc_eng_find_clcb_by_bd_addr(const RawAddress& bda) {
   uint8_t i_clcb;
   tSRVC_CLCB* p_clcb = NULL;
 
@@ -156,7 +156,7 @@
  *                  block.
  *
  ******************************************************************************/
-tSRVC_CLCB* srvc_eng_clcb_alloc(uint16_t conn_id, const bt_bdaddr_t& bda) {
+tSRVC_CLCB* srvc_eng_clcb_alloc(uint16_t conn_id, const RawAddress& bda) {
   uint8_t i_clcb = 0;
   tSRVC_CLCB* p_clcb = NULL;
 
@@ -334,7 +334,7 @@
  *
  ******************************************************************************/
 static void srvc_eng_connect_cback(UNUSED_ATTR tGATT_IF gatt_if,
-                                   const bt_bdaddr_t& bda, uint16_t conn_id,
+                                   const RawAddress& bda, uint16_t conn_id,
                                    bool connected, tGATT_DISCONN_REASON reason,
                                    UNUSED_ATTR tBT_TRANSPORT transport) {
   VLOG(1) << __func__ << ": from " << bda
@@ -359,7 +359,7 @@
  * Returns          void
  *
  ******************************************************************************/
-bool srvc_eng_request_channel(const bt_bdaddr_t& remote_bda, uint8_t srvc_id) {
+bool srvc_eng_request_channel(const RawAddress& remote_bda, uint8_t srvc_id) {
   bool set = true;
   tSRVC_CLCB* p_clcb = srvc_eng_find_clcb_by_bd_addr(remote_bda);
 
@@ -429,8 +429,8 @@
     srvc_eng_cb.clcb[clcb_idx].trans_id = 0;
   }
 }
-void srvc_sr_notify(const bt_bdaddr_t& remote_bda, uint16_t handle,
-                    uint16_t len, uint8_t* p_value) {
+void srvc_sr_notify(const RawAddress& remote_bda, uint16_t handle, uint16_t len,
+                    uint8_t* p_value) {
   uint16_t conn_id = srvc_eng_find_conn_id_by_bd_addr(remote_bda);
 
   if (conn_id != GATT_INVALID_CONN_ID) {
diff --git a/stack/srvc/srvc_eng_int.h b/stack/srvc/srvc_eng_int.h
index 5a6f21c..7608355 100644
--- a/stack/srvc/srvc_eng_int.h
+++ b/stack/srvc/srvc_eng_int.h
@@ -37,7 +37,7 @@
   bool in_use;
   uint16_t conn_id;
   bool connected;
-  bt_bdaddr_t bda;
+  RawAddress bda;
   uint32_t trans_id;
   uint8_t cur_srvc_id;
 
@@ -57,14 +57,14 @@
 extern tSRVC_ENG_CB srvc_eng_cb;
 
 extern tSRVC_CLCB* srvc_eng_find_clcb_by_conn_id(uint16_t conn_id);
-extern tSRVC_CLCB* srvc_eng_find_clcb_by_bd_addr(const bt_bdaddr_t& bda);
-extern uint16_t srvc_eng_find_conn_id_by_bd_addr(const bt_bdaddr_t& bda);
+extern tSRVC_CLCB* srvc_eng_find_clcb_by_bd_addr(const RawAddress& bda);
+extern uint16_t srvc_eng_find_conn_id_by_bd_addr(const RawAddress& bda);
 
 extern void srvc_eng_release_channel(uint16_t conn_id);
-extern bool srvc_eng_request_channel(const bt_bdaddr_t& remote_bda,
+extern bool srvc_eng_request_channel(const RawAddress& remote_bda,
                                      uint8_t srvc_id);
 extern void srvc_sr_rsp(uint8_t clcb_idx, tGATT_STATUS st, tGATTS_RSP* p_rsp);
-extern void srvc_sr_notify(const bt_bdaddr_t& remote_bda, uint16_t handle,
+extern void srvc_sr_notify(const RawAddress& remote_bda, uint16_t handle,
                            uint16_t len, uint8_t* p_value);
 
 #endif
diff --git a/stack/test/ble_advertiser_test.cc b/stack/test/ble_advertiser_test.cc
index ac9435b..df2a4d4 100644
--- a/stack/test/ble_advertiser_test.cc
+++ b/stack/test/ble_advertiser_test.cc
@@ -50,8 +50,7 @@
 void btm_ble_update_dmt_flag_bits(uint8_t* flag_value,
                                   const uint16_t connect_mode,
                                   const uint16_t disc_mode) {}
-void btm_acl_update_conn_addr(uint8_t conn_handle, const bt_bdaddr_t& address) {
-}
+void btm_acl_update_conn_addr(uint8_t conn_handle, const RawAddress& address) {}
 void btm_gen_resolvable_private_addr(base::Callback<void(uint8_t[8])> cb) {
   uint8_t fake_rand[8] = {0, 0, 0, 0, 0, 0, 0, 0};
   cb.Run(fake_rand);
@@ -102,7 +101,7 @@
                void(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, status_cb));
   MOCK_METHOD6(SetScanResponseData,
                void(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, status_cb));
-  MOCK_METHOD3(SetRandomAddress, void(uint8_t, const bt_bdaddr_t&, status_cb));
+  MOCK_METHOD3(SetRandomAddress, void(uint8_t, const RawAddress&, status_cb));
   MOCK_METHOD5(Enable, void(uint8_t, uint8_t, uint16_t, uint8_t, status_cb));
   MOCK_METHOD5(SetPeriodicAdvertisingParameters,
                void(uint8_t, uint16_t, uint16_t, uint16_t, status_cb));
@@ -114,14 +113,14 @@
 
   MOCK_METHOD9(SetParameters1,
                void(uint8_t, uint16_t, uint32_t, uint32_t, uint8_t, uint8_t,
-                    const bt_bdaddr_t&, uint8_t, const bt_bdaddr_t&));
+                    const RawAddress&, uint8_t, const RawAddress&));
   MOCK_METHOD8(SetParameters2, void(uint8_t, int8_t, uint8_t, uint8_t, uint8_t,
                                     uint8_t, uint8_t, parameters_cb));
 
   void SetParameters(uint8_t handle, uint16_t properties, uint32_t adv_int_min,
                      uint32_t adv_int_max, uint8_t channel_map,
-                     uint8_t own_address_type, const bt_bdaddr_t& own_address,
-                     uint8_t peer_address_type, const bt_bdaddr_t& peer_address,
+                     uint8_t own_address_type, const RawAddress& own_address,
+                     uint8_t peer_address_type, const RawAddress& peer_address,
                      uint8_t filter_policy, int8_t tx_power,
                      uint8_t primary_phy, uint8_t secondary_max_skip,
                      uint8_t secondary_phy, uint8_t advertising_sid,
diff --git a/stack/test/stack_smp_test.cc b/stack/test/stack_smp_test.cc
index cb6db3d..1e53474 100644
--- a/stack/test/stack_smp_test.cc
+++ b/stack/test/stack_smp_test.cc
@@ -55,8 +55,8 @@
  */
 
 // Set remote bda to 0xB1B2B3B4B5B6
-bool BTM_ReadRemoteConnectionAddr(const bt_bdaddr_t& pseudo_addr,
-                                  bt_bdaddr_t& conn_addr,
+bool BTM_ReadRemoteConnectionAddr(const RawAddress& pseudo_addr,
+                                  RawAddress& conn_addr,
                                   tBLE_ADDR_TYPE* p_addr_type) {
   conn_addr = {.address = {0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6}};
   *p_addr_type = 0x00;
@@ -64,8 +64,8 @@
 }
 
 // Set local_bda to 0xA1A2A3A4A5A6
-void BTM_ReadConnectionAddr(const bt_bdaddr_t& remote_bda,
-                            bt_bdaddr_t& local_conn_addr,
+void BTM_ReadConnectionAddr(const RawAddress& remote_bda,
+                            RawAddress& local_conn_addr,
                             tBLE_ADDR_TYPE* p_addr_type) {
   local_conn_addr = {.address = {0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6}};
   *p_addr_type = 0x01;
@@ -84,7 +84,7 @@
                                  tBLE_ADDR_TYPE remote_bd_addr_type,
                                  BT_OCTET16 p1);
 
-extern void smp_gen_p2_4_confirm(tSMP_CB* p_cb, const bt_bdaddr_t& remote_bda,
+extern void smp_gen_p2_4_confirm(tSMP_CB* p_cb, const RawAddress& remote_bda,
                                  BT_OCTET16 p2);
 
 extern tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, BT_OCTET16 rand,
@@ -170,7 +170,7 @@
 // Test smp_gen_p2_4_confirm function implementation
 TEST_F(SmpCalculateConfirmTest, test_smp_gen_p2_4_confirm_as_master) {
   BT_OCTET16 p2;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBLE_ADDR_TYPE remote_bd_addr_type = 0;
   BTM_ReadRemoteConnectionAddr(p_cb_.pairing_bda, remote_bda,
                                &remote_bd_addr_type);
@@ -186,7 +186,7 @@
 // Test smp_gen_p1_4_confirm and SMP_Encrypt function implementation
 TEST_F(SmpCalculateConfirmTest, test_SMP_Encrypt_as_master) {
   BT_OCTET16 p1;
-  bt_bdaddr_t remote_bda;
+  RawAddress remote_bda;
   tBLE_ADDR_TYPE remote_bd_addr_type = 0;
   BTM_ReadRemoteConnectionAddr(p_cb_.pairing_bda, remote_bda,
                                &remote_bd_addr_type);
diff --git a/test/suite/adapter/adapter_unittest.cc b/test/suite/adapter/adapter_unittest.cc
index f53de32..730ac5a 100644
--- a/test/suite/adapter/adapter_unittest.cc
+++ b/test/suite/adapter/adapter_unittest.cc
@@ -151,7 +151,7 @@
   EXPECT_EQ(GetState(), BT_STATE_OFF)
       << "Test should be run with Adapter disabled";
 
-  bt_bdaddr_t bdaddr = {{0x22, 0x22, 0x22, 0x22, 0x22, 0x22}};
+  RawAddress bdaddr = {{0x22, 0x22, 0x22, 0x22, 0x22, 0x22}};
 
   for (int i = 0; i < kTestRepeatCount; ++i) {
     EXPECT_EQ(bt_interface()->enable(false), BT_STATUS_SUCCESS);
diff --git a/test/suite/adapter/bluetooth_test.cc b/test/suite/adapter/bluetooth_test.cc
index 8484480..3b8ebda 100644
--- a/test/suite/adapter/bluetooth_test.cc
+++ b/test/suite/adapter/bluetooth_test.cc
@@ -89,7 +89,7 @@
   return nullptr;
 }
 
-bt_property_t* BluetoothTest::GetRemoteDeviceProperty(const bt_bdaddr_t* addr,
+bt_property_t* BluetoothTest::GetRemoteDeviceProperty(const RawAddress* addr,
                                                       bt_property_type_t type) {
   if (curr_remote_device_ != *addr) return nullptr;
 
@@ -129,7 +129,7 @@
 
 // callback
 void BluetoothTest::RemoteDevicePropertiesCallback(bt_status_t status,
-                                                   bt_bdaddr_t* remote_bd_addr,
+                                                   RawAddress* remote_bd_addr,
                                                    int num_properties,
                                                    bt_property_t* properties) {
   curr_remote_device_ = *remote_bd_addr;
diff --git a/test/suite/adapter/bluetooth_test.h b/test/suite/adapter/bluetooth_test.h
index 2c12aff..52b8518 100644
--- a/test/suite/adapter/bluetooth_test.h
+++ b/test/suite/adapter/bluetooth_test.h
@@ -55,7 +55,7 @@
   bt_property_t* GetProperty(bt_property_type_t type);
 
   // Get the value of a specific remote device property
-  bt_property_t* GetRemoteDeviceProperty(const bt_bdaddr_t* addr,
+  bt_property_t* GetRemoteDeviceProperty(const RawAddress* addr,
                                          bt_property_type_t type);
 
   // Get the current discovery state
@@ -83,7 +83,7 @@
 
   // A callback that is called when the remote device's property changes
   void RemoteDevicePropertiesCallback(bt_status_t status,
-                                      bt_bdaddr_t* remote_bd_addr,
+                                      RawAddress* remote_bd_addr,
                                       int num_properties,
                                       bt_property_t* properties) override;
 
@@ -107,7 +107,7 @@
   bt_state_t state_;
   int properties_changed_count_;
   bt_property_t* last_changed_properties_;
-  bt_bdaddr_t curr_remote_device_;
+  RawAddress curr_remote_device_;
   int remote_device_properties_changed_count_;
   bt_property_t* remote_device_last_changed_properties_;
   bt_discovery_state_t discovery_state_;
diff --git a/test/suite/gatt/gatt_test.cc b/test/suite/gatt/gatt_test.cc
index 2ea43cf..de1d68b 100644
--- a/test/suite/gatt/gatt_test.cc
+++ b/test/suite/gatt/gatt_test.cc
@@ -99,8 +99,8 @@
 }
 
 void GattTest::ScanResultCallback(
-    bluetooth::hal::BluetoothGattInterface* /* unused */,
-    const bt_bdaddr_t& bda, int rssi, std::vector<uint8_t> adv_data) {
+    bluetooth::hal::BluetoothGattInterface* /* unused */, const RawAddress& bda,
+    int rssi, std::vector<uint8_t> adv_data) {
   semaphore_post(scan_result_callback_sem_);
 }
 
diff --git a/test/suite/gatt/gatt_test.h b/test/suite/gatt/gatt_test.h
index cdf532c..29e0c24 100644
--- a/test/suite/gatt/gatt_test.h
+++ b/test/suite/gatt/gatt_test.h
@@ -61,7 +61,7 @@
       bluetooth::hal::BluetoothGattInterface* /* unused */, int status,
       int clientIf, const bt_uuid_t& app_uuid) override;
   void ScanResultCallback(bluetooth::hal::BluetoothGattInterface* /* unused */,
-                          const bt_bdaddr_t& bda, int rssi,
+                          const RawAddress& bda, int rssi,
                           std::vector<uint8_t> adv_data) override;
 
   // bluetooth::hal::BluetoothGattInterface::ServerObserver overrides
diff --git a/test/suite/rfcomm/rfcomm_test.cc b/test/suite/rfcomm/rfcomm_test.cc
index b8632a8..751a427 100644
--- a/test/suite/rfcomm/rfcomm_test.cc
+++ b/test/suite/rfcomm/rfcomm_test.cc
@@ -45,8 +45,8 @@
 
   bt_property_t* bonded_devices_prop =
       GetProperty(BT_PROPERTY_ADAPTER_BONDED_DEVICES);
-  bt_bdaddr_t* devices = (bt_bdaddr_t*)bonded_devices_prop->val;
-  int num_bonded_devices = bonded_devices_prop->len / sizeof(bt_bdaddr_t);
+  RawAddress* devices = (RawAddress*)bonded_devices_prop->val;
+  int num_bonded_devices = bonded_devices_prop->len / sizeof(RawAddress);
 
   for (int i = 0; i < num_bonded_devices && bdaddr_is_empty(&bt_remote_bdaddr_);
        i++) {
diff --git a/test/suite/rfcomm/rfcomm_test.h b/test/suite/rfcomm/rfcomm_test.h
index 662fdb1..03d2730 100644
--- a/test/suite/rfcomm/rfcomm_test.h
+++ b/test/suite/rfcomm/rfcomm_test.h
@@ -36,7 +36,7 @@
   // TearDown cleans up the Bluetooth and RFCOMM interfaces
   virtual void TearDown();
 
-  bt_bdaddr_t bt_remote_bdaddr_;
+  RawAddress bt_remote_bdaddr_;
 
   static const bt_uuid_t HFP_UUID;
 
diff --git a/test/suite/rfcomm/rfcomm_unittest.cc b/test/suite/rfcomm/rfcomm_unittest.cc
index b81f781..6fa633a 100644
--- a/test/suite/rfcomm/rfcomm_unittest.cc
+++ b/test/suite/rfcomm/rfcomm_unittest.cc
@@ -51,7 +51,7 @@
   EXPECT_TRUE(len == sizeof(signal))
       << "Connection signal not read from RFCOMM socket. Bytes read: " << len;
 
-  EXPECT_TRUE(!memcmp(&signal.bd_addr, &bt_remote_bdaddr_, sizeof(bt_bdaddr_t)))
+  EXPECT_TRUE(!memcmp(&signal.bd_addr, &bt_remote_bdaddr_, sizeof(RawAddress)))
       << "Connected to a different bdaddr than expected.";
   EXPECT_TRUE(channel == signal.channel)
       << "Inconsistent channels returned: " << channel << " and "
@@ -102,7 +102,7 @@
     }
 
     EXPECT_TRUE(
-        !memcmp(&signal.bd_addr, &bt_remote_bdaddr_, sizeof(bt_bdaddr_t)))
+        !memcmp(&signal.bd_addr, &bt_remote_bdaddr_, sizeof(RawAddress)))
         << "Connected to a different bdaddr than expected.";
     EXPECT_TRUE(channel == signal.channel)
         << "Inconsistent channels returned: " << channel << " and "
diff --git a/tools/bdtool/adapter.c b/tools/bdtool/adapter.c
index 70b1b70..a556aa5 100644
--- a/tools/bdtool/adapter.c
+++ b/tools/bdtool/adapter.c
@@ -58,7 +58,7 @@
 bt_bond_state_t adapter_get_bond_state() { return bond_state; }
 
 // callback
-void acl_state_changed(bt_status_t status, bt_bdaddr_t* remote_bd_addr,
+void acl_state_changed(bt_status_t status, RawAddress* remote_bd_addr,
                        bt_acl_state_t state) {
   acl_state = state;
   CALLBACK_RET();
@@ -81,7 +81,7 @@
 }
 
 // callback
-void bond_state_changed(bt_status_t status, bt_bdaddr_t* bdaddr,
+void bond_state_changed(bt_status_t status, RawAddress* bdaddr,
                         bt_bond_state_t state) {
   char buf[18];
   bond_state = state;
@@ -138,7 +138,7 @@
 }
 
 // callback
-void remote_device_properties(bt_status_t status, bt_bdaddr_t* bdaddr,
+void remote_device_properties(bt_status_t status, RawAddress* bdaddr,
                               int num_properties, bt_property_t* properties) {
   char buf[18];
   fprintf(stdout, "Device found bdaddr:%s num_properties:%d\n",
@@ -150,9 +150,8 @@
 }
 
 // callback
-void ssp_request(bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name,
-                 uint32_t cod, bt_ssp_variant_t pairing_variant,
-                 uint32_t pass_key) {
+void ssp_request(RawAddress* remote_bd_addr, bt_bdname_t* bd_name, uint32_t cod,
+                 bt_ssp_variant_t pairing_variant, uint32_t pass_key) {
   char* pairing_variant_name = "Unknown";
 
   switch (pairing_variant) {
@@ -199,7 +198,7 @@
 
       case BT_PROPERTY_BDADDR: {
         char buf[18];
-        const bt_bdaddr_t* addr = property_as_addr(property);
+        const RawAddress* addr = property_as_addr(property);
         if (addr)
           fprintf(stdout, " addr:%s\n",
                   bdaddr_to_string(addr, buf, sizeof(buf)));
diff --git a/tools/bdtool/bdtool.c b/tools/bdtool/bdtool.c
index f25cf24..7e8f802 100644
--- a/tools/bdtool/bdtool.c
+++ b/tools/bdtool/bdtool.c
@@ -36,7 +36,7 @@
 
 const bt_interface_t* bt_interface;
 
-bt_bdaddr_t bt_remote_bdaddr;
+RawAddress bt_remote_bdaddr;
 
 static int f_verbose;
 static bool discover = false;
diff --git a/tools/mcap_tool/mcap_test_app.cc b/tools/mcap_tool/mcap_test_app.cc
index 0f421fa..b247c96 100644
--- a/tools/mcap_tool/mcap_test_app.cc
+++ b/tools/mcap_tool/mcap_test_app.cc
@@ -137,7 +137,7 @@
 
 bool McapTestApp::Registered() { return _mcap_handle > 0; }
 
-bool McapTestApp::ConnectMcl(const bt_bdaddr_t& bd_addr, uint16_t ctrl_psm,
+bool McapTestApp::ConnectMcl(const RawAddress& bd_addr, uint16_t ctrl_psm,
                              uint16_t sec_mask) {
   if (!Registered()) {
     LOG(ERROR) << "Application not registered";
@@ -169,7 +169,7 @@
 
 uint8_t McapTestApp::GetHandle() { return _mcap_handle; }
 
-McapMcl* McapTestApp::FindMclByPeerAddress(const bt_bdaddr_t& bd_addr) {
+McapMcl* McapTestApp::FindMclByPeerAddress(const RawAddress& bd_addr) {
   for (McapMcl& mcl : _mcl_list) {
     if (mcl.GetPeerAddress() == bd_addr) {
       return &mcl;
@@ -431,7 +431,7 @@
       // Called when MCA_ConnectReq succeeded
       print_mcap_event(&p_data->connect_ind);
       LOG(INFO) << "Received MCL handle " << (int)mcl;
-      bt_bdaddr_t bd_addr = p_data->connect_ind.bd_addr;
+      RawAddress bd_addr = p_data->connect_ind.bd_addr;
       mcap_mcl = FindMclByPeerAddress(bd_addr);
       if (!mcap_mcl) {
         LOG(INFO) << "Creating new MCL for ID " << (int)mcl;
@@ -450,7 +450,7 @@
     case MCA_DISCONNECT_IND_EVT: {
       // Called when MCA_ConnectReq failed or MCA_DisconnectReq succeeded
       print_mcap_event(&p_data->disconnect_ind);
-      bt_bdaddr_t bd_addr = p_data->disconnect_ind.bd_addr;
+      RawAddress bd_addr = p_data->disconnect_ind.bd_addr;
       mcap_mcl = FindMclByPeerAddress(bd_addr);
       if (!mcap_mcl) {
         bdstr_t bd_addr_str;
diff --git a/tools/mcap_tool/mcap_test_app.h b/tools/mcap_tool/mcap_test_app.h
index 23dfa37..96762bb 100644
--- a/tools/mcap_tool/mcap_test_app.h
+++ b/tools/mcap_tool/mcap_test_app.h
@@ -71,7 +71,7 @@
    * @param sec_mask Security mask
    * @return True on success
    */
-  bool ConnectMcl(const bt_bdaddr_t& bd_addr, uint16_t ctrl_psm,
+  bool ConnectMcl(const RawAddress& bd_addr, uint16_t ctrl_psm,
                   uint16_t sec_mask);
   /**
    * Create MCAP Data End Point
@@ -84,7 +84,7 @@
                   tMCA_DATA_CBACK* data_callback);
   // Simple methods that are self-explanatory
   uint8_t GetHandle();
-  McapMcl* FindMclByPeerAddress(const bt_bdaddr_t& bd_addr);
+  McapMcl* FindMclByPeerAddress(const RawAddress& bd_addr);
   McapMcl* FindMclByHandle(tMCA_CL mcl_handle);
   McapMdep* FindMdepByHandle(tMCA_DEP mdep_handle);
   void RemoveMclByHandle(tMCA_CL mcl_handle);
diff --git a/tools/mcap_tool/mcap_test_mcl.cc b/tools/mcap_tool/mcap_test_mcl.cc
index 7170c36..a017551 100644
--- a/tools/mcap_tool/mcap_test_mcl.cc
+++ b/tools/mcap_tool/mcap_test_mcl.cc
@@ -25,7 +25,7 @@
 namespace SYSTEM_BT_TOOLS_MCAP_TOOL {
 
 McapMcl::McapMcl(btmcap_test_interface_t* mcap_test_interface,
-                 tMCA_HANDLE mcap_handle, const bt_bdaddr_t& peer_bd_addr)
+                 tMCA_HANDLE mcap_handle, const RawAddress& peer_bd_addr)
     : _mdl_list() {
   _mcap_handle = mcap_handle;
   _mcap_test_interface = mcap_test_interface;
@@ -134,7 +134,7 @@
   return ret == MCA_SUCCESS;
 }
 
-bt_bdaddr_t& McapMcl::GetPeerAddress() { return _peer_bd_addr; }
+RawAddress& McapMcl::GetPeerAddress() { return _peer_bd_addr; }
 
 void McapMcl::SetHandle(tMCA_CL handle) { _mcl_handle = handle; }
 
diff --git a/tools/mcap_tool/mcap_test_mcl.h b/tools/mcap_tool/mcap_test_mcl.h
index 2d71ee6..21b2e03 100644
--- a/tools/mcap_tool/mcap_test_mcl.h
+++ b/tools/mcap_tool/mcap_test_mcl.h
@@ -32,7 +32,7 @@
    * @param peer_bd_addr Peer Bluetooth MAC address
    */
   McapMcl(btmcap_test_interface_t* mcap_test_interface, tMCA_HANDLE mcap_handle,
-          const bt_bdaddr_t& peer_bd_addr);
+          const RawAddress& peer_bd_addr);
   /**
    * Connect this MCL's control channel
    * @param ctrl_psm Control channel L2CAP PSM
@@ -101,7 +101,7 @@
    */
   bool DeleteMdl(uint16_t mdl_id);
   // Simple methods that are self-explanatory
-  bt_bdaddr_t& GetPeerAddress();
+  RawAddress& GetPeerAddress();
   void SetHandle(tMCA_CL handle);
   tMCA_CL GetHandle() const;
   void SetMtu(uint16_t mtu);
@@ -120,7 +120,7 @@
   // Initialized during start up
   btmcap_test_interface_t* _mcap_test_interface;
   tMCA_HANDLE _mcap_handle;
-  bt_bdaddr_t _peer_bd_addr;
+  RawAddress _peer_bd_addr;
   std::vector<McapMdl> _mdl_list;
 
   // Initialized later
diff --git a/tools/mcap_tool/mcap_tool.cc b/tools/mcap_tool/mcap_tool.cc
index c7abd55..473a117 100644
--- a/tools/mcap_tool/mcap_tool.cc
+++ b/tools/mcap_tool/mcap_tool.cc
@@ -424,7 +424,7 @@
 
 static void adapter_properties_changed(bt_status_t status, int num_properties,
                                        bt_property_t* properties) {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bdstr_t bd_addr_str;
   if (!properties) {
     printf("properties is null\n");
@@ -448,7 +448,7 @@
             << (state == BT_DISCOVERY_STOPPED ? "STOPPED" : "STARTED");
 }
 
-static void pin_request_cb(bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name,
+static void pin_request_cb(RawAddress* remote_bd_addr, bt_bdname_t* bd_name,
                            uint32_t cod, bool min_16_digit) {
   bt_pin_code_t pincode = {{0x31, 0x32, 0x33, 0x34}};
 
@@ -458,7 +458,7 @@
   }
 }
 
-static void ssp_request_cb(bt_bdaddr_t* remote_bd_addr, bt_bdname_t* bd_name,
+static void ssp_request_cb(RawAddress* remote_bd_addr, bt_bdname_t* bd_name,
                            uint32_t cod, bt_ssp_variant_t pairing_variant,
                            uint32_t pass_key) {
   LOG(INFO) << __func__ << ": device_name:" << bd_name->name
@@ -472,13 +472,13 @@
 }
 
 static void bond_state_changed_cb(bt_status_t status,
-                                  bt_bdaddr_t* remote_bd_addr,
+                                  RawAddress* remote_bd_addr,
                                   bt_bond_state_t state) {
   LOG(INFO) << "Bond State Changed = " << state;
   global_pair_state = state;
 }
 
-static void acl_state_changed(bt_status_t status, bt_bdaddr_t* remote_bd_addr,
+static void acl_state_changed(bt_status_t status, RawAddress* remote_bd_addr,
                               bt_acl_state_t state) {
   bdstr_t bd_addr_str;
   bdaddr_to_string(remote_bd_addr, bd_addr_str, sizeof(bd_addr_str));
@@ -680,7 +680,7 @@
 static void do_mcap_connect_mcl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   uint16_t ctrl_psm = get_hex(&p, 0);  // arg2
   uint16_t sec_mask = get_int(&p, 0);  // arg3
@@ -697,7 +697,7 @@
 static void do_mcap_disconnect_mcl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   printf("%s: bd_addr=%s\n", __func__, buf);
   if (!valid_bd_addr) {
@@ -716,7 +716,7 @@
 static void do_mcap_create_mdl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   uint16_t mdep_handle = get_int(&p, 0);  // arg2
   uint16_t data_psm = get_hex(&p, 0);     // arg3
@@ -746,7 +746,7 @@
 static void do_mcap_data_channel_config(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   printf("%s: bd_addr=%s\n", __func__, buf);
   if (!valid_bd_addr) {
@@ -765,7 +765,7 @@
 static void do_mcap_abort_mdl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   printf("%s: bd_addr=%s\n", __func__, buf);
   if (!valid_bd_addr) {
@@ -784,7 +784,7 @@
 static void do_mcap_delete_mdl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   uint16_t mdl_id = get_int(&p, 0);  // arg2
   printf("%s: bd_addr=%s, mdl_id=%d\n", __func__, buf, mdl_id);
@@ -804,7 +804,7 @@
 static void do_mcap_close_mdl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   uint16_t mdl_id = get_int(&p, 0);  // arg2
   printf("%s: bd_addr=%s, mdl_id=%d\n", __func__, buf, mdl_id);
@@ -829,7 +829,7 @@
 static void do_mcap_reconnect_mdl(char* p) {
   char buf[64];
   get_str(&p, buf);  // arg1
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   bool valid_bd_addr = string_to_bdaddr(buf, &bd_addr);
   uint16_t data_psm = get_hex(&p, 0);  // arg1
   uint16_t mdl_id = get_int(&p, 0);    // arg2
@@ -853,7 +853,7 @@
 }
 
 static void do_pairing(char* p) {
-  bt_bdaddr_t bd_addr;
+  RawAddress bd_addr;
   if (!string_to_bdaddr(p, &bd_addr)) {
     LOG(ERROR) << "Invalid Bluetooth address " << p;
     return;