by reorder9695 · 3mo ago · 0 comments
I think the real problem is Google Play Services. It's far, far too tightly integrated in a way that it just seems like Android was designed to be unusable without. It's installed as a location manager internally, which gives it a shitload of permissions by default that you never grant it. There's absolutely no reason everything (notifications, the app store, some location services) has to be packaged together into one thing instead of each having its own module that can be removed at will. Play integrity just plain shouldn't exist and as far as I'm concerned is purely there to ensure no one creates a real play services alternative or another mobile OS with Android compatibility.
The ideal outcome for me would be keeping Android but effectively dissolving Play Services and instead having the concept of a core services, where instead of apps choosing to use Firebase for notifications, they instead bind to the system notifications service, and as the user I choose which implementation I want, preferably with it not installed as a system app. I'm well aware that's not going to happen, but it seems like the most practical way to break up the Google/Apple monopoly to me, Android's great but Google's services aren't.
This is somehow by intention. In the ramp-up of Android adoption, Vendors and carriers started to fork Android and deviate too much from the core. Google needed a leverage to tie them to stay compatible to the ecosystem, Google Mobile Services (GMS) was the tool to do so. "Pass the compatibility test suite and you qualify to preload GMS".
Then, at some point, Google implemented API's in the OS which call Google's cloud infrastructure (e.g. Location services), which they didn't want to commit to the Android source for the risk of them being forked and modified, so they started to implement them in a precompiled "Google Play Services" module.
Over time, it seems Google Play Services became the preferred vehicle for Google to rollout any kind of API-changes to have them applied on all devices immediately, without waiting for the vendor to do an OS-Upgrade.
The result is that Google now promotes Google Play Service API's as the way for the most widely compatible implementation of an app. Which is...not wrong, but in the larger picture also the reason why Android is not considered "real" open-source (anymore).
> The ideal outcome for me would be keeping Android but effectively dissolving Play Services
Agree. There is still a very good OS in there, clearly written by considerate SW-Engineers.
Yeah, it wasn't even totally the wrong thing when it happened. It was something I liked because you had both the manufacturers and the carriers getting in the way of OS updates.
For example, I bought a new Samsung Galaxy 4 years ago from Tmobile. Tmobile NEVER updated the phone past the initial release, even though samsung did the next android version (I forget which exactly, 9, 10?). But even samsung had dropped support for the phone basically after that single update.
The google move to pull things out of the OS and push them into the play store was welcome because it meant you were less likely to have unfixed bugs and problems due to vendor laziness.
But of course greed has taken over and now google is trying to change Android from an open source OS to a closed source one. Increasingly making it hard for the likes of GrapheneOS to exist.
First came Project Treble, where Android was refactored to actually have a stable ABI for drivers, by pretending Linux is a microkernel, all drivers run in userspace, use Android IPC to talk with the kernel, and are implemented in a mix of C++, Java and more recently Rust.
Since Android 8, traditional Linux kernel drivers are considered legacy.
https://source.android.com/docs/core/architecture/hal
However adoption by OEMs was still not enforced, because "our partners freedom" kind of thing,
So Project Mainline come to be, where Android was further modularised and userspace components could be updated via PlayStore.
https://source.android.com/docs/core/ota/modular-system
With, as already mentioned by others, APEX as delivery format,
https://source.android.com/docs/core/ota/apex
Naturally all of this only works via PlayStore services, and is related to the "Google Play System Update", or similar, that you can find in the settings section.
GKI (Generic Kernel Image) support did result in significant kernel driver changes by requiring them to use a far smaller subset of the kernel API and work with a GKI image for testing. Certified devices don't need to use a GKI in production and mostly don't but do need to work with it for testing. That's supposed to make it possible to much more easily update the kernel in a similar way as Treble did for the OS. This has forced writing drivers in a way that's much easier to port to new kernel versions which encourages updating the kernel to new LTS branches. It has the downside of making Android itself upgrading the AOSP kernel trees to new LTS revisions within a branch much harder since there's supposed to be a stable ABI. It would be much more purely beneficial if they dropped the stable ABI while keeping the restriction on the subset of the ABI usable by modules.
Implementing drivers largely in userspace is entirely a choice for the companies writing the drivers. It's much better for security and robustness to have most of the code in sandboxed userspace processes than the kernel. There's no requirement from Android or Google certification to do this. It's simply regarded as a good engineering practice by most. The reason the Linux kernel puts so much into the kernel is because it doesn't control the userspace. They're largely putting code into highly privileged kernel space for organizational reasons. If they had a way to write large portions of the drivers in userspace, then many upstream Linux drivers would likely be written that way. It's a huge problem that there isn't a standard and accepted way to do that rather than a good thing. Many out-of-tree drivers for Android devices largely being in isolated userspace processes is a major security benefit which shouldn't exist because upstream drivers should be able to be written as sandboxed processes too.
The APEX modules used as part of the device independent base OS are open source parts of the Android Open Source Project. Google Play mainline updates are Play Store shipped builds of the code for those for Google Mobile Services devices. It didn't result in anything being removed from AOSP.
In GrapheneOS, we have our own app implementing both. We host geocoding via Nominatim. We currently use Apple's location service as an opt-in feature via either direct usage or our own proxy but we plan to provide our own database instead of only a proxy.
Google Play services is nearly entirely for using Google services rather than functionality independent of Google services. Certain functionality such as security key support was put into Play services to make it available on all devices despite not shipping with it. In the case of security keys, AOSP now has a standard API for it with apps able to provide it. There are multiple apps providing security key support as a supplementary credential manager which can be used alongside a main password manager.
It is true that Play services sometimes ships new functionality unrelated to Google services, but they didn't move functionality from AOSP to it. It's new functionality which wasn't previously in AOSP. Our main issue with it was what they did with security keys but they promised us it would be resolved and years later it was resolved. It took a lot longer than it should have and it's wrong that it happened the way that it did but it's not an issue anymore.
The main issue are the licensing terms for Google Mobile Services and the Play Integrity API device and strong integrity levels enforcing licensing it. That's how Google locks out competition and locks in OEMs with them. It's the massive problem which needs to be addressed by regulators, not any of the things they focus on instead.
Android gained market share through being an open platform with open source code. Google should be forced to stop degrading that and locking out competition. If they want to implement fancy things in Play services tied to their services, that's fine. People can compete with them. On the other hand, what they're doing with the Play Integrity API and beyond it is not fair and prevents competition.
Unfortunately, regulators largely don't understand how Google harms competition and solves the wrong problems. The remedies for their anti-competitive behavior consistently don't address the core issues and allow it to continue getting worse.
Not really. That's a different thing viz. Android Pony Express: https://source.android.com/docs/core/ota/apex
I wonder if further developing microg or similar would be a better use of resources than Postmarket, Ubuntu touch etc? Would that be a faster path to wider adoption and therefore better chance of challenging the Android/iOS duopoly?
I have spent the past 2 years off and on modifying AOSP (for "reasons") and I am constantly amazed the poor quality of the code base and badly architected the overall system is.
It's a bunch of re-inventions of the wheel (start-up daemon manager, IPC, HAL, GUI, etc) with the "upper layers" written in Java with a mix of C/C++. Mixing the metaphor of a Java "run time environment" with a Linux-based kernel results in a hodepodge of pieces and having seen it up close it makes sense why "Android" user experience varies so much device to device.
Did Android need it's own bastardized libc for example (bionic)? Did Android need to have it's own start-up daemon manager? A "HAL" in C++ (wrapping Linux kernel capability) with a bunch of bridges to Java via JNI?
Writing an application for Android is also a byztantine mess of NDK, SDKs, Java build systems (Maven, Gradle, etc), XML files, Java, Kotlin, etc. Why can't icons just be SVGs, why do these have to be in some XML-formatted resource? The list goes on.
Yes, it has a few warts, still much better than fitting UNIX with X Windows on a phone, with a C SDK, like FOSS keeps trying since Open Moko.
Same kudos goes to Apple by pushing Objective-C and Swift, no matter what.
Microsoft unfortunately no longer seems to know what Windows is supposed to be.
And what do you think iOS / macOS is based on? UNIX userland from the BSDs with the Mach kernel, Mach IPC, etc. Fun note: It's easier to cross-compile standard UNIX utilities and programs for iOS/macOS than it is Android since Android effectively has its own user-land.
macOS and by extention iOS are, by comprarison to Android, actually pretty well architected. The choice of kernel (Mach, Linux) is really not the limiting factor, it's how you plumb together the layers above the kernel and that's what Android has done badly.
Lastly, just because OpenMoko may or may not have done something ideally (~20 years ago?) doesn't mean the current efforts (postmarketOS, Plasma, PHOSH, Sailfish) have done it badly. Actually most of these efforts are leveraging the fairly refined parts of a modern Linux environment and are MUCH easier to work with at the lower levels than Android.
Android is great dragging devs screaming into modern computing, from Xerox PARC ideas.
Apparently you missed the part that Apple has already deprecated POSIX APIs like the usage of sockets for new networking capabilities.
Or the plethora of ways classic UNIX doesn't work, which is what happens to everyone that buys Apple as shinny Linux.
However the point was about mobile OSes, try to ship apps on the store using only UNIX APIs to see how far you would get on the approval process.
Wasn't the point of Play services to enable keeping OS "updated" regardless of the manufacturer schedule? Which is to say: they are tightly integrated because they were designed to be part of an operating system that Google can keep updated through Play Store even if the device OEM is slacking on porting upstream updates to the users.
I'm old enough and was very pro-android in the early days when it first released. I absolutely remember the frustrations around having vendors just REFUSE to update the OS on devices. Even things that were brand spanking new often got left to rot, and the OS updates in those days were genuinely meaningful software updates - Lots of new capabilities.
So I was actually ok with Google going down the route of moving critical software into an installable package that they controlled, that would provide a way to get new capabilities onto devices that manufacturers didn't give a shit about anymore.
---
But the problem is that "Google" today sure as hell isn't the google that I liked back then (and even that google was starting to shift tone).
And now this package is a backdoor that they can use like a beat-stick to force vendors to stay on their version of Android, and it functions to make "Android" (the distro that users actually use) functionally closed-source and non-permissive.
---
I still strongly believe that the appropriate regulation for this situation (across both iOS and Android) is that the company that makes the OS should be prohibited from running any sort of app store, and app stores must be selectable at device initialization (ex - the Internet Explorer ruling, but for app stores).
Google may think it's important to keep WebView always up to date with Play services. I couldn't care less. I still have to buy a new phone to get all updates.
Permission model of Andorid is hostile to the user and is designed to the benefit of the manufacturer. It undermines the users' ability to take advantage of their computer but allows the manufacturer / whoever installed the system to have undue and unwarranted access to the device.
My experience of using Android is very similar to using a corporate laptop configured by the least competent IT department of a large US bank: you are not allowed to do the basic and useful things, you are required to jump through a lot of hoops to have the remaining absolutely necessary things done, you cannot eliminate hostile functionality, you cannot be sure your personal stuff will remain personal (if it ever was...), it's a system that will automatically do things to you that you don't want done...
Basically, using Android sends me back to the early 2000s when this kind of setup was typical for MS Windows computers given to employees in large US companies.
Applications can specify that they can't be backed up, and you as a user have no way of overriding that. Highlights on my smartphone are Fennec (Firefox), Termux, Cromite, Element, Syncthing, various videogames and other utilities.
I absolutely want these backed up, and on any sensible system I'd just point restic to their storage locations and be done. On Android I need an arcane mess of Titanium Backup and TWRP, and god help me if I ever have to recover from a backup.
What is even their motivation to not be backed up?
It starts with an upstream GrapheneOS build and modify the system image (super) in place, signed with the published userdebug keys.
Just no. I developed for android for a long time and I have seldomly seen a worse and more confusing SDK and code base. I can give you many examples but the core layouting algorithm having quadratic complexity with the number of widgets and the single base-view class having 60.000 lines of code are just the tip of the iceberg.
When was that?
My gripe with android is that I think it wastes a lot of resources by being very inefficient in software. Just enable the debug mode to see what portion of your screen refreshes and repaints and stand back in awe while nothing changes and you still get hundreds of repaints.
And you are positive that this hasn't change in almost a decade?
> My gripe with android is that I think it wastes a lot of resources by being very inefficient in software.
As opposed to what? This thread is about Linux on Mobile. Are you saying that Linux on Mobile is a lot more efficient than Android? Like do you get more battery life with Linux on Mobile for the same usage?
You could not design a worse system than Android, even if you tried to design the worst system possible