Android is like linux

Android – это Linux. Или нет?

Константин Иванов

Android – это Linux? Казалось бы, это тот вопрос, на который должен существовать прямой ответ – да или нет. Но вместо этого сообщества пользователей Android и Linux годами обсуждают, как обстоят дела на самом деле, и не могут прийти к согласию.

Есть два фактора, которые делают особенно сложным поиск четкого ответа на вопрос, являются ли Android и Linux одним и тем же.

  1. Люди часто используют слово Linux для обозначения определенного числа связанных между собой, но однозначно разных вещей.
  2. Нет четкого, однозначного и повсеместно принятого определения, что позволяет считать то или иное ПО Linux.

Задача этого материала – прояснить, почему возникает путаница вокруг различных типов ПО, которое люди могут иметь в виду, используя слово Linux, а затем обговорить все аргументы, которые неизбежно приводятся в любом споре на тему «Android – это Linux или нет».

Так что же такое Linux?

Когда кто-то говорит «Linux», это может относиться к следующим вещам:

  • Ядро Linux. Это малая, но ключевая часть операционной системы. Ядро выполняет функцию взаимодействия с аппаратной частью устройства, обеспечивая сервисами остальную часть системы и формулируя задачи, такие как управление процессором или памятью устройства. Ядро Linux, как и любое другое ядро, может работать исключительно в качестве части операционной системы в более широком смысле. Существование ОС, которая состоит исключительно из ядра Linux, попросту невозможно. Поскольку Android – полноценная операционная система, мы совершенно спокойно можем исключить определение Android как ядра Linux.
  • Дистрибутив Linux. Это операционная система, которая содержит ядро Linux и дополнительное ПО, такое как утилиты, библиотеки, графический интерфейс, а также предустановленные приложения, такие как веб-браузеры, текстовые редакторы, музыкальные проигрыватели и др. Это дополнительное ПО было разработано специально для того, чтобы работать на ядре Linux, но оно не является частью самого ядра Linux. Если в разговоре речь заходит об операционных системах, которые используют ядро Linux, термины «дистрибутив» и «операционная система» взаимозаменяемы. Поскольку кто угодно может взять ядро Linux и свое собственное ПО и создать свою операционную систему, в настоящее время существует бесчисленное количество доступных дистрибутивов Linux.
  • GNU/Linux. Большая часть дистрибутивов Linux – это комбинация ядра Linux и программного обеспечения GNU, что заставляет некоторых людей утверждать, что дистрибутивы Linux – то же самое, что GNU/Linux. Это предмет для отдельной дискуссии, поэтому для того, чтобы несколько упростить объяснения, далее на протяжении материала будет использоваться термин «дистрибутив Linux» — просто отметим, что между ядром Linux и программным обеспечением GNU существует прочная связь.

В свою очередь, вокруг термина Android нет такой путаницы. Есть, тем не менее, два вида ОС Android.

Первый – это Android Open Source Project (AOSP), проект, в рамках которого Google предоставляет доступ к исходному коду Android. Этот код можно использовать для того, чтобы создать рабочую операционную систему, которую можно установить на смартфон или планшет, но в итоге ей будет не хватать функциональности, которую большая часть пользователей ожидают получить от своего опыта взаимодействия с Android, наиболее характерный пример – это мобильные сервисы Google. Это набор приложений и API от Google, которые для большого числа пользователей являются основной частью опыта работы с Android, аналогично тому, как iTunes и App Store являются основной частью опыта на macOS. AOSP имеет открытый исходный код, но не обеспечивает тех возможностей, которых ожидает типичный конечный пользователь устройства, работающего на ОС Android.

Второй вариант – это ОС Android, на которой работает ваше типичное устройство, будь то смартфон или планшет, по сути, она основана на AOSP, возможно, имеет ряд модификаций, привнесенных производителем устройства, а также в нее добавлено значительное количество проприетарного кода.

Большая часть аргументов за и против того, чтобы расценивать Android как Linux, относится к обоим вариантам Android, но есть ряд пунктов, в которых ответ будет различаться. И это будет зависеть от того, определяем ли мы Android как AOSP или как операционную систему, на которой работает ваш обычный смартфон или планшет.

Почему Android – Linux?

Существует всего лишь один реальный аргумент в пользу того, чтобы расценивать Android как Linux, но это серьезный аргумент. Каждый смартфон или планшет на Android содержит ядро Linux. Вы даже можете увидеть, какая версия ядра установлена на вашем устройстве. Для этого надо зайти в Настройки – Об устройстве – Версия ядра.

Тем не менее, Android – это не только ядро Linux. Это полнофункциональная операционная система, в которой имеются множество дополнительных библиотек, графический интерфейс, приложения и многое другое. Поэтому когда мы задаем вопрос «Android – это Linux?», мы на самом деле спрашиваем «Является ли Android дистрибутивом Linux?»

Поскольку даже оценить реальное количество дистрибутивов Linux не представляется возможным, тем более сложно написать список правил, позволяющих определить, что делает операционную систему дистрибутивом Linux.

Помимо обязательного условия наличия ядра Linux, определение дистрибутива Linux допускает достаточно свободную интерпретацию. Поэтому оставшаяся часть материала будет посвящена аргументам, которые люди чаще всего приводят против того, чтобы расценивать Android как дистрибутив Linux.

Почему Android – не Linux?

Он не использует стандартное ядро Linux

Для того, чтобы создать операционную систему, которая отвечает уникальным потребностям мобильных устройств, команда разработчиков Android внесла в ядро Linux рад изменений, включая добавление специализированных библиотек, API и инструментов, которые по большей частью взяты из BSD или написаны с нуля специально для Android.

Поскольку основной аргумент в пользу того, чтобы расценивать Android как дистрибутив Linux, базируется на том факте, что Android использует ядро Linux, может показаться, что тут и всяким спорам конец, все и так вполне очевидно. Однако для дистрибутива Linux не является обычным делом внесение изменений в ядро.

Читайте также:  Windows screen display size

Ядро Linux подпадает под действие Универсальной общественной лицензии GNU, каждый волен как хочет изменять его исходный код, что и делается во многих дистрибутивах Linux. Если говорить о том, насколько значительным изменениям подвергла команда разработчиков Android ядро Linux, в Embedded Linux wiki приходят к заключению, что количество изменений, внесенных командой Android, «не особенно велико и не выходит за рамки того, что обычно делают с ядром Linux разработчики ОС на его базе».

Android не включает в себя ПО GNU и библиотеки

Если вы согласны с тем, что наличие ПО GNU является определяющей характеристикой для дистрибутива Linux вплоть до того, что мы должны расценивать дистрибутивы Linux как GNU/Linux, тогда Android ни в коем случае не может быть дистрибутивом Linux. Android включает в себя лишь некоторые системные библиотеки GNU. Из самого заметного – команда разработчиков Android разработала кастомизированную C-библиотеку под названием Bionic вместо того, чтобы использовать C-библиотеку GNU.

И даже если вы не согласны с тем, что дистрибутив Linux должен включать в себя ПО GNU, трудно отрицать, что отсутствие GNU делает Android очень отличным от большей части представителей сообщества дистрибутивов Linux.

Вы не можете запускать приложения Linux на Android – и наоборот

Если вы возьмете несколько выбранных случайным образом дистрибутивов Linux, есть шанс, что единственным общим программным компонентом у них у всех будет ядро Linux. В реальности у Android так мало общего ПО с другими дистрибутивами Linux, что запускать обычные приложения Linux на Android невозможно.

Верно и обратное утверждение. Приложения для Android требуют специальных библиотек Android, среды выполнения и ряда других программ, которые есть только в ОС Android, так что по умолчанию вы не можете запускать приложения для Android на какой-то другой платформе, кроме Android.

Android – это продукт Google

Google может сделать основной исходный код Android общедоступным через AOSP, но следующий релиз AOSP готовить в закрытую. На самом деле, на сайте AOSP ясно утверждается, что «Google оставляет за собой ответственность за стратегическое направление развития Android как платформы и как продукта».

Вдобавок к этому, не задействованные в Google разработчики могут участвовать в AOSP на различных ролях, но сайт AOSP совершенно четко говорит, что руководят проектом обычно сотрудники Google. И еще один маленький факт: Google принадлежат права на имя и логотип Android, так что если вы создаете операционную систему, основанную на коде AOSP, вам потребуется связаться с Google, если вы хотите выпустить свою работу под именем Android.

Несмотря на то, что некоторые дистрибутивы Linux тесно связаны с конкретными компаниями (на ум тут же приходят Canonical и Ubuntu), для дистрибутивов Linux нехарактерно разрабатываться в закрытую и полностью одной организацией.

«Открытый» статус Android под вопросом

Несмотря на рекомендацию Фонда свободного программного обеспечения, предписывающую разработчикам убрать все проприетарное программное обеспечение из их дистрибутивов Linux, нет строгого правила, которое бы запрещало дистрибутивам Linux содержать проприетарное ПО. В реальности многие дистрибутивы включают в себя скомпилированные бинарные драйверы, известные также как блобы. Поэтому на самом деле вопрос стоит так: насколько открыт Android в сравнении с вашим типичным дистрибутивом Linux?

Несмотря на то, что многие энтузиасты ПО с открытым кодом единодушны в том, что AOSP далек от идеального open source проекта, его код бесплатно доступен для изменения и распространения другими людьми.

Тем не менее, к моменту, когда AOSP доходит до пользователя Android, к нему добавляется большое количество проприетарного кода, и, в сущности, нет большой разницы между тем, что вы расцениваете как «чистый Android» на устройствах вроде Nexus или Pixel, и тем, что претерпело модификации, сделанные производителем.

Это не обязательно означает, что Android невозможно расценивать как дистрибутив Linux, но нельзя не отметить, что большая часть кода, который пользователи могут видеть и с которым могут взаимодействовать, является проприетарной, таковы мобильные сервисы Google и модификации производителя, как, например, TouchWiz от Samsung.

Несмотря на то, что многие дистрибутивы Linux включают в себя проприетарный код, для многих людей термин Linux четко ассоциируется с программным обеспечением с открытым кодом. И этот проприетарный пользовательский код вызывает ощущение, что Android гораздо более закрыт, чем типичный дистрибутив Linux.

Вы не можете кастомизировать ОС Android – по умолчанию

Если дистрибутив Linux как правило достаточно просто модифицировать на уровне операционной системы, пользователи Android по умолчанию не могут получить доступ к базовой ОС на своем смартфоне или планшете. Чувствительные разделы надежно защищены от их вмешательства. Но эта оговорка «по умолчанию» имеет значение, поскольку вы можете получить доступ к разделам, обычно закрытым на вашем устройстве, используя дыры в безопасности Android – это процесс получения рут-прав.

Итак, несмотря на то, что Android значительно меньше подвержен кастомизации, чем типичный дистрибутив Linux, существуют возможности получить доступ к базовой операционной системе.

Заключение

Итак, возвращаемся к исходному вопросу: является ли Android дистрибутивом Linux? В целом, все сводится к тому, что вы подразумеваете под дистрибутивом Linux. Если вы согласны с тем, что мы должны относить к дистрибутивам Linux GNU/Linux, а не Linux, тогда ответ отрицательный, поскольку Android включает в себя очень малую часть ПО GNU.

Если вы определяете дистрибутив Linux как операционную систему, которая включает в себя ядро Linux и соответствует одному или более дополнительным условиям, тогда ответ вероятнее всего также будет отрицательным. Несмотря на то, что каждый Android-смартфон или планшет включает в себя ядро Linux, Android полностью не соответствует ни одной другой характеристике из тех, что обычно ассоциируются с дистрибутивами Linux. К примеру, Android совершенно очевидно является продуктом одной компании, он несовместим с обычными приложениями для Linux, и даже несмотря на то, что AOSP имеет открытый исходный код, та версия Android, с которой мы имеем дело на коммерческих устройствах, кажется гораздо более закрытой, чем можно было бы ожидать от дистрибутива Linux, благодаря проприетарному пользовательскому коду.

Однако если вы определяете дистрибутив Linux как операционную систему, которая основана на ядре Linux, тогда Android является дистрибутивом Linux. Возможно, это необычный, высокоспециализированный дистрибутив, но это такой же дистрибутив, как Ubuntu, Fedora, Debian и любая другая операционная система, основанная на ядре Linux.

Читайте также:  Mac os font smoothing

А каково ваше мнение? Является ли Android дистрибутивом Linux просто по причине наличия в нем ядра Linux? Или операционная система должна соответствовать ряду дополнительных критериев, чтобы можно было считать ее дистрибутивом Linux?

Источник

Is Android really just Linux? (Video)

Is Android Linux? is one of those frustrating questions that seems like it should have a straightforward ‘yes’ or ‘no’ answer, but these are three words that the Android and Linux communities have been debating for years.

There are two factors that have made it particularly difficult to reach a definitive answer in this long-running debate:

  1. People regularly use the word “Linux” to refer to a number of related, but distinctly different things.
  2. There’s no universally accepted definition about what makes a piece of software Linux.

In this article, I’m going to clear up the confusion surrounding the different kinds of software someone may have in mind when they use the term ‘Linux,’ before working through all the arguments that inevitably creep in, in every “is Android Linux” debate.

What is Linux?

When someone says the word “Linux,” they may be referring to:

  • The Linux kernel. This is a small, but essential part of an operating system. The kernel is responsible for interfacing with a device’s hardware, providing services to the rest of the system, and performing tasks such as managing the device’s CPU and memory. The Linux kernel, like any kernel, can only function as part of a wider operating system. It’s impossible to have an operating system that consists solely of a Linux kernel. Since Android is a complete operating system, we can immediately rule out classifying Android as a Linux kernel.
  • A Linux distribution, or distro. This is an operating system that contains the Linux kernel and additional software such as utilities, libraries and a GUI, plus pre-installed applications such as web browsers, text editors, and music players. Even if this additional software was designed specifically to run on the Linux kernel, it’s not part of the Linux kernel. When discussing operating systems that use the Linux kernel, the terms ‘distribution,’ ‘distro’ and ‘operating system’ are interchangeable. Since anyone can take the Linux kernel, add their own software, and create a complete operating system, there are countless Linux distros currently available.
  • GNU/Linux. The majority of Linux distributions are a combination of the Linux kernel plus GNU software, which has led some people to argue that we should all be referring to Linux distros as GNU/Linux. This is a whole other debate, so to help keep things simple I’ll be using the terms ‘Linux distribution’ and ‘distro’ throughout this article – just note that there’s a strong link between the Linux kernel and GNU software.

While there’s nowhere near as much confusion surrounding the term “Android,” there are still two distinct strains of the Android operating system.

The first is the Android Open Source Project (AOSP), which is the project where Google release the Android source code. While it is possible to use this source code to build a functioning operating system that you can install on a smartphone or tablet, the end result would be lacking functionality that most users expect from their Android experience, most notably Google Mobile Services (GMS). GMS is the collection of Google apps and APIs that, for many users, are a fundamental part of the Android experience, in the same way that iTunes and the App Store are a fundamental part of the macOS experience. AOSP is open source, but the experience that your typical end-user expects from Android, isn’t provided by AOSP.

The Android operating system that ships on your typical Android smartphone or tablet is essentially an AOSP base, potentially with some manufacturer modifications, and with the addition of a significant amount of proprietary code.

Most of the arguments for and against classifying Android as Linux apply to both interpretations of Android, but there are a few instances where the answer differs, depending on whether you define Android as AOSP, or as the operating system that ships on your typical Android smartphone or tablet.

Why Android is Linux

There’s really only one argument in favor of classifying Android as Linux, but it’s a strong one: every Android smartphone or tablet contains a Linux kernel. You can even see what version of the kernel is installed on your device, by opening its ‘Settings’ app and navigating to ‘About Device > Software info.’

However, Android isn’t just the Linux kernel; it’s a fully-functioning operating system that features lots of additional libraries, a GUI, apps and much more, so when we ask “is Android Linux,” we’re actually asking “is Android a Linux distro?”

Since it’s impossible to even estimate how many Linux distros are out there, it’s very difficult to put together a list of rules about what makes an operating system a Linux distro.

Beyond the presence of the Linux kernel, the definition of a Linux distro is pretty open to interpretation, so in the rest of this article I’ll be discussing the arguments people most commonly put forward, when arguing against classifying Android as a Linux distribution.

Why Android isn’t Linux

It doesn’t use the standard Linux kernel

In order to create an operating system that meets the unique needs of mobile devices, the Android team made a number of changes to the Linux kernel, including the addition of specialized libraries, APIs and tools that are mostly BSD-derived or written from scratch, specifically for Android.

Since the entire argument in favor of classifying Android as a Linux distro hinges on the fact that Android uses the Linux kernel, this point might seem like it’s the end of the argument, but it’s not that unusual for a Linux distro to make changes to the kernel.

The Linux kernel is released under the GNU General Public License, so anyone is free to modify its source code, which many Linux distros have done. When it comes to the question of just how drastically the Android team modified the Linux kernel, the Embedded Linux wiki concludes that the amount of changes implemented by the Android team “is not extremely large, and is on the order of changes that are customarily made to the Linux kernel by embedded developers.”

Читайте также:  Колесо жизненного баланса приложение windows

It doesn’t include the GNU software and libraries

If you agree that GNU software is a defining characteristic of a Linux distro, to the point where we should all be referring to Linux distros as GNU/Linux, then there’s no way that Android can be a Linux distro. Android includes very little GNU software, most notably, the Android team developed a customized C library called Bionic, rather than use the GNU C Library.

Even if you disagree that a Linux distro has to include GNU software, then there’s still no denying that the absence of GNU makes Android very different from the majority of the Linux distro community.

You cannot run Linux apps on Android – and vice versa

If you picked several different Linux distros at random, then chances are that the Linux kernel would be the only software component they have in common. In fact, Android has such little software in common with other Linux distros, that it’s impossible to run regular Linux apps on Android.

The reverse is also true: Android apps require Android-specific libraries, a runtime, plus a range of other software that’s found only in the Android OS, so by default you cannot run Android apps on any platform other than Android.

Android is a Google product

Google may make the base Android source code publicly available via AOSP, but Google develops the next release of AOSP in private. In fact, the AOSP website clearly states that “Google retains responsibility for the strategic direction of Android as a platform and a product.”

In addition, although non-Google employees can contribute to AOSP in various capacities, the AOSP website makes it very clear that project leads are usually Google employees. There’s also the small matter of Google owning the rights to the Android name and logo, so even if you do build an operating system based on AOSP code, you’ll still need to liaise with Google if you want to release your work under the Android name.

While some Linux distributions do have strong links to a particular company (Canonical and Ubuntu immediately spring to mind) it’s unusual for a Linux distro to be developed in private, entirely by a single organization.

Android’s ‘open source’ status is up for debate

Despite the Free Software Foundation’s recommendation that developers remove all proprietary software from their Linux distributions, there’s no strict rule that states Linux distributions cannot include proprietary software. In reality many distros include vendor-compiled binary drivers, also known as binary blobs, so really the question is: how open is Android, compared to your ‘typical’ Linux distro?

While many open source enthusiasts would agree that AOSP is far from an ideal open source project, its code is freely available for other people to modify and distribute.

However, by the time the AOSP base reaches the Android user, a lot of proprietary code has been added, and this is true regardless of whether you opt for a “pure Android” device such as a Nexus or Pixel, or a device that features manufacturer modifications.

While this doesn’t necessarily disqualify Android from being labelled as a Linux distribution, it’s worth noting that much of the code that users can see and interact with is proprietary, such as Google Mobile Services and manufacturer-specific modifications like Samsung’s TouchWiz skin.

Although many Linux distros do include proprietary code, for many people the term ‘Linux’ has a strong association with open source software, and all of that user-facing proprietary code does tend to make Android feel much more closed than your typical Linux distro.

You cannot customize the Android OS – by default

While it’s typically pretty easy to modify a Linux distribution at the operating system level, by default Android owners cannot access the underlying operating system on their smartphone or tablet, and sensitive partitions are locked down tight. However, the by default is important, as you can gain access to areas of your device that are normally closed off, by exploiting security flaws in the Android system, in a process known as rooting.

So, while Android is considerably less customizable than your typical Linux distribution, there are ways to gain access to the underlying operating system.

Wrapping up

So, circling back to our original question: Is Android a Linux distribution? Ultimately (and frustratingly) it all hinges on how you define a Linux distro. If you agree that we should all be referring to Linux distros as GNU/Linux instead of Linux, then the answer is no, as Android includes very little GNU software.

If you define ‘Linux distro’ as an operating system that includes the Linux kernel and fulfills one or more additional criteria, then again, the answer is very likely to be no. Although every Android smartphone and tablet does include a Linux kernel, Android doesn’t completely fulfill any of the other characteristics commonly associated with Linux distros. For example, Android is very clearly the product of one company, it’s incompatible with regular Linux apps, and even though AOSP is open source, the version of Android you encounter on commercial devices feels considerably more closed than you’d expect from a Linux distro, thanks to the inclusion of user-facing proprietary code.

However, if your definition of a Linux distro is an operating system that’s based on the Linux kernel, then Android is a Linux distro. It may be an unusual, highly-specialized distro, but it’s every bit as much a distro as Ubuntu, Fedora, Debian, and any other operating system that’s based on the Linux kernel.

So what’s your take on this? Is Android a Linux distro because it includes the Linux kernel? Or does an operating system need to meet some additional criteria, in order to qualify as a Linux distro? Let us know in the comments!

Источник

Оцените статью