Android is Based on Linux, But What Does That Mean?
2014-06-18 17:50
561 查看
轉載自:http://www.howtogeek.com/189036/android-is-based-on-linux-but-what-does-that-mean/
Android may be based on Linux, but it’s not based on the type of Linux system you may have used on your PC. You can’t run Android apps on typical Linux distributions and you can’t run the Linux programs you’re familiar with on Android.
Linux makes up the core part of Android, but Google hasn’t added all the typical software and libraries you’d find on a Linux distribution like Ubuntu. This makes all the difference.
The big difference here comes down to what we mean by Linux. People use the term “Linux” to mean many different things. At its most basic, Linux means the
Linux kernel. A kernel is the core part of any operating system.
We also refer to Linux distributions as simply “Linux.” However, Linux distributions aren’t just the
Linux kernel. They contain many other pieces of software, such as the GNU shell utilities, Xorg graphical server, GNOME desktop, Firefox web browser, and so on. That’s why some people think the term GNU/Linux should be used for “Linux distributions” like
Ubuntu, Mint, Debian, Fedora, Arch, openSUSE, and others.
Android uses the Linux kernel under the hood. Because Linux is open-source, Google’s Android developers
could modify the Linux kernel to fit their needs. Linux gives the Android developers a pre-built, already maintained operating system kernel to start with so they don’t have to write their own kernel. This is the way many different devices are built — for
example, the PlayStation 4 uses the open-source FreeBSD kernel, while the Xbox One uses the Windows NT kernel found in modern versions of
Windows.
You’ll even see the Linux kernel version running on your device under About phone or About tablet in Android’s Settings.
There’s some debate over whether Android qualifies as a “Linux distribution.” It uses the Linux kernel and
other software, but it doesn’t include much of the software Linux distributions normally include.
When you boot an Android device, the Linux kernel loads just like it would on a Linux distribution. However, much of the other software is different. Android doesn’t include the GNU C Library (glibc) used on standard Linux distributions, nor does it include
all of the GNU libraries you’d find on a typical Linux distribution. It also doesn’t include an X server like Xorg, so you can’t run standard graphical Linux applications.
Rather than running typical Linux applications, Android uses the Dalvik virtual machine to essentially run applications written in Java. These applications are targeted at Android devices and the application programming interfaces (APIs) Android provides rather
than being targeted at Linux in general.
Because Android doesn’t include a graphical X server or all the standard GNU libraries, you can’t simply run Linux applications on Android. You have to run applications written specifically for Android.
Android does have a shell like the one you’ll find on Linux. There’s no way to access it out-of-the-box, but you can install an app like Android
Terminal Emulator to gain access to this terminal environment.
By default, there’s not much you can do here. The terminal will still run in a restricted environment, so you can’t gain a full root shell without rooting your Android device. Many standard commands you might need aren’t available — that’s why people who root
their device generally install the BusyBox application, which installs many command-line utilities. These utilities are used by applications to do things with their root access.
Because Android doesn’t include a graphical X server or all the standard GNU libraries, you can’t simply run Linux applications on Android. You have to run applications written specifically for Android.
Android does have a shell like the one you’ll find on Linux. There’s no way to access it out-of-the-box, but you can install an app like Android
Terminal Emulator to gain access to this terminal environment.
By default, there’s not much you can do here. The terminal will still run in a restricted environment, so you can’t gain a full root shell without rooting your Android device. Many standard commands you might need aren’t available — that’s why people who root
their device generally install the BusyBox application, which installs many command-line utilities. These utilities are used by applications to do things with their root access.
Linux doesn’t include the Dalvik virtual machine, so it can’t run Android apps. The Dalvik virtual machine and all of Android’s other software can’t simply be dropped onto a desktop Linux machine — you’d have to do more work to make Android apps output to a
window on a standard desktop through Xorg, for example. Theoretically, with enough work, developers could make Dalvik run on desktop Linux so desktop Linux users could run Android apps on their desktops. The now-dormant Ubuntu for Android product attempted
to do something like this, integrating Ubuntu and Android on a phone and allowing those Android apps to run on Ubuntu’s desktop.
BlueStacks and other Android app emulators attempt to do this for Windows and Mac. They run Android on virtual
hardware in a virtual machine, allowing them to run Android apps — with a performance penalty — on your desktop. These solutions haven’t proven very popular, though.
Google’s Chrome OS is also based on Linux. Like Android, Chrome OS doesn’t provide a standard X window system, so standard Linux applications can’t run on Chrome OS. Unlike Android, Chrome OS is closer to standard desktop Linux distributions so you can use
developer mode to install the missing Linux desktop software.
Android may be based on Linux, but it’s not based on the type of Linux system you may have used on your PC. You can’t run Android apps on typical Linux distributions and you can’t run the Linux programs you’re familiar with on Android.
Linux makes up the core part of Android, but Google hasn’t added all the typical software and libraries you’d find on a Linux distribution like Ubuntu. This makes all the difference.
“Linux” vs. The Linux Kernel
The big difference here comes down to what we mean by Linux. People use the term “Linux” to mean many different things. At its most basic, Linux means theLinux kernel. A kernel is the core part of any operating system.
We also refer to Linux distributions as simply “Linux.” However, Linux distributions aren’t just the
Linux kernel. They contain many other pieces of software, such as the GNU shell utilities, Xorg graphical server, GNOME desktop, Firefox web browser, and so on. That’s why some people think the term GNU/Linux should be used for “Linux distributions” like
Ubuntu, Mint, Debian, Fedora, Arch, openSUSE, and others.
Android uses the Linux kernel under the hood. Because Linux is open-source, Google’s Android developers
could modify the Linux kernel to fit their needs. Linux gives the Android developers a pre-built, already maintained operating system kernel to start with so they don’t have to write their own kernel. This is the way many different devices are built — for
example, the PlayStation 4 uses the open-source FreeBSD kernel, while the Xbox One uses the Windows NT kernel found in modern versions of
Windows.
You’ll even see the Linux kernel version running on your device under About phone or About tablet in Android’s Settings.
The Differences
There’s some debate over whether Android qualifies as a “Linux distribution.” It uses the Linux kernel andother software, but it doesn’t include much of the software Linux distributions normally include.
When you boot an Android device, the Linux kernel loads just like it would on a Linux distribution. However, much of the other software is different. Android doesn’t include the GNU C Library (glibc) used on standard Linux distributions, nor does it include
all of the GNU libraries you’d find on a typical Linux distribution. It also doesn’t include an X server like Xorg, so you can’t run standard graphical Linux applications.
Rather than running typical Linux applications, Android uses the Dalvik virtual machine to essentially run applications written in Java. These applications are targeted at Android devices and the application programming interfaces (APIs) Android provides rather
than being targeted at Linux in general.
Because Android doesn’t include a graphical X server or all the standard GNU libraries, you can’t simply run Linux applications on Android. You have to run applications written specifically for Android.
Android does have a shell like the one you’ll find on Linux. There’s no way to access it out-of-the-box, but you can install an app like Android
Terminal Emulator to gain access to this terminal environment.
By default, there’s not much you can do here. The terminal will still run in a restricted environment, so you can’t gain a full root shell without rooting your Android device. Many standard commands you might need aren’t available — that’s why people who root
their device generally install the BusyBox application, which installs many command-line utilities. These utilities are used by applications to do things with their root access.
Why You Can’t Run Desktop Linux Software on Android
Because Android doesn’t include a graphical X server or all the standard GNU libraries, you can’t simply run Linux applications on Android. You have to run applications written specifically for Android.Android does have a shell like the one you’ll find on Linux. There’s no way to access it out-of-the-box, but you can install an app like Android
Terminal Emulator to gain access to this terminal environment.
By default, there’s not much you can do here. The terminal will still run in a restricted environment, so you can’t gain a full root shell without rooting your Android device. Many standard commands you might need aren’t available — that’s why people who root
their device generally install the BusyBox application, which installs many command-line utilities. These utilities are used by applications to do things with their root access.
Why You Can’t Run Android Software on Desktop Linux
Linux doesn’t include the Dalvik virtual machine, so it can’t run Android apps. The Dalvik virtual machine and all of Android’s other software can’t simply be dropped onto a desktop Linux machine — you’d have to do more work to make Android apps output to awindow on a standard desktop through Xorg, for example. Theoretically, with enough work, developers could make Dalvik run on desktop Linux so desktop Linux users could run Android apps on their desktops. The now-dormant Ubuntu for Android product attempted
to do something like this, integrating Ubuntu and Android on a phone and allowing those Android apps to run on Ubuntu’s desktop.
BlueStacks and other Android app emulators attempt to do this for Windows and Mac. They run Android on virtual
hardware in a virtual machine, allowing them to run Android apps — with a performance penalty — on your desktop. These solutions haven’t proven very popular, though.
Google’s Chrome OS is also based on Linux. Like Android, Chrome OS doesn’t provide a standard X window system, so standard Linux applications can’t run on Chrome OS. Unlike Android, Chrome OS is closer to standard desktop Linux distributions so you can use
developer mode to install the missing Linux desktop software.
相关文章推荐
- 1.1 Introduction中 Apache Kafka™ is a distributed streaming platform. What exactly does that mean?(官网剖析)(博主推荐)
- What Color is My Pixel? Image based color picker on iPhone
- Node.js: What is the best "full stack web framework" (with scaffolding, MVC, ORM, etc.) based on Node.js / server-side JavaScript? - Quora
- What is a good EPUB reader on Linux
- A ship is always safe at the shore - but that is not what it is built for.
- What is the Maximum Value for max_connections on Linux?
- Android unspecified' depends on one or more Android Libraries but is a jar 的解决方法
- What Does “Neurons that Fire Together Wire Together” Mean?
- #Redis Error #MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details a
- What is SynchronizationContext, and what does it mean to capture and use it?
- What is a good text editor on Linux?
- What does that mean: Work smart, not just hard?
- When we call objective c is runtime language what does it mean? 我们说的oc是动态运行时语言是什么意思?
- Android Eclipse Plugin “reset adb” gives “Adb connection Error:EOF” error, not blocking, but what is it?
- The usage of the Javascript method call and apply(what is the new and object.create difference.)(What does call(null) mean?)
- What is a good HEX editor on Linux?
- What is good video editing software on Linux?
- linux安装问题:what is the location of the gcc program on your machine
- What Does "Bitrate" Mean on a Video?
- What is a good EPUB reader on Linux