When a user taps "Power Off" on an Android device, AOSP initiates a multi-layered shutdown sequence starting in Java framework services, notifying active apps, unmounting file systems, and signaling Linux kernel init.

AOSP Shutdown Architecture Flow

AOSP Call Stack Sequencetext
[User Power Off Action]
[PowerManagerService.java] ──► Triggers goToSleep() / shutdown()
[ShutdownThread.java] ───────► Displays shutdown dialog, broadcasts ACTION_SHUTDOWN
[SystemServer Services] ────► Stops Radio, Audio, Wi-Fi, and Package Manager
[System Properties] ────────► Sets property: sys.powerctl = shutdown
[init / init.cpp] ──────────► Unmounts partitions, executes __reboot(LINUX_REBOOT_CMD_POWER_OFF)