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.
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.
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:
Go to “apps”.
Enable “Show system apps” in the three dot menu.
Look for the app named “Bluetooth”.
Click on “advanced”.
Enable the secret hidden permission named “Can change system settings”.
Afterwards, it just works. At least enabling.
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.