Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15] Bluetooth issue #13

Closed
stuartore opened this issue Dec 8, 2024 · 3 comments
Closed

[15] Bluetooth issue #13

stuartore opened this issue Dec 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@stuartore
Copy link
Owner

As titile. This issue could cause system stacks and UI crash

log:

12-08 09:51:46.563  9964 10036 I SetupLibrary: [SetupCompatServiceProvider] Waiting for service to get connected
12-08 09:51:46.581  9964 10037 E AndroidRuntime: FATAL EXCEPTION: highpool[2]
12-08 09:51:46.581  9964 10037 E AndroidRuntime: Process: com.google.android.gms.ui, PID: 9964
12-08 09:51:46.581  9964 10037 E AndroidRuntime: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@5ee9db50: enable
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3242)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:3226)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3209)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3151)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.bluetooth.IBluetoothManager$Stub$Proxy.enable(IBluetoothManager.java:450)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.bluetooth.BluetoothAdapter.enable(BluetoothAdapter.java:1574)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at dhbg.c(:com.google.android.gms@[email protected] (260408-659641177):3)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at com.google.android.gms.smartdevice.utils.bluetooth.BluetoothController.a(:com.google.android.gms@[email protected] (260408-659641177):105)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at dgor.run(:com.google.android.gms@[email protected] (260408-659641177):13)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at anew.c(:com.google.android.gms@[email protected] (260408-659641177):50)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at anew.run(:com.google.android.gms@[email protected] (260408-659641177):76)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at ankj.run(:com.google.android.gms@[email protected] (260408-659641177):8)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:1012)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	Suppressed: emod: 
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 		at tk_trace.smartdevice-TargetQuickStartChimeraActivity_onCreate(Unknown Source:0)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at com.android.server.bluetooth.BtPermissionUtils.checkConnectPermissionForDataDelivery(BtPermissionUtils.java:101)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at com.android.server.bluetooth.BtPermissionUtils.checkBluetoothPermissions(BtPermissionUtils.java:337)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at com.android.server.bluetooth.BtPermissionUtils.callerCanToggle(BtPermissionUtils.java:124)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at com.android.server.bluetooth.BluetoothServiceBinder.enable(BluetoothServiceBinder.java:103)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 	at android.bluetooth.IBluetoothManager$Stub.onTransact(IBluetoothManager.java:244)
12-08 09:51:46.581  9964 10037 E AndroidRuntime: 
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: ChkKCWNvbnRhaW5lchCGkcdzGEAg-Oej5cNGGnwKMGNvbS5nb2
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: 9nbGUuYW5kcm9pZC5nbXMub3B0aW9uYWxfbWxraXRfYmFyY29k
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: ZV91aRITMjQuMjMuMzcgKDEwMDQwMC0wKRiSisdzIi4KJ2NvbS
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: 5nb29nbGUuYW5kcm9pZC5nbXMubWxraXQuYmFyY29kZS51aRDo
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: icdzGngKLmNvbS5nb29nbGUuYW5kcm9pZC5nbXMub3B0aW9uYW
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: xfdmlzaW9uX2JhcmNvZGUSEzI0LjIzLjM3ICgxMDA0MDAtMCkY
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: korHcyIsCiVjb20uZ29vZ2xlLmFuZHJvaWQuZ21zLnZpc2lvbi
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: 5iYXJjb2RlEOiJx3MgAA==
12-08 09:51:46.588  9964 10037 I GCore-Chimera-Crash: GCore-Chimera-Crash
12-08 09:51:46.589  9964 10037 I DeviceDrDatabaseHelper: Cleaning stale data from database!
12-08 09:51:46.591  9964  9964 D CompatChangeReporter: Compat change id reported: 63938206; UID 10481; state: ENABLED
12-08 09:51:46.592  9964 10037 W DeviceDoctorHandler: Crash Hash: fc2387b3f0913e05cb34e34f85c6cc46a0d7876b
12-08 09:51:46.593  9964 10037 W DeviceDoctorHandler: Shushing crash.
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: FATAL EXCEPTION: highpool[2]
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: Process: com.google.android.gms.ui, PID: 9964
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@5ee9db50: enable
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3242)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.os.Parcel.createException(Parcel.java:3226)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.os.Parcel.readException(Parcel.java:3209)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.os.Parcel.readException(Parcel.java:3151)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.bluetooth.IBluetoothManager$Stub$Proxy.enable(IBluetoothManager.java:450)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.bluetooth.BluetoothAdapter.enable(BluetoothAdapter.java:1574)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at dhbg.c(:com.google.android.gms@[email protected] (260408-659641177):3)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at com.google.android.gms.smartdevice.utils.bluetooth.BluetoothController.a(:com.google.android.gms@[email protected] (260408-659641177):105)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at dgor.run(:com.google.android.gms@[email protected] (260408-659641177):13)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at anew.c(:com.google.android.gms@[email protected] (260408-659641177):50)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at anew.run(:com.google.android.gms@[email protected] (260408-659641177):76)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at ankj.run(:com.google.android.gms@[email protected] (260408-659641177):8)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at java.lang.Thread.run(Thread.java:1012)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	Suppressed: emod: 
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 		at tk_trace.smartdevice-TargetQuickStartChimeraActivity_onCreate(Unknown Source:0)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: Caused by: android.os.RemoteException: Remote stack trace:
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at com.android.server.bluetooth.BtPermissionUtils.checkConnectPermissionForDataDelivery(BtPermissionUtils.java:101)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at com.android.server.bluetooth.BtPermissionUtils.checkBluetoothPermissions(BtPermissionUtils.java:337)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at com.android.server.bluetooth.BtPermissionUtils.callerCanToggle(BtPermissionUtils.java:124)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at com.android.server.bluetooth.BluetoothServiceBinder.enable(BluetoothServiceBinder.java:103)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 	at android.bluetooth.IBluetoothManager$Stub.onTransact(IBluetoothManager.java:244)
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 
12-08 09:51:46.593  9964 10037 E DeviceDoctorHandler: 
12-08 09:51:46.596  2783  2896 I DropBoxManagerService: add tag=system_app_crash isTagEnabled=true flags=0x2
12-08 09:51:46.597  9964 10037 I Process : Sending signal. PID: 9964 SIG: 9
12-08 09:51:46.626  2783  3023 D FileUtils: Rounded bytes from 8012230656 to 8000000000
12-08 09:51:46.627  5858  6497 W gcfj    : [{0}] Failed to resolve name. status={1}
12-08 09:51:46.632  2783  3023 I ActivityManager: Process com.google.android.gms.ui (pid 9964) has died: fg  TOP 
12-08 09:51:46.633  2783  2831 I libprocessgroup: Removed cgroup /sys/fs/cgroup/uid_10481/pid_9964
12-08 09:51:46.634  2633  2633 I Zygote  : Process 9964 exited due to signal 9 (Killed)
@stuartore stuartore added the bug Something isn't working label Dec 8, 2024
@stuartore stuartore pinned this issue Dec 8, 2024
@stuartore
Copy link
Owner Author

Stack after reboot. Log:

12-08 09:52:54.335  1608  1608 D BluetoothSystemServer: BluetoothManagerService: ServiceConnection.onServiceConnected(com.android.bluetooth.btservice.AdapterService, android.os.BinderProxy@d8badd8)
12-08 09:52:54.336  1608  2331 D BluetoothSystemServer: BluetoothManagerService: MESSAGE_BLUETOOTH_SERVICE_CONNECTED: service=android.os.BinderProxy@d8badd8
12-08 09:52:54.336  1608  2331 D BluetoothSystemServer: BluetoothManagerService: sendBluetoothServiceUpCallback(): to 10 receivers
12-08 09:52:54.336  2955  3018 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@5794a5a
12-08 09:52:54.337  1608  2331 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@d8badd8
12-08 09:52:54.337  9611 10387 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@2a44067
12-08 09:52:54.337 21628 21659 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@a6c909c
12-08 09:52:54.337  9425 13465 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@8c0c47d
12-08 09:52:54.337  9717  9736 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@290a12d
12-08 09:52:54.337  9402  9444 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@772f254
12-08 09:52:54.337  9740 10796 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@823dd2d
12-08 09:52:54.338  3137 16433 D BluetoothAdapter: onBluetoothServiceUp: android.os.BinderProxy@905ffa6
12-08 09:52:54.339 21740 21740 I KeyguardTransitionRepository: FINISHED transition: TransitionStep(from=OFF, to=OFF, value=1.0, transitionState=FINISHED, ownerName=)
12-08 09:52:54.341 21561 21589 I BluetoothAdapterService: enable() - Enable called with quiet mode status =  false
12-08 09:52:54.342 21561 21561 I AdapterState: BLE_TURNING_ON : entered 
12-08 09:52:54.342 21561 21589 W Binder  : Caught a RuntimeException from the binder stub implementation.
12-08 09:52:54.342 21561 21589 W Binder  : java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@8d216358: BluetoothAdapterService
12-08 09:52:54.342 21561 21589 W Binder  : 	at com.android.bluetooth.Utils.checkPermissionForDataDelivery(Utils.java:637)
12-08 09:52:54.342 21561 21589 W Binder  : 	at com.android.bluetooth.Utils.checkConnectPermissionForDataDelivery(Utils.java:669)
12-08 09:52:54.342 21561 21589 W Binder  : 	at com.android.bluetooth.btservice.AdapterService$AdapterServiceBinder.registerBluetoothConnectionCallback(AdapterService.java:3515)
12-08 09:52:54.342 21561 21589 W Binder  : 	at android.bluetooth.IBluetooth$Stub.onTransact(IBluetooth.java:1924)
12-08 09:52:54.342 21561 21589 W Binder  : 	at android.os.Binder.execTransactInternal(Binder.java:1505)
12-08 09:52:54.342 21561 21589 W Binder  : 	at android.os.Binder.execTransact(Binder.java:1444)
12-08 09:52:54.343  1608  2331 D BluetoothSystemServer: BluetoothManagerService: MESSAGE_BLUETOOTH_STATE_CHANGE: prevState=OFF newState=BLE_TURNING_ON
12-08 09:52:54.343  1608  2331 D BluetoothSystemServer: BluetoothManagerService: broadcastIntentStateChange: action=BLE_STATE_CHANGED prevState=OFF newState=BLE_TURNING_ON
12-08 09:52:54.345 21561 21561 I AdapterProperties: init(), maxConnectedAudioDevices, default=5, propertyOverlayed=5, finalValue=5
12-08 09:52:54.345  1608  1608 W Binder  : Outgoing transactions from this process must be FLAG_ONEWAY
12-08 09:52:54.345  1608  1608 W Binder  : java.lang.Throwable
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.os.BinderProxy.transact(BinderProxy.java:547)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.bluetooth.IBluetooth$Stub$Proxy.getState(IBluetooth.java:2270)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.bluetooth.BluetoothAdapter$2.apply(BluetoothAdapter.java:1418)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.bluetooth.BluetoothAdapter$2.apply(BluetoothAdapter.java:1412)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.app.PropertyInvalidatedCache.recompute(PropertyInvalidatedCache.java:775)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.app.PropertyInvalidatedCache.query(PropertyInvalidatedCache.java:999)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.os.IpcDataCache.query(IpcDataCache.java:360)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.bluetooth.BluetoothAdapter.getStateInternal(BluetoothAdapter.java:1446)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.bluetooth.BluetoothAdapter.getLeState(BluetoothAdapter.java:1511)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.bluetooth.BluetoothAdapter.isLeEnabled(BluetoothAdapter.java:1300)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.companion.devicepresence.BleDeviceProcessor.checkBleState(BleDeviceProcessor.java:125)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.companion.devicepresence.BleDeviceProcessor.-$$Nest$mcheckBleState(BleDeviceProcessor.java:0)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.companion.devicepresence.BleDeviceProcessor$1.lambda$onReceive$0(BleDeviceProcessor.java:245)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.companion.devicepresence.BleDeviceProcessor$1.$r8$lambda$GG5h9OK5k90dQ3r6u26HI7ldv-E(BleDeviceProcessor.java:0)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.companion.devicepresence.BleDeviceProcessor$1$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.os.Handler.handleCallback(Handler.java:959)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.os.Handler.dispatchMessage(Handler.java:100)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.os.Looper.loopOnce(Looper.java:232)
12-08 09:52:54.345  1608  1608 W Binder  : 	at android.os.Looper.loop(Looper.java:317)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.SystemServer.run(SystemServer.java:984)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.server.SystemServer.main(SystemServer.java:668)
12-08 09:52:54.345  1608  1608 W Binder  : 	at java.lang.reflect.Method.invoke(Native Method)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
12-08 09:52:54.345  1608  1608 W Binder  : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:864)
12-08 09:52:54.346  1608  1608 D BluetoothAdapter: isLeEnabled(): BLE_TURNING_ON
12-08 09:52:54.349 21561 21795 I BluetoothBondStateMachine: StableState(): Entering Off State
12-08 09:52:54.350 21561 21788 I BluetoothDatabase: cacheMetadata
12-08 09:52:54.350 21561 21788 I BluetoothDatabase: cacheMetadata: Database is ready
12-08 09:52:54.356 21561 21561 I bt_btif : system/btif/src/bluetooth.cc:869 get_profile_interface: id = gatt
12-08 09:52:54.356 21561 21561 I bluetooth: system/bta/gatt/bta_gatts_api.cc:383 BTA_GATTS_InitBonded: 
12-08 09:52:54.356 21561 21611 I bt_bta_sys_main: system/bta/sys/bta_sys_main.cc:83 bta_sys_event: Ignoring receipt of unregistered event id:BTA_ID_GATTS[32]
12-08 09:52:54.359 21561 21561 I bt_shim_scanner: system/main/shim/le_scanning_manager.cc:498 RegisterCallbacks: in shim layer

@stuartore
Copy link
Owner Author

stuartore commented Dec 8, 2024

Maybe help:

<!-- For Bluetooth LE -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- For Bluetooth Scan -->
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<!-- For Bluetooth Connect -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<!-- For Bluetooth Advertise -->
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />

stuartore pushed a commit that referenced this issue Dec 10, 2024
1. fix bluetooth on device_xiaomi_sm8250-common repo
2. close issue #13
@stuartore stuartore reopened this Dec 11, 2024
@stuartore
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant