[ale] difference between android and linux ?

Michael B. Trausch mike at trausch.us
Fri Aug 12 17:59:36 EDT 2011


On 08/12/2011 05:15 PM, Ron Frazier wrote:
> Thanks for the info.  OK, the essence of what you're saying is, Android 
> is a variant of Linux and Ubuntu (and other similar) are variants of 
> Linux, but as a practical matter, they're not software compatible.

Your confusion is understandable.  Our community often refers to whole
systems as "Linux".  A lot of people in our community for years said
that was a dandy term because it was unambiguous.  Some have argued for
years that it is ambiguous because of the lack of understanding it
yields, and today, when the Linux kernel is used in more places than
most other operating system kernels, this ambiguity is coming to light.

Neither Android nor Ubuntu are "Linux variants".  They are both systems
which are built on top of the Linux kernel.  Furthermore, there are
other, non-Android/Linux, non-GNU/Linux systems out there, albeit of
quite limited popularity.

What I have told people for years---and will continue to tell
people!---is that a kernel alone does not an operating system make.
Application software is designed to run on one or more "operating
systems", and from the point of view of an application program, the
operating system is a standard interface that the program can use to do
its work.  Unfortunately, the very nature of that definition is that
there are a lot of grey areas.

Unfortunately, I can think of no single operating system that I can cite
as a means to clarify that grey area.  Much like the US federal court's
opinion of obscenity, "I know what [an operating system is] when I see it."

To try to help (and with the realization that this may cause even more
confusion): Gentoo, Slackware, Debian, Red Hat Enterprise Linux,
Ubuntu---they are all the names of operating system distributions.  They
all do things differently.  They all, however, serve much the same
purpose, to drive our hardware and provide a platform for applications
to run on top of.  Much the same can be said for Microsoft Windows 7,
albeit for a much more limited selection of hardware and in some cases
more applications (since it is a popular target for proprietary
software, whereas most Linux systems are not, and nearly all free
software that runs on Linux-based systems is capable of running on
Windows in some way or another).

Back in the days of Windows 9x, there was a lot of questions as to
whether Windows 9x constituted an operating system or not.  I tell
people that they _were_ operating systems.  They essentially used MS-DOS
as a bootstrap, and attempted to provide a large degree of backwards
compatibility that ultimately proved to be detrimental to the Windows 9x
ecosystem.  The NT-based versions of Windows were (are) the answer to
that problem, where DOS is no longer something that actually is executed
on the system, but is instead fully emulated in a virtual machine (on
32-bit versions of Windows; no longer is that the case on 64-bit
versions of Windows, though 64-bit versions of Linux can still run DOS
programs :-)).

In any event, an operating system is much more than the kernel; core
libraries and system interfaces that are provided "on top of" the kernel
can be considered to be part of the operating system.  From the point of
view of applications (as well as users), an operating system provides a
minimum set of libraries and application programs (/bin/sh, /bin/ls,
etc.) with it.

> So, 
> if I get an Android tablet, I would get apps from the Android 
> marketplace (if supported) and independent Android websites.  If I get a 
> Linux tablet, I would apps from it's repositories or independent Linux 
> websites.  The software from the one would not work on the other type of 
> platform unless the software specifically mentioned that it works on 
> Android or Linux respectively.

It is possible to install Debian "on top of" Android, as well as other
operating systems, such as Ubuntu.  However, doing this is an incredible
task and requires a significant amount of understanding as to what it is
that you're doing, and precisely why it works.  You must also be sure
that you have a Linux kernel that is configured to sufficiently satisfy
the requirements of both systems; for example, newer distributions that
are now using systemd as an init dæmon are no longer able to work with
kernel versions later than 2.6.39 (e.g., the very last 2.6 kernel),
which you won't find as the basis of Android systems yet.

> That brings up a couple of more questions.  Hypothetically, say I get an 
> ARM9 Android tablet with 512 MB RAM and a 500 MHz processor.  Is it 
> possible to reflash it to run either Android (as designed) or a variant 
> of GNU/Linux, and to switch back and forth between the two, so I can do 
> development and testing either way.  Also, I'm seeing designations of 
> several types of ARM processors, such as ARM v5, ARM 9, ARM v9, etc.  Do 
> these variations substantially affect the capabilities of the system and 
> is it something I need to be worried about.

System requirements can be deceiving.  Nobody in their right mind would
run a full Ubuntu stack on hardware that was originally designed to run
Android, because it would be intolerably slow; Android as a platform
defines a set of constraints that enable it to fit in a
resource-constrained (rather, what we today call resource-constrained)
systems.  Of course, back in the day of the 8088, our modern Android
gadgets would be considered to possess an almost god-like power, but
that's neither here nor there.  :-)

That said, Android *has* been ported to run on x86/x86-64 hardware.  You
can run Android on a PC just fine.  You can even dual boot a GNU/Linux
system and Android if you so desire.  Given enough motivation, you can
do just about anything that your heart desires.  You could even use
Dalvik on top of Ubuntu if you really wanted to, though I cannot imagine
a reason that anyone would.

I would suggest that you do a lot of reading on what comprises a
barebones functional GNU/Linux stack (ignore extras such as X!) and what
comprises a barebones functional Android stack (which includes a fair
bit more than a barebones functional GNU/Linux stack, in terms of
functionality and defined programming interfaces).  Look at the
platforms that they run on; the bootloader, the kernel, what starts up
as PID 1, the libraries that are considered to be part of the base
system, and so forth.  This will significantly increase your
understanding of what the systems really are, and how they can be made
to interoperate without a hypervisor (if truly desired).

And yes, it would be possible (in theory) to "port" Android to run in a
window on an X11 display.  That doesn't really make it "not an operating
system", for various reasons.  One operating system can be made to run
on top of another operating system, after all---especially when
everything involved is either free software or open source, truly
_anything_ is possible!

	--- Mike


More information about the Ale mailing list