question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getSerial is not accessible even if permissions are available

See original GitHub issue

Summary

Version v8.3.3
Affected OS Android
OS Version API > 26

Current behavior

Access to serial number on android doesn’t work even if android.permission.READ_PRIVILEGED_PHONE_STATE is granted. (no error displayed) getSerial return “unknown”

Expected behavior

Serial number should be retrieved

Link to documentation

https://developer.android.com/reference/android/os/Build#getSerial() If the calling app has been granted the READ_PRIVILEGED_PHONE_STATE permission; this is a privileged permission that can only be granted to apps preloaded on the device. That means it can be tested only with an app preloaded in android system image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
freeboubcommented, Nov 13, 2021

Few days were long 😃

Thank you for the reminder ! I just remove all tests to keep only the last catch used, I think it is enough. Thank you

1reaction
freeboubcommented, Oct 2, 2021

I will open a pull request to fix the issue in few days!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SecurityException: getSerial: The user 10134 does not meet ...
Google has not given any solution yet. It's worse than "Dangerous permissions" - You cannot even ask user to grant a permission at...
Read more >
Azure Serial Console for Windows - Virtual Machines
The Serial Console in the Azure portal provides access to a text-based console for ... It is not yet available in the Azure...
Read more >
Privacy changes in Android 10 - Android Developers
Note: If your app is the device or profile owner app, you need only the READ_PHONE_STATE permission to access non-resettable device identifiers, even...
Read more >
gcloud compute instances get-serial-port-output
If the zone cannot be determined, gcloud prompts you for a selection with all available Google Cloud Platform zones. To avoid prompting when...
Read more >
Lake Los Angeles residents might get serial rapist for a neighbor ...
“They're taking someone who is not from here — who has a horrific ... even if — as with Hubbart — they have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found