<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Boopalan Vadamalai on Medium]]></title>
        <description><![CDATA[Stories by Boopalan Vadamalai on Medium]]></description>
        <link>https://medium.com/@boopalan457?source=rss-376d98894667------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v00WcIV9o6uvV8NOGhAIMg.jpeg</url>
            <title>Stories by Boopalan Vadamalai on Medium</title>
            <link>https://medium.com/@boopalan457?source=rss-376d98894667------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:27:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@boopalan457/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deconstructing Android Automotive OS: From AOSP Architecture to the Cockpit]]></title>
            <link>https://medium.com/@boopalan457/deconstructing-android-automotive-os-from-aosp-architecture-to-the-cockpit-59fbee13d333?source=rss-376d98894667------2</link>
            <guid isPermaLink="false">https://medium.com/p/59fbee13d333</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[android-automotive]]></category>
            <category><![CDATA[aosp]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[software-defined-vehicle]]></category>
            <dc:creator><![CDATA[Boopalan Vadamalai]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 14:14:36 GMT</pubDate>
            <atom:updated>2026-08-09T14:14:36.419Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What actually changes when Android stops being a phone.</em></p><p>The vehicle initializes a headless Android user environment without UI rendering. This highlights the architectural divergence of Android Automotive OS (AAOS) from standard Android. AAOS is a fundamental platform extension, not merely a custom UI or form factor.</p><p>It augments the Android Open Source Project (AOSP) with a dedicated automotive system domain. This domain introduces specialized system services, automotive hardware abstraction layers (HALs), deterministic power state management, and a vehicle-centric multi-user model. This document outlines the core architectural additions AAOS makes to AOSP.</p><h3>Architectural Additions: The Car Stack</h3><p>AAOS introduces one primary subsystem to AOSP: the <strong>Car Stack</strong>. This stack resides in packages/services/Car.</p><p>The Car Stack architecture consists of four core modules:</p><ul><li>car-lib/: The Car API. This provides the client-side interface for applications and system components.</li><li>service/: The core CarService implementation. This is deployed as a modular, independently updatable system component.</li><li>service-builtin/: The platform-level shim. This component hosts and executes the CarService module.</li><li>cpp/: Native automotive services. These execute during early boot phases before the Android Framework initializes.</li></ul><p>The separation between service/ and service-builtin/ enables out-of-band updates. CarService can be updated independently from the underlying OS platform.</p><h3>Headless Multi-User Architecture</h3><p>AAOS fundamentally alters the AOSP user model. The system user is decoupled from the active human operator.</p><ul><li><strong>System User (User 0) is Headless.</strong> This user initializes at vehicle ignition. It hosts core system services. It never binds to a physical display or renders UI components.</li><li><strong>Human Operators are Secondary Users.</strong> The driver profile operates as the foreground user. This provides isolated application sandboxes, accounts, and configuration settings. User IDs typically begin at 10 based on creation sequence. ID assignment is decoupled from physical seats or displays. The system also supports guest profiles and strict Role-Based Access Control (RBAC) to restrict vehicle configuration.</li><li><strong>Single Foreground User Default.</strong> Standard deployments cap concurrent users at three (config_multiuserMaxRunningUsers): the headless system user, one foreground human user, and one background user.</li><li><strong>Concurrent Multi-User (CMU).</strong> This opt-in architectural feature supports per-seat simultaneous users. OEMs must enable config_multiuserVisibleBackgroundUsers. Introduced primarily in Android 15, CMU allows non-foreground secondary users to execute activities on assigned displays.</li><li><strong>Zone-Based Display Allocation.</strong> Displays are not bound directly to users. Instead, users are assigned to physical Occupant Zones. Occupant Zones own the displays.</li></ul><p><strong>Architectural Consequence:</strong> The headless system user (User 0) remains active even without an authenticated human user. This design enables unattended operations such as Over-The-Air (OTA) updates and background diagnostics during sleep cycles (Garage Mode). System services must explicitly distinguish between the headless system user, the primary foreground user, and visible background users. Relying on generic “current user” context is an anti-pattern.</p><h3>Hardware Integration Architecture</h3><p>Application layers are strictly isolated from vehicle buses (CAN, LIN, Automotive Ethernet). Signal propagation follows a deterministic path:</p><p>Each layer serves a distinct architectural purpose:</p><ol><li>CarPropertyManager: Provides a strongly-typed, permission-enforced API for applications. It abstracts the underlying vehicle network protocols.</li><li>CarService: Centralizes access control, multiplexes client requests, and enforces security boundaries.</li><li>Vehicle HAL (VHAL): Defines the rigid vendor boundary. It uses stable AIDL interfaces to bridge the Android framework and the Tier-1 ECU implementations.</li></ol><p>This architecture ensures domain isolation. Infotainment applications operate at a lower Quality Management (QM) level. The VHAL boundary prevents unprivileged applications from injecting data into safety-critical vehicle networks. AAOS mandates AIDL for the Vehicle HAL. This standardizes interface definitions and ensures robust versioning across the platform.</p><h3>CarService Lifecycle and Connectivity</h3><p>CarService is a modular, updatable component. Consequently, it can terminate and restart independently of the host process. System architects must ensure clients do not cache stale manager references across service boundaries.</p><p>Clients must implement asynchronous lifecycle listeners using Car.createCar()</p><pre>private var car: Car? = null<br>private var propertyManager: CarPropertyManager? = null<br>private fun connect(context: Context) {<br>    car = Car.createCar(<br>        context,<br>        /* handler = */ null,<br>        Car.CAR_WAIT_TIMEOUT_DO_NOT_WAIT<br>    ) { car, ready -&gt;<br>        propertyManager = if (ready) {<br>            car.getCarManager(Car.PROPERTY_SERVICE) as? CarPropertyManager<br>        } else {<br>            null   // CarService terminated — drop cached manager references<br>        }<br>    }<br>}</pre><p>Using CAR_WAIT_TIMEOUT_DO_NOT_WAIT ensures non-blocking initialization. Clients must handle the ready == false condition gracefully. This branch executes when CarService terminates, requiring the application to discard all cached manager instances and await reconnection.</p><h3>Vehicle State Management: CarPropertyManager</h3><p>Vehicle state data is encapsulated as distinct <strong>Properties</strong>. CarPropertyManager serves as the authoritative source of truth for these properties.</p><p>A property requires both a <strong>Property ID</strong> and an <strong>Area ID</strong> (e.g., seat location, window index):</p><pre>val driverTemp = propertyManager?.getFloatProperty(<br>    VehiclePropertyIds.HVAC_TEMPERATURE_SET,<br>    VehicleAreaSeat.SEAT_ROW_1_LEFT<br>)</pre><p>Properties define specific behavioral contracts:</p><ul><li><strong>Access Level:</strong> Read, write, or bidirectional.</li><li><strong>Change Mode:</strong> STATIC (immutable constants), ON_CHANGE (discrete asynchronous events), or CONTINUOUS (high-frequency telemetry streams).</li></ul><p>Continuous properties require careful performance consideration:</p><pre>private val speedCallback = object : CarPropertyManager.CarPropertyEventCallback {<br>    override fun onChangeEvent(value: CarPropertyValue&lt;*&gt;) {<br>        if (value.status != CarPropertyValue.STATUS_AVAILABLE) return<br>        val speedMps = value.value as Float<br>    }<br><br>    override fun onErrorEvent(propertyId: Int, areaId: Int) {<br>        // Handle hardware fault or write failure<br>    }<br>}<br><br>propertyManager?.registerCallback(<br>    speedCallback,<br>    VehiclePropertyIds.PERF_VEHICLE_SPEED,<br>    10f<br>)</pre><p><strong>Key Design Principles:</strong></p><ol><li>Property status (CarPropertyValue.STATUS_AVAILABLE) must be validated independently of the property value. An unavailable property is distinct from a zero value.</li><li>Property timestamps represent the hardware sampling time, not the IPC delivery time. Timestamp correlation is critical for synchronizing sensor fusion and telemetry.</li><li>Access control is granular. Sensitive domains (e.g., HVAC, telemetry) require specific permissions. OEMs can define proprietary vendor properties to expose custom hardware capabilities.</li></ol><h3>Power Management Architecture</h3><p>Vehicle power states supersede standard Android power management. The vehicle controller dictates the power lifecycle; Android operates as a subordinate node.</p><p>CarPowerManagementService handles state negotiation with the VHAL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6XFm4NoYOpG8JULrgVTbOQ.jpeg" /></figure><p>The VHAL dictates the desired state; Android reports state transition progress. The <strong>Shutdown Prepare</strong> state is critical. It triggers <strong>Garage Mode</strong>, a designated time window where the system performs unattended maintenance, OTA updates, and diagnostics before hardware shutdown. Android can request time extensions using SHUTDOWN_POSTPONE.</p><p>AAOS heavily utilizes Suspend-to-RAM for rapid boot performance. Processes may resume execution with stale state data after indeterminate suspension periods. System components must implement robust state-recovery mechanisms upon resume.</p><h3>System Reliability: CarWatchdogService</h3><p>In automotive environments, service deadlocks are critical safety events. CarWatchdogService monitors system health and resource utilization.</p><p>Components register with the Watchdog and must acknowledge periodic heartbeat requests. If a component misses a deadline, the Watchdog terminates and recovers the process. Timeout thresholds are tiered based on the declared criticality level of the component.</p><p>The Watchdog also monitors flash storage I/O. Excessive disk writes degrade the lifespan of embedded eMMC/UFS modules. The Watchdog identifies and terminates rogue processes to enforce the 15-year hardware durability requirements of automotive engineering.</p><h3>Spatial Architecture: Occupant Zones</h3><p>CarOccupantZoneService maps the logical system to the physical vehicle cabin (e.g., driver, front passenger).</p><ul><li><strong>Display Routing:</strong> Occupant Zones own specific display hardware (Center Stack, Instrument Cluster, HUD). Users are mapped to Zones, not directly to displays.</li><li><strong>Audio Routing:</strong> CarAudioService routes audio contexts to specific physical Zones. This prevents media playback in passenger zones from interfering with critical navigation or safety alerts in the driver&#39;s zone. Volume management and context routing are strictly zone-isolated.</li></ul><p>Therefore, an AAOS “user” represents a composite entity: an identity bound to a physical seat, assigned displays, and a discrete audio zone. UI implementations must respect this multi-dimensional routing.</p><p>User transitions are broadcast as system lifecycle events:</p><pre>val userManager = car.getCarManager(Car.CAR_USER_SERVICE) as CarUserManager<br>val filter = UserLifecycleEventFilter.Builder()<br>    .addEventType(CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING)<br>    .addEventType(CarUserManager.USER_LIFECYCLE_EVENT_TYPE_UNLOCKED)<br>    .build()<br>userManager.addListener(executor, filter) { event -&gt;<br>    // Access event.eventType, event.userHandle, event.previousUserHandle<br>}</pre><p><em>Note: User switch events lack sequence numbers and timestamps. State synchronization must account for this constraint.</em></p><h3>Architectural Implications for AAOS Development</h3><ol><li><strong>Asynchronous Lifecycles:</strong> The Android framework is only one component of the vehicle stack. Native services, VHAL modules, and safety-critical features (e.g., Early View Camera) initialize independently. They do not wait for framework readiness.</li><li><strong>Distributed State Authority:</strong> System state is highly distributed. Power, user, display, and window states are managed by distinct services with divergent lifecycles. Robust architectures must gracefully handle state synchronization across these domains.</li><li><strong>Vendor Extensibility:</strong> AAOS is designed for extensive OEM customization. Custom properties, proprietary HALs, and Runtime Resource Overlays (RROs) are foundational architectural patterns, not edge cases.</li></ol><p><em>Next in this series: the five-layer AAOS stack in detail, and how CarService manages user and display instances.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59fbee13d333" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Internal AOSP process when user clicks App Icon from Launcher]]></title>
            <link>https://medium.com/@boopalan457/internal-aosp-process-when-user-clicks-app-icon-from-launcher-81113bf3c111?source=rss-376d98894667------2</link>
            <guid isPermaLink="false">https://medium.com/p/81113bf3c111</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[aosp]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Boopalan Vadamalai]]></dc:creator>
            <pubDate>Tue, 28 May 2024 15:20:25 GMT</pubDate>
            <atom:updated>2024-05-28T15:20:25.918Z</atom:updated>
            <content:encoded><![CDATA[<p>When you click on an app icon on the Android device, a series of processes and components are triggered in the background to launch the application. Here is a technical explanation of what happens step-by-step, focusing on the Android Open Source Project (AOSP) components involved,</p><h3>1. Launcher App Interaction</h3><ul><li>Component Involved: Launcher (e.g., Pixel Launcher)</li><li>Action: When you tap on an app icon, the launcher app intercepts this touch event. It identifies the app associated with the tapped icon.</li></ul><h3>2. Intent Creation</h3><ul><li>Component Involved: Launcher</li><li>Action: The launcher creates an Intent object. This Intent specifies the package name and the activity to be launched. For example, it might look something like</li></ul><blockquote>Intent intent = getPackageManager().getLaunchIntentForPackage(&quot;com.example.myapp&quot;);</blockquote><h3>3. Sending Intent to Activity Manager</h3><ul><li>Component Involved: Launcher, Activity Manager</li><li>Action: The launcher sends this Intent to the Activity Manager Service (AMS) via a Binder IPC call. The startActivity method is invoked on the Activity Manager.</li></ul><h3>4. Activity Manager Service Processing</h3><ul><li>Component Involved: Activity Manager Service (AMS)</li><li>Action: The AMS processes the Intent. It checks if the application is already running. If not, it needs to start a new process for the application. The AMS also checks the application&#39;s manifest to determine the launch activity.</li></ul><h3>5. Application Process Creation</h3><ul><li>Component Involved: Zygote, AMS</li><li>Action: If the application is not running, the AMS requests the Zygote process to fork a new process for the application. Zygote is a daemon responsible for starting new Android applications.</li><li>Forking: Zygote forks a new process. The new process inherits the initial memory state of Zygote, which includes preloaded classes and resources, to reduce startup time.</li></ul><h3>6. ActivityThread Initialization</h3><ul><li>Component Involved: ActivityThread, Application</li><li>Action: In the newly created application process, the ActivityThread class is responsible for starting the main application thread (main looper) and initializing the application.</li></ul><p>The ActivityThread calls the attach method, which sets up the environment for the application.It also loads the application’s classes and resources.</p><h3>7. Launching the Activity</h3><ul><li>Component Involved: ActivityThread, Activity</li><li>Action: The ActivityThread handles the launch of the specified activity.It creates an instance of the activity class.It calls the onCreate method of the activity to initialize the UI and other components.The onStart and onResume methods are called to bring the activity to the foreground.</li></ul><h3>8. Rendering the UI</h3><ul><li>Component Involved: Window Manager, ViewRootImpl</li><li>Action: The activity’s content view is attached to the window manager.The WindowManager service is responsible for managing the display and handling input events.The ViewRootImpl acts as the bridge between the Android view hierarchy and the window manager. It handles rendering the views and dispatching input events.</li></ul><h3>9. User Interaction</h3><ul><li>Component Involved: Input Dispatcher, Input Queue</li><li>Action: The input dispatcher listens for touch, key, and other input events. These events are placed in an input queue and dispatched to the appropriate window and view within the activity.</li></ul><h3>Summary of Key Components:</h3><ul><li><strong>Launcher</strong>: Handles the initial user interaction and creates an intent.</li><li><strong>Activity Manager Service (AMS)</strong>: Manages the lifecycle of activities and processes.</li><li><strong>Zygote</strong>: Forks new processes for applications.</li><li><strong>ActivityThread</strong>: Initializes and runs the main application thread.</li><li><strong>Window Manager</strong>: Manages windows and rendering.</li><li><strong>Input Dispatcher</strong>: Handles input events.</li></ul><p>This sequence ensures that when you click on an app icon, the appropriate app is started efficiently, and the UI is rendered for user interaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81113bf3c111" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>