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" />


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?
I can't reproduce this on Android 11. Did you try disabling the "Remove permissions if app isn't used" option at the bottom of app permissions enabled? Where did you install microG: /system/priv-app, /system/app or user app?
The SMS Retriever API is implemented in Play Services by using the SMS permission, it's not an operation system API. Google again closes down an existing open source API and replaces it with a proprietary extension (although intention might be a good one here so that apps cannot read your private SMS anymore).
I could not verify this either. I am putting a prebuilt of microg in my aosp 11 build and granting that permission right away. SMS and all SMS related apps are just working fine.
Did you try disabling the "Remove permissions if app isn't used" option at the bottom of app permissions enabled?
Yes.
Where did you install microG: /system/priv-app, /system/app or user app?
/system/priv-app/
Are there any logs to examine?
Maybe you need to add it to your privapp-permissions system configuration file? What build of LineageOS / patches are you using?
FYI: In my prebuilt, I added it to my regular permissions, not priv-app.
https://github.com/chris42/android_prebuilts_prebuiltapks/blob/master/GmsCore/permissions/permissions-com.google.android.gms.xml
EDIT: Without the permission, my phone wouldn't even boot and complain in the logs endlessly about the permission.
LineageOS 18.0 GSI on ARM device (clean flash). Previous LOS17.1 worked ok.
Maybe you need to add it to your privapp-permissions system configuration file?
FYI: In my prebuilt, I added it to my regular permissions, not priv-app.
Thanks guys, how do I do that? Where is the file(s) located?
It is copied to folder /system/etc/default-permissions/
Additionally the privapp-permissions and whitelists each have their own target. The .mk file defines it:
https://github.com/chris42/android_prebuilts_prebuiltapks/blob/master/GmsCore/Android.mk
$(TARGET_OUT_ETC) is normally /system/etc
With all three files copied, I have microg granted with all permissions on a new device from the start on.
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.
Same miss on aosp10_r40 with
com.android.permissioncontroller W/Role: com.google.android.gms not qualified for android.app.role.SMS due to missing RequiredComponent{mIntentFilterData=IntentFilterData{mAction='android.provider.Telephony.SMS_DELIVER', mCategories='[]', mDataScheme='null', mDataType='null'}, mPermission='android.permission.BROADCAST_SMS', mMetaData=[]}
May this be linked to api29 added: https://developer.android.com/reference/androidx/core/role/RoleManagerCompat#ROLE_SMS ? ; on Los 17.1 (with same implementation), it works fine but com.android.permissioncontroller is also rom-modified (?)
@JonnyTech can you check whether or not your android11 logcat shows this com.android.permissioncontroller W/Role when attempting microG sms perm ?
Always resulting, for me, to false:
com.android.permissioncontroller V/GrantPermissionsActivity: Permission grant result ... ... callingPackage=com.google.android.gms permission=android.permission.RECEIVE_SMS isImplicit=false result=1
I have reverted back to LOS17.1 for now, shall test again with LOS18.0 in a few days. But iirc there were very similar messages in the log.
@mar-v-in , for general-ui only test purpose, uploaded in previous post is magisk systemless module for AndroidStudio AVD Api30 once rooted with https://github.com/shakalaca/MagiskOnEmulator (canary option): don't have the sms W/Role on AVD Api30, but same resulting callingPackage=com.google.android.gms permission=android.permission.RECEIVE_SMS isImplicit=false result=1 when attempting sms permission .
(btw, anyone knows how to boot a treble GSIx86 raw image via AndroidStudio AVD ?)
EDIT: AVD Api30 also lists
system_process E/PackageManager: Cannot grant hard restricted non-exempt permission android.permission.ACCESS_BACKGROUND_LOCATION for package com.google.android.gms
due to missing use of setWhitelistedRestrictedPermissions
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?
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?
Can confirm this is also happening with microG 0.2.13 installed using NanoDroid 23.0.1, on phh AOSP GSI v300.l (Android 11). It's not possible to grant SMS nor background location for microG Services Core anymore.
EDIT: Just updated to microG 0.2.16 and I can now enable background locations as well as SMS permissions. The issue might have been fixed there.
Most helpful comment
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?