GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
337 stars 18 forks source link

Bluetooth broken and weirdness @ QPR2 #2020

Closed catdevnull closed 1 year ago

catdevnull commented 1 year ago

after restarting after the update, while it's "finishing the update" it's freaking out connecting and disconnecting to my bluetooth speaker and heavily freezing. it had a crash dialog for bluetooth too.

type: crash
osVersion: google/panther/panther:13/TQ2A.230305.008/2023031300:user/release-keys
package: [com.android](http://com.android/).bluetooth:33
process: [com.android](http://com.android/).bluetooth
processUptime: 3758 + 63 ms

java.lang.SecurityException: Bluetooth is the only caller allowed
    at android.os.Parcel.createExceptionOrNull([Parcel.java:3021](http://parcel.java:3021/))
    at android.os.Parcel.createException([Parcel.java:3005](http://parcel.java:3005/))
    at android.os.Parcel.readException([Parcel.java:2981](http://parcel.java:2981/))
    at android.os.Parcel.readException([Parcel.java:2923](http://parcel.java:2923/))
    at [android.media](http://android.media/).IAudioService$Stub$Proxy.handleBluetoothActiveDeviceChanged([IAudioService.java:5306](http://iaudioservice.java:5306/))
    at [android.media](http://android.media/).AudioManager.handleBluetoothActiveDeviceChanged([AudioManager.java:5966](http://audiomanager.java:5966/))
    at [com.android](http://com.android/).bluetooth.a2dp.A2dpService.setActiveDevice([A2dpService.java:636](http://a2dpservice.java:636/))
    at [com.android](http://com.android/).bluetooth.btservice.ActiveDeviceManager.setA2dpActiveDevice([ActiveDeviceManager.java:677](http://activedevicemanager.java:677/))
    at [com.android](http://com.android/).bluetooth.btservice.ActiveDeviceManager.-$$Nest$msetA2dpActiveDevice(Unknown Source:0)
    at [com.android](http://com.android/).bluetooth.btservice.ActiveDeviceManager$ActiveDeviceManagerHandler.handleMessage([ActiveDeviceManager.java:251](http://activedevicemanager.java:251/))
    at android.os.Handler.dispatchMessage([Handler.java:106](http://handler.java:106/))
    at android.os.Looper.loopOnce([Looper.java:201](http://looper.java:201/))
    at android.os.Looper.loop([Looper.java:288](http://looper.java:288/))
    at [android.os.HandlerThread.run](http://android.os.handlerthread.run/)([HandlerThread.java:67](http://handlerthread.java:67/))
Caused by: android.os.RemoteException: Remote stack trace:
    at [com.android.server.audio](http://com.android.server.audio/).AudioService.handleBluetoothActiveDeviceChanged([AudioService.java:7186](http://audioservice.java:7186/))
    at [android.media](http://android.media/).IAudioService$Stub.onTransact([IAudioService.java:2616](http://iaudioservice.java:2616/))
    at android.os.Binder.execTransactInternal([Binder.java:1307](http://binder.java:1307/))
    at android.os.Binder.execTransact([Binder.java:1265](http://binder.java:1265/))

notably, the heavy freezing of the ui seems to go away almost instantly after turning off the bluetooth speaker that it kept trying to reconnect to.

Metr0pl3x commented 1 year ago

Have you tried forgetting the speaker and pairing again?

If that doesn't work, my next suggestion would be SETTINGS>SYSTEM>RESET>MOBILE BLUETOOTH WIFI followed by a restart and pairing again.

catdevnull commented 1 year ago

forgetting the speaker and pairing again doesn't work. also, a bluetooth keyboard doesn't work either (but it doesn't freeze the ui like the speaker.)

i'd rather not reset my bluetooth and wifi pairings. it also seems like this would affect anyone updating anyway..

girlbossceo commented 1 year ago

@catdevnull Any more specific details to reproduce this? Four people (including me) on 6th-gen devices can play Bluetooth audio just fine, but another person reported this crash also on 6th-gen so the way to reproduce this is unclear.

YousifYaldo commented 1 year ago

I'm having the same issue with Bluetooth crashing after updating to the latest beta release (pixel 6 pro) Bluetooth keeps crashing when trying to connect to a paired device, it would just keep turning off and on then crash. I tried forgetting the paired device, the crashing stopped. But started crashing again when I paired the device again. Crash report below. Thanks to everyone for their efforts.

type: crash
osVersion: google/raven/raven:13/T2B3.230109.009/2023031300:user/release-keys
package: com.android.bluetooth:33
process: com.android.bluetooth
processUptime: 6453 + 64 ms

java.lang.SecurityException: validateSignalStrengthUpdateRequest: Neither user 1002 nor current process has android.permission.LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
    at android.os.Parcel.createException(Parcel.java:3005)
    at android.os.Parcel.readException(Parcel.java:2981)
    at android.os.Parcel.readException(Parcel.java:2923)
    at com.android.internal.telephony.ITelephony$Stub$Proxy.setSignalStrengthUpdateRequest(ITelephony.java:14498)
    at android.telephony.TelephonyManager.setSignalStrengthUpdateRequest(TelephonyManager.java:16614)
    at com.android.bluetooth.hfp.HeadsetPhoneState.startListenForPhoneState(HeadsetPhoneState.java:171)
    at com.android.bluetooth.hfp.HeadsetPhoneState.listenForPhoneState(HeadsetPhoneState.java:145)
    at com.android.bluetooth.hfp.HeadsetStateMachine.updateAgIndicatorEnableState(HeadsetStateMachine.java:2101)
    at com.android.bluetooth.hfp.HeadsetStateMachine.-$$Nest$mupdateAgIndicatorEnableState(Unknown Source:0)
    at com.android.bluetooth.hfp.HeadsetStateMachine$Connected.enter(HeadsetStateMachine.java:1047)
    at com.android.internal.util.StateMachine$SmHandler.invokeEnterMethods(StateMachine.java:1038)
    at com.android.internal.util.StateMachine$SmHandler.performTransitions(StateMachine.java:880)
    at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:820)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.os.HandlerThread.run(HandlerThread.java:67)
matchboxbananasynergy commented 1 year ago

I'm having the same issue with Bluetooth crashing after updating to the latest beta release (pixel 6 pro) Bluetooth keeps crashing when trying to connect to a paired app, it would just keep turning off and on then crash. I tried forgetting the paired device, the crashing stopped. But started crashing again when I paired the device again. Crash report below. Thanks to everyone for their efforts.

type: crash
osVersion: google/raven/raven:13/T2B3.230109.009/2023031300:user/release-keys
package: com.android.bluetooth:33
process: com.android.bluetooth
processUptime: 6453 + 64 ms

java.lang.SecurityException: validateSignalStrengthUpdateRequest: Neither user 1002 nor current process has android.permission.LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH.
  at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
  at android.os.Parcel.createException(Parcel.java:3005)
  at android.os.Parcel.readException(Parcel.java:2981)
  at android.os.Parcel.readException(Parcel.java:2923)
  at com.android.internal.telephony.ITelephony$Stub$Proxy.setSignalStrengthUpdateRequest(ITelephony.java:14498)
  at android.telephony.TelephonyManager.setSignalStrengthUpdateRequest(TelephonyManager.java:16614)
  at com.android.bluetooth.hfp.HeadsetPhoneState.startListenForPhoneState(HeadsetPhoneState.java:171)
  at com.android.bluetooth.hfp.HeadsetPhoneState.listenForPhoneState(HeadsetPhoneState.java:145)
  at com.android.bluetooth.hfp.HeadsetStateMachine.updateAgIndicatorEnableState(HeadsetStateMachine.java:2101)
  at com.android.bluetooth.hfp.HeadsetStateMachine.-$$Nest$mupdateAgIndicatorEnableState(Unknown Source:0)
  at com.android.bluetooth.hfp.HeadsetStateMachine$Connected.enter(HeadsetStateMachine.java:1047)
  at com.android.internal.util.StateMachine$SmHandler.invokeEnterMethods(StateMachine.java:1038)
  at com.android.internal.util.StateMachine$SmHandler.performTransitions(StateMachine.java:880)
  at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:820)
  at android.os.Handler.dispatchMessage(Handler.java:106)
  at android.os.Looper.loopOnce(Looper.java:201)
  at android.os.Looper.loop(Looper.java:288)
  at android.os.HandlerThread.run(HandlerThread.java:67)

Would be very helpful to know specifics such as name of the app, BT device etc. As much info as possible would be very much appreciated.

YousifYaldo commented 1 year ago

I'm having the same issue with Bluetooth crashing after updating to the latest beta release (pixel 6 pro) Bluetooth keeps crashing when trying to connect to a paired app, it would just keep turning off and on then crash. I tried forgetting the paired device, the crashing stopped. But started crashing again when I paired the device again. Crash report below. Thanks to everyone for their efforts.

type: crash
osVersion: google/raven/raven:13/T2B3.230109.009/2023031300:user/release-keys
package: com.android.bluetooth:33
process: com.android.bluetooth
processUptime: 6453 + 64 ms

java.lang.SecurityException: validateSignalStrengthUpdateRequest: Neither user 1002 nor current process has android.permission.LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
    at android.os.Parcel.createException(Parcel.java:3005)
    at android.os.Parcel.readException(Parcel.java:2981)
    at android.os.Parcel.readException(Parcel.java:2923)
    at com.android.internal.telephony.ITelephony$Stub$Proxy.setSignalStrengthUpdateRequest(ITelephony.java:14498)
    at android.telephony.TelephonyManager.setSignalStrengthUpdateRequest(TelephonyManager.java:16614)
    at com.android.bluetooth.hfp.HeadsetPhoneState.startListenForPhoneState(HeadsetPhoneState.java:171)
    at com.android.bluetooth.hfp.HeadsetPhoneState.listenForPhoneState(HeadsetPhoneState.java:145)
    at com.android.bluetooth.hfp.HeadsetStateMachine.updateAgIndicatorEnableState(HeadsetStateMachine.java:2101)
    at com.android.bluetooth.hfp.HeadsetStateMachine.-$$Nest$mupdateAgIndicatorEnableState(Unknown Source:0)
    at com.android.bluetooth.hfp.HeadsetStateMachine$Connected.enter(HeadsetStateMachine.java:1047)
    at com.android.internal.util.StateMachine$SmHandler.invokeEnterMethods(StateMachine.java:1038)
    at com.android.internal.util.StateMachine$SmHandler.performTransitions(StateMachine.java:880)
    at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:820)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.os.HandlerThread.run(HandlerThread.java:67)

Would be very helpful to know specifics such as name of the app, BT device etc. As much info as possible would be very much appreciated.

I'm using ymusic app and paired to my Toyota Prius (2012)

YousifYaldo commented 1 year ago

Update: I tried to reset network settings, restart the phone, and connect to a different device (Monster N-lite clear talk earphones). Problem still persists. I'm not using any profiles, I only have the main. Bluetooth doesn't crash when finding upaired devices, it only crashes when it connects.

ericzeez commented 1 year ago

Also having the same issue on a PIxel 7 Pro. When Bluetooth is enabled and devices are continuously connecting and disconnecting the UI is also slow and unresponsive. I've had the "System UI" crash twice which would take me back to the lock screen to re-authenticate. Devices I've tried so far Galaxy Buds, Sony XM4, and Jaybirds.

type: crash
osVersion: google/cheetah/cheetah:13/TQ2A.230305.008.C1/2023031300:user/release-keys
package: com.android.bluetooth:33
process: com.android.bluetooth
processUptime: 5710 + 90 ms

java.lang.SecurityException: Bluetooth is the only caller allowed
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
    at android.os.Parcel.createException(Parcel.java:3005)
    at android.os.Parcel.readException(Parcel.java:2981)
    at android.os.Parcel.readException(Parcel.java:2923)
    at android.media.IAudioService$Stub$Proxy.handleBluetoothActiveDeviceChanged(IAudioService.java:5306)
    at android.media.AudioManager.handleBluetoothActiveDeviceChanged(AudioManager.java:5966)
    at com.android.bluetooth.a2dp.A2dpService.setActiveDevice(A2dpService.java:636)
    at com.android.bluetooth.btservice.ActiveDeviceManager.setA2dpActiveDevice(ActiveDeviceManager.java:677)
    at com.android.bluetooth.btservice.ActiveDeviceManager.-$$Nest$msetA2dpActiveDevice(Unknown Source:0)
    at com.android.bluetooth.btservice.ActiveDeviceManager$ActiveDeviceManagerHandler.handleMessage(ActiveDeviceManager.java:251)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.os.RemoteException: Remote stack trace:
    at com.android.server.audio.AudioService.handleBluetoothActiveDeviceChanged(AudioService.java:7186)
    at android.media.IAudioService$Stub.onTransact(IAudioService.java:2616)
    at android.os.Binder.execTransactInternal(Binder.java:1307)
    at android.os.Binder.execTransact(Binder.java:1265)
thestinger commented 1 year ago

Need to know if each person experiencing this crash is using a work profile or not.

YousifYaldo commented 1 year ago

Need to know if each person experiencing this crash is using a work profile or not.

I'm not using any profiles, only main.

ericzeez commented 1 year ago

Need to know if each person experiencing this crash is using a work profile or not.

Not using a work profile. I do have multiple users but those user sessions were not started.

muhomorr commented 1 year ago

@YousifYaldo @deezeem Can you post the output of adb shell pm dump com.android.bluetooth? It doesn't contain PII.

ericzeez commented 1 year ago

@YousifYaldo @deezeem Can you post the output of adb shell pm dump com.android.bluetooth? It doesn't contain PII.

Attached.

bluetooth-dump.txt

YousifYaldo commented 1 year ago

@YousifYaldo @deezeem Can you post the output of adb shell pm dump com.android.bluetooth? It doesn't contain PII.

Here you go Bluetooth Dump.txt

muhomorr commented 1 year ago

@deezeem @YousifYaldo What's the state of "Enable secure app spawning" toggle in Settings -> Security?

YousifYaldo commented 1 year ago

@deezeem @YousifYaldo What's the state of "Enable secure app spawning" toggle in Settings -> Security?

I have it disabled.

thestinger commented 1 year ago

This will be released by today's release which will be available in around 6 hours.

ericzeez commented 1 year ago

@deezeem @YousifYaldo What's the state of "Enable secure app spawning" toggle in Settings -> Security?

It is disabled.