Skip to content

Instantly share code, notes, and snippets.

@zhuowei
Created December 2, 2025 00:16
Show Gist options
  • Select an option

  • Save zhuowei/4fcaa4b0141d62f44af0cddd9b906588 to your computer and use it in GitHub Desktop.

Select an option

Save zhuowei/4fcaa4b0141d62f44af0cddd9b906588 to your computer and use it in GitHub Desktop.

For forcing hfp client on Android 11:

su
setenforce 0
cp -a /system/etc/sysconfig /data/local/tmp/sysconfig
chown shell:shell /data/local/tmp/sysconfig
adb push override-enable-hf-client.xml /data/local/tmp/sysconfig/
mount -o bind /data/local/tmp/sysconfig /system/etc/sysconfig
stop
start
<?xml version="1.0" encoding="utf-8"?>
<!-- https://android.googlesource.com/platform/packages/services/Car/+/b53ae8d/car_product/build/component-overrides.xml -->
<config>
<component-override package="com.android.bluetooth" >
<!-- Enable sink profiles (typically used on a CarKitt) -->
<!-- Controlled by profile_supported_hfpclient -->
<component class=".hfpclient.HeadsetClientService" enabled="true" />
<!-- Controlled by hfp_client_connection_service_enabled -->
<component class=".hfpclient.connserv.HfpClientConnectionService" enabled="true" />
</component-override>
</config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment