- XDA Basics: How to Check and Update the Android Version on your phone
- How to check the Android version of your device
- How to update your Android phone
- Бесшовные A/B-обновления в Android: как они устроены
- Recovery-based OTA
- Seamless A/B OTA
- Слотирование
- Изменения в таблице разделов
- Необходимые компоненты для работы с Seamless A/B.
- boot_control
- update_engine
- update_engine_client
- update_verifier
- UpdateEngineApi
- Заключение
- Manually Update Android Version — 4 Options Here
- Make a Backup of Your Android Device
- Option 1. Manually Update Android Version via the Most Professional Tool
- Option 2. Manually Update Android Version Over the Air
- Option 3. Manually Update Android Version with Upgrade Package
- Option 4. Manually Update Android Version via Rooted ROM
- Tip. How to Install Android Beta Q on Your Android
XDA Basics: How to Check and Update the Android Version on your phone
If you’re trying to find out the Android version of your smartphone or wondering how to update it, we can help. It’s actually quite easy to check the Android device’s software information. In this guide, we’ll talk about exactly how you can check the Android version or install a new update on your phone, presuming that your device OEM has provided an official update.
How to check the Android version of your device
- Open the Settings app on your phone or tablet.
- Scroll down, and tap on System.
- You’ll now see an option called About phone (or About tablet) — tap on it. If you don’t see the About phone option, you may have to tap on something like Software Information, depending on your device. On some phones, you might find the About phone option right on the main setting page.
- On the About phone screen, you’ll see all the details, like the Android version, as well as your device manufacturer’s software version. This page will also give details about the Android security patch level, baseband version, kernel version, and build number.
Until a couple of years ago, Google used to name the Android versions after a dessert or a sweet. But now, the Android versions just include numbers. So depending on your device’s Android version, you can see a name, or a version number and a name, or just a version number.
How to update your Android phone
- Open the Settings app on your Android phone.
- Scroll down to System, and tap on it.
- Now, tap on the System update option under Advanced. In some cases, the Software update option may be present right under the main settings.
- After you’ve tapped on System update, your phone will search if an update is available for your phone. If there’s no update, you’ll be informed that your phone is up to date. If there’s an update, you can follow the on-screen instructions to download and install it.
On Pixel phones, you can also check for Security and Google Play system updates by going to Settings > Security > Security update.
This is how you can check the Android version of your phone and update it officially. As mentioned, the options may be at different places on devices from different manufacturers. Note that if your phone manufacturer has not provided any updates, you will not see any updates available as this method is only checking for officially provided updates.
If your phone is too old and outdated, and you’re looking to upgrade, check out our recommendations on the Best Phones, the Best Android Phones, and the Best Cheap Android Phones.
Источник
Бесшовные A/B-обновления в Android: как они устроены
Всем привет. В SberDevices наша команда занимается разработкой различных железок и прошивок для них на базе AOSP.
Начиная с Android 8 (у некоторых вендоров с 7.1) в системе появился новый механизм накатки OTA-обновлений, т. н. Seamless A/B OTA Updates — бесшовные обновления. В этом посте я опишу общие принципы его работы, рассмотрю механизм с точки зрения разработчика, а также проведу сравнение со старым (будем его называть recovery-based) подходом применения обновлений. Всё нижесказанное будет справедливо только для чистого AOSP, т. к. конкретная реализация зависит от вендора.
Recovery-based OTA
Обновления для Android поставляются в виде zip-архива с образами обновляемых разделов (block-based updates). Во времена KitKat это был просто набор файлов, которые копировались на устройство прилагаемым скриптом. Я не стану подробно останавливаться на этом режиме, кратко опишу основные принципы его работы:
- zip-архив скачивается системой на устройство;
- система перезагружается в режим recovery;
- проверяется совместимость обновления с устройством, его подпись;
- если всё OK, выполняется updater-script из zip-архива;
- в процессе обновления устройство может несколько раз перезагрузиться (например, для обновления device tree);
- если всё прошло успешно, загружаемся в новую прошивку.
Какие минусы в данной схеме?
- Необходимость резервировать достаточное количество встроенной памяти для OTA-архива. Для этого служит раздел /cache. Некоторые вендоры используют /data, но это редкость. В итоге пользователю остаётся меньше места (да, приложения всё ещё могут использовать место в разделе /cache, но с некоторыми ограничениями).
- Перезагрузка и применение обновления занимает время, что может быть критично для некоторых видов устройств, например, для Smart TV.
- Прерывание процесса обновления может привести к boot loop.
- Нет возможности откатиться на старую версию прошивки.
Эти неудобства позволяет обойти способ бесшовного обновления. Давайте посмотрим, как он устроен.
Seamless A/B OTA
Ключевые компоненты и механизмы, необходимые для реализации бесшовных A/B-обновлений:
- слотовая разметка флеш-памяти;
- взаимодействие с загрузчиком, управление состоянием слотов;
- системный демон update_engine;
- генерация zip-архива с обновлением. В рамках данной статьи этот аспект рассматриваться не будет.
Слотирование
Основным принципом работы A/B OTA является слотирование. Все разделы, которые необходимо обновлять (это могут быть любые разделы, а не только системные), должны находиться в двух копиях или, иначе, в слотах. В Android-реализации поддерживается 2 слота, которые именуются соответственно A и B. Система загружается и работает из текущего слота, второй используется только в момент обновления. К имени раздела добавляется суффикс с именем слота.
Ниже приведена таблица сравнения двух вариантов организации разделов на устройстве.
Все слотируемые разделы помечаются опцией монтирования slotselect, чтобы система могла выбрать правильный слот. В зависимости от того, где они описаны, это может быть fstab либо dts.
Изменения в таблице разделов
- В /сache больше нет необходимости. Теперь обновление может сохраняться либо в /data, либо сразу прошиваться в неактивный слот (об этом ниже).
- Раздел recovery также больше не используется. Однако режимrecovery всё ещё существует, он необходим, например, для сброса устройства на заводские настройки (к этому может привести rescue party). Или для т. н. ручного обновления (sideload) через adb. Recovery ramdisk теперь лежит внутри boot-раздела, ядро общее.
- Для переключения режима загрузки (android/recovery) появилась новая опция в cmdline ‑ skip_initramfs.
На первый взгляд кажется, что такая схема не оптимальна, т. к. под систему необходимо выделить в два раза больше места. Но ведь мы избавились от /cache, а значит уже сэкономили большое количество памяти. Таким образом, система будет занимать немного больше, чем в варианте с recovery.
Главным достоинством A/B-обновлений является возможность стриминга прошивки. Именно она обеспечивает бесшовность и прозрачность обновлений для пользователя: для обновления устройству достаточно перезагрузиться в новый слот. В этом режиме нет необходимости заранее скачивать zip-архив, занимая место в /data. Вместо этого система сразу пишет блоки данных из специально подготовленного файла (payload, см. ниже) в каждый раздел неактивного слота. С точки зрения реализации нет разницы, скачиваем ли мы предварительно обновление либо сразу стримим его в слот.
Слоты имеют следующие состояния:
- active – активный слот, из него будет загружена система при следующей перезагрузке;
- bootable – обновление успешно прошито в слот, прошло валидацию, совпали хеш-суммы и т. д.;
- successful – система смогла успешно загрузиться в новый слот;
- unbootable – слот поврежден. Система всегда помечает слот как unbootable перед началом процесса обновления.
Оба слота могут быть bootable и successful, но только один — active.
Алгоритм работы загрузчика при выборе слота:
- Загрузчик определяет, что имеется один или более слотов с флагом bootable.
- Из них выбирается активный слот (либо слот с наибольшим приоритетом).
- Если система загрузилась успешно, слот помечается как successful и active.
- Иначе слот помечается как unbootable и система перезагружается.
Изменение состояний слотов во время обновления:
Необходимые компоненты для работы с Seamless A/B.
boot_control
Для поддержки A/B-обновлений вендор должен реализовать специальный HAL-интерфейс — boot_control. Он позволяет изменять состояния слотов и получать о них информацию. Для внешней работы (например, через adb shell) используется утилита – bootctl. Интерфейс используется как средство взаимодействия между ОС и загрузчиком.
update_engine
Основной компонент всей A/B-схемы. Занимается загрузкой, стримингом обновлений, проверкой подписи и многим другим. Изменяет состояния слотов через boot_control. Позволяет контролировать процесс обновления устройства: приостанавливать, возобновлять, отменять.
Компонент пришёл в Android из ChromeOS, где уже используется некоторое время. AOSP поддерживает update_engine в виде статической sideload-сборки. Именно она используется в recovery, т.к данный режим не поддерживает динамическую линковку.
Процесс работы данного компонента можно разделить на следующие шаги:
- загрузка обновления в слот. Загружать можно как из предварительно скачанного пакета с обновлением, так и напрямую по Сети через http/https. В процессе загрузки проверяется подпись, открытый ключ уже находится на устройстве (/system/etc/update_engine/update-payload-key.pub.pem);
- верификация загруженного обновления и сравнение хеш-сумм;
- выполнение post-install скриптов.
Структура пакета обновления:
- care_map.txt — используется update_verifier-ом (см. ниже);
- payload_properties.txt — содержит хеши и размеры данных внутри payload;
- payload.bin — пакет обновления, содержит блоки всех разделов, метаданные , подпись.
update_engine_client
Клиент для управления демоном update_engine. Может напрямую вызываться вендором для применения обновления.
update_verifier
Утилита для проверки целостности системы при первом запуске (слот с флагом active, но еще не successful). Контроль целостности реализуется с помощью модуля ядра dm-verity. Если проверка закончилась успешно, утилита помечает текущий слот как successful. Иначе система перезагружается в старый слот. Верифицируются только блоки, указанные в файле care_map.txt.
UpdateEngineApi
Для реализации vendor-сервисов обновлений существует Java API. Также имеется пример реализации такого сервиса.
Рассмотрим пример сборки A/B update в AOSP. Для этого отредактируем Makefile целевой платформы:
После вызова make otapackage получаем zip-архив с обновлением. В таком виде он уже подходит для sideload-режима. Можем выполнить перезагрузку в recovery и вызвать adb sideload ota.zip. Этот способ удобен для отладки.
Применение обновления изнутри рабочей системы обычно определяется вендором. Самый простой способ — выложить payload.bin на http-сервер и напрямую вызвать update_engine_client.
В параметр headers передается содержимое файла payload_properties.txt. В logcat можно наблюдать прогресс обновления. Если передать ключ —follow, прогресс будет дублироваться в stdout.
Заключение
Плюсы нового механизма обновлений очевидны:
- обновление системы происходит в фоне, не прерывая работу пользователя. Да, всё так же потребуется перезагрузка (в новый слот), но пройдёт она значительно быстрее, чем перезагрузка в recovery для применения обновления;
- минимизируется вероятность boot loop (от ошибок в реализации никто не застрахован). Процесс обновления можно прерывать, на активный слот это никак не повлияет;
- появляется возможность отката на предыдущую версию прошивки. Даже если по каким-то причинам обновление прошло неуспешно, система просто вернётся к старой версии;
- благодаря стримингу устройство обновится быстрее;
- в зависимости от реализации можно полностью исключить пользователя из процесса обновления.
Из минусов я бы выделил два момента:
- A/B OTA становится зависимой от текущей разметки диска, т. к. обновление происходит во время работы системы. Т. е. становится невозможно накатить обновление с изменёнными разделами;
- относительная сложность реализации.
И все же, на мой взгляд, плюсы перевешивают. Кстати, в нашем недавно анонсированном устройстве мы используем A/B OTA обновления.
Источник
Manually Update Android Version — 4 Options Here
The Android operating system continues to be more impressed with the release of every new update and the new Android 9.0 pie is no different. Available for download on most Android devices at the moment and comes with over 25 new features that are meant to improve your device’s performance.
The upgrade process is quite easy and can be accomplished in numerous ways. In this article, we are going to look at the various ways to easily update the Android version on your phones or tablets manually.
Make a Backup of Your Android Device
Before we begin with the different ways to manually update your Android device, it is important to create a backup of all the data on your Android device. There are a lot of things that could go wrong during the update process that could result in data loss. If you have a backup of all the data, you can easily restore all the data back to the device. Follow these simple steps to back up the data on your Android device:
Step 1: Go to Settings > Backup and reset and then choose «Back up my Data» and «Automatic restore» to enable the feature.
Step 2: Now go to Settings > Accounts and choose your Google account.
Step 3: Check all the boxes to select the data you want to be synced to your Google account.
Note: This process may vary slightly across different Android devices, but the steps are basically similar.
Like we mentioned before, there are several ways you can update your Android device, you can have a brief view of them first.
Option 1. Manually Update Android Version via the Most Professional Tool
One of the easiest ways to update your Android device is to use the best Android system repair tools in the business. This tool is known as iMyFone Fixppo for Android and it is designed to help you not just fix all system issues in your Android device, but also for updating your device as you want.
It is the best and most advanced Android repair tool and has a 100% success rate of repairing/updating.
It is very easy to use and all you need to do is just a few clicks.
The program supports thousands of Android devices including and all versions of the Android OS.
Here’s how to perform an update on a Samsung Galaxy Device using Fixppo for Android:
Step 1: Download and install iMyFone Fixppo for Android on to your computer. Launch the program and then click «Start» to begin the process. In order to download the latest firmware on your device, you will need to provide your device’s details. Enter all the details that identify your device and then click on «Download Firmware».
Step 2: Now, connect the device to your computer and double-check that the details you entered are correct and then click «Start». Follow the instructions on the screen to put the device in Download Mode.
Step 3: Once the device is in download mode, the program will begin fixing any issues the device may have. When the repair process is complete, the device will restart with the corresponding version of Android installed on it.
Many professional media sites have already trusted this advanced tool, so do not hesitate to have a try.
Option 2. Manually Update Android Version Over the Air
Under normal circumstances, your device will let you know when there is an update for your Android device. Most devices will either download the update automatically if you are connected to Wi-Fi or notify you that the update is available if you are using Cellular data. If you don’t see the update notification, here’s how you can update the Android device manually:
Step 1: Connect the device to a reliable and strong Wi-Fi network.
Step 2: Now go to Settings -> About Device and then select «System Updates -> Check for Updates -> Update. The download and the installation process will begin.
Step 3: Your device may reboot automatically when the installation is complete.
Disadvantages of Using this Method
Your device needs to be connected to Wi-Fi to update or you will incur cellular data charges if you choose to update via Cellular data.
Sometimes the update can stall or fail to complete due to various reasons.
Option 3. Manually Update Android Version with Upgrade Package
Your device’s manufacturer may also have update files for users to download. In this way, you can download the update package from the device manufacturer’s website and store it on your device’s SD card. You can then use this upgrade package to update the device to the latest version of Android.
The process to update the device using this upgrade package is relatively simple. Follow these simple steps to do it:
Step 1: Settings > About Phone > System Update. The device should display this update package.
Step 2: Tap «Continue» to allow the device to download and install the package.
Step 3: Reboot the device to complete the process.
Disadvantages of Using this Method
You need to find and download the upgrade package before you can update the device.
You need to have adequate storage on your device or SD card for the update.
Option 4. Manually Update Android Version via Rooted ROM
Rooting your device allows you superuser access, giving you the ability to not just easily update the device to the latest version, but also install unapproved apps. The following simple instructions will help you root your device:
Step 1: Download one of the many root apps on to your computer.
Step 2: Run the rooting app and then connect the Android device to the computer using USB cables.
Step 3: Follow the on-screen prompts to root the device.
Step 4: Once the rooting process is complete, reboot the device and you’ll have instant access to the latest version of Android.
Disadvantages of Using this Method
It can result in total data loss when done incorrectly.
The process will also invalidate the warranty on the device.
When done incorrectly, the process could also result in significant damage to the software.
Tip. How to Install Android Beta Q on Your Android
Even with the latest Android 9.0 already in the market, Android developers continue to experiment with more features to improve later updates. One of these updates is known as Android Q and although there is no official release date for it yet, Google has already rolled out Android Q to beta testers.
To have access to the Android Q beta, you must have a pixel smartphone. The following are some of the devices that can run Android Q Beta: Google Pixel XL, Google Pixel 2, Google Pixel 2 XL, Google Pixel 3, Google Pixel 3 XL. By mid this year, Google had also rolled out a version of Android Q Beta that can be used on other non-Google devices.
To download Android Q, follow the guidelines laid out on this page . You will need to read and agree to the terms of service before you can be accepted into the Beta program. Once accepted, you will receive regular over the air update notifications for the various Android Beta builds.
This method allows you to reap all the benefits and enjoy the features of the latest version of Android before anyone else can, but we must warn you that beta updates can be dangerous. They can cause issues that may interfere with your device’s ability to function correctly and may even cause data loss.
Conclusion
With more than one way to manually update your Android device, you can choose the method that best suits your particular situation according to your needs. Just remember to back up your data before updating the device.
Источник