ponces/treble_aosp

[MTK] Bluetooth - Crashes and Disconnects After 5 Minutes.

Closed this issue · 2 comments

Acknowledgements

  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • This is not a feature request.
  • This issue is not a duplicate of an existing issue.
  • The issue is solely related to this GSI.
  • This issue occurs with the latest available build.
  • I am not running a custom vendor on my device.
  • This issue is not kernel related.
  • This issue is not related to Magisk/KernelSU/APatch.

Info

  • Device: Wiko Power U20 (V-750BN-TVM)
  • GSI version: AOSP 14 v2024.07.03
  • Vendor version: Pure Android 11
  • Vendor build.prop

Expected Behavior

Bluetooth should work well and not crash.

Current Behavior

After connecting Bluetooth headphones, the connection automatically disconnects after approximately 5 minutes. The crash log reports a com.android.bluetooth System App Native Crash.

Possible Solution

No response

Steps to Reproduce

  1. Connect to bluetooth headphone
  2. Wait around 5 min
  3. Device will automatically disconnect and crash log show com.android.bluetooth Sytem App Native Crash

Logs

SystemUptimeMs: 4374729
Process: com.android.bluetooth
PID: 14163
UID: 1002
Frozen: false
Flags: 0x20c8be45
Package: com.android.bluetooth v34 (14)
Foreground: No
Process-Runtime: 265595
Build: WIKO/W-V750BN-TVM/W-V750BN:11/RP1A.200720.011/17542236:user/release-keys
Loading-Progress: 1.0
Dropped-Count: 0


Build fingerprint: 'WIKO/W-V750BN-TVM/W-V750BN:11/RP1A.200720.011/17542236:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2024-07-08 08:26:07.262131412+0700
Process uptime: 0s
Cmdline: com.android.bluetooth
pid: 14163, tid: 14198, name: bt_stack_manage >>> com.android.bluetooth <<<
uid: 1002
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'assertion 'was_validated_' failed'
x0 0000000000000000 x1 0000000000003776 x2 0000000000000006 x3 00000071de51d920
x4 646b6860651f265e x5 646b6860651f265e x6 646b6860651f265e x7 7f7f7f7f7f7f7f7f
x8 00000000000000f0 x9 0000007486843560 x10 ffffff80fffffbdf x11 0000000000000000
x12 00000071de51d8b0 x13 0000000000000004 x14 ffffffffffffffff x15 0000000000000000
x16 0000007486902fe0 x17 00000074868e6c60 x18 00000071663bc040 x19 0000000000003753
x20 0000000000003776 x21 00000000ffffffff x22 00000071f1758438 x23 00000071de51eac0
x24 00000071de51eac0 x25 000000716e8b471c x26 000000716f0472e0 x27 0000000000000000
x28 00000071de51eac0 x29 00000071de51d9a0
lr 0000007486886ee0 sp 00000071de51d900 pc 0000007486886f10 pst 0000000000000000
14 total frames
backtrace:
#00 pc 0000000000066f10 /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 26a5ee10dbb5422c275baa981346b946)
#1 pc 00000000008ed788 /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+88) (BuildId: e80ff12130cade1e1fbcdd24f28a8ca0)
#2 pc 0000000000025358 /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_0::__invoke(char const*)+80) (BuildId: 1d14eb72b07fa02ee4eacceeccc7777f)
#3 pc 0000000000012584 /system/lib64/liblog.so (__android_log_assert+292) (BuildId: c68824428ab0162f4bb4414f962098fc)
#4 pc 00000000004140b0 /apex/com.android.btservices/lib64/libbluetooth_jni.so (bluetooth::hci::CommandCompleteView::GetCommandOpCode() const+312) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#5 pc 0000000000411788 /apex/com.android.btservices/lib64/libbluetooth_jni.so (cpp::OnTransmitPacketCommandComplete(void ()(BT_HDR, void*), void*, bluetooth::hci::CommandCompleteView)+108) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#6 pc 0000000000417aa4 /apex/com.android.btservices/lib64/libbluetooth_jni.so (void base::internal::FunctorTraits<void ()(void ()(BT_HDR*, void*), void*, bluetooth::hci::CommandCompleteView), void>::Invoke<void ()(void ()(BT_HDR*, void*), void*, bluetooth::hci::CommandCompleteView), void ()(BT_HDR, void*), void*, bluetooth::hci::CommandCompleteView>(void (&&)(void ()(BT_HDR*, void*), void*, bluetooth::hci::CommandCompleteView), void (&&)(BT_HDR, void*), void*&&, bluetooth::hci::CommandCompleteView&&)+288) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#7 pc 000000000042c9e4 /apex/com.android.btservices/lib64/libbluetooth_jni.so (void base::internal::FunctorTraits<base::OnceCallback<void (bluetooth::hci::CommandCompleteView)>, void>::Invoke<base::OnceCallback<void (bluetooth::hci::CommandCompleteView)>, bluetooth::hci::CommandCompleteView>(base::OnceCallback<void (bluetooth::hci::CommandCompleteView)>&&, bluetooth::hci::CommandCompleteView&&)+280) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#8 pc 000000000041caf8 /apex/com.android.btservices/lib64/libbluetooth_jni.so (bluetooth::os::Handler::handle_next_event()+228) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#9 pc 000000000041d924 /apex/com.android.btservices/lib64/libbluetooth_jni.so (bluetooth::os::Reactor::Run()+512) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#10 pc 000000000041d0f0 /apex/com.android.btservices/lib64/libbluetooth_jni.so (bluetooth::os::Thread::run(bluetooth::os::Thread::Priority)+176) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#11 pc 000000000041d278 /apex/com.android.btservices/lib64/libbluetooth_jni.so (void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct >, void (bluetooth::os::Thread::)(bluetooth::os::Thread::Priority), bluetooth::os::Thread, bluetooth::os::Thread::Priority> >(void*)+68) (BuildId: ab0d9731ab45b0afeac790ced58ac033)
#12 pc 000000000007705c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 26a5ee10dbb5422c275baa981346b946)
#13 pc 000000000006a270 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 26a5ee10dbb5422c275baa981346b946)

Additional context

Use System Wide BT HAL - Enable
Bluetooth workarounds - Mediatek
Set eSCO transport unit size - 0 (default)

There are System Tombstone Log: System Tombstone Crash.txt

It might be a bug with Android 14 QPR3. I tried the June PixelOS update that came with Android 14 QPR3 and ran into the same issue.