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.

Android 11 android.permission.RECEIVE_SMS not working

See original GitHub issue

In self check, the permission to receive text messages (SMS) is always unchecked / denied. In app info the SMS permission is denied. Changing it to allowed then reverts immediately back to denied.

Permissions xml file shows denied too. Changing to granted then reverts back to denied. <permission name="android.permission.RECEIVE_SMS" granted="false" flags="4000" />

sc

d1

Android Version: 11 Custom ROM: LineageOS 18.0

This looks to be a problem with many apps requiring SMS access. Google advises the SMS Retriever API.

There is an article that discusses the issue.

Is this needed and does microG have a workaround?

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
ghostcommented, Dec 21, 2020

Hey, I’m running into the same issue. I installed MicroG using the MicroG Installer (Revived) magisk module. It won’t let me grant background location nor SMS permissions; does anyone have a clear solution that doesn’t involve fiddling with files in various system folders?

2reactions
JonnyTechcommented, Nov 29, 2020

This seems to be a known issue since MinMicroG references it:

If you are not able to grant some permissions to microG (background location or recieving SMS), refer to the the troubleshooting section of install.md

Permission troubles with microG and gang

In a terminal app (like Termux) write these 2 commands, accept root request and reboot:

su;
npem;

Some new permissions are protected by Android now, and cannot simply be granted. You can try several things that may or may not work, depending on your ROM:

    Extracting the MicroG APK from the zip and installing it as an user app update
    Installing MinMicroG as system instead of as a Magisk module
    Clean flashing, if all else fails

The npem file is downloaded from https://gitlab.com/nanolx/nanodroid/raw/master/Full/system/bin/nanodroid-perm and is attached here: nanodroid-perm.txt

I shall investigate next week when I have more time, but maybe it helps others too, or the devs here can integrate it to microg.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Permissions updates in Android 11 - Android Developers
Auto-reset permissions from unused apps. If your app targets Android 11 or higher and isn't used for a few months, the system protects...
Read more >
Android permission doesn't work even if I have declared it
You have to ask for permissions at run-time even if you have declared those permissions in Android manifest. Save this answer. Show activity...
Read more >
Permissions and APIs that Access Sensitive Information
You may only request permissions and APIs that access sensitive information that are necessary to implement current features or services in your app...
Read more >
2.1: Sending and Receiving SMS Messages - Part 1 · GitBook
Your app doesn't need code to request permission from the user. If the user has multiple SMS messaging apps installed on the Android...
Read more >
SMS BroadcastReceiver working in emulator but not physical ...
[BroadcastReceiver(Enabled = true, Exported = true, Permission = "android.permission.RECEIVE_SMS")]; [IntentFilter(new[] { "android.provider.Telephony.
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