FriendlyNeighborhoodShane/MinMicroG

Android 11 requires permanent location permission

Closed this issue · 5 comments

y0va commented

This was already raised here: microg/IchnaeaNlpBackend#56

I solved it by doing kinda s/false/true/g on https://github.com/FriendlyNeighborhoodShane/MinMicroG/blob/master/res/system/etc/default-permissions/microg-permissions-unlp.xml .

I actually did it in the corresponding file in the release zip.

Uhm, are you sure that this helps?

The default-permission file doesn't really seem to do much. As the comment in it explains (and the latest android source can corroborate), the only difference that a fixed="true" value makes is that now the user is unable to toggle the permission to off.

If the issue you are facing is that microG doesn't have the background location (and/or sms) perms, and those boxes are unchecked in self-check, then the solution is close to what the prson in the linked thread discovered, but simpler.

You can just install microG as a user app update (no need to disable/uninstall the module), and that fixes it for most people. This solution was first discovered here. It's mentioned in INSTALL.md: https://github.com/FriendlyNeighborhoodShane/MinMicroG/blob/master/INSTALL.md#permission-troubles-with-microg-and-gang

This is done automatically with an init script if MinMicroG is installed as a magisk module. Unfortunately it cannnot be done automatically for non-magisk installations.

y0va commented

Uhm, are you sure that this helps?

The default-permission file doesn't really seem to do much. As the comment in it explains (and the latest android source can corroborate), the only difference that a fixed="true" value makes is that now the user is unable to toggle the permission to off.

Not fully sure, whether it was the only reason that make it work, I have to do more tests on that. I also realized that the values were unchangable in the UI afterwards, but they were fixed to "always allow". Maybe a granted=true , fixed=false or so could also help.

This is done automatically with an init script if MinMicroG is installed as a magisk module. Unfortunately it cannnot be done automatically for non-magisk installations.

I'm heading for working fresh builds without magisk, so installls from user side are no option to me.

I don't think granted="true" is part of the syntax. As far as I understand the comment referenced above, just putting a permission in that list grants it by default, and fixed is just a 'modifier' dictating whether it's user toggleable or not.

And in fact, you can see this behaviour when microG is automatically granted most permissions even upon a dirty flash. As the microg issue I linked mentions, this behaviour is different for the background location and sms perms because those are somehow 'protected' permissions.

I'm heading for working fresh builds without magisk, so installls from user side are no option to me.

AFAIK, nobody has figured out a way to make this work on a dirty flash other than having to install the apk.

I believe your only options here are either a clean flash or installing the microG apk by hand.

y0va commented

OK, forget this. Wrong way. Thanks for your explanations!