Since immersing myself in the GrapheneOS sphere, I keep coming across the claim that (as I understand it) the Install unknown apps permission is only meant to be requested by apps that obtain their installation files from a single source, or at least only sources controlled by a single entity (i.e. stable and beta repositories). If I'm misunderstanding, I hope someone can clarify.
Two examples:
[Package manager being discussed] doesn't follow the intended app source model correctly. Enabling an app source is not meant to enable installing from more than one source (..)
https://discuss.grapheneos.org/d/4374-does-google-play-store-update-apps-automatically-without-user-input/2
(..) having other repositories in a single app also violates the security model of Android which was not designed for this at all. The OS expects you to trust an app repository as a single source of apps, yet [package manager being discussed] isn't that by design as it mixes several repositories in one single app.
https://privsec.dev/posts/android/f-droid-security-issues/#5-general-lack-of-good-practices
Yet I can't find a single authoritative source that substantiates this claim. Every time Android and its documentation use the word source in this context it refers to the package requesting the permission, not the source of the APK they want to install. E.g.
For your security, your phone currently isn’t allowed to install unknown apps from this source. You can change this in Settings.
It specifically talks about “unknown apps”, i.e. Android doesn't and won't know where they originate from. Moreover, Vanadium and Files—and indeed any web browser and file manager—request this permission while obtaining APKs from a theoretically limitless amount of sources. As do apps like App Manager (app management), Termux (terminal emulator), LocalSend (file sharing) and ReVanced (app patcher). Clearly, you're being asked if you trust these apps enough to give them permission to initiate installations on your behalf.
So why is it "not following the intended app source model correctly" and "violating the security model of Android" when an app like Obtainium or Droid-ify does it?
If the permission is intended to apply to a repository instead of an app, why do I need to grant it per app (e.g. when I have multiple apps that use the same repository) instead of per repository?
It doesn't really make sense to me. Can anyone explain?