12 ms·
Bringing the Android kernel back to the mainline
- noja 8y agoAre the binary blobs staying, or are they open source now too?
- yepguy 8y agoThey're staying.
- rsre 8y agoI've always found this curious since Linux fans usually mention the high usage of Android as Linux usage. The people usually think of GNU/Linux when they think about using Linux but the truth is Android is far from that. Be it the lack of GNU utils, not using a mainline kernel or the myriad of blobs and proprietary stuff bolted on top.
- craftyguy 8y agoIt's not clear what you are curious about. You can run GNU/Linux with out of tree modules (e.g. proprietary nvidia graphics driver). That doesn't change the fact that you're running a (now probably tainted) Linux kernel. I don't think anyone is thinking of a GNU/Linux desktop environment when they think "Android runs Linux!", they are quite literally thinking "Android uses the Linux kernel." They are not wrong.
- rsre 8y agoOf course. I wasn't talking about the population of HN, I mean it in a broader sense, people who know GNU/Linux is a thing but don't know or care enough to realise the differences. I'm curious about what is there to celebrate in some huge corp using some free software in a completely cornered use that gives little to no freedom to its users. I'm sorry if my points are not clear. As it has been evidenced english is not my first language.
- izacus 8y ago> I'm curious about what is there to celebrate in some huge corp using some free software in a completely cornered use that gives little to no freedom to its users. Huge amount of money poured into development of said opensource software - including the patches in the article you're commenting on. Major opensource projects are (and have for years) receiving most contributions from developers in Microsoft, Google, Intel, RedHat, Pivotal, and many others.
- craftyguy 8y agoAh, I see your point. I suppose there are folks who know GNU/Linux is a thing, but don't understand the distinction between "it uses a Linux kernel" and "it uses a Linux kernel and gnu-friendly environment." In which case they would wrongly equate Android == Linux == GNU/Linux. > As it has been evidenced english is not my first language. No problem, I'd say that your English seems great, better than some native English speakers I know. English is my first language and it's easy for me to be unclear :D
- newnewpdro 8y agoAgreed, the Linux kernel is nothing more than a board support package for Android. Android applications are not Linux applications. And Fuschia/Zircon are clearly efforts replace the kernel.
- derefr 8y agoUnlike most other environments, though, it is very simple to create an Android application which embeds and launches a Linux userland, without any virtualization or syscall-ABI translation being required. See, for example, https://termux.com/ https://termux.com/ ChromeOS is also "Linux" in this sense, because of Crouton.
- pjmlp 8y agoKind of, https://wiki.termux.com/wiki/Differences_from_Linux https://wiki.termux.com/wiki/Differences_from_Linux
- pjmlp 8y agoMany of them never actually developed for Android as such. Official NDK APIs are ISO C and C++ standard libraries, a couple of portable libraries like zlib and Android specific APIs. As of Android 7, any application that tries to link to on-device libraries or do calls that aren't whitelisted just gets killed. Yes one might successfully do Linux specific calls, but given they aren't part of the stable Android NDK API, any OEM is free to bork those attemps. In practice, being based on Linux doesn't mean anything for app developers. Only for those doing system space development, which are Google and the OEMs, noone else.
- yjftsjthsd-h 8y agoNice to see that progress is being made on upstreaming the Android patches. Hopefully this will make it easier for ex. postmarketOS to work using a vanilla kernel, or at least to update the version used.
- craftyguy 8y agoWhile hacking on postmarketOS off and on for the last year, the #1 issue was always dealing with crappy old kernels from manufacturers with out of tree patches that would no longer apply to the current mainline. Unfortunately this problem will still exist with the proposal in the article, manufacturers will still be allowed to ship out of tree code. Being able to boot a mainline kernel on your device is practically useless if the code necessary for display, input, audio, etc are out of tree and thrown over the wall by the manufacturer with no intention of keeping it up to date.
- bubblethink 8y agoThere was some other news about the display side of things. https://www.phoronix.com/scan.php?page=news_item&px=Pixel-3-Freedreno-MSM-DRM-Plus https://www.phoronix.com/scan.php?page=news_item&px=Pixel-3-...
- ChristianBundy 8y agoThis is even an issue with Chromebooks from Google (e.g. Chromebook Pixel 2015). Sure, it "runs Linux", but how useful is that if you can't put any other distro on it? After a few years we finally got all of the Chromebook-specific patches pushed to mainline Linux, but Google doesn't seem to care about mainline at all.
- DonHopkins 8y agoMisread the title as "Bringing the Android kernel back to the mainframe". Since you can run mainframe emulators on Android, it only seems fair to run Android on mainframes. I wonder if the code is 36 bit clean?
- kristianp 8y agoAll this vendor-provided code is why lesser-used hardware features like bluetooth low energy don't work on many tablets, even new ones. Good luck trying to get web-bluetooth running on Chrome, despite it supposedly being supported for Android 6.0 and later [1]. Samsung seems to have good support, but Lenovo and Vivo don't support it, despite saying they support Bluetooth 4 on recent devices. [1] https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md https://github.com/WebBluetoothCG/web-bluetooth/blob/master/...
- pedrocr 8y agoWhen I buy a laptop I install whatever is the latest version of Ubuntu on it and am done. When I buy an access point I install whatever is the latest version of OpenWrt on it and am done. I've tried to do the same thing with phones using LineageOS but it's hopeless. Devices are often half broken and are never guaranteed to continue being supported because of this kernel mess. It seems there's slow progress being made which is nice. I was hoping Android One phones would at least guarantee monthly security updates but it's still up to the manufacturer if that happens or not.
- umanwizard 8y agoWhen I buy a phone I install whatever is the latest version of iOS on it and am done ;)
- mixedCase 8y agoIt's all about tradeoffs, Android phones getting updates usually means the phone gets faster as opposed to ever closer to unusably slow.
- mitchty 8y ago> It's all about tradeoffs, Android phones getting updates usually means the phone gets faster as opposed to ever closer to unusably slow. You say this like it is unique to android, iOS 12 was basically the same. And I can say from friends experiences, its not always true for all android phones.
- chipotle_coyote 8y agoAnecdotally, iOS 11 made my iPhone 6 run slower than iOS 10, but iOS 12 made it run faster than iOS 10. (This is in line with other reports and benchmarks you'll find if you go looking.) There's an awful lot of snark about iOS slowing down with each successive version, but I'm not at all convinced it's universally true. (Again, anecdotally, I'd say iOS 7 and 9–11 were guilty of that.) At any rate, the big issue I tend to hear about Android phones getting updates is "my Android phone isn't getting updates." My iPhone 6 shipped in 2014, and iOS 12 actually ran on 2013's iPhone 5s. How many Android phones that shipped before 2016 are getting Android P? Are there Android phones that shipped in 2016 that aren't?
- bubblethink 8y agoI'll believe that real progress has been made when google updates the major kernel version for a phone. No OEM (AFAIK) has ever done a kernel (major version) bump.
- culot 8y agoIt was either the original Moto G or the 2nd gen one that got a kernel version bump - from 3.4 to 3.10, I think. I remember being impressed at the time. Newer Sony devices got a major version bump from 4.4 to 4.9 with their Pie releases: https://developer.sony.com/develop/open-devices/latest-updates https://developer.sony.com/develop/open-devices/latest-updat... I wonder if the major version update for Sony's 9.0/Pie was due to a Qualcomm BSP change, or if it was solely their initiative? I think the reason for typically not doing major kernel updates may be down to sticking with reference stuff from BSPs. (I don't think they're offering any big updates, not kernel or Android major versions, for their Mediatek stuff. I think that might be typical though.) Kind of cool, anyway, to move from one LTS kernel release to the next. I wonder have any other OEMs made the same move?
- corbet 8y agoThe Galaxy S and Galaxy Nexus both got major version bumps. Old history at this point, but it does show that this can happen... (https://lwn.net/Articles/738225/ https://lwn.net/Articles/738225/)
- fffrantz 8y agoHonestly, it's extremely difficult to update the kernel since it's usually tied to the BSP the SoC vendor is providing. Also, you gotta keep in mind the difficulties associated with the lazy 3rd parties providing drivers for a single kernel version, making updates almost impossible. -- Disclosure : I work for an OEM as a system architect, and it's been one of my goals to try and get newer kernel versions running. (Suffice to say I failed so far)
- baybal2 8y agoDoing so will require a complete shift of responsibilities for parties involved. I myself witnessed many "brains being broken" scenes when somebody tries to explain why Linux kernel development being done for "free", to men with educational background in business. In the end, you will never be successful doing so, be sure 99%. But whether they understood the bigger picture of things or not, technical needs need to supersede business needs, or that tech business will not work.
- craftyguy 8y agoDevices like the Librem 5 cannot come fast enough...
- qubex 8y agoAs soon as I read the title I started to wonder what (if anything) this means for Fuchsia. At first I thought “oh, they’re doubling down on Linux-powered Android and that in turn means they’ll be setting Fuchsia aside” to “ah, adding a HAL to the Linux kernel and reproducing it’s interfaces elsewhere is a great way to enable proprietary devices to switch OSes”. Does anybody more knowledgeable in the matter have other thoughts?
- dcbadacd 8y agoIt would also be really nice if common distributions finally considered creating feature+architecture-based repositories, small improvements that you get by creating more specific binaries really sum up on mobile/low-powered devices. It does require more effort (and money for storage, compilation) though.
- sandGorgon 8y agoThis is happening because of Project Treble which creating a boundary between device drivers and the kernel. Earlier, kernel versions (even android versions itself) were subject to integration of device drivers into the kernel source code... which took a long time and often resulted in forced obsolescence. By separating out the driver interface using Treble, you can update the kernel and android versions from upstream without worrying about driver integration/updates.
- pjmlp 8y agoThis is happening, because Project Treble still requires OEMs to ship updates and in one year after its introduction, Oreo got a meager 10% when Android P was announced and OEMs were still shipping Nougat with updates to Oreo, which doesn't require Project Treble compliance in such cases. Google is finally facing the issue that regular consumers aren't caring to update anymore, specially now that devices are quite usable for several years. So if they want to bring new OS versions into the market they really have to force OEMs to do it. Hence the new GSI concept, finally adding update clauses to the Play Store usage agreement, and now upstreaming kernel changes.
- taralx 8y agoSadly, no. Both kernel and device drivers are in the HAL: https://blog.linuxplumbersconf.org/2017/ocw/system/presentations/4807/original/Treble%20&%20Kernel%20-%20Plumbers.pdf https://blog.linuxplumbersconf.org/2017/ocw/system/presentat...
- shmerl 8y ago> Devices will be expected to run this kernel; to make that happen, vendors will provide a set of kernel modules to add the necessary hardware support. Getting there will require the upstreaming of kernel symbol namespaces among other things. Google should go one step further and require upstreaming hardware drivers.