At least for my phone (LG G2), the camera uses several proprietary frameworks and there are only 1-2 apps that work with them (the official one and a community replacement). Furthermore the frameworks only work on one Android version (Lollipop) so there is no way to upgrade to newer Android.
Similarly there are a lot of LG UI tweaks (lock screen, notification bar, a few others) with no source (Although here at least there are custom mods with different tweaks, so there is some amount of freedom).
> If you want to make your Android phone in a factory, or if you want to use any google app, you need to obey their rules.
The first part is wrong - "Android" per-se is Apache 2, i.e. free to use without restrictions (thus Amazon's "Fire OS"). But Google has been moving more and more functionality (e.g. location services) into Google Frameworks so it's pretty hard to avoid signing an agreement.
Opengapps isn't really a solution, you still need a license to use them on the phone (and Google could easily lock out an unlicensed manufacturer). https://microg.org/ is but it would still take some work to make it production-quality.