diff --git a/tests/bluetooth/AndroidManifest.xml b/tests/bluetooth/AndroidManifest.xml
index 58f8d77..0b93c20 100644
--- a/tests/bluetooth/AndroidManifest.xml
+++ b/tests/bluetooth/AndroidManifest.xml
@@ -21,7 +21,6 @@
     <uses-permission android:name="android.permission.BLUETOOTH" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE"/>
-    <!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/> -->
     <uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
diff --git a/tests/bluetooth/AndroidTest.xml b/tests/bluetooth/AndroidTest.xml
index 1850b6b..87be477 100644
--- a/tests/bluetooth/AndroidTest.xml
+++ b/tests/bluetooth/AndroidTest.xml
@@ -19,8 +19,8 @@
     <option name="config-descriptor:metadata" key="component" value="bluetooth" />
     <!-- Instant apps cannot hold android.permission.BLUETOOTH which makes BT tests irrelevant -->
     <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
-    <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
-    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
+    <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
+    <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" />
     <option name="config-descriptor:metadata" key="parameter" value="no_foldable_states" />
 
     <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
diff --git a/tests/bluetooth/src/android/bluetooth/cts_root/BluetoothCddRootTest.java b/tests/bluetooth/src/android/bluetooth/cts_root/BluetoothCddRootTest.java
index d04d9db..97504e8 100644
--- a/tests/bluetooth/src/android/bluetooth/cts_root/BluetoothCddRootTest.java
+++ b/tests/bluetooth/src/android/bluetooth/cts_root/BluetoothCddRootTest.java
@@ -25,6 +25,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothProfile;
 import android.bluetooth.cts.BTAdapterUtils;
 import android.bluetooth.cts.TestUtils;
 import android.content.Context;
@@ -47,6 +48,7 @@
 import org.junit.runner.RunWith;
 
 import java.util.List;
+import java.util.Set;
 
 /**
  * Test cases that can only run in rooted environments
@@ -54,6 +56,7 @@
 @RunWith(AndroidJUnit4.class)
 @SmallTest
 public class BluetoothCddRootTest {
+    private static final String TAG = BluetoothCddRootTest.class.getSimpleName();
     private static final int BLUETOOTH_CORE_SPECIFICATION_4_2 = 0x08;
     private static final int BLUETOOTH_CORE_SPECIFICATION_5_0 = 0x09;
     private static final int BLUETOOTH_LOCAL_VERSION_REPORTED_ATOM_ID = 530;
@@ -71,6 +74,8 @@
         Assume.assumeTrue(mHasBluetooth);
         TestUtils.adoptPermissionAsShellUid(BLUETOOTH_CONNECT,
                 BLUETOOTH_PRIVILEGED, BLUETOOTH_SCAN, DUMP, PACKAGE_USAGE_STATS);
+        assertThat(TestUtils.getAdoptedShellPermissions()).containsAtLeast(BLUETOOTH_CONNECT,
+                BLUETOOTH_PRIVILEGED, BLUETOOTH_SCAN, DUMP, PACKAGE_USAGE_STATS);
         mAdapter = TestUtils.getBluetoothAdapterOrDie();
         if (mAdapter.isEnabled()) {
             assertThat(BTAdapterUtils.disableAdapter(mAdapter, mContext)).isTrue();
@@ -109,6 +114,27 @@
         // TODO: Enforce LE data length extension
     }
 
+    @CddTest(requirements = {"7.4.3/C-3-6"})
+    @Test
+    public void test_C_5_1_AshaRequirements() {
+        Assume.assumeTrue(mHasBluetooth);
+        Assume.assumeTrue(TestUtils.isBleSupported(mContext));
+        AtomsProto.BluetoothLocalVersionsReported version = getBluetoothVersion();
+        Assume.assumeTrue(version.hciVersion >= BLUETOOTH_CORE_SPECIFICATION_5_0);
+        assertThat(BTAdapterUtils.enableAdapter(mAdapter, mContext)).isTrue();
+        assertThat(mAdapter.getSupportedProfiles()).contains(BluetoothProfile.HEARING_AID);
+        TestUtils.BluetoothCtsServiceConnector connector =
+                new TestUtils.BluetoothCtsServiceConnector(TAG,
+                        BluetoothProfile.HEARING_AID, mAdapter, mContext);
+        try {
+            assertThat(connector.openProfileProxyAsync()).isTrue();
+            assertThat(connector.waitForProfileConnect()).isTrue();
+            assertThat(connector.getProfileProxy()).isNotNull();
+        } finally {
+            connector.closeProfileProxy();
+        }
+    }
+
     @CddTest(requirements = {"7.4.3/C-12-1"})
     @Test
     public void test_C_12_1_Bluetooth5Requirements() {
@@ -135,6 +161,8 @@
      * @return Bluetooth version proto
      */
     private AtomsProto.BluetoothLocalVersionsReported getBluetoothVersion() {
+        Set<String> permissionsAdopted = TestUtils.getAdoptedShellPermissions();
+        String[] permissionArray = permissionsAdopted.toArray(String[]::new);
         if (mAdapter.isEnabled()) {
             assertThat(BTAdapterUtils.disableAdapter(mAdapter, mContext)).isTrue();
             try {
@@ -158,7 +186,7 @@
             if (atom == null) {
                 continue;
             }
-            Log.i("BluetoothCddTest", "[" + i + "] HCI version is " + atom.hciVersion
+            Log.i("BluetoothCddRootTest", "[" + i + "] HCI version is " + atom.hciVersion
                     + ", LMP version is " + atom.lmpVersion);
             assertThat(atom.lmpManufacturerName).isGreaterThan(0);
             assertThat(atom.lmpVersion).isGreaterThan(0);
@@ -172,6 +200,8 @@
             }
             i++;
         }
+        TestUtils.dropPermissionAsShellUid();
+        TestUtils.adoptPermissionAsShellUid(permissionArray);
         return summaryAtom;
     }
 }
