Hacker News new | ask | show | jobs
by NuSkooler 1402 days ago
It's mentioned already, but: Android.

Discounting Android as "Not Linux" enough is a mind boggle to me. Perhaps not "GNU" enough, but certainly the spirit of Linux -- customized for the particular needs, stable, fast, works on a plethora of hardware, etc.

16 comments

Vanilla Android or AOSP might kinda have “Linux Spirit” but I’m not sure what gets shipped on most consumer devices does… lots of random things locked down (including boot loader, sometimes), crapware all over the place, drivers and kernel changes that aren’t upstreamed making it difficult to install anything but carrier/manufacturer-flavored Android, etc.

I think most people rooting for “smartphone Linux” are looking to be able to swap and customize OSes on their phones and tablets as easily as they do on their x86 PCs without futzing around with device specific ROMs and the like.

Android has something called GSIs (Generic System Images) that will run on any device that supports Android 9 and above. They don't always support custom hardware, but this isn't really any different from pure Linux. Instead of building a mobile ecosystem from scratch, why not build a community around submitting drivers to a build based on GSI?
AIUI, GSI's are not quite "generic", there are a few architectural variants. Plus they only give you a "system" partition, so the kernel and low-level userspace code (driver HAL, init-system etc.) are still Android-native and device-specific. Droidian is trying to implement something that's as-close-as-possible to Linux as GSI's, and it's not easy.
Even AOSP is running something quite far from a mainline kernel, although they've been gradually reducing the delta with Linux proper. It really is a fork.
But why is a fork still not Linux? Every major distributor runs a fork.
Because Linux kernel is an implementation detail in what Android userspace is concerned.
My pixel broke (was running CalyxOS, lineage before that), and I had to get a quick burner phone to make work calls. Got a $200 dollar used samsung. I didn't realize what utter trash nonsense is loaded onto normal phones. It's absolutely bonkers what Samsung did to destroy Android with no value add.
To be honest though, there's a huge difference between the Android experience on a $200 Samsung phone, and a $2000 one. I have a Galaxy S10, and the experience is fairly good (though I would prefer at least a vanilla Android).
> It's absolutely bonkers what Samsung did to destroy Android with no value add.

They added value, just not for end users.

Each AOSP version is just a big code drop from Google. It's really far away in the spirit. Not even talking about how difficult it is to patch some component as a user.
No it's not, AOSP is developed in the open. Directed by Google sure, but not just a code drop every release.

Check out the current PRs in gerrit: https://android-review.googlesource.com/q/status:open+-is:wi...

I have taken a look at random git repo that seemed important enough: https://android.googlesource.com/platform/system/core.git

There's about 5% of commits made by people with e-mail domain different than google.com, android.com or chromium.org (6% if you count the last one too).

Pretty much the same result on another one: https://android.googlesource.com/platform/frameworks/base.gi...

Do you get to see the code of yet unreleased versions of Android? Sure, they do accept some patches, but "developed in the open" doesn't seem to describe their development model.

>including boot loader, sometimes

Perhaps in the past, but it feels like more and more this is shifting toward the expectation, rather than the exception.

When I think of a Linux phone, I really want something that supports a full GNU/Linux desktop as convergence.

The Steam Deck does this perfectly!

Damn, you got me thinking now, that Valve of all people could probably put out a Linux phone.

The Steam Phone could be a game changer.

You may actually be onto something here!

Especially if the smaller steam deck clones like Aya neo Air Pro ( https://www.youtube.com/watch?v=Kw-0ngNgGC0 ) can support voice calls and a decent camera (the only other things my "mobile gamer" friends care about in a phone), I think there will be a niche market around it. Nokia N-Gage reborn!

We already have decent enough android apps support on linux using anbox / waydroid. For the edge case android apps.

I don’t believe that can happen. The steam deck kind of works because they pack in a bunch of peripherals that won’t fit into a phone. The touchscreen experience on it is miserable. 99% of steam games with touchscreen controls would be totally a sad experience.

What it is is a laptop in a funny case.

For a niche market, possibly. However, I just don't see Valve as a company being interested in becoming a phone manufacturer. What would realistically be in for them? It's strategically mostly irrelevant to their core business, with the sole exception of the Steam Store. But to create, develop and support a whole phone platform (hard- and software) just to sell mobile games? I don't see it.
You underestimate the size of the opportunity. The mobile game market was $119 billion in 2021.
Given the complexities involved in such an endeavor, I'm still confident in my assessment, especially when confronted with a one-liner just throwing a large number against the wall. If Microsoft couldn't get a mobile OS off the ground, despite trying, I don't see what the opportunity size has anything to do with it. Focusing on (even casual) gamers with specialized hardware works for a gaming-focused company, whereas a general-purpose device would not. Compare Nintendo Switch and Steam Deck. Strictly speaking this is part of mobile gaming, with significantly higher margins.
> "If Microsoft couldn't get a mobile OS off the ground, despite trying..."

Google was actively sabotaging access to their services, like Youtube, at that time. With the amount of regulatory scrutiny they're under today, they wouldn't dare try it again.

Yes. But the gamer niche is just that. A niche. A toe hold. A position every up and coming brand / product dreams about. They can extend out from there.

MS on the other hand, drank its own Kool Aid, threw it's weight around, went all in...and walked away empty handed. There was little value add. There was zero coolness. Etc.

There are some similarities but that was then, this is now. A device that's "proven" - and some privacy tossed in - can probably find a market just beyond the gaming niche.

Exactly, maybe they could do a "gaming phone" like Nokia tried before.

The Steam Deck is very impressive.

The taco phone was hardly a success, or the n-gage variants.
Yeah, I think the main issue is getting support for WhatsApp and banking and ID services (that usually block even just rooted Android phones).

I'm literally writing this comment from my Steam Deck.

I would buy a Steam Phone, and I'd want a big Valve logo on its back, and an easter egg that says "half-life 3 is not coming"
Android is Linux but it has nowhere close to the fully open source freedom of a traditional Linux workstation. This is why I carry a tiny linux laptop.
I'm quite happy with Termux on Android. Allows me to rsync my data for backup or imports, I can ssh into real Linux machines, process images with ImageMagick, etc. Sharing documents from inside other apps works too (you can set up scripts in Termux as receivers). Sure, full control of a device would be great, but I'm better off with Android after I migrated from IOS.
Bad news: Android blocks exec in newer API versions. Termux isn't going to be able to use newer API features as they release, unless they rewrite their own ELF loader. exec is now only allowed on executables within the apk, nothing fetched from termux's repositories.
What do you use a small laptop? Seems there's nothing ultralight and small like the Asus Eee and Acer Aspire One these days (even though you'd think it'd be easier with ARM now).
> What do you use a small laptop? Seems there's nothing ultralight and small like the Asus Eee and Acer Aspire One these days

They're called "Ultrabooks" now. Buy an older one on the used market if you don't care about top performance.

Not the OP, but you should take a look at https://www.gpd.hk/ they have a handful of small devices targeted at different niches.
The GPD Pocket is what I carry in a leg bag.
which tiny linux laptop? I am in the market, especially if it can survive jogging in backpack!
I carry a GPD Pocket in a leg bag. Fantastic for conferences etc. No need for a backpack.
Phones are not PCs/general-purpose computers. Do you want your TV to be a general purpose computer as well? (Having put my family through a Media Center PC and TV remotes with keyboards/trackpads for several years, I don't recommend it.)
> Phones are not PCs/general-purpose computers.

That's just the opinion of the manufacturer, we don't have to agree.

Phones have banking and government apps, they are general purpose computers from their usage alread

If something currently serves as a general-purpose computer for most people, it's an (Android) phone. It's affordable, it has integrated graphics, video, audio, trackpad, and keyboard, it has excellent networking, it's easily programmable and has a plethora of apps for all cases.

It does not have a built-in Basic-like language for immediate fiddling; this is sad, of course.

If you do not mind running an endless pile of proprietary software and granting several third parties the right to track you and have remote root access to your device via hundreds of binary blobs, then Android is great. Even CalyxOS and GrapheneOS cannot escape the hell that is the vendor partition. Not to mention binary blobs from Qualcomm etc that target particular kernel versions which guarantee your hardware will be a brick in 2-4 years when it is no longer possible to use modern kernels because Qualcomm moved on to new chipsets and abandoned the last gen.

I spent the better part of a year doing Android OS dev only to conclude there just is no way to trust it or make it sustainable.

The Librem 5, Pinephone, and the Precursor are shaping up to be decent options. For now no phone at all suits me fine.

Plenty of options on the respective stores.
Bankers and governments don't want your phone to be a general purpose computer. That's why you can't run your banking app on a rooted phone. From a security standpoint, "general purpose computing" is really just "arbitrary code execution" -- generally a bad thing.

We are approaching the sunset of general purpose computing in the consumer space. There's nothing you can do. Accept it and move on.

“General purpose computing” does not imply any particular security model, it refers to a device with a variety of end user purposes.

It is in contrast to a special purpose computer, which smartphones clearly are not.

> We are approaching the sunset of general purpose computing in the consumer space. There's nothing you can do. Accept it and move on

I agree that governments and big business (not just banks, think about media services with DRM) don't want us to have full control of our computers for many reasons.

I disagree we just have to accept it though. I will keep fighting that forever.

You missed quite a lot of history then. Smartphones are general purpose computers for the last 12 years or so.
Actually yes. All my TVs have attached PCs and run kodi, steam, etc on Ubuntu so I can do whatever I want on them. All my remotes have an airmouse and small keyboard.

We love it. When we want to look up something we see in a video we just open a browser. We also use them to order food etc. No proprietary software required.

I run termux on mine and wish termux wasn't so restricted by google/android.
Maybe Termux can learn to code against Java APIs instead of forcing themselves through the Linux layer that is considered a private API on Android.
Typically the Java APIs are restricted to the bare minimum Chrome Android needs to do sandboxing and native code-gen for V8. Shared memory only works in a more limited way with many less options. They'd really like to restrict these APIs way more and not allow apps any way of loading dynamic native code with the exec bit set, but can't because of Chrome and antitrust worries about just making Chrome system software with access to the APIs it needs that a competitor couldn't replicate in an APK.

I think you can see some of their thinking with the removal of exec; they just want to undercut termux because that isn't needed for V8, but as long as loadable generated native code is still needed for Chrome, termux could potentially create their own ELF loader to replace exec).

Exec should just be behind a separate permission anyway. A flashlight app has no legitimate reason for exec()ing random code that was not in the APK bundle, but the permission should be there so that JIT's and stuff like Termux can make use of it.
Thing is, exec() was never a public API anyway.
My Pinephone is a general-purpose computer, which runs a desktop OS and can be connected to a keyboard and screen. Same for Librem 5, which I preordered.
Google created an Android userspace that requires Google services to do anything meaningful. This violates everything Linux stands for.
Not great, agreed, but they did at least architect the OS so that they are decoupled and you can build without them very easily. In fact the largest custom ROM doesn't bundle with them by default (LineageOS). What do you need Google services for?
LineageOS doesn't bundle Google Play by default because they're not allowed to, not because they don't want to.

In fact they would like to because a majority of their users install it. But there's a lot of legal strings attached to it.

You can still have a useful experience on a pure AOSP build.

You'll miss features like push notifications, Google accounts outside of the browser, an app store and various other features.

But there's no reason the open source community couldn't add these, a package repo/app store equivalent and push messaging would probably be the deal breakers for me as a phone where chat apps don't work isn't useful to me.

The binary blobs to get driver support are also a problem, but it's also true in desktop linux, see for example Nvidia's graphics card driver.

I think it's better to come up with replacements for those Google services and apps instead of rewriting the entire operating system. You need to solve the same problems on a linux smartphone as well, so Android gave you a lot of time savings, and I doubt the app sandboxing is even remotely as good on those non-Android linuxes. For Google Play for example there is F-droid, for push messages/FCM there is UnifiedPush, for Google Maps there is Osmand.
Who decides what "Linux" stands for? Linus? RMS? "The community"?
My personal objective take is if it runs a Linux kernel, it's Linux. Any other factor is subjective and does not matter.

Legally though, Linus Torvalds gets to define what Linux is because he owns that name.

Linux is a trademark owned by Linus Torvalds. So Linus decides.
Yes, articles like this illustrate that RMS had a point, as annoying as he can be about it. Android is obviously Linux. What's missing is all of the things GNU and BSD brought to the party.
Try reading Linux man pages on things like system calls to map shared memory. On Android it won't work, and you have to call into Java code to do it. Google created a monster rather than work to get things merged into the kernel (there was some kind of possible resource leak or DoS with shared memory mapping).
Linux kernel is an implementation detail on Android.
Yes, Android is absolutely not GNU enough. This terminological goofiness is the flipside of using the term 'Linux' to refer to a whole bunch of GNU/Linux operating systems.

Here's the thing though, this is not even about abstract ideals. When we say Android is not 'real Linux', what it comes down to is this: there's a certain peace, a sense of relief— of being respected— that comes with running Linux on your personal desktop or server. It feels really, really different from using an OS whose main function, which has driven its evolution, is just to sell you paid apps and services. That makes it fun, and it lends itself to a certain fluency.

Running any variety of Android is just an alien experience to all of that. Android doesn't feel good to use the way that Linux does for people who like running Linux on other contexts. And that's why it makes perfect sense to say it's 'not Linux enough'. The experience speaks powerfully enough for itself that it hardly seems worth explaining tbh. If you actually get what is good about running Linux and you've ever sought those virtues in Android, you already get it.

>When we say Android is not 'real Linux', what it comes down to is this: there's a certain peace, a sense of relief— of being respected— that comes with running Linux on your personal desktop or server. It feels really, really different from using an OS whose main function, which has driven its evolution, is just to sell you paid apps and services. That makes it fun, and it lends itself to a certain fluency.

Might just be me, but I don't feel any respect coming from whoever are the devs that made this week's flavor of Linux I might be trying out.

Yeah, Windows 10/11 and iOS, and to a slightly lesser extent MacOS and Android, all aim primarily to sell me their shit. I hate them all for that. I run an OS to run the shit I want on my computer, not the shit they want on their computer.

Linux, though, aims to primarily sell me their ideological shit: FOSS, free as in freedom, GPL, Command Line Interface or bust. Instead of commercial pursuits, it's dogmatic pursuits.

They're all the same sides of the same shit sandwich. I get to choose what's in the sandwich, but it's still a shit sandwich until the heat death of the universe. Fuck that noise.

That all being said, Android is Linux. Because it runs the Linux kernel. End of. QED. Anyone who argues to the contrary is just being spiteful of Android succeeding where the wider Linux community could not.

When mapping shared memory or checking for the right broadcast subnet requires calling into Java code... it isn't Linux on the user side so much anymore.
Because Linux is not exposed to userspace.

All you have access to are Java, Kotlin, ISO C, ISO C++, and NDK libraries.

Nothing about Linux is public, other than APIs used by OEMs themselves.

Since Android 8, even Linux kernel drivers are considered legacy and all new ones are required to be Treble based.

All the LinuxSE, seccomp,...are also not exposed and can only be customised by OEMs.

People like to pat themselves on the back regarding Android, however it could start using any other kernel and the apps sold on official stores would at most need to be recompiled.

fuchsia (+starnix for legacy) might make android much less linux-y over the long term
> Perhaps not "GNU" enough, but certainly the spirit of Linux -- customized for the particular needs, stable, fast, works on a plethora of hardware, etc.

True, but you forget being transparent and giving users control, which are vital aspects of Linux that Android is light years away from offering and will never offer.

So have you watched the talk? It's mentioned there and the talk describes pretty well why it's not what many people are looking for. You may want to watch it after all.
You don't interact with Linux by using Android, it's Java. Android could also have been based on FreeBSD, wouldn't have made a difference for the user.
I suppose it depends what you mean/want by 'Linux'? In a nutshell I suppose I want systemd & config files.
Android is not an acceptable Linux.
The android operating system is not open soruce.
That is the license for the Android Open Source Project. Unfortunately, Google has spent the last fifteen years moving many parts of the stack and almost (if not) all the core apps to Google Proprietary versions. Most apps in AOSP no longer receive updates at all.

The dream is here is not just that we would be running "an open source stack" but that the active development would be on the open source stack. Sure, there are new releases of AOSP. But take a look at the core apps: Contacts, Calendar, Camera, Email, Location services. These are all proprietary now.

Android is open source in the same sort of way that MacOS is open source. There are some open source bits in there.

Who cares about the google user space apps? There are viable open source alternatives for all of them. It's like saying Linux is not open source because Redhat bundles proprietary software with their distro.
This could have been a reasonable analogy if a very significant chunk of applications "for Linux" only worked (or offered its full functionality) if you had Red Hat's proprietary addons installed.
That's just not true. You'll need to give a specific example of which apps are like this on Android. I'm writing this using a LineageOS phone with no proprietary or closed source apps on it right now.
Many millions of people in China happily use Android smartphones every day without any Google apps at all.
FDroid. Period.
Unfortunately there's not a single device on earth that runs AOSP to my knowledge, even the emulator does not.
I don't know if things have changed, but you definitely used to be able to install AOSP on some phones, the Nexus line were typically the easiest.
Are GSI images not built off of AOSP?
What they're referring to as linux is actually gnu/linux, or as I like to call it, gnu+linux.