最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

device policy manager - Is Getting The Serial Number Blocked On Android 15? - Stack Overflow

programmeradmin0浏览0评论

We have a custom DPC that has device owner rights and the READ_PRIVILEGED_PHONE_STATE permission but if we build it with the Android 15 SDK, we can no longer get the device serial number. This is happening on numerous devices. We always get a security exception which we can then catch and get the device enrollment identifier.

We are just calling the Build.getSerial(); - after checking the version and the enrollment type.

The same code was getting the serial number when built with the Android 14 sdk.

The Android 15 documentation states that we should still be able get the serial number if we have device owner rights and the READ_PRIVILEGED_PHONE_STATE permission but this doesn't seem to be the case. Is the documentation wrong and is this a change for Android 15, is this an Android 15 bug or is there a new way of getting the serial number?

Our customers would expect to get the serial number for identification purposes.

We have a custom DPC that has device owner rights and the READ_PRIVILEGED_PHONE_STATE permission but if we build it with the Android 15 SDK, we can no longer get the device serial number. This is happening on numerous devices. We always get a security exception which we can then catch and get the device enrollment identifier.

We are just calling the Build.getSerial(); - after checking the version and the enrollment type.

The same code was getting the serial number when built with the Android 14 sdk.

The Android 15 documentation states that we should still be able get the serial number if we have device owner rights and the READ_PRIVILEGED_PHONE_STATE permission but this doesn't seem to be the case. Is the documentation wrong and is this a change for Android 15, is this an Android 15 bug or is there a new way of getting the serial number?

Our customers would expect to get the serial number for identification purposes.

Share Improve this question asked Feb 4 at 10:48 NoScoobyNoScooby 314 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

This was just a permissions thing. I really should have spotted it earlier. The READ_PHONE_STATE is the one. I had removed that by mistake. Restoring it has fixed the issue.

发布评论

评论列表(0)

  1. 暂无评论