Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root required? #8

Open
gtbX opened this issue Jan 29, 2018 · 1 comment
Open

Root required? #8

gtbX opened this issue Jan 29, 2018 · 1 comment

Comments

@gtbX
Copy link

gtbX commented Jan 29, 2018

Trying to run this on unrooted Nexus 6, but doesn't seem to work. I see this error in logcat after pairing:

D/HidPeripheral: Need BLUETOOTH PRIVILEGED permission: Neither user 10102 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
                                                                      java.lang.SecurityException: Need BLUETOOTH PRIVILEGED permission: Neither user 10102 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
                                                                          at android.os.Parcel.readException(Parcel.java:1942)
                                                                          at android.os.Parcel.readException(Parcel.java:1888)
                                                                          at android.bluetooth.IBluetooth$Stub$Proxy.setPairingConfirmation(IBluetooth.java:1677)
                                                                          at android.bluetooth.BluetoothDevice.setPairingConfirmation(BluetoothDevice.java:1235)
                                                                          at jp.kshoji.blehid.HidPeripheral$4.onConnectionStateChange(HidPeripheral.java:581)
                                                                          at android.bluetooth.BluetoothGattServer$1.onServerConnectionState(BluetoothGattServer.java:93)
                                                                          at android.bluetooth.IBluetoothGattServerCallback$Stub.onTransact(IBluetoothGattServerCallback.java:70)
                                                                          at android.os.Binder.execTransact(Binder.java:674)

According to docs, BLUETOOTH_PRIVILEGED is not allowed for 3rd party apps.

@jmichael2497
Copy link

jmichael2497 commented Mar 9, 2019

seems like the sort of thing that needs to be manually added via adb or automatically via su (root).

should take a peek at open source apps with similar special permission needs like this logcat reader:

https://github.com/plusCubed/matlog/blob/master/app/src/main/java/com/pluscubed/logcat/helper/SuperUserHelper.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants