Despite being based on AOSP, omni/lineage/etc all have pretty different features, so usually it takes a nontrivial amount of effort to go between the two (although it's definitely less effort than starting from scratch)
Most devices within the project are maintained by single developers - the difference is that official devices have been submitted to us and have everything working.
We don't blindly support devices (even as "beta") because we have no way of verifying that everything actually works (e.g. blobs that depend on an old C library ABI can't really be detected before runtime, afaik). Shipping stuff that's broken is something we'd like to avoid. The idea is that when you download a LineageOS build from lineageos.org you know that it'll work flawlessly (that may not always be the case, but it's the goal :P)
>Despite being based on AOSP, omni/lineage/etc all have pretty different features, so usually it takes a nontrivial amount of effort to go between the two (although it's definitely less effort than starting from scratch)
I understand, the same way that Firefox and Chrome are very different, yet work on the same kernel, or are the differences between Lineage and others that deep?
So for example, Omni has athene up and running on Oreo, while despite officially being maintained (with three maintainers at that), according to Lineage OS' code review, it hasn't been worked on since last July.
So the way I see it (coming from a dev, though not a ROM dev): Android has multiple layers. It has hardware-dependent code (such as the kernel) and hardware-independent code (such as bionic or Java), sort of like in Desktop Linux you have the kernel and X, and there's bash, gnome and Firefox.
So why can't (I know how that sounds coming from the outside ... ) you take their hardware code (the kernel and whatever the Android equivalent of X is) and build on top of that? Is the whole system that integrated?
On the other hand, now that Treble officially separated the two, will it be possible to, for example, flash Omni and then flash a lineage image on top of that?
>We don't blindly support devices (even as "beta") because we have no way of verifying that everything actually works
But does every Debian maintainer (of a userspace program like, say, MySQL) have every combination of hardware? You just assume that the kernel and libc are a reliable abstraction and go from there. Is that impossible on Android?
>So the way I see it (coming from a dev, though not a ROM dev): Android has multiple layers. It has hardware-dependent code (such as the kernel) and hardware-independent code (such as bionic or Java), sort of like in Desktop Linux you have the kernel and X, and there's bash, gnome and Firefox.
Yeah, that's pretty much it.
>So why can't (I know how that sounds coming from the outside ... ) you take their hardware code (the kernel and whatever the Android equivalent of X is) and build on top of that? Is the whole system that integrated?
We could - and it would definitely be a good start - but there would be changes necessary because e.g. our extra bits are implemented differently, maybe our "device-independent" bits are missing some commits that Omni has that fix support for some OEM driver - before treble, Android's hardware-dependent code and hardware-independent code were often both modified by OEMs/SoC manufacturers in order to fix issues on their platforms/add extra features. So Omni might have some fixes that we don't have, and vice versa.
>But does every Debian maintainer (of a userspace program like, say, MySQL) have every combination of hardware? You just assume that the kernel and libc are a reliable abstraction and go from there. Is that impossible on Android?
It's much harder on Android, because there's so many blobs built against previous platform releases (often with extra ABI changes from the OEM added on top). That means we can't assume that the ABI is consistent: for instance, we've had nasty bugs in proprietary binaries caused by AOSP adding fields to structs. Whereas on Debian, everything's kept in-step, so they don't end up with ABI mismatches all over the place.
Hopefully with Treble, a lot of this will change - so the idea of a "universal Lineage image" might be possible.
The kernel you get is entirely up to the SoC vendor.
Snapdragon 820/821 ships with 3.18.
Snapdragon 830 ships with 4.4.
Snapdragon 830+1 will ship with 4.9
There's a huge amount of work involved in porting a chipset from one kernel version to another. While I'm sure Google _could_ do it, it's ultimately not worth their while - they'd probably lose support from Qualcomm, and if they hit any weird bugs they'd be on their own.
The real issue for the Nexus 6 is that Qualcomm has completely abandoned their 32-bit mobile platforms. Look for "8084" here: https://wiki.codeaurora.org/xwiki/bin/QAEP/release - the Snapdragon 805 hasn't received a release since August 2016.
So, Google did an in-house bringup for 7.0 - and "normal" OEMs aren't able to do that. Qualcomm usually provides a lot of pre-compiled binaries to the OEM, which either require nasty hacks to work on newer versions of Android (which won't pass CTS - so can't be shipped), or just straight up don't work. The blame here rests largely with chip manufacturers and their short support cycles.
Of course, LineageOS[1] remains an option if you're looking for extended support for the Nexus 6. (disclaimer, I'm a device maintainer for Lineage)
A manufacturer should have contracts with vendors to update software for at least 3 years after production has been stopped. It will cost more (which is why most manufacturers don't do it) but would be an easy way to establish compatibility similar to Apple devices. I'm sure Apple has contracts like this in place with all manufacturers they use.
The Pixel phones use Qualcomm's flagship 64-bit SoCs, and they have a last update date of October 2018. Google's update policy is not good enough, especially now when they've started to charge premium prices.
I don't understand the problems with backward compatibility. They already provide it via the Android SDK (the support library).
Java/Dex/Dalvik/ART or whatever it's called now that runs the shit works on Linux 3.0 probably. (Android 2.3 was released with Linux 2.6.35 [+ patches, I assume && hope], and that's currently the lowest supported API Level (that is api level 9)).
The kernel isn't the problem - one of the devices I maintain runs 7.1 (mostly) fine on Linux 3.0[1]. The issues lie in the HALs - which translate between the standard Android camera/sensor/telephony APIs and the vendor's implementation in the kernel. These are device-specific, and usually provided to the OEM by a HW/chipset manufacturer.
Google is generally pretty good about keeping source compatibility, but ABIs change, and sometimes completely unrelated changes break everything for no obvious reason. Some things I've encountered include:
* sensor blobs crashing when using a clang-built libc, but working with a gcc-built one.
* blobs crashing when using jemalloc, but not dlmalloc (dlmalloc was removed with 7.0).
* Vendors introducing hacks in the OS - workarounds to deal with broken HW media encoders (which misinterpret pixel formats), misbehaving GL blobs, or devices which expect one pixel format for their display when the system provides another (e.g. RGB vs BGR).
* closed-source OpenGL drivers which use-after-free - the bug's probably existed since forever, but it only manifests after 7.0.
Oh. I see, so the binary blobs that are not exactly user space, but not exactly non-userspace either.
That's why XDA is full of ROMs that "just need to get GPS working and camera sometimes crashes" :(
How come Google doesn't try to source better hardware for their phones? Also, is this the cause of why Apple in-housed a lot of things?
Also, how come there isn't an isolation layer for these blobs, something like docker for the phone? (So they get their runtime dependencies, and communicate with them via a socket-shim?)
Google should put some resources into kernel development for a year or so.Get the changes they want into Linux 5.0 and make it the android long-term-release kernel. Then no further changes to the kernel unless its 0.0.1 security patches.
Google does this already[1]. As far as I know, it's possible to boot Android off a mainline kernel - the main obstacle is the lack of drivers in the upstream kernel. Certainly, a lot of the SoCs (especially in older phones) can _boot_ from mainline. Maybe you could even get a serial console, or a picture of tux on the screen. But the OEMs don't really have any incentive to upstream their drivers (or port older platforms to newer kernels) - why bother?
Probably the only instance that I'm aware of where an OEM has actually mainlined support for their own mobile devices is Samsung with some of their Tizen reference devices - "trats"[2], "trats2"[3] (which is pretty much identical to the Galaxy S3), "tm2" and "tm2e"[4]. Of course, these will probably never gain support for certain things like 3D acceleration and the modem in mainline, but it's certainly a good start. (Note: a few Nexus devices seem to have mainline DTS[5], but I'm not sure how complete they are).
It doesn't have to be a mainstream kernel. The only important part is that it is a fixed kernel version so drivers and such does not need to be re-written with each new android release.
> It doesn't have to be a mainstream kernel. The only important part is that it is a fixed kernel version
This is how it is done already. Google picks a kernel release (historically 3.0, 3.4, 3.10, 3.18, 4.4 etc.) and ports Android patches to that kernel while developing new features as well. Then SoC vendors do their bringups using that kernel tree.
It's not that they change kernel versions every month to the most recent ones anyway. It's roughly every year and if you check you'll see they're all upstream longterm versions which are supported 2-5 years.
A device is released with a specific kernel version and it doesn't get upgraded in devices lifetime even if the same device gets several Android upgrades. Native Nougat devices released in 2017 have kernel 4.4 which was released in early 2016, which is not even considered a new kernel by the upstream standards.
What do you expect the benefit everyone gains from sticking to the same kernel for 5 years? What is the point of developing a SoC in 2017 and bringing it up using Linux 2.6.32 instead of Linux 4.4? What is the benefit for Quallcomm, for Google or for users?
Probably not - Lineage can only patch issues that are present in the open source code. Since this issue exists in the firmware, it's up to device manufacturers to release an update including the fixed firmware, which Lineage can then incorporate.
Despite being based on AOSP, omni/lineage/etc all have pretty different features, so usually it takes a nontrivial amount of effort to go between the two (although it's definitely less effort than starting from scratch)
Most devices within the project are maintained by single developers - the difference is that official devices have been submitted to us and have everything working.
We don't blindly support devices (even as "beta") because we have no way of verifying that everything actually works (e.g. blobs that depend on an old C library ABI can't really be detected before runtime, afaik). Shipping stuff that's broken is something we'd like to avoid. The idea is that when you download a LineageOS build from lineageos.org you know that it'll work flawlessly (that may not always be the case, but it's the goal :P)