Android version and linux kernel version

На каком Android работает ядро ​​Linux?

Есть ли список версий ядра, которые есть в каждой версии Android AOSP?

Или скажем, какую версию / proc / version выложат.

Версия для Linux в AOSP

 Android Version |API Level |Linux Version in AOSP |Header Version ---------------------------------------------------------------------------------------- 1.5 Cupcake |3 |(2.6.27) | 1.6 Donut |4 |(2.6.29) |2.6.18 2.0/1 Eclair |5-7 |(2.6.29) |2.6.18 2.2.x Froyo |8 |(2.6.32) |2.6.18 2.3.x Gingerbread |9, 10 |(2.6.35) |2.6.18 3.x.x Honeycomb |11-13 |(2.6.36) |2.6.18 4.0.x Ice Cream San|14, 15 |(3.0.1) |2.6.18 4.1.x Jelly Bean |16 |(3.0.31) |2.6.18 4.2.x Jelly Bean |17 |(3.4.0) |2.6.18 4.3 Jelly Bean |18 |(3.4.39) |2.6.18 4.4 Kit Kat |19, 20 |(3.10) |2.6.18 5.x Lollipop |21, 22 |(3.16.1) |3.14.0 6.0 Marshmallow |23 |(3.18.10) |3.18.10 7.0 Nougat |24 | 3.18.48 4.4.0 |4.4.1 7.1 Nougat |25 | ? |4.4.1 8.0 Oreo |26 | 3.18.72 4.4.83 4.9.44 |4.10.0 8.1 Oreo |27 | 3.18.70 4.4.88 4.9.56 |4.10.0 9.0 Pie |28 | 4.4.146 4.9.118 4.14.61 |4.15.0 10.0 Q |29 | 4.9.191 4.14.142 4.19.71|5.0.3 
  • Википедия История версий Android (в скобках; не могу найти ее источник)
  • Android / ядро ​​/ общий / Makefile (Linux в AOSP)
  • android / платформа / external / kernel-headers / original / uapi / linux / version.h (заголовки Linux, используемые Bionic в AOSP)

Примечание: другие «дистрибутивы» Android могут работать с разными версиями ядра.

Любой желающий может исправить и расширить эту таблицу. Пожалуйста, продолжайте форматирование.

Почему ОС Android / версия ядра не совпадают

OEM-производители, как правило, поставляют свои основные обновления Android с ядром, аналогичным тому, с которым устройство было выпущено изначально. Это, скорее всего, позволит избежать проблем несовместимости оборудования и драйверов с более новым ядром. Например, устройство, которое было обновлено для работы с Android 8.0 Oreo, но первоначально поставлялось с 6.0 Marshmallow, все еще может работать под управлением Linux 3.18.x вместо Linux 4.10.x.

Требования Vendor Test Suite (VTS) для версии Linux

Один аспект, который был до OEM — это версия ядра Linux, но это меняется с Android Oreo.

До тех пор, пока OEM-производитель мог проходить сертификационные тесты, которые выкладывает Google, им было все равно, какая версия ядра использовалась в новом устройстве. Как правило, это не было проблемой, так как большинство OEM-производителей использовали бы ту же версию ядра для того поколения, которую использовали другие OEM-производители, поскольку она сильно привязана к тому, что поддерживают драйверы оборудования. Тем не менее, некоторые провалились в трещины, и это стало причиной проблем с безопасностью. Это то, что Google воспринимает всерьез в последнее время, поэтому имеет смысл, что они захотят начать поручать это.

Начиная с этого года со смартфонами, которые поставляются с Android Oreo, Google требует, чтобы все SoC, выпущенные в 2017 году, были запущены с ядром 4.4 или новее.

В настоящее время существующие устройства, которые обновлены до Android Oreo, должны работать только на ядре версии 3.18 или новее, и их не нужно обновлять для поддержки Project Treble.

Согласно https://android.googlesource.com/platform/test/vts-testcase/kernel/ , было требование к версии Linux, VtsKernelConfigTest или VtsKernelVersionTest, на 8.0, 8.1 и 9.0, но позже удалено на 10.0. Для 8.0 и 8.1 требуется версия 3.18, 4.4 или 4.9. Для 9.0 требуется версия не ниже 4.4.107, 4.9.84 или 4.14.42.

Читайте также:  Администрирование linux управление пользователями

Более техническая и свежая информация доступна непосредственно на веб-сайте AOSP: https://source.android.com/devices/architecture/kernel/core-kernel-reqs

Там нет жестких быстрых правил! Например, ICS / JB на Zte Blade использовал ядро ​​2.6.35, ICS на Sony Xperia Mini было 2.6.32 . возьмите это с щепоткой соли в качестве единственного ориентира 🙂

Я могу полностью понять, почему разные устройства, работающие на одной и той же версии Android, будут работать с разными ядрами, но эта таблица является лишь практическим правилом, и да, я бы хотел немного зерна с моим эмпирическим правилом =)

Кроме того, когда устройство выпускается с определенной версией Android и ядром, а затем версия Android обновляется производителем, версия ядра в основном сохраняется в исходной версии с исправлениями.

Обратите внимание, что даже Google не следит за этим. Только что проверил эмулятор с API 26 и ядро ​​3.18.56+

Источник

How to get the version of the Linux kernel using Android?

Not 100% sure, but I think calling «uname -r» would require root access. There is anyways a less dirty way to do this, which is :

System.getProperty("os.version"); 

If you want the full Kernel version has shown in Android about phone, this is the file to parse: /proc/version

Here is an extract of Android source code that retrieves the actual kernel version string:

private String getFormattedKernelVersion() < String procVersionStr; try < procVersionStr = readLine(FILENAME_PROC_VERSION); final String PROC_VERSION_REGEX = "\\w+\\s+" + /* ignore: Linux */ "\\w+\\s+" + /* ignore: version */ "([^\\s]+)\\s+" + /* group 1: 2.6.22-omap1 */ "\\(([^\\s@]+(?:@[^\\s.]+)?)[^)]*\\)\\s+" + /* group 2: (xxxxxx@xxxxx.constant) */ "\\((?:[^(]*\\([^)]*\\))?[^)]*\\)\\s+" + /* ignore: (gcc ..) */ "([^\\s]+)\\s+" + /* group 3: #26 */ "(?:PREEMPT\\s+)?" + /* ignore: PREEMPT (optional) */ "(.+)"; /* group 4: date */ Pattern p = Pattern.compile(PROC_VERSION_REGEX); Matcher m = p.matcher(procVersionStr); if (!m.matches()) < Log.e(LOG_TAG, "Regex did not match on /proc/version: " + procVersionStr); return "Unavailable"; >else if (m.groupCount() < 4) < Log.e(LOG_TAG, "Regex match on /proc/version only returned " + m.groupCount() + " groups"); return "Unavailable"; >else < return (new StringBuilder(m.group(1)).append("\n").append( m.group(2)).append(" ").append(m.group(3)).append("\n") .append(m.group(4))).toString(); >> catch (IOException e) < Log.e(LOG_TAG, "IO Exception when getting kernel version for Device Info screen", e); return "Unavailable"; >> 

Invoke uname -r and read its output from stdout . It shouldn’t be too complicated. The output is just the version number.

Runtime.getRuntime().exec("uname -r"); 

Источник

Which Android runs which Linux kernel?

Is there a list of which kernel version comes in each Android AOSP version? Or lets say, which version /proc/version would spit out.

1 Answer 1

Linux version in AOSP

Android Version API Level Linux Version in AOSP Header Version
1.5 Cupcake 3 (2.6.27)
1.6 Donut 4 (2.6.29) 2.6.18
2.0/1 Eclair 5-7 (2.6.29) 2.6.18
2.2.x Froyo 8 (2.6.32) 2.6.18
2.3.x Gingerbread 9, 10 (2.6.35) 2.6.18
3.x.x Honeycomb 11-13 (2.6.36) 2.6.18
4.0.x Ice Cream San 14, 15 (3.0.1) 2.6.18
4.1.x Jelly Bean 16 (3.0.31) 2.6.18
4.2.x Jelly Bean 17 (3.4.0) 2.6.18
4.3 Jelly Bean 18 (3.4.39) 2.6.18
4.4 Kit Kat 19, 20 (3.10) 2.6.18
5.x Lollipop 21, 22 (3.16.1) 3.14.0
6.0 Marshmallow 23 (3.18.10) 3.18.10
7.0 Nougat 24 3.18.48 4.4.0 4.4.1
7.1 Nougat 25 ? 4.4.1
8.0 Oreo 26 3.18.72 4.4.83 4.9.44 4.10.0
8.1 Oreo 27 3.18.70 4.4.88 4.9.56 4.10.0
9.0 Pie 28 4.4.146 4.9.118 4.14.61 4.15.0
10.0 Q 29 4.9.191 4.14.142 4.19.71 5.0.3
  • Wikipedia Android version history (in parentheses; can’t find its source)
  • android / kernel / common / Makefile (the Linux in AOSP)
  • android / platform / external / kernel-headers / original / uapi / linux / version.h (the Linux headers as used by Bionic in AOSP)
Читайте также:  Linux efi partition size

Note: other “distributions” of Android might run different kernel versions.

Anyone is welcome to correct and expand this table. Please keep formatting.

Why Android OS/kernel version mismatches

OEMs tend to ship their major Android updates with a similar kernel to the one the device was initially released with. This is most likely to avoid hardware and driver incompatibility issues with a newer kernel. For example, a device that has been updated to run Android 8.0 Oreo but originally shipped with 6.0 Marshmallow may still be running Linux 3.18.x instead of Linux 4.10.x.

Vendor Test Suite (VTS) requirements on Linux version

One aspect that has been up to the OEM is the Linux kernel version but this is changing with Android Oreo.

As long as the OEM was able to pass the certification tests that Google lays out, then they didn’t care what kernel version was used in a new device. This generally wasn’t an issue as most OEMs would use the same version of the kernel for that generation that other OEMs were using, as it is tied heavily to what the hardware drivers support. However, some had been falling through the cracks and this started to cause security issues. This is something that Google has been taking seriously lately so it makes sense that they would want to start mandating this.

Starting this year with smartphones which ship with Android Oreo, Google is requiring that all SoCs productized in 2017 must launch with kernel 4.4 or newer.

Currently existing devices that are upgraded to Android Oreo are only required to run kernel version 3.18 or newer, and will not have to be upgraded to support Project Treble.

Источник

What is Kernel Version on Android? Different Android Kernel Versions

Have you ever encountered the term “kernel” while talking about technology or gadgets including your computer PC and android device? Also, you might be familiar with the term “Linux Kernel”. Now most of us are aware of Linux and Linus Torvalds(Developer of Linux) but what about “Kernel”? What is Kernel in the android kernel and Linux Kernel?

what is Android Kernel version

This article explores the definition of Kernel and its usage. What is Kernel and what is the significance of Kernel in Android kernel? Also, let’s know a bit about the Android kernel versions as well.

What is Kernel?

All the multitasking device running on OS have their own kernel. Windows has a kernel, OS X has a kernel, iOS has a kernel, Windows Phone has a kernel, and of course Android has a kernel. But, to be precise we are here to learn about the Android kernel.

Every time a device starts to boot for OS the kernel comes into action to load the instruction to the memory, CPU and hardware to help the device to boot to OS.

On an Android, a kernel is the core program that manages the CPU resources, the system memory, the system devices, including the file systems and networking, and is responsible for managing all the processes.

As we know, all multitasking devices have their own Kernel and Kernel version. Similarly Android uses Linux Kernel on the device. The Android Kernel is consists of over 20 million source codes that include all the drivers (over 70% of the code) plus the support for the different system architectures (ARM, x86, MIPS, IBM, PowerPC, SPARC, etc).

What is Android Kernel Version?

Like other OS versions on Android, the Kernel has its own version. All the apps on your android smartphone or device use Linux as the core Kernel and are required to run the OS and other apps on the device.

Читайте также:  Не работает звук manjaro linux

The Linux Kernel is open-source and so is the Android. This makes it easy for the developer to develop their app and install it on the device without worrying about the Kernel prices.

What is the latest Android Kernel Version?

The latest Linux Kernel for Android 5.11.8 was released on 20th March 2021 and previewed to the devices on 21-March 2021.

What are the different versions of Android Kernel?

The initial version of Linux Kernel was introduced to Android on September 8 2000 starting with Google Pixel Smartphones including OnePlus, Xiaomi, Oppo, RealMe etc.

Later the different version of Android Kernel of Linux was introduced to Android devices followed by Android OS. Here is the table you can see to know the Android version of your device.

Android Version API Level Linux Kernel Version in Android OSP Header Version
1.5 Cupcake 3 (2.6.27)
1.6 Donut 4 (2.6.29) 2.6.18
2.0/1 Eclair 5-7 (2.6.29) 2.6.18
2.2.x Froyo 8 (2.6.32) 2.6.18
2.3.x Gingerbread 9, 10 (2.6.35) 2.6.18
3.x.x Honeycomb 11-13 (2.6.36) 2.6.18
4.0.x Ice Cream San 14,15 (3.0.1) 2.6.18
4.1.x Jelly Bean 16 (3.0.31) 2.6.18
4.2.x Jelly Bean 17 (3.4.0) 2.6.18
4.3.x Jelly Bean 18 (3.4.39) 2.6.18
4.4 Kit Kat 19,20 (3.10) 2.6.18
5.x Lollipop 21,22 (3.16.1) 3.14.0
6.0 Marshmallow 23 (3.18.10) 3.18.10
7.0 Nougat 24 3.18.48 4.4.0 4.4.1
7.1 Nougat 25 N/A 4.10.0
Oreo 26 3.18.72 4.4.83 4.9.44 4.10.0
Oreo 27 3.18.70 4.4.88 4.9.56 4.10.0
Pie 28 4.4.146 4.9.118 4.15.0
Android 10(Q) 29 4.9.191 4.14.142 4.19.71 5.0.3
Android 11(R) 30 5.11.8 5.0.3
Android 12(Snow Cone) 31 5.11.8 N/A
Android 12L 32 5.11.8 N/A

How do I find my Android kernel version?

Follow the Steps to know the Android Kernel version on the device.

find Android kernel version

  1. Open Settings on Android.
  2. Scroll down and open About phone.
  3. Now open Software Information.
  4. Scroll down to find Device’s Kernel Version.

Can we update Android kernel version?

Yes, Android custom kernels, also called ROMs, can be applied or updated manually to Android OS to add features, improve performance or change certain parts of the operating system. But, a custom Kernel cam only be flashed on a rooted android phone.

What is the best kernel for Android?

There are the three best Android Kernels

  1. Franco Kernel: This is one of the biggest kernel projects on the scene and is compatible with quite a few devices, including the Nexus 5, the OnePlus One and more. …
  2. ElementalX: This is another project that promises compatibility with a wide variety of devices, and so far it has maintained that promise. …
  3. Linaro Kernel.

Is custom kernel safe?

Not all Kernels are good and not all are bad. It completely depends on the Android OS and Kernels. A kernel update can also improve the performance while others are known for security and stability anomalies.

How Kernel version is different from Android OS Version?

Kernel on Android is the base of the operating system and depends on updates on the Linux updates. This Kernel adds extra features and improves the performance on the Android OS of the device.

On the other hand, the Android OS version is completely different from the Kernel version update. The Android OS version depends on Andriod itself for updates. An Andriod OS is used to add and improve some extra features and UIs.

Источник

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