Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-feature permission management #2669

Open
lucasmz-dev opened this issue Dec 6, 2024 · 5 comments
Open

Per-feature permission management #2669

lucasmz-dev opened this issue Dec 6, 2024 · 5 comments

Comments

@lucasmz-dev
Copy link
Contributor

lucasmz-dev commented Dec 6, 2024

Is your feature request related to a problem? Please describe.
Currently microG defaults to being granted a bunch of permissions, a lot of which I have been able to live without. e.g. Contacts, Nearby devices, Media permissions, Body Sensors and don't seem to affect any of the features I use anyway.

Describe the solution you'd like
Instead of recommending granting every permission requested by microG, I believe it would be nice to have a per-feature setup, where if the user chooses the enable that feature, that feature will have their own little menu for what permissions it needs to work. e.g. Cloud Messaging would need battery restrictions to be off.

Describe alternatives you've considered
Nothing else I've considered... I don't see immediately a better way to decrease the amount of permissions microG uses by default

Additional context
microG can be used unprivileged officially in LineageOS and DivestOS, and it works fine for most people's use cases; better permission control over this would be beneficial, since it's something that a lot of apps communicate with.

There are a few features I believe are just there, no way to disable or enable, e.g. SMS code auto-completion which would require SMS access, etc. Might make this a bit more complicated

@ale5000-git
Copy link
Member

ale5000-git commented Dec 6, 2024

What do you mean?
microG works even if permissions are not granted (losing the features that need them).
You can disable permissions inside Android settings.

I believe battery restrictions need to be off in any case because microG is used by most apps so it must always be functional.
Cloud Messaging is the one that break first but, although I'm not 100% sure, I think many other functionality can also break unnoticed.

@ale5000-git
Copy link
Member

ale5000-git commented Dec 6, 2024

Note: some things can be controlled with app ops.

You can control them via adb or using an app like this: https://play.google.com/store/apps/details?id=rikka.appops

@lucasmz-dev
Copy link
Contributor Author

What do you mean?
microG works even if permissions are not granted (losing the features that need them).
You can disable permssion inside Android settings.

Exactly, it's not great to be giving permissions for unused features, Self-Check just tells you "ENABLE EVERYTHING RIGHT NOW!" when most people don't even need the permissions needed for specific features there.
I'm aware I personally can manage that, but IMO it's not a great default, so this is kind of a different way to deal with the Self-Check permissions menu

Battery restrictions is whatever, that's the least troublesome in this context; most people will use Cloud Messaging anyway

Note: some thing can be controlled with app ops.
You can control them via adb or using an app like this: https://play.google.com/store/apps/details?id=rikka.appops

Cool app, might use for certain things

@ale5000-git
Copy link
Member

Exactly, it's not great to be giving permissions for unused features, Self-Check just tells you "ENABLE EVERYTHING RIGHT NOW!" when most people don't even need the permissions needed for specific features there.
I'm aware I personally can manage that, but IMO it's not a great default, so this is kind of a different way to deal with the Self-Check permissions menu

As I said microG is mainly used by other apps and not by the user directly.
So the user may not know exactly when a feature break in an app (that use microG) on your phone.
Not granting all permissions to microG is like having a time bomb.

Maybe you are more expert and know it better when these problems happens but the general user may also be a noob and not knowing the cause.

Maybe there can be more help text that explain why a permission is needed but it is difficult because a permission can be used from many different features (not just one) and new "features" are added to microG often so the info may get outdated.

@mar-v-in
Copy link
Member

mar-v-in commented Dec 8, 2024

For some features we already have the logic to ask for the specific permission it needs in the moment it is actually needed, however that's not easily possible in all cases (e.g. when the permission is required to handle some background logic). In general, it probably works fine to not grant permission in advance (set to "Ask every time"), but as @ale5000-git some feature might silently break. I consider it a bug if they stop working silently just because a permission is not granted, so if you notice any such, please file them independently - so that at some point we can reasonably get rid of the permission checks in Self-Check - and thereby most of self-check itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants