SecurityException when binding Bluetooth socket
This crash looks similar to #1698 but the stacktrace is different. The error message says the app lacks permission android.permission.BLUETOOTH, which was replaced by new permissions in Android 12. Is the error message out of date, or does this device still use the old Bluetooth permissions?
- Android version: 12
- Phone model: Redmi M2101K6R (sweet_global)
- Briar version: 1.4.18 (47971517)
- User feedback: "The app stopped out of nowhere and I need it urgently."
Stacktrace:
java.lang.SecurityException: UID 10414 / PID 7993 lacks permission android.permission.BLUETOOTH
at android.os.Parcel.createExceptionOrNull(Parcel.java:2426)
at android.os.Parcel.createException(Parcel.java:2410)
at android.os.Parcel.readException(Parcel.java:2393)
at android.os.Parcel.readException(Parcel.java:2335)
at android.bluetooth.IBluetoothSocketManager$Stub$Proxy.createSocketChannel(IBluetoothSocketManager.java:265)
at android.bluetooth.BluetoothSocket.bindListen(BluetoothSocket.java:453)
at android.bluetooth.BluetoothAdapter.createNewRfcommSocketAndRecord(BluetoothAdapter.java:2883)
at android.bluetooth.BluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(BluetoothAdapter.java:2830)
at org.briarproject.bramble.plugin.bluetooth.AndroidBluetoothPlugin.openServerSocket(AndroidBluetoothPlugin.java:152)
at org.briarproject.bramble.plugin.bluetooth.AndroidBluetoothPlugin.openServerSocket(AndroidBluetoothPlugin.java:61)
at org.briarproject.bramble.plugin.bluetooth.AbstractBluetoothPlugin.lambda$bind$0(AbstractBluetoothPlugin.java:215)
at org.briarproject.bramble.plugin.bluetooth.AbstractBluetoothPlugin.$r8$lambda$Nv27P8uQlCv6FpD1a0uQUudeR9U(Unknown Source:0)
at org.briarproject.bramble.plugin.bluetooth.AbstractBluetoothPlugin$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Edited log:
12-28 01:54:17.763 I/PluginManagerImpl: Starting simplex plugins
12-28 01:54:17.763 I/PluginManagerImpl: Starting duplex plugins
12-28 01:54:17.779 I/PluginManagerImpl: org.briarproject.bramble.bluetooth changed from state STARTING_STOPPING to INACTIVE
12-28 01:54:17.799 I/AbstractBluetoothPlugin: Local address null
12-28 01:54:17.802 I/PluginViewModel: TransportStateEvent: org.briarproject.bramble.bluetooth is INACTIVE
Looks like the plugin was enabled and the crash happened at startup.
Edited by akwizgran