ykasidit / bluetooth_gnss

Bluetooth GNSS app on Google Play Store
https://play.google.com/store/apps/details?id=com.clearevo.bluetooth_gnss&hl=en&gl=US
GNU General Public License v2.0
72 stars 21 forks source link

Connect Failed: java.lang.SecurityException android ... UID 10371 / PID 18403 lacks permission #65

Closed Laroosta closed 9 months ago

Laroosta commented 9 months ago

Since the new update (1.0.48) I'm unable to connect to my Garmin GLO 2 device from my Nokia 8.5 (Android 12) phone. I can still connect using my Samsung Galaxy Tab 7, though its on the older version (1.0.39).

The error appears on the notification bar: Connect Failed: java.lang.SecurityException android ... UID 10371 / PID 18403 lacks permission ...

debug log posted below

I've tried:

image image

Debug log: DEBUG: btgnss_nmea_p: set_callback() com.clearevo.libbluetooth_gnss_service.bluetooth_gnss_service@aaef733 DEBUG: btgnss_rfcmgr: tcp_server_host null so disabled conencting to tcp server mode... DEBUG: btgnss_rfcmgr: init() done m_readline_callback_mode: true DEBUG: btgnss_rfcmgr: connect() start DEBUG: btgnss_rfcmgr: createRfcommSocketToServiceRecord SPP_WELL_KNOWN_UUNID DEBUG: btgnss_rfcmgr: calling m_bluetooth_socket.connect() START m_target_bt_server_dev: name: Garmin GLO 2 #4ce1c bdaddr: 90:F1:57:F4:CE:1C DEBUG: btgnss_rfcmgr: connect() exception: java.lang.SecurityException: UID 10371 / PID 18403 lacks permission android.permission.BLUETOOTH: stack_trace: 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.connectSocket(IBluetoothSocketManager.java:227) at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:404) at com.clearevo.libbluetooth_gnss_service.rfcomm_conn_mgr.connect(rfcomm_conn_mgr.java:256) at com.clearevo.libbluetooth_gnss_service.bluetooth_gnss_service$8.run(bluetooth_gnss_service.java:743)

DEBUG: btgnss_rfcmgr: m_bluetooth_socket close() done

Laroosta commented 9 months ago

Just a brief update: I rolled my Nokia 8.5 (Android 12) back to 1.0.39 and its now connecting to the GLO 2 Device. The new update seems to have broken the permissions somehow.

I then installed 1.0.48 from github release, but it does the same thing. I'll try some other versions also.

Laroosta commented 9 months ago

1.0.47 connects, but 1.0.48 does not.

ykasidit commented 9 months ago

Hello, thanks for your detailed observations and logcat extract!

As far as i remember, some android docs instructed to limit the permission as per the logcat to before android 12 (massdkver 30) in manifast which i did but the logcat mentioned it's required so i just made a new release v49 that doesnt have the maxsdkver limit in manifast - pls try and confirm, if still fail pls try uninstall and install again.

Laroosta commented 9 months ago

Perfect, that seemed to have fixed it!

ykasidit commented 9 months ago

Great to hear that!