Bluetooth thethering cannot be enabled

If I try to enable Bluetooth tethering the system UI crashes and the lock screen is shown again, Bluetooth tethering being disabled.
Bluetooth itself seems to work, at least it does find/show devices.

I guess this is a FP3 bug.

Already reported to support.

It doesn’t seem to be a universal bug. I can activate the Bluetooth tethering switch without any side effects.

Created some logcat logs and this looks interesting:

02-10 20:21:52.625  3920  3920 E QCOMSysDaemon: Can't find/open bootselect node: (No such file or directory)
02-10 20:21:52.625  3920  3920 I QCOMSysDaemon: Starting qcom system daemon
02-10 20:21:52.610  3920  3920 W qcom-system-dae: type=1400 audit(0.0:725): avc: denied { read write } for name="diag" dev="tmpfs" ino=14714 scontext=u:r:vendor_qcomsysd:s0 tcontext=u:object_r:diag_device:s0 tclass=chr_file permissive=0
02-10 20:21:52.625  3920  3920 E Diag_Lib:  Diag_LSM_Init: Failed to open handle to diag driver, error = 13
02-10 20:21:52.625  3920  3920 E QCOMSysDaemon:  Diag_LSM_Init failed : 0
02-10 20:21:52.899  1871  1871 I ConnectivityManager: startTethering caller:com.android.settings
02-10 20:21:52.905   474   474 W hwservicemanager: getTransport: Cannot find entry vendor.qti.hardware.servicetracker@1.0::IServicetracker/default in either framework or device manifest.
02-10 20:21:52.906  1214  1214 D BluetoothPan: BluetoothPAN Proxy object connected
02-10 20:21:52.907  1214  1214 D BluetoothPan: setBluetoothTethering(true)
02-10 20:21:52.910  1666  1691 D PanService: setBluetoothTethering: true, mTetherOn: false
02-10 20:21:52.914  1214  1214 E Zygote  : System zygote died with exception
02-10 20:21:52.914  1214  1214 E Zygote  : java.lang.SecurityException: com.android.bluetooth was not granted  this permission: android.permission.WRITE_SETTINGS.
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.os.Parcel.createException(Parcel.java:1950)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.os.Parcel.readException(Parcel.java:1918)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.os.Parcel.readException(Parcel.java:1868)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.bluetooth.IBluetoothPan$Stub$Proxy.setBluetoothTethering(IBluetoothPan.java:179)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.bluetooth.BluetoothPan.setBluetoothTethering(BluetoothPan.java:356)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at com.android.server.connectivity.Tethering$1.onServiceConnected(Tethering.java:503)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.bluetooth.BluetoothPan$2.onServiceConnected(BluetoothPan.java:381)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1730)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1762)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.os.Handler.handleCallback(Handler.java:873)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.os.Handler.dispatchMessage(Handler.java:99)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at android.os.Looper.loop(Looper.java:193)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at com.android.server.SystemServer.run(SystemServer.java:466)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at com.android.server.SystemServer.main(SystemServer.java:302)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at java.lang.reflect.Method.invoke(Native Method)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-10 20:21:52.914  1214  1214 E Zygote  : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
02-10 20:21:52.914  1214  1214 D AndroidRuntime: Shutting down VM
--------- beginning of crash
02-10 20:21:52.915  1214  1214 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
02-10 20:21:52.915  1214  1214 E AndroidRuntime: java.lang.SecurityException: com.android.bluetooth was not granted  this permission: android.permission.WRITE_SETTINGS.
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:1950)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1918)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1868)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.bluetooth.IBluetoothPan$Stub$Proxy.setBluetoothTethering(IBluetoothPan.java:179)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.bluetooth.BluetoothPan.setBluetoothTethering(BluetoothPan.java:356)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at com.android.server.connectivity.Tethering$1.onServiceConnected(Tethering.java:503)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.bluetooth.BluetoothPan$2.onServiceConnected(BluetoothPan.java:381)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1730)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1762)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at com.android.server.SystemServer.run(SystemServer.java:466)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at com.android.server.SystemServer.main(SystemServer.java:302)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-10 20:21:52.915  1214  1214 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
02-10 20:21:52.947  1214  1214 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1005 com.android.server.am.ActivityManagerService.handleApplicationCrashInner:15582 com.android.server.am.ActivityManagerService.handleApplicationCrash:15560 com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException:143 java.lang.ThreadGroup.uncaughtException:1068 
02-10 20:21:52.948  1214  1214 E ActivityManager: Sending non-protected broadcast com.arima.oem.SYSTEM_CRASH from system 1214:system/1000 pkg android
02-10 20:21:52.948  1214  1214 E ActivityManager: java.lang.Throwable
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:21388)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:21992)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22134)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at android.app.ContextImpl.sendBroadcast(ContextImpl.java:1009)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:15582)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at com.android.server.am.ActivityManagerService.handleApplicationCrash(ActivityManagerService.java:15560)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at com.android.internal.os.RuntimeInit$KillApplicationHandler.uncaughtException(RuntimeInit.java:143)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
02-10 20:21:52.948  1214  1214 E ActivityManager: 	at java.lang.Thread.dispatchUncaughtException(Thread.java:1955)

I did check in the settings and the “Bluetooth” app does not ask for any permissions.

Also reporting this to support.

So finally I could fix it. In the end, the issue just was that the app “Bluetooth” was missing a permission to change the system settings.

You need to grant this permission to the app in this way:

  1. Go to “apps”.
  2. Enable “Show system apps” in the three dot menu.
  3. Look for the app named “Bluetooth”.
  4. Click on “advanced”.
  5. Enable the secret hidden permission named “Can change system settings”.

Afterwards, it just works. At least enabling. :slight_smile:

Anyway, it would be nice if Fairphone could fix that crash or report it to those responsible for that.
Because in such a case the app should show an error instead of crashing the whole system UI.

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.