A/B (Seamless) update device questions


Question

The internal storage of each Android device is separated into partitions such as system and boot. Most devices have only a single copy of each partition, but devices that support seamless updates have two copies of certain partitions—slot A and slot B, hence A/B—so that one copy of the partition lies dormant while the other is in active use. Because each partition is a copy, they can be used interchangeably to boot into Android. This also means that you can update one partition in the background and then swap to it when you reboot—thus your update is seamless!



I need to know more about this for a stock unrooted device:




  1. After OTA system update, does the device install OS to both partitions? Or install to only one partition.


  2. whether the device continues to same(current) android version until reboot manually?(after installing version update). Or whether it updates current to latest version overnight.


  3. When normal reboot(not after update), how can a user identify whether device is booted to which slot (A/B)? Else, will the device continues to current slot on normal reboot(for example if it is A).


  4. If any one slot got corrupted, Is it possible to use other slot only.



Answer


After OTA system update, does the device install OS to both partitions? Or install to only one partition.



and



whether the device continues to same(current) android version until reboot manually?(after installing version update). Or whether it updates current to latest version overnight.



It installs only to the inactive partition, which becomes active on reboot after update. Figure explains clearly


enter image description here



When normal reboot(not after update), how can a user identify whether device is booted to which slot (A/B)? Else, will the device continues to current slot on normal reboot(for example if it is A)



On a normal reboot, it always reboots into the currently active partition. You can verify by running this command pre and post normal reboot


fastboot getvar all | grep “current-slot” (On Linux)


On Windows, fastboot getvar all and search for current-slot


Edit : You can see current slot using apps like Dev check



If any one slot got corrupted, Is it possible to use other slot only.



If you mean by corruption , the update has failed,



....the device will roll back to the working build on the other slot....Your data is kept perfectly intact, even if the update is borked, as there is only one partition (userdata) which houses your data.



From How A/B Partitions and Seamless Updates Affect Custom Development on XDA and for more technical details see A/B (Seamless) System Updates


Edit:



  1. Here is a more detailed picture from Android Police



  2. Also see A/B (Seamless) System Updates from Android developers.




enter image description here


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes