phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.41k stars 660 forks source link

android 13 sysbta does not work and masks existing android.hardware.bluetooth.audio hidl implementation #2519

Open Kethen opened 1 year ago

Kethen commented 1 year ago

Current Behavior:

bluetooth audio does not work until stopping sysbta aidl service then restart bluetooth hal

Describe the bug

persist.bluetooth.system_audio_hal.enabled=1 is embedded in build.prop, overriding the hidl binder implementation registered as android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvidersFactory/default

sysbta does not seem to be working on the device, with persist.bluetooth.system_audio_hal.enabled=1 embedded in build.prop it also masks the working hidl implementation

To Reproduce

run a13 GSI with android.hardware.bluetooth.audio@2.0-impl:32 installed into a vndk32 vendor, in my case, the Galaxy S7, which has a 32bit audio hal from Samsung

Expected behavior

Perhaps check for 32 bit audio hal (lack of audio hal besides /vendor/lib64/hw/audio.primary.default.so) before setting persist.bluetooth.system_audio_hal.enabled, which would allow the bt stack to use the existing hidl binder interface

Alternatively check for 32 bit audio hal then start a 32 bit version of sysbta, that might work too

Or have persist.bluetooth.system_audio_hal.enabled disabled by default, leave toggling that to the treble app for devices that don't work

Perhaps check for existing android.hardware.bluetooth.audio implementation (/vendor/lib/hw/android.hardware.bluetooth.audio@-impl.so) before setting persist.bluetooth.system_audio_hal.enabled

Not sure why sysbta does not work on the device

Smartphone (please complete the following information):

phhusson commented 1 year ago

Not sure what 32bits has to do with this... But yeah disabling system audio hal on vndk32 makes sense

Le lun. 13 févr. 2023 à 23:07, Katharine Chui @.***> a écrit :

Current Behavior:

bluetooth audio does not work until stopping sysbta aidl service then restart bluetooth hal Describe the bug

persist.bluetooth.system_audio_hal.enabled=1 is embedded in build.prop, overriding the hidl binder implementation registered as @.*** ::IBluetoothAudioProvidersFactory/default To Reproduce

run a13 GSI with @.***:32 installed into a vndk32 vendor, in my case, the Galaxy S7, which has a 32bit audio hal from Samsung Expected behavior

Perhaps check for 32 bit audio hal (lack of audio hal besides /vendor/lib64/hw/audio.primary.default.so) before setting persist.bluetooth.system_audio_hal.enabled, which would allow the bt stack to use the existing hidl binder interface

Alternatively check for 32 bit audio hal then start a 32 bit version of sysbta, that might work too

Or have persist.bluetooth.system_audio_hal.enabled disabled by default, leave toggling that to the treble app for devices that don't work Smartphone (please complete the following information):

  • Device: Galaxy S7 exynos
  • Build Flavor: system-td-arm64-ab-vanilla.img
  • Version android_13.0.0_r24 ci-20230131

— Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/2519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OXGELG7LYMUEGUL563WXKWCNANCNFSM6AAAAAAU2Z32GE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Kethen commented 1 year ago

sorry for my confusion on the matter, I misunderstood how sysbta achieve it's goal

not sure why the 32 bit android.hardware.bluetooth.audio@2.0 works but not sysbta

here is a logcat for sysbta, headset pairing happens at 01:33:54

logcat.txt