Yes, Android is a Linux phone. But, none of the apps are. Read more for a simple guide about how Android software works… and why it doesn’t work the way most believe.
Myth #1 – Android Lets You Run Linux Software.
While Android’s operating system is powered by Linux, all third-party applications run on a modified form of Java, called Dalvik.
Dalvik is essentially a fine-tuned version of Java, which Google made to avoid licensing fees. Dalvik is relatively identical to a desktop version of Java. In the future, Google plans to extend Dalvik with additional APIs that make it better for phones than Java.
So, to be clear, you cannot take your favorite Linux apps and just port them to Android.
Myth #2 – Enabling unsigned code lets you run Linux apps.
Like iPhone, applications have to play by Google’s rules. Even when you tell an Android phone to run Dalvik applications not approved by Google, there is no option to enable running Linux applications.
Myth #3 – I can just “jailbreak” my G1 to run Linux apps.
Sorry, no such method has been developed to date. While hackers have cooked custom versions of Android to run on select HTC devices… nobody has accomplished that on the G1. Worse, even bypassing any code checks… still wouldn’t get past the fact that Android doesn’t want to run Linux applications on the screen.
Android’s source code would have to be modified to permit running Linux applications… an even larger hurdle since the screen is controlled by Dalvik. It would require advanced Java and Linux programming to accomplish such a task. Even then, the system is running a pared-down version of Linux, designed to run nothing but Java/Dalvik apps.
Still, it’s not impossible for the future… there is enough code sitting in the SDK to pull it off. However, it would probably be about as buggy as the first jailbroken iPhone applications… that’s what not having a full SDK will do to a program.
As noted in the article update, some have called into question the relative ease of modifying Linux apps to run on Android… once some workaround has been developed. However, even if porting Linux applications to Android were easy today (and nobody is saying that at this point)… you still can’t get them to run on the G1 currently.
Myth #4 – Google is just waiting to roll out Linux app support in a few months.
Again, sorry, not true. There are no plans on the table at the OHA to open up Android to Linux apps. Considering mainstream phone makers like Samsung and Motorola haven’t even released first-generation Android phones… the change won’t happen any time soon.
Myth #5 – Google wants to open up Android to Linux.
Google has always existed in a world where Linux played second fiddle to the underlying software. Be it Python-powered Google searches, or Java-powered Dalvik, Google has never appreciated Linux as a runtime.
In fact, the only mainstream application to run in Linux, is Google Earth. And, that program requires a good multi-hour boot camp to learn how to install properly (for a person new to Linux). There aren’t any pre-packaged, double-click-to-install-versions.
(Google also does offer Picasa for Linux, however, it is the Windows version pre-packaged in a self-contained WINE environment, rather than a true Linux port).
Google doesn’t appear to want to embrace native Linux applications, but rather, spend the next several years developing Dalvik into an application platform of its own… complete with all the desktop services of comparable, modern, computing environments (Cocoa/Obj-C and .NET/C#).
Finally, opening up Android to Linux takes away the selectivity. While someone could answer Dalvik’s call with their own bytecode… opening up to Linux would put Android in a suicidal position. There is nothing stopping Android from being code-compatible with other mobile forms of Linux. That would take away any benefit from being tied to the OHA, and tied to Google. Then each manufacture would pick-and-mix their own mobile Linux distribution.
While that may be good for consumers… it wouldn’t be good for Google. And, thus, Linux will remain a background traffic cop, flowing only to Dalvik apps. Google seems to like the idea… it’s very profitable for them.
Update: To clarify a few things… we want to thank the many people that have posted in-depth research from the Android SDK.
Yes, Google’s applications do run on Linux. However, much of the technical knowledge needed to make Linux applications run properly is not disclosed in the SDK. Of course, that is because Google prohibits developers from running Linux applications on the G1, so that makes perfect sense.
However, our reporting remains the same. The only thing that comes into question, is the ease at which Linux-on-Android, once hacked to work… can be tapped to its full potential. We noted this in Myth 3 as something of relative dispute in the hacking community.
Regarding 5:
If you use Ubuntu or Debian, you can add:
deb http://dl.google.com/linux/deb/ testing non-free
to your /etc/apt/sources.list
This will enable you to install Google apps for linux (Picasa, Google Earth etc.,) seamlessly.
~V
And, that, my friends is why Google doesn’t like Linux (as a consumer platform). I knew a comment like that would be one of the first to be posted.
Please, tell my grandmother to edit her /etc/apt/sources.list… I hope you enjoy the next eight hours of your life.
Well, I think Google gave what they promised. They promised an open source phone, and they made it open source. Now it is up to the developers to either figure out a way to install applications of their own or use the source to compile their own kernel which will have capabilities that Google left out. It is a lot of work, but I’m sure that some developers out there are having fun right now.
Would your grandmother be able to keep a WIndows box free of malware? Doubtful. It’s easy enough to edit a plain text file and add a line… or it can be done thru the GUI in synaptic.
Mustang46L, most of what you have said is absolutely correct…
Except the part about people just making their own kernel, and turning this into a Linux phone.
There is no way to flash the G1 with another kernel. The bootloader is secured. One would have to hack through the G1’s bootloader.
Hardly an open process. This goes back to Myth 3… Google’s Dalvik apps are open, and you have the source code as a reference… but the bridge to take Open Linux to the device remains a bridge to nowhere.
George, I don’t want to drag this into an off-topic discussion about Linux apps. We raised that area to tell you why Google came to the decision that they did. I know many won’t like that decision… but it is what it is.
To address malware… Actually, if you’re on the Google train of thought, users would install the Google Pack, which includes anti-malware protection. You don’t have to edit any lines of code to do that.
And, to address the “it’s just a quick edit of a file” argument… it fails to stand the test of the public. If it was that easy for the public to accomplish, Google would have embraced it. I would hardly call a couple of Linux and WINE ports a warm embrace.
Yeah I understand. I guess I just never though of the Linux phone we’ve heard so much about to be something the general public wanted to get their hand on. I figured it was something for tech junkies and developers, not grandma.
If Android phones were to run Linux apps, then on which microprocessor architecture?
The advantage of Java, and Dalvik is that an application binary runs on any phone regardless of its underlying hardware (or even os).
[…] Phonenews has put up an interesting post about Android, which dispelled some misconceptions I had about the OS. I knew the apps were Java based, but did not know developers did not really have the option to add native Linux apps, or have deep access to the OS. Myth #1 – Android Lets You Run Linux Software. […]
DannyB, the applications would be platform independent (that’s the nice thing about Linux… a few tweaks, a simple recompile, and you can target several processors).
As such, if you ever had Android running on two different processors (that aren’t code compatible), you’d just optimize the code and have gcc do its magic.
Yes, that is a bit of a simplification from a technical standpoint. However, if Android is popular… and Apple is considering moving iPhone to Intel MID… it would have to be able to answer the competition. Java is nice, but the processor argument is pretty weak on Linux. Now if it were Windows… that would be a different story.
Those all seem like the same myth and I have to question if that is what anyone with an ounce of computer knowledge thought? Android is phone software or a stack of you will. It has always been said to be based on GNU/Linux and to be an open source project. The fact that they built an API layer for developers was expected. The fact that this API layer was based on a form of Java was well known. The fact that this design helps keep software/application development simplified while also keeping the low level _Linux_ based phone services safe and working is a positive aspect of the design.
So I guess Ruby on Rails also falls to all your myths because it does not run as native GNU/Linux software. Same goes for the software on the OLPC because it runs on the Python stack.
This isn’t the 80s or even the 90s folks. Software layers make things easier and many times safer. And “Linux” is the kernel. GNU/Linux is what people use because a kernel by itself is not of much use. So this is really Android/GNU/Linux of you want the name to indicate the layering of software to some reasonable extent.
Doug, first, I’ll disregard your arrogant and unnecessary initial comment. If I didn’t, we wouldn’t be able to have a conversation at all. Shame on you for starting dialogue with that.
We are constantly hearing that Android is a Linux phone, and it is… but the average consumer online beleives that this is going to be the breakthrough that lets them run Linux software on their phone. And, it doesn’t do that.
You may think Linux is unnecessary, but the public perception is that running Linux software on phones is a good thing. We are simply clearing the air, so that consumers won’t be confused when VLC and Google Earth aren’t running on Android in three months time.
Myth 1: “all applications run on a modified form of Java, called Dalvik” – this can’t be true, since the web browser is based on webkit which is written in C++. So there must already exist a way of compiling and running C based GUI apps, though the API is probably not that great – but as long as the basic drawing primitives are there, there’s the potential to port QT and GTK and open up the world of Linux desktop apps.
I also found this quote “Given that Android can support arbitrary browser plugins written using the NPAPI standard, it should be possible for other popular add-ons (*cough*Flash*cough*) to be ported to the gPhone. The only caveats are: they have to be written in native (C/C++) code, and there is no “official†way to install them on the device. Yet.” http://blogs.zdnet.com/Burnette/?p=662
The Android browser supports native code plugins? If so, that could be another path to getting native apps on these phones…
Chris, Google’s applications can run in Linux. Just nobody else’s. This is much akin to how Apple made “WebApps” open on the original iPhone OS 1.0, but left Mac OS X apps closed down.
I haven’t spent a lot of time with the Android SDK myself, but from what I have seen, Google/OHA has not provided sufficient documentation of their Linux apps. However, they have made clear that you can’t touch it (aside from checking in source).
It may be possible once the G1 is “jailbroken” (I use that term in quotes since it really only applies to iPhone), to run Linux apps. But, as we addressed in Myth 3, it’s not something that Google is going to welcome, and it’s not something that there’s going to be the SDK-grade documentation on. So, a prospective G1 buyer shouldn’t count on those apps being any better than the iPhone OS 1.0 jailbroken apps in terms of quality.
But seriously people. Arent they just using the OS as an…. well, OS?
This is the job of an OS, to provide support to whatever you want to abstract from the hardware.
This is good for Linux in the long run; lots of devices with Linux installed (driver support etc)
Ok, a bit more digging later…
The 2D API is called SGL (Skia Graphics Library), originally developed by a company called Skia. Apparently Google bought them out and opened the source a couple of months ago (1). The code is Apache licensed so you can do whatever you want with it. SGL is used for the Chrome browser.(2) There doesn’t seem to be a great deal of documentation, or maybe I’m just not looking in the right places. The Webkit SGL backend is open and perhaps a good place to look for examples of code use.(3) There is a standalone version of Skia (4) which includes the “hello world” from (5). We can also draw stuff onto the screen with OpenGl ES 1.0, which appears to be open source (6) The OpenGL is well documented, so that’s not a problem. Underneath the GUI is a non-standard libc (called Bionic), but it’s pretty easy to use an ARM cross-compiler to get your own stuff running.(7)
(8) has a good amount of info on building the cross-compiler, compiling your code, linking to native libraries etc.
The Android Emulator includes a bash shell that gives full root access, and allows native executable code and libraries to be uploaded and run. It doesn’t seem like the Android development environment itself makes any efforts to hide the Linux underneath. The Android JVM (Dalvik) supports linking to native code with JNI System.loadLibrary. (9)
So to sum up, yes a particular phone may have to be jail-broken, or not, but that’s only a matter of time. On the graphics side, Skia and OpenGL are both open and free to use. OpenGL is well documented, Skia not so well. On the libraries and system side, ARM GCC will already compile everything from glibc to python and uploading/linking/running native code is supported by the Android Emulator and JNI is supported by Dalvik.
ps. Sorry for the long post, I found this page via Google and figured others would too. I hope the information is helpful to someone.
Hmm. This comment system won’t let me post the links. Suffice to say, check out src.chromium.org android-internals.org and google for the rest 🙂
i can’t wait for G1 come into my country. hopefully it doesn’t take so much money 😀
after look at android application in google site, i am getting more interested to buy android phone
Thanks to everyone for their analysis, we’ve made a couple of updates… our original reporting appears to not be in dispute (by most anyways), but we have clarified a few things about how Google uses Linux inside of Android (for their own apps).
[…] Перевод оригинальной Ñтатьи phonenews. […]
Whilst the very first response is technically correct, and I understand your reaction – in that using the command line or editing obscure files is not “granny friendly”, it’s also not required. We have a GUI for this and have had for quite some time now (at least 4 years by my counting).
If I was talking my granny through installing those google apps – well – I wouldn’t, I’d remote desktop in and do it for her, but hey. If I _did_ decide to talk her through it, I’d probably say “Click ‘System’, then ‘Administration’, then ‘Software Sources’, enter your password, then click ‘Third party software’, then ‘Add’, then tell her to copy and paste the line from the email I would already have sent her – or maybe read it out’ – my granny is quite bright at 92 years old.
I’m pretty sure that wouldn’t take long and isn’t too painful either. If I wasn’t in a hurry I’d probably make a screencast to show her how to do it, or like I said, remote control using some funky graphical software like gitso.
Whilst you might like to perpetuate the myth that _all_ of linux is obscure files and quirky commands with bizarre names, _sometimes_ that isn’t the case 🙂
Alan, it’s funny you should bring that up.
I tried the GUI method on Ubuntu 8.10… and it didn’t work. I had to do the text edit method.
I can understand your reservations about walking anyone through the process verbally… my point was, that Linux still doesn’t take a point-and-click approach to third-party software. It still has a fragmented world view about how to handle that.
I think that’s something the community needs to tackle, if Linux is supposed to go mainstream.
“I tried the GUI method on Ubuntu 8.10… and it didn’t work. I had to do the text edit method.”
Tsk tsk, using the development version of Ubuntu before it’s released 🙂
Well, if Ubuntu could get the Wi-Fi would work on my… *shot*
Touché
“Google prohibits developers from running Linux applications on the G1” – the Android emulator includes specific functionality to upload and run non-Java applications, and gives you a full root shell for general hacking around. If Google didn’t want this functionality to be available, they wouldn’t have included it. Individual phones may not allow the upload of non-Java applications, but that’s not Google’s fault…
Even if Google were working against running non-Java applications on Android phones, they would fail. Android is open source, so anyone can take the code and compile it for a platform that allows you to run your own applications. You could even run Dalvik on your PC if you feel like it – the Cairo backend for Skia means that any Skia application could run on a standard Linux desktop. As far as phones go, you certainly don’t need a G1 – the Neo Freerunner already runs full Linux applications, and Android is being ported to it (see http://wiki.openmoko.org/wiki/Android ) – current estimates are that porting will be done in November. As you can see from the status (see http://spreadsheets.google.com/pub?key=pzDEXnU19gkeTjpD28t-7fw ) most of the patching is already done.
“my point was, that Linux still doesn’t take a point-and-click approach to third-party software. It still has a fragmented world view about how to handle that.” – most distributions do package up massive amounts of third party software, many thousands of applications in fact. How many applications do Apple or Microsoft package and provide through a unified installation system? Only the iPhone approaches what the Linux distributions already have, and Android has its own equivalent application repository – the only difference is that the Android store only includes Java applications approved by Google, whereas the iPhone store only includes Objective-C applications approved by Apple.
“Koolu.com has announced that they will be selling the OpenMoko Freerunner with Android pre-installed beginning in November 2008, as well as offering free downloads of the Freerunner port of Android to existing Freerunner owners.” – http://www.koolu.com/
There you go, a standard commercially available phone that runs all Linux applications, including Android ones… 🙂
It turns out the G1 supports native code upload and execution without any hacks: http://androidcommunity.com/forums/f2/busybox-on-the-g1-4358/
The G1 actually ships with a running debug daemon. Awesome.
Most people may know by now, but root access has been obtained. With this, all myths are now true. Please upate your post? If you need proof just google “android root”.
And Google’s RC30 update will block that. It’s already on its way to devices.
[…] Five Common Myths About Linux and Android (Updated) Five Common Myths About Linux and Android (Updated) […]
@doug:
“It has always been said to be based on GNU/Linux and to be an open source project.”
That isn’t actually true. Android is based on Linux, but not GNU/Linux. There is no FSF/GNU code in Android.
КÑтати подобное придумали ориентировочно лет 10 назад .:
Then why do certain websites identify Android as Linux?
[…] two major platforms, Android devices are non-options because the “Bionic-is-not-libc” issue means normal Linux software won’t work on them (except via chrooting, but that is a seriously […]
[…] 38. Five Common Myths About Linux and Android (Updated) https://phone.news/five-common…-android-5105/ 39. Student Gets Jail for Crashing University Servers […]
Just stumbled on this and must say that looking back you have to admit you totally missed the mark in some of your points there. While the headings may be true, the reasoning behind each point makes this look more like an opinion piece. Sure Google don’t want to promote Android as a Linux capable platform for several reasons. But they haven’t actively blocked the community from going ahead and doing so (it’s just smartphone manufacturers and telcos pushing for this, and they are not Android). For someone who isn’t Google you seem to speak with great authority on their behalf. Almost every Google product has an easily downloadable installer for my Ubuntu workstation. My Android phone is running a suite of GNU software ported to the platform by dedicated community of Android hackers who are a hell of a lot more organised and professional than that of the iPhone hacking community (rooted iPhoned are far more susceptible to worms as far as I can tell). Sure, I had to root the phone and my grandma isn’t going to do that, but that’s fine, that’s not the point. I wanted a platform I could mess with and this was the only choice.