AOSP
Boot
Walk through the complete Android boot sequence from power-on to
system_serverstartup.What is the role of the Boot ROM, and how does it verify the next stage bootloader?
Explain the differences between U-Boot, Little Kernel (LK), and proprietary bootloaders in AOSP.
How does
avb_verifywork in the context of Verified Boot 2.0 (AVB)?What is the purpose of the
boot.imgheader, and how do the V3 and V4 formats differ from V1/V2?Describe the process of loading and verifying the
vendor_bootpartition.How does the bootloader pass the kernel command line and device tree (DTB) to the Linux kernel?
What is the role of
initin early userspace, and how does it parseinit.rcscripts?Explain the difference between early-init, init, and late-init stages in
init.rc.How does
inithandle the transition from the rootfs ramdisk to the system partition?What is the purpose of the
system/etc/init/directory and how does it relate to first-stage vs second-stageinit?How do you debug early boot failures before
logdandlogcatare available?Explain how dm-verity is initialized during boot and its impact on I/O performance.
What is the purpose of the
vbmetapartition, and how are rollback indexes used?How does the boot sequence differ between a normal boot and a recovery boot?
Build
Explain the AOSP build system architecture: how do
Soong,Kati, andNinjainteract?What is the difference between
Android.bpandAndroid.mk, and when would you still need the latter?How does the
Android.bpmodule system handle dependencies between shared libraries and static libraries?Describe the purpose of
AndroidProducts.mk,BoardConfig.mk, anddevice.mkin a device build.How do you add a new HAL implementation to the build without modifying AOSP core repositories?
Explain the difference between
eng,user,userdebug, anduserbuild variants at the build system level.What is the purpose of
sepoliciesin the build, and how are they compiled into the final image?How does the build system generate OTA packages, and what is the role of
releasetools.py?Describe how to create a custom build target that packages additional prebuilt binaries.
What are
apexmodules, and how do they change the traditional system image partitioning?How does the build system handle kernel compilation out-of-tree vs in-tree?
Explain the purpose of
PRODUCT_COPY_FILESvsPRODUCT_PACKAGESand their build-time implications.How do you implement a build-time flag that conditionally compiles source code across multiple modules?
What is the role of
bionicin the build, and how does it differ from glibc-based builds?How would you optimize a clean AOSP build time for a large team using distributed build caches?
Framework
Explain the Zygote startup process and why it uses a prefork model.
What happens during
ZygoteInitbefore the first application process is forked?Describe the Binder IPC mechanism: how does a client obtain a reference to a system service?
What is the difference between
BpBinderandBBinder, and how does the proxy/stub pattern work in native code?How does
AIDLdiffer fromHIDLandAIDL(stable) in terms of interface stability and versioning?Explain the role of
ServiceManagervshwservicemanagervsvndservicemanager.What is the purpose of the
system_serverprocess, and how is it started from Zygote?Describe the
ActivityThreadinitialization sequence when an application process starts.How does the
PackageManagerServicescan and resolve packages during boot?Explain the difference between
systempermissions,signaturepermissions, andnormalpermissions inAndroidManifest.xml.How does the
WindowManagerServicemanage window layers and surface composition?Describe the input event pipeline from kernel to application:
EventHub,InputManagerService,InputDispatcher.What is the role of
SurfaceFlingerin the display pipeline, and how does it interact with HWC?How does the
PowerManagerServicecoordinate with the kernel for suspend/resume and wakelocks?Explain the
JobSchedulerframework and how it interacts with Doze mode and App Standby.What is the difference between a
ContentProviderrunning in its own process vs the caller's process?How does the
ActivityManagerServicehandle process lifecycle and out-of-memory killing decisions?Describe how
BroadcastReceiverdelivery works, including ordered vs unordered broadcasts and background restrictions.What is the purpose of
Looper,Handler, andMessageQueuein the Android threading model?How does the
Resourcesframework handle runtime resource overlay (RRO) and static overlay?
System Service
How do you implement a new system service that is accessible to third-party applications?
What is the difference between a Java system service and a native system service in terms of registration?
Explain the
SystemServicebase class and theonStart(),onBootPhase(), andonUserStarting()lifecycle methods.How do you ensure thread safety in a system service that receives concurrent Binder calls?
Describe the watchdog mechanism (
Watchdog.java) and how to register a system service with it.How does
ActivityManagerServiceenforce background execution limits introduced in recent Android versions?Explain the architecture of
ConnectivityServiceand how it manages multiple network agents.How does
LocationManagerServiceinteract with GNSS HAL and fuse location providers?Describe the power management flow from
PowerManagerServiceto the kernel power HAL.How does
BatteryServicemonitor battery state and propagate events to the framework?Explain the role of
StorageManagerServiceand how it handles adopted storage vs portable storage.How does
AudioServicemanage audio focus, routing, and policy decisions across HAL implementations?Describe the
CameraServicearchitecture and how it handles concurrent camera access from multiple apps.What is the purpose of
SensorService, and how does it batch sensor events for power efficiency?How does
TelephonyRegistrydispatch phone state changes to multiple listeners securely?Explain the
VibratorServiceandLightsServiceabstractions over their respective HALs.How would you add a custom hardware feature (e.g., a proprietary sensor) and expose it through the framework?
Describe how
DevicePolicyManagerServiceenforces enterprise policies at the system service level.How does
NetworkManagementServiceusenetdto configure iptables and routing rules?What is the role of
AppOpsServiceand how does it provide fine-grained permission auditing beyond runtime permissions?
Last updated