Android is a screwed, hard-coded, non-portable abomination.(laforge.gnumonks.org)
laforge.gnumonks.org
Android is a screwed, hard-coded, non-portable abomination.
http://laforge.gnumonks.org/weblog/2009/11/04/#20091104-android_mythbusters
8 comments
What the hell was that? Ah, gnumonks.org, makes sense. I was wondering who in their right mind would be flipping out because a mobile-freaking-phone didn't have 20 years of GNU userspace laying around. What until they find out it's not running X11...
Doesn't seem like a big deal to me, but then I'm not a Linux guy.
And J2ME is portable and that's truly an abomination.
And J2ME is portable and that's truly an abomination.
Agreed, I was hoping to read something of substance but what I ended up reading was very hyperbolic.
I disagree, there is a lot of substance to the presentation.
My summary: Google hacked the snot out of linux to produce android.[1] The result is still nominally linux, but much of what a developer expects when you say "linux" is no longer there.
As a result of the hacking (including the lack of X11), it is going to be difficult (possibly to the point of being unrealistic) to port "standard" linux programs to android.
Trivia: Nokia's n770/n800/n810/n900 runs pretty vanilla linux and X11 with Hildon[2] (Maemo) layered on top for the user interface (on-screen keyboard, etc.). It still takes some effort to port a "standard" linux program to Nokia/Maemo, even though it is pretty straightforward. As a result, the number of available packages is nowhere near what you can get via Debian/Ubuntu.
[1] I image they did it to skinny up the memory footprint and speed it up (for some definition of "speed").
[2] It didn't help that Nokia kept the Hildon user interface layer closed source for several years.
My summary: Google hacked the snot out of linux to produce android.[1] The result is still nominally linux, but much of what a developer expects when you say "linux" is no longer there.
As a result of the hacking (including the lack of X11), it is going to be difficult (possibly to the point of being unrealistic) to port "standard" linux programs to android.
Trivia: Nokia's n770/n800/n810/n900 runs pretty vanilla linux and X11 with Hildon[2] (Maemo) layered on top for the user interface (on-screen keyboard, etc.). It still takes some effort to port a "standard" linux program to Nokia/Maemo, even though it is pretty straightforward. As a result, the number of available packages is nowhere near what you can get via Debian/Ubuntu.
[1] I image they did it to skinny up the memory footprint and speed it up (for some definition of "speed").
[2] It didn't help that Nokia kept the Hildon user interface layer closed source for several years.
The guys at Google are not stupid. They are actually some of the smartest guys I've ever met (I haven't met anyone on the Android team, though). Most of them also have fairly extensive experience with Linux. To make the implied assertion that they just threw everything out and hard-coded the system because they are stupid is asinine. I'm guessing that they were aiming for squeezing as much performance out of the system as possible. Considering how abysmally slow many of the smart phones are, I can't blame them. Purity as the highest ideal in software engineering is for academics. In the real world, performance is much more important goal.
And the idea of using X11 on a smart phone is laughable. Please, let's not continue to perpetuate that monstrosity on any more platforms.
And the idea of using X11 on a smart phone is laughable. Please, let's not continue to perpetuate that monstrosity on any more platforms.
for (char *p = strchr(tmpfn, ' '); p && *p; p = strchr(tmpfn, ' '))
*p = '_';
OW MY BRAIN.That's fairly redundant.
char *p;
while (p = strchr(tmpfn, ' '))
*p = '_';I love that the O(n^2 / 2) algorithm for this problem is modded 4x the O(n) one.
You're replacing all spaces in a string with underscores, until you reach the end of a string or there are no spaces left...
Cool. But what does this have to do with the article? (I apologize if I'm missing something, it is 3am afterall)
Cool. But what does this have to do with the article? (I apologize if I'm missing something, it is 3am afterall)
It was in the presentation.
What's wrong with that code, Computer Guru? =)
Yes. Linux is a kernel, and you don't have to use a traditional GNU userland with it.
Maybe I'm missing something, as I'm not too familiar with android, but I thought that android apps were compiled to Dalvik, which is Java based? I fail to see how any traditional userland software would work anyway...
Maybe I'm missing something, as I'm not too familiar with android, but I thought that android apps were compiled to Dalvik, which is Java based? I fail to see how any traditional userland software would work anyway...
Not only that, Android applications respond to event like "you are about to be killed, please serialize your state" or "please restore your state", something that "classic" linux applications do not support.
Android is not typical linux - it is not supposed to run on devices with gigabytes of fast memory running off AC outlet. When your memory bandwith is two orders of magnite lower, you have 128MB of it (on G1, 64MB of memory is used by the radio) and you are on battery, putting GNU system there would be not very smart - if you want something usable and with battery life longer than few hours, that is.
Android is not typical linux - it is not supposed to run on devices with gigabytes of fast memory running off AC outlet. When your memory bandwith is two orders of magnite lower, you have 128MB of it (on G1, 64MB of memory is used by the radio) and you are on battery, putting GNU system there would be not very smart - if you want something usable and with battery life longer than few hours, that is.
The Android project uses Linux as a hardware abstraction layer, that's all.
It was never meant to be a full Linux distribution. Most of the things that the presenter picks on (lack of SysV IPC, prelinked libraries, hand-optimized custom libc) were meant in the interest of performance, not portability.
It was never meant to be a full Linux distribution. Most of the things that the presenter picks on (lack of SysV IPC, prelinked libraries, hand-optimized custom libc) were meant in the interest of performance, not portability.
For those that are interested in Linux on mobile phones, Nokia's Maemo 5 mobile platform offers a more traditional GNU/Linux environment. It even allows the enduser to gain root access using "sudo gainroot".
Just because Android has a hacked Linux kernel underneath doesn't make it anything but a quasi-JVM-based Sidekick, written by exactly the same people.