BLE-HID-Peripheral-for-Android icon indicating copy to clipboard operation
BLE-HID-Peripheral-for-Android copied to clipboard

Need BLUETOOTH PRIVILEGED permission

Open fbiego opened this issue 5 years ago • 3 comments

D/HidPeripheral: Need BLUETOOTH PRIVILEGED permission: Neither user 10152 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
    java.lang.SecurityException: Need BLUETOOTH PRIVILEGED permission: Neither user 10152 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
        at android.os.Parcel.readException(Parcel.java:1683)
        at android.os.Parcel.readException(Parcel.java:1636)
        at android.bluetooth.IBluetooth$Stub$Proxy.setPairingConfirmation(IBluetooth.java:1616)
        at android.bluetooth.BluetoothDevice.setPairingConfirmation(BluetoothDevice.java:1273)
        at jp.kshoji.blehid.HidPeripheral$5.onConnectionStateChange(HidPeripheral.java:609)
        at android.bluetooth.BluetoothGattServer$1.onServerConnectionState(BluetoothGattServer.java:105)
        at android.bluetooth.IBluetoothGattServerCallback$Stub.onTransact(IBluetoothGattServerCallback.java:82)
        at android.os.Binder.execTransact(Binder.java:570)

Android docs says 'Not for use by third-party applications.' BLUETOOTH PRIVILEGED

How do I make it work?

fbiego avatar Aug 11 '20 19:08 fbiego

Not sure, but this suggest that it's possible to add it via adb https://github.com/kshoji/BLE-HID-Peripheral-for-Android/issues/8

tobiasBora avatar Oct 07 '20 12:10 tobiasBora

Im trying to use this app but nothing happens no crash logs and nothing how did you get this BLUETOOTH PRIVILEGED issue?

it is working now for you?

iroidzeel avatar Oct 12 '20 12:10 iroidzeel

happens during pairing because setPairingConfirmation(true) requires BLUETOOTH PRIVILEGED. Even after granting the permission by installing as a system app, pairing fails #1

fbiego avatar Jan 31 '21 19:01 fbiego