SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Evolution of Android Update
Principles
Maksym Kreshchuk, 2020
Agenda
● What is Android?
● Project Treble
● Updates in Android
● Android partitions
● Mainline modules
Android Open Source Project (AOSP)
● Free for download
● More than 800 projects
● More than 50 GB of sources
What is Android?
AOSP GMS (Google mobile services)
Device production process
Fragmentation of Android 8 & and below
Project treble
● Introduced in Android 8.0
● main goal: make Android updates easier, faster, and less costly for device
manufacturers
● separates the vendor implementation (device-specific, lower-level software
written by silicon manufacturers) from the Android OS framework via a new
vendor interface
Project treble: system-vendor dependencies
Before treble With treble
system.img system.img vendor.img
Android OS
framework
Android OS
framework
Vendor
implemen-
tation
Vendor
implemen-
tation
Shared
libraries
Stable API
Depends on
Project treble: Android updates
Android 7.0 and earlier updates
Download OS
The update is
downloaded to /cache or
/data; enough space
must be available.
Boot to Recovery
The device reboots to
recovery.
Apply Update
The update is applied
in recovery.
Boot Android
The device reboots
into a new Android
build.
A/B updates
Stream Update
In the background, the
update is streamed
directly to B slot.
Switch Slot
The B slot is marked
as bootable.
Boot to New Slot
● The device reboots.
● If boot fails, the device
reverts to the A slot.
Alt Slot Reserved
Once successfully
booted
on the B slot, the next
update applies directly to
the A slot, etc.
A/B updates
● Reliable OTAs
○ Rollback mechanism built-in
○ Likelihood of bricking greatly reduced
● Background OTAs
○ Including bootloader and device-specific partitions
● Reduced downtime when applying an OTA
Partitions on Moto X (2014), Android M
mmcblk0: 16GB eMMC flash
mmcblk0p1modem
mmcblk0p2sbl1
mmcblk0p3DDR
mmcblk0p4aboot
mmcblk0p5rpm
mmcblk0p6tz
mmcblk0p7sdi
mmcblk0p8utags
mmcblk0plogs
mmcblk0p10factorytune1
mmcblk0p11padA
mmcblk0p12abootBackup
mmcblk0p13rpmBackup
mmcblk0p14tzBackup
mmcblk0p15utagsBackup
mmcblk0p16frp
mmcblk0p17padB
mmcblk0p18modemst1
mmcblk0p19modemst2
mmcblk0p20hob
mmcblk0p21dhob
mmcblk0p22fsg
mmcblk0p23fsc
mmcblk0p24ssd
mmcblk0p25sp
mmcblk0p26cid
mmcblk0p27pds
mmcblk0p28misc
mmcblk0p29logo
mmcblk0p30clogo
mmcblk0p31persist
mmcblk0p32kpan
mmcblk0p33boot
mmcblk0p34recovery
mmcblk0p35factorytune2
mmcblk0p36customize
mmcblk0p37cache
mmcblk0p38system
mmcblk0p39userdata
Partitions for Android 7 and earlier
○ boot - Linux kernel and a minimal root filesystem (loaded into a RAM disk)
○ cache - application and JVM caches
○ recovery - failsafe micro OS that can be used for maintenance and un-bricking
○ system - Android OS files and core components
○ userdata - any user related things (like non-system utilities, games and other optional staff)
Partitions in Android 8
● vendor - Contains system applications and libraries that do not have source code available
on Android Open Source Project (AOSP)
● cache - not needed for A/B updates
● recovery - not needed for A/B updates, recovery RootFS moves to boot partition
● For A/B updates uses two sets of partitions referred to as slots (normally slot A and slot B)
○ boot_a, boot_b, system_a, system_b, vendor_a, vendor_b.
Problem with partitions in Android 8
On some production device
System cannot take a 10MB update even though there is space free!
system vendor
5MB free 150MB free
● Introduced in Android 9
● Dynamic partitions solves space problem by making partitions resizable
● Dynamic partitions are stored in a fixed-size super partition.
● Contains contents of dynamic partitions as well as some metadata
● Dynamic partitions do not appear in the fixed-partition table, super replaces them
● Is NOT used for writable partitions (such as userdata)
Dynamic partitions
system_b
vendor_b
product_b
super
system_a
vendor_a
product_a
Partitions in Android 9
Product - an extension of the system partition. Uses for customization application and
packages from system partition
Super - contains other partitions, handles A/B slots internally
Problem with A/B updates
● A/B updates allow roll back of updates that fail to boot
○ Rolls back system, vendor, etc.
● BUT if update modifies userdata before failing, cannot roll back modifications
● Android does not support updated userdata with old system/vendor
User Data Checkpoint
● Introduced in Android 10
● Allows Android to roll back to its previous state when an Android over-the-air (OTA)
update fails.
● UDC enables the device to revert the user data partition even after being modified.
● Use backup on write mechanism
● Require some free space on userdata partition
Partitions in Android 10
Odm - an extension of the vendor partition. Can be used for customization without
changing vendor partition.
Current Google recommendation for partitions
To reduce the number of builds needed to support
device variants
Pros
● Lower Android version update cost
● Lower compatibility and certification cost
● Lower build management complexity
● Easier patching and releasing of security patches
● Quicker release of major updates
Cons
● Slight increase in technical complexity of factory
calibration and device configuration
ODM
Vendor
System
Product A&B
Can be separate
OEM A OEM B
Device A Device B
Mainline modules
Deliver “important code changes” to specific internal OS
components directly from Google Play.
Modules in Android 10:
● Security: Media Codecs, Media Framework Components, DNS
Resolver, Conscrypt
● Privacy: Documents UI, Permission Controller, ExtServices
● Consistency: Timezone data, ANGLE, Module Metadata,
Networking components, Captive Portal Login, Network
Permission Configuration
Mainline modules: how it’s work
● Mainline components are delivered as either APK or APEX files
● APEX is a new file format we developed, similar to APK
● After reboot, the APEX is mounted at the
/apex/<apex_name>@<version> directory.
● Multiple versions of the same APEX can be mounted at the same
time.
Updates in Android R
● 21 OS components will be updatable through Google play
● Generic kernel image
● Virtual A/B updates
Q&A

Weitere ähnliche Inhalte

Was ist angesagt?

Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
Kan-Ru Chen
 

Was ist angesagt? (20)

Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux Kernel
 
From Android NDK To AOSP
From Android NDK To AOSPFrom Android NDK To AOSP
From Android NDK To AOSP
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
 
systemd
systemdsystemd
systemd
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
LAS16-406: Android Widevine on OP-TEE
LAS16-406: Android Widevine on OP-TEELAS16-406: Android Widevine on OP-TEE
LAS16-406: Android Widevine on OP-TEE
 
Notes/Domino アプリがそのまま Web ブラウザで動く HCL Nomad Web の簡単な導入と「仕掛け」
Notes/Domino アプリがそのまま Web ブラウザで動く HCL Nomad Web の簡単な導入と「仕掛け」Notes/Domino アプリがそのまま Web ブラウザで動く HCL Nomad Web の簡単な導入と「仕掛け」
Notes/Domino アプリがそのまま Web ブラウザで動く HCL Nomad Web の簡単な導入と「仕掛け」
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UI
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
semaphore & mutex.pdf
semaphore & mutex.pdfsemaphore & mutex.pdf
semaphore & mutex.pdf
 
XPDDS17: PVH Dom0: The Road so Far - Roger Pau Monné, Citrix
XPDDS17: PVH Dom0: The Road so Far - Roger Pau Monné, CitrixXPDDS17: PVH Dom0: The Road so Far - Roger Pau Monné, Citrix
XPDDS17: PVH Dom0: The Road so Far - Roger Pau Monné, Citrix
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in Linux
 
Network Automation with Ansible
Network Automation with AnsibleNetwork Automation with Ansible
Network Automation with Ansible
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 

Ähnlich wie Evolution of Android Update Principles

Android Internals and Toolchain
Android Internals and ToolchainAndroid Internals and Toolchain
Android Internals and Toolchain
Vladimir Kotov
 
Droidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform AnatomyDroidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform Anatomy
Benjamin Zores
 

Ähnlich wie Evolution of Android Update Principles (20)

Android Porting for Embedded Platforms
Android Porting for Embedded PlatformsAndroid Porting for Embedded Platforms
Android Porting for Embedded Platforms
 
Android : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using AndroidAndroid : Deep dive into developing MobileApp using Android
Android : Deep dive into developing MobileApp using Android
 
Android beyond the smartphone
Android beyond the smartphoneAndroid beyond the smartphone
Android beyond the smartphone
 
Android Things: Android for IoT
Android Things: Android for IoTAndroid Things: Android for IoT
Android Things: Android for IoT
 
Android Internals and Toolchain
Android Internals and ToolchainAndroid Internals and Toolchain
Android Internals and Toolchain
 
Droidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform AnatomyDroidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform Anatomy
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Android Things Internals
Android Things InternalsAndroid Things Internals
Android Things Internals
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar report
 
An introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentAn introduction on Android OS, its working and android development
An introduction on Android OS, its working and android development
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android
Android Android
Android
 
Android zensar
Android zensarAndroid zensar
Android zensar
 
An introduction on Android OS, its working and android development
An introduction on Android OS, its working and android developmentAn introduction on Android OS, its working and android development
An introduction on Android OS, its working and android development
 
Lick my Lollipop
Lick my LollipopLick my Lollipop
Lick my Lollipop
 
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
 
01 03 - introduction to android
01  03 - introduction to android01  03 - introduction to android
01 03 - introduction to android
 
Introduction to Android
Introduction to Android Introduction to Android
Introduction to Android
 
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
Developing for Android TV and the Nexus player - Mihai Risca & Alexander Wegg...
 
Android development
Android developmentAndroid development
Android development
 

Mehr von GlobalLogic Ukraine

GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 

Mehr von GlobalLogic Ukraine (20)

GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
 
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
 
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptxШтучний інтелект як допомога в навчанні, а не замінник.pptx
Штучний інтелект як допомога в навчанні, а не замінник.pptx
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptxЗадачі AI-розробника як застосовується штучний інтелект.pptx
Задачі AI-розробника як застосовується штучний інтелект.pptx
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptxЩо треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"JavaScript Community Webinar #14 "Why Is Git Rebase?"
JavaScript Community Webinar #14 "Why Is Git Rebase?"
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
 
Страх і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic EducationСтрах і сила помилок - IT Inside від GlobalLogic Education
Страх і сила помилок - IT Inside від GlobalLogic Education
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
 
“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?“How to Secure Your Applications With a Keycloak?
“How to Secure Your Applications With a Keycloak?
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Webinar "Introduction to Embedded QA"
 
C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"C++ Webinar "Why Should You Learn C++ in 2021-22?"
C++ Webinar "Why Should You Learn C++ in 2021-22?"
 
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
GlobalLogic Test Automation Live Testing Session “Android Behind UI — Testing...
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Evolution of Android Update Principles

  • 1. Evolution of Android Update Principles Maksym Kreshchuk, 2020
  • 2. Agenda ● What is Android? ● Project Treble ● Updates in Android ● Android partitions ● Mainline modules
  • 3.
  • 4. Android Open Source Project (AOSP) ● Free for download ● More than 800 projects ● More than 50 GB of sources
  • 5. What is Android? AOSP GMS (Google mobile services)
  • 7. Fragmentation of Android 8 & and below
  • 8. Project treble ● Introduced in Android 8.0 ● main goal: make Android updates easier, faster, and less costly for device manufacturers ● separates the vendor implementation (device-specific, lower-level software written by silicon manufacturers) from the Android OS framework via a new vendor interface
  • 9. Project treble: system-vendor dependencies Before treble With treble system.img system.img vendor.img Android OS framework Android OS framework Vendor implemen- tation Vendor implemen- tation Shared libraries Stable API Depends on
  • 11. Android 7.0 and earlier updates Download OS The update is downloaded to /cache or /data; enough space must be available. Boot to Recovery The device reboots to recovery. Apply Update The update is applied in recovery. Boot Android The device reboots into a new Android build.
  • 12. A/B updates Stream Update In the background, the update is streamed directly to B slot. Switch Slot The B slot is marked as bootable. Boot to New Slot ● The device reboots. ● If boot fails, the device reverts to the A slot. Alt Slot Reserved Once successfully booted on the B slot, the next update applies directly to the A slot, etc.
  • 13. A/B updates ● Reliable OTAs ○ Rollback mechanism built-in ○ Likelihood of bricking greatly reduced ● Background OTAs ○ Including bootloader and device-specific partitions ● Reduced downtime when applying an OTA
  • 14. Partitions on Moto X (2014), Android M mmcblk0: 16GB eMMC flash mmcblk0p1modem mmcblk0p2sbl1 mmcblk0p3DDR mmcblk0p4aboot mmcblk0p5rpm mmcblk0p6tz mmcblk0p7sdi mmcblk0p8utags mmcblk0plogs mmcblk0p10factorytune1 mmcblk0p11padA mmcblk0p12abootBackup mmcblk0p13rpmBackup mmcblk0p14tzBackup mmcblk0p15utagsBackup mmcblk0p16frp mmcblk0p17padB mmcblk0p18modemst1 mmcblk0p19modemst2 mmcblk0p20hob mmcblk0p21dhob mmcblk0p22fsg mmcblk0p23fsc mmcblk0p24ssd mmcblk0p25sp mmcblk0p26cid mmcblk0p27pds mmcblk0p28misc mmcblk0p29logo mmcblk0p30clogo mmcblk0p31persist mmcblk0p32kpan mmcblk0p33boot mmcblk0p34recovery mmcblk0p35factorytune2 mmcblk0p36customize mmcblk0p37cache mmcblk0p38system mmcblk0p39userdata
  • 15. Partitions for Android 7 and earlier ○ boot - Linux kernel and a minimal root filesystem (loaded into a RAM disk) ○ cache - application and JVM caches ○ recovery - failsafe micro OS that can be used for maintenance and un-bricking ○ system - Android OS files and core components ○ userdata - any user related things (like non-system utilities, games and other optional staff)
  • 16. Partitions in Android 8 ● vendor - Contains system applications and libraries that do not have source code available on Android Open Source Project (AOSP) ● cache - not needed for A/B updates ● recovery - not needed for A/B updates, recovery RootFS moves to boot partition ● For A/B updates uses two sets of partitions referred to as slots (normally slot A and slot B) ○ boot_a, boot_b, system_a, system_b, vendor_a, vendor_b.
  • 17. Problem with partitions in Android 8 On some production device System cannot take a 10MB update even though there is space free! system vendor 5MB free 150MB free
  • 18. ● Introduced in Android 9 ● Dynamic partitions solves space problem by making partitions resizable ● Dynamic partitions are stored in a fixed-size super partition. ● Contains contents of dynamic partitions as well as some metadata ● Dynamic partitions do not appear in the fixed-partition table, super replaces them ● Is NOT used for writable partitions (such as userdata) Dynamic partitions system_b vendor_b product_b super system_a vendor_a product_a
  • 19. Partitions in Android 9 Product - an extension of the system partition. Uses for customization application and packages from system partition Super - contains other partitions, handles A/B slots internally
  • 20. Problem with A/B updates ● A/B updates allow roll back of updates that fail to boot ○ Rolls back system, vendor, etc. ● BUT if update modifies userdata before failing, cannot roll back modifications ● Android does not support updated userdata with old system/vendor
  • 21. User Data Checkpoint ● Introduced in Android 10 ● Allows Android to roll back to its previous state when an Android over-the-air (OTA) update fails. ● UDC enables the device to revert the user data partition even after being modified. ● Use backup on write mechanism ● Require some free space on userdata partition
  • 22. Partitions in Android 10 Odm - an extension of the vendor partition. Can be used for customization without changing vendor partition.
  • 23. Current Google recommendation for partitions To reduce the number of builds needed to support device variants Pros ● Lower Android version update cost ● Lower compatibility and certification cost ● Lower build management complexity ● Easier patching and releasing of security patches ● Quicker release of major updates Cons ● Slight increase in technical complexity of factory calibration and device configuration ODM Vendor System Product A&B Can be separate OEM A OEM B Device A Device B
  • 24. Mainline modules Deliver “important code changes” to specific internal OS components directly from Google Play. Modules in Android 10: ● Security: Media Codecs, Media Framework Components, DNS Resolver, Conscrypt ● Privacy: Documents UI, Permission Controller, ExtServices ● Consistency: Timezone data, ANGLE, Module Metadata, Networking components, Captive Portal Login, Network Permission Configuration
  • 25. Mainline modules: how it’s work ● Mainline components are delivered as either APK or APEX files ● APEX is a new file format we developed, similar to APK ● After reboot, the APEX is mounted at the /apex/<apex_name>@<version> directory. ● Multiple versions of the same APEX can be mounted at the same time.
  • 26. Updates in Android R ● 21 OS components will be updatable through Google play ● Generic kernel image ● Virtual A/B updates
  • 27. Q&A