So for some reason, I tried to play a bit with permissions...
And while running :
System > Application > Sandboxed Google Play > Google Settings > devices and share > devices
I can see my Pixel buds pro ready to pair.
But when I try, it fails and request a manual pair from bluetooth menu (wich works, but with limited functions)
Looking at logs from gms app :
I catched this :
https://i.imgur.com/51ZCTs5.png
FastPair fails because of missing permission android.permission.BLUETOOTH_PRIVILEGED
Looking in package settings :
shiba:/ $ dumpsys package com.google.android.gms | grep permission |grep -i bluetooth
android.permission.BLUETOOTH_CONNECT
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.BLUETOOTH_PRIVILEGED
android.permission.BLUETOOTH_ADVERTISE
android.permission.BLUETOOTH_SCAN
android.permission.BLUETOOTH: granted=true
android.permission.BLUETOOTH_ADMIN: granted=true
android.permission.BLUETOOTH_PRIVILEGED: granted=false
android.permission.BLUETOOTH: granted=true
android.permission.BLUETOOTH_ADMIN: granted=true
android.permission.BLUETOOTH_PRIVILEGED: granted=false
android.permission.BLUETOOTH_CONNECT: granted=false, flags=[ USER_SET|USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]
android.permission.BLUETOOTH_ADVERTISE: granted=false, flags=[ USER_SET|USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]
android.permission.BLUETOOTH_SCAN: granted=false, flags=[ USER_SET|USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]
and this permission can't be enabled from adb
shiba:/ $ pm grant com.google.android.gms android.permission.BLUETOOTH_PRIVILEGED
Exception occurred while executing 'grant':
java.lang.SecurityException: Permission android.permission.BLUETOOTH_PRIVILEGED requested by com.google.android.gms is not a changeable permission type
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1402)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1321)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:583)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:634)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2899)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:313)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6459)
at android.os.Binder.shellCommand(Binder.java:1238)
at android.os.Binder.onTransact(Binder.java:1051)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4742)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6443)
at android.os.Binder.execTransactInternal(Binder.java:1530)
at android.os.Binder.execTransact(Binder.java:1464)
Is there anything I miss ?
How can we give BLUETOOTH_PRIVILEGED permission to Play Service App ?
Thanks