diff --git a/system/btif/Android.bp b/system/btif/Android.bp
index 2a7fff3669fdfed8419fd044f7c7a937c07d4a4c..6fca3df1b059eb8356b1477f224a5cf348042389 100644
--- a/system/btif/Android.bp
+++ b/system/btif/Android.bp
@@ -658,8 +658,6 @@ cc_test {
           "libbt-sbc-encoder",
           "libbtif",
           "libbtif-core",
-          "libbt-stack",
-          "libbt-stack-core",
           "libbtdevice",
           "lib-bt-packets",
           "lib-bt-packets-avrcp",
diff --git a/system/main/Android.bp b/system/main/Android.bp
index 295f21caa10609bfe9f21fdc0903f2cee1158fe9..6a9d565fd9208cf2982dfcb68e4a2e971024c49e 100644
--- a/system/main/Android.bp
+++ b/system/main/Android.bp
@@ -159,6 +159,7 @@ cc_test {
     include_dirs: [
         "packages/modules/Bluetooth/system",
         "packages/modules/Bluetooth/system/gd",
+        "packages/modules/Bluetooth/system/stack/btm",
         "packages/modules/Bluetooth/system/stack/include",
     ],
     srcs: [
diff --git a/system/stack/Android.bp b/system/stack/Android.bp
index b0c1499c18a00446f1e81c8453cd15407e9c7cca..ed8d3e4cedf92a7af9d451954678015848590c65 100644
--- a/system/stack/Android.bp
+++ b/system/stack/Android.bp
@@ -1033,6 +1033,7 @@ cc_test {
     include_dirs: [
         "packages/modules/Bluetooth/system",
         "packages/modules/Bluetooth/system/gd",
+        "packages/modules/Bluetooth/system/stack/btm",
     ],
     srcs: crypto_toolbox_srcs + [
         ":TestMockStackL2cap",
@@ -1086,6 +1087,7 @@ cc_test {
     include_dirs: [
         "packages/modules/Bluetooth/system",
         "packages/modules/Bluetooth/system/gd",
+        "packages/modules/Bluetooth/system/stack/btm",
     ],
     generated_headers: [
         "BluetoothGeneratedDumpsysDataSchema_h",
@@ -1148,6 +1150,7 @@ cc_test {
     include_dirs: [
         "packages/modules/Bluetooth/system",
         "packages/modules/Bluetooth/system/gd",
+        "packages/modules/Bluetooth/system/stack/btm",
         "packages/modules/Bluetooth/system/utils/include",
     ],
     generated_headers: [
@@ -1224,6 +1227,7 @@ cc_test {
     include_dirs: [
         "packages/modules/Bluetooth/system",
         "packages/modules/Bluetooth/system/gd",
+        "packages/modules/Bluetooth/system/stack/btm",
         "packages/modules/Bluetooth/system/utils/include",
     ],
     generated_headers: [
@@ -1296,6 +1300,7 @@ cc_test {
     include_dirs: [
         "packages/modules/Bluetooth/system",
         "packages/modules/Bluetooth/system/gd",
+        "packages/modules/Bluetooth/system/stack/btm",
         "packages/modules/Bluetooth/system/utils/include",
     ],
     generated_headers: [
diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3182581cd2d14209f679e9ee5cd41d1965448586
--- /dev/null
+++ b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * Generated mock file from original source file
+ *   Functions generated:3
+ *
+ *  mockcify.pl ver 0.5.0
+ */
+
+#include <cstdint>
+#include <functional>
+#include <map>
+#include <string>
+
+extern std::map<std::string, int> mock_function_count_map;
+
+// Mock include file to share data between tests and mock
+#include "test/mock/mock_stack_btm_hfp_msbc_decoder.h"
+
+// Original usings
+
+// Mocked internal structures, if any
+
+namespace test {
+namespace mock {
+namespace stack_btm_hfp_msbc_decoder {
+
+// Function state capture and return values, if needed
+struct hfp_msbc_decoder_cleanup hfp_msbc_decoder_cleanup;
+struct hfp_msbc_decoder_decode_packet hfp_msbc_decoder_decode_packet;
+struct hfp_msbc_decoder_init hfp_msbc_decoder_init;
+
+}  // namespace stack_btm_hfp_msbc_decoder
+}  // namespace mock
+}  // namespace test
+
+// Mocked function return values, if any
+namespace test {
+namespace mock {
+namespace stack_btm_hfp_msbc_decoder {
+
+bool hfp_msbc_decoder_decode_packet::return_value = false;
+bool hfp_msbc_decoder_init::return_value = false;
+
+}  // namespace stack_btm_hfp_msbc_decoder
+}  // namespace mock
+}  // namespace test
+
+// Mocked functions, if any
+void hfp_msbc_decoder_cleanup(void) {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_hfp_msbc_decoder::hfp_msbc_decoder_cleanup();
+}
+bool hfp_msbc_decoder_decode_packet(const uint8_t* i_buf, int16_t* o_buf,
+                                    size_t out_len) {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_hfp_msbc_decoder::hfp_msbc_decoder_decode_packet(
+      i_buf, o_buf, out_len);
+}
+bool hfp_msbc_decoder_init() {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_hfp_msbc_decoder::hfp_msbc_decoder_init();
+}
+// Mocked functions complete
+// END mockcify generation
diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_decoder.h b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.h
new file mode 100644
index 0000000000000000000000000000000000000000..9bb23a75255e9000b826989ee4f4e17aa0d98c6a
--- /dev/null
+++ b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+/*
+ * Generated mock file from original source file
+ *   Functions generated:3
+ *
+ *  mockcify.pl ver 0.5.0
+ */
+
+#include <cstdint>
+#include <functional>
+#include <map>
+#include <string>
+
+extern std::map<std::string, int> mock_function_count_map;
+
+// Original included files, if any
+// NOTE: Since this is a mock file with mock definitions some number of
+//       include files may not be required.  The include-what-you-use
+//       still applies, but crafting proper inclusion is out of scope
+//       for this effort.  This compilation unit may compile as-is, or
+//       may need attention to prune from (or add to ) the inclusion set.
+#include <base/logging.h>
+
+#include <cstring>
+
+#include "embdrv/sbc/decoder/include/oi_codec_sbc.h"
+#include "embdrv/sbc/decoder/include/oi_status.h"
+#include "hfp_msbc_decoder.h"
+#include "osi/include/log.h"
+
+// Original usings
+
+// Mocked compile conditionals, if any
+
+namespace test {
+namespace mock {
+namespace stack_btm_hfp_msbc_decoder {
+
+// Shared state between mocked functions and tests
+// Name: hfp_msbc_decoder_cleanup
+// Params: void
+// Return: void
+struct hfp_msbc_decoder_cleanup {
+  std::function<void(void)> body{[](void) {}};
+  void operator()(void) { body(); };
+};
+extern struct hfp_msbc_decoder_cleanup hfp_msbc_decoder_cleanup;
+
+// Name: hfp_msbc_decoder_decode_packet
+// Params: const uint8_t* i_buf, int16_t* o_buf, size_t out_len
+// Return: bool
+struct hfp_msbc_decoder_decode_packet {
+  static bool return_value;
+  std::function<bool(const uint8_t* i_buf, int16_t* o_buf, size_t out_len)>
+      body{[](const uint8_t* i_buf, int16_t* o_buf, size_t out_len) {
+        return return_value;
+      }};
+  bool operator()(const uint8_t* i_buf, int16_t* o_buf, size_t out_len) {
+    return body(i_buf, o_buf, out_len);
+  };
+};
+extern struct hfp_msbc_decoder_decode_packet hfp_msbc_decoder_decode_packet;
+
+// Name: hfp_msbc_decoder_init
+// Params:
+// Return: bool
+struct hfp_msbc_decoder_init {
+  static bool return_value;
+  std::function<bool()> body{[]() { return return_value; }};
+  bool operator()() { return body(); };
+};
+extern struct hfp_msbc_decoder_init hfp_msbc_decoder_init;
+
+}  // namespace stack_btm_hfp_msbc_decoder
+}  // namespace mock
+}  // namespace test
+
+// END mockcify generation
\ No newline at end of file
diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..08e530282ba8ab61ba2e309fdc755f24d635aa52
--- /dev/null
+++ b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * Generated mock file from original source file
+ *   Functions generated:3
+ *
+ *  mockcify.pl ver 0.5.1
+ */
+
+#include <cstdint>
+#include <functional>
+#include <map>
+#include <string>
+
+extern std::map<std::string, int> mock_function_count_map;
+
+#ifndef __clang_analyzer__
+// Mock include file to share data between tests and mock
+#include "test/mock/mock_stack_btm_hfp_msbc_encoder.h"
+
+// Original usings
+
+// Mocked internal structures, if any
+
+namespace test {
+namespace mock {
+namespace stack_btm_hfp_msbc_encoder {
+
+// Function state capture and return values, if needed
+struct hfp_msbc_encode_frames hfp_msbc_encode_frames;
+struct hfp_msbc_encoder_cleanup hfp_msbc_encoder_cleanup;
+struct hfp_msbc_encoder_init hfp_msbc_encoder_init;
+
+}  // namespace stack_btm_hfp_msbc_encoder
+}  // namespace mock
+}  // namespace test
+
+// Mocked function return values, if any
+namespace test {
+namespace mock {
+namespace stack_btm_hfp_msbc_encoder {
+
+uint32_t hfp_msbc_encode_frames::return_value = 0;
+
+}  // namespace stack_btm_hfp_msbc_encoder
+}  // namespace mock
+}  // namespace test
+
+// Mocked functions, if any
+uint32_t hfp_msbc_encode_frames(int16_t* input, uint8_t* output) {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_hfp_msbc_encoder::hfp_msbc_encode_frames(input,
+                                                                        output);
+}
+void hfp_msbc_encoder_cleanup(void) {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_hfp_msbc_encoder::hfp_msbc_encoder_cleanup();
+}
+void hfp_msbc_encoder_init(void) {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_hfp_msbc_encoder::hfp_msbc_encoder_init();
+}
+// Mocked functions complete
+#endif  //  __clang_analyzer__
+// END mockcify generation
diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_encoder.h b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.h
new file mode 100644
index 0000000000000000000000000000000000000000..20b4e5994cfa76e7dc1059a0277c4a1dc403ce6c
--- /dev/null
+++ b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+/*
+ * Generated mock file from original source file
+ *   Functions generated:3
+ *
+ *  mockcify.pl ver 0.5.1
+ */
+
+#include <cstdint>
+#include <functional>
+#include <map>
+#include <string>
+
+extern std::map<std::string, int> mock_function_count_map;
+
+// Original included files, if any
+// NOTE: Since this is a mock file with mock definitions some number of
+//       include files may not be required.  The include-what-you-use
+//       still applies, but crafting proper inclusion is out of scope
+//       for this effort.  This compilation unit may compile as-is, or
+//       may need attention to prune from (or add to ) the inclusion set.
+#include <cstring>
+
+#include "embdrv/sbc/encoder/include/sbc_encoder.h"
+#include "hfp_msbc_encoder.h"
+#include "osi/include/log.h"
+
+// Original usings
+
+// Mocked compile conditionals, if any
+
+namespace test {
+namespace mock {
+namespace stack_btm_hfp_msbc_encoder {
+
+// Shared state between mocked functions and tests
+// Name: hfp_msbc_encode_frames
+// Params: int16_t* input, uint8_t* output
+// Return: uint32_t
+struct hfp_msbc_encode_frames {
+  static uint32_t return_value;
+  std::function<uint32_t(int16_t* input, uint8_t* output)> body{
+      [](int16_t* input, uint8_t* output) { return return_value; }};
+  uint32_t operator()(int16_t* input, uint8_t* output) {
+    return body(input, output);
+  };
+};
+extern struct hfp_msbc_encode_frames hfp_msbc_encode_frames;
+
+// Name: hfp_msbc_encoder_cleanup
+// Params: void
+// Return: void
+struct hfp_msbc_encoder_cleanup {
+  std::function<void(void)> body{[](void) {}};
+  void operator()(void) { body(); };
+};
+extern struct hfp_msbc_encoder_cleanup hfp_msbc_encoder_cleanup;
+
+// Name: hfp_msbc_encoder_init
+// Params: void
+// Return: void
+struct hfp_msbc_encoder_init {
+  std::function<void(void)> body{[](void) {}};
+  void operator()(void) { body(); };
+};
+extern struct hfp_msbc_encoder_init hfp_msbc_encoder_init;
+
+}  // namespace stack_btm_hfp_msbc_encoder
+}  // namespace mock
+}  // namespace test
+
+// END mockcify generation
\ No newline at end of file
diff --git a/system/test/mock/mock_stack_btm_sco_hfp_hal.cc b/system/test/mock/mock_stack_btm_sco_hfp_hal.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ba2c01385ff05d38adac8a59de93742c1899e3b5
--- /dev/null
+++ b/system/test/mock/mock_stack_btm_sco_hfp_hal.cc
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * Generated mock file from original source file
+ *   Functions generated:10
+ *
+ *  mockcify.pl ver 0.5.1
+ */
+
+#ifndef __clang_analyzer__
+#include <cstdint>
+#include <functional>
+#include <map>
+#include <string>
+
+extern std::map<std::string, int> mock_function_count_map;
+
+// Mock include file to share data between tests and mock
+#include "test/mock/mock_stack_btm_sco_hfp_hal.h"
+
+// Original usings
+
+// Mocked internal structures, if any
+
+namespace test {
+namespace mock {
+namespace stack_btm_sco_hfp_hal {
+
+// Function state capture and return values, if needed
+struct enable_offload enable_offload;
+struct get_codec_capabilities get_codec_capabilities;
+struct get_offload_enabled get_offload_enabled;
+struct get_offload_supported get_offload_supported;
+struct get_packet_size get_packet_size;
+struct get_wbs_supported get_wbs_supported;
+struct init init;
+struct notify_sco_connection_change notify_sco_connection_change;
+struct set_codec_datapath set_codec_datapath;
+struct update_esco_parameters update_esco_parameters;
+
+}  // namespace stack_btm_sco_hfp_hal
+}  // namespace mock
+}  // namespace test
+
+// Mocked function return values, if any
+namespace test {
+namespace mock {
+namespace stack_btm_sco_hfp_hal {
+
+bool enable_offload::return_value = false;
+hfp_hal_interface::bt_codecs get_codec_capabilities::return_value = {};
+bool get_offload_enabled::return_value = false;
+bool get_offload_supported::return_value = false;
+int get_packet_size::return_value = 0;
+bool get_wbs_supported::return_value = false;
+
+}  // namespace stack_btm_sco_hfp_hal
+}  // namespace mock
+}  // namespace test
+
+namespace hfp_hal_interface {
+
+// Mocked functions, if any
+bool enable_offload(bool enable) {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_sco_hfp_hal::enable_offload(enable);
+}
+bt_codecs get_codec_capabilities(uint64_t codecs) {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_sco_hfp_hal::get_codec_capabilities(codecs);
+}
+bool get_offload_enabled() {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_sco_hfp_hal::get_offload_enabled();
+}
+bool get_offload_supported() {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_sco_hfp_hal::get_offload_supported();
+}
+int get_packet_size(int codec) {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_sco_hfp_hal::get_packet_size(codec);
+}
+bool get_wbs_supported() {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_btm_sco_hfp_hal::get_wbs_supported();
+}
+void init() {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_sco_hfp_hal::init();
+}
+void notify_sco_connection_change(RawAddress device, bool is_connected,
+                                  int codec) {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_sco_hfp_hal::notify_sco_connection_change(
+      device, is_connected, codec);
+}
+void set_codec_datapath(esco_coding_format_t coding_format) {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_sco_hfp_hal::set_codec_datapath(coding_format);
+}
+void update_esco_parameters(enh_esco_params_t* p_parms) {
+  mock_function_count_map[__func__]++;
+  test::mock::stack_btm_sco_hfp_hal::update_esco_parameters(p_parms);
+}
+
+}  // namespace hfp_hal_interface
+
+// Mocked functions complete
+#endif  //  __clang_analyzer__
+// END mockcify generation
diff --git a/system/test/mock/mock_stack_btm_sco_hfp_hal.h b/system/test/mock/mock_stack_btm_sco_hfp_hal.h
new file mode 100644
index 0000000000000000000000000000000000000000..bcff3493c0de1e473ad54b2798652619cdf4f3a8
--- /dev/null
+++ b/system/test/mock/mock_stack_btm_sco_hfp_hal.h
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+/*
+ * Generated mock file from original source file
+ *   Functions generated:10
+ *
+ *  mockcify.pl ver 0.5.1
+ */
+
+#include <cstdint>
+#include <functional>
+#include <map>
+#include <string>
+
+extern std::map<std::string, int> mock_function_count_map;
+
+// Original included files, if any
+// NOTE: Since this is a mock file with mock definitions some number of
+//       include files may not be required.  The include-what-you-use
+//       still applies, but crafting proper inclusion is out of scope
+//       for this effort.  This compilation unit may compile as-is, or
+//       may need attention to prune from (or add to ) the inclusion set.
+#include <vector>
+
+#include "btm_sco_hfp_hal.h"
+#include "device/include/esco_parameters.h"
+
+// Original usings
+
+// Mocked compile conditionals, if any
+
+namespace test {
+namespace mock {
+namespace stack_btm_sco_hfp_hal {
+
+// Shared state between mocked functions and tests
+// Name: enable_offload
+// Params: bool enable
+// Return: bool
+struct enable_offload {
+  static bool return_value;
+  std::function<bool(bool enable)> body{
+      [](bool enable) { return return_value; }};
+  bool operator()(bool enable) { return body(enable); };
+};
+extern struct enable_offload enable_offload;
+
+// Name: get_codec_capabilities
+// Params: uint64_t codecs
+// Return: bt_codecs
+struct get_codec_capabilities {
+  static hfp_hal_interface::bt_codecs return_value;
+  std::function<hfp_hal_interface::bt_codecs(uint64_t codecs)> body{
+      [](uint64_t codecs) { return return_value; }};
+  hfp_hal_interface::bt_codecs operator()(uint64_t codecs) {
+    return body(codecs);
+  };
+};
+extern struct get_codec_capabilities get_codec_capabilities;
+
+// Name: get_offload_enabled
+// Params:
+// Return: bool
+struct get_offload_enabled {
+  static bool return_value;
+  std::function<bool()> body{[]() { return return_value; }};
+  bool operator()() { return body(); };
+};
+extern struct get_offload_enabled get_offload_enabled;
+
+// Name: get_offload_supported
+// Params:
+// Return: bool
+struct get_offload_supported {
+  static bool return_value;
+  std::function<bool()> body{[]() { return return_value; }};
+  bool operator()() { return body(); };
+};
+extern struct get_offload_supported get_offload_supported;
+
+// Name: get_packet_size
+// Params: int codec
+// Return: int
+struct get_packet_size {
+  static int return_value;
+  std::function<int(int codec)> body{[](int codec) { return return_value; }};
+  int operator()(int codec) { return body(codec); };
+};
+extern struct get_packet_size get_packet_size;
+
+// Name: get_wbs_supported
+// Params:
+// Return: bool
+struct get_wbs_supported {
+  static bool return_value;
+  std::function<bool()> body{[]() { return return_value; }};
+  bool operator()() { return body(); };
+};
+extern struct get_wbs_supported get_wbs_supported;
+
+// Name: init
+// Params:
+// Return: void
+struct init {
+  std::function<void()> body{[]() {}};
+  void operator()() { body(); };
+};
+extern struct init init;
+
+// Name: notify_sco_connection_change
+// Params: RawAddress device, bool is_connected, int codec
+// Return: void
+struct notify_sco_connection_change {
+  std::function<void(RawAddress device, bool is_connected, int codec)> body{
+      [](RawAddress device, bool is_connected, int codec) {}};
+  void operator()(RawAddress device, bool is_connected, int codec) {
+    body(device, is_connected, codec);
+  };
+};
+extern struct notify_sco_connection_change notify_sco_connection_change;
+
+// Name: set_codec_datapath
+// Params: esco_coding_format_t coding_format
+// Return: void
+struct set_codec_datapath {
+  std::function<void(esco_coding_format_t coding_format)> body{
+      [](esco_coding_format_t coding_format) {}};
+  void operator()(esco_coding_format_t coding_format) { body(coding_format); };
+};
+extern struct set_codec_datapath set_codec_datapath;
+
+// Name: update_esco_parameters
+// Params: enh_esco_params_t* p_parms
+// Return: void
+struct update_esco_parameters {
+  std::function<void(enh_esco_params_t* p_parms)> body{
+      [](enh_esco_params_t* p_parms) {}};
+  void operator()(enh_esco_params_t* p_parms) { body(p_parms); };
+};
+extern struct update_esco_parameters update_esco_parameters;
+
+}  // namespace stack_btm_sco_hfp_hal
+}  // namespace mock
+}  // namespace test
+
+// END mockcify generation
diff --git a/system/test/mock/mock_stack_l2cap_ble.cc b/system/test/mock/mock_stack_l2cap_ble.cc
index ada82b9367fe9a216dbe76e5ef35223e3ff8179e..a66064f9ddc33ce098f1075e9cfca4e0640e8fce 100644
--- a/system/test/mock/mock_stack_l2cap_ble.cc
+++ b/system/test/mock/mock_stack_l2cap_ble.cc
@@ -73,6 +73,7 @@ struct l2cble_sec_comp l2cble_sec_comp;
 struct l2ble_sec_access_req l2ble_sec_access_req;
 struct L2CA_AdjustConnectionIntervals L2CA_AdjustConnectionIntervals;
 struct l2cble_use_preferred_conn_params l2cble_use_preferred_conn_params;
+struct L2CA_SubrateRequest L2CA_SubrateRequest;
 
 }  // namespace stack_l2cap_ble
 }  // namespace mock
@@ -198,5 +199,12 @@ void l2cble_use_preferred_conn_params(const RawAddress& bda) {
   mock_function_count_map[__func__]++;
   test::mock::stack_l2cap_ble::l2cble_use_preferred_conn_params(bda);
 }
+bool L2CA_SubrateRequest(const RawAddress& rem_bda, uint16_t subrate_min,
+                         uint16_t subrate_max, uint16_t max_latency,
+                         uint16_t cont_num, uint16_t timeout) {
+  mock_function_count_map[__func__]++;
+  return test::mock::stack_l2cap_ble::L2CA_SubrateRequest(
+      rem_bda, subrate_min, subrate_max, max_latency, cont_num, timeout);
+}
 
 // END mockcify generation
diff --git a/system/test/mock/mock_stack_l2cap_ble.h b/system/test/mock/mock_stack_l2cap_ble.h
index a47cf5f41a61bd21c70cdd53f5eec520f00606df..9de9b3ddd05abe2e52d171a217f991e3de7755e4 100644
--- a/system/test/mock/mock_stack_l2cap_ble.h
+++ b/system/test/mock/mock_stack_l2cap_ble.h
@@ -313,6 +313,24 @@ struct l2cble_use_preferred_conn_params {
   void operator()(const RawAddress& bda) { body(bda); };
 };
 extern struct l2cble_use_preferred_conn_params l2cble_use_preferred_conn_params;
+// Name: L2CA_SubrateRequest
+// Params:
+// Returns: bool
+struct L2CA_SubrateRequest {
+  std::function<bool(const RawAddress& rem_bda, uint16_t subrate_min,
+                     uint16_t subrate_max, uint16_t max_latency,
+                     uint16_t cont_num, uint16_t timeout)>
+      body{[](const RawAddress& rem_bda, uint16_t subrate_min,
+              uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num,
+              uint16_t timeout) { return false; }};
+  bool operator()(const RawAddress& rem_bda, uint16_t subrate_min,
+                  uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num,
+                  uint16_t timeout) {
+    return body(rem_bda, subrate_min, subrate_max, max_latency, cont_num,
+                timeout);
+  };
+};
+extern struct L2CA_SubrateRequest L2CA_SubrateRequest;
 
 }  // namespace stack_l2cap_ble
 }  // namespace mock