Android (operating system) - Security Model and Integrity
Understand Android’s partition layout and rooting risks, its app sandbox and evolving permissions model, and the verified boot / dm‑verity chain that ensures system integrity.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
Which Android partition is used to store the operating system?
1 of 15
Summary
Rooting and Device Security
Understanding Android's Storage Architecture
Android devices organize their flash storage into separate partitions, each serving a specific purpose. The main partitions include:
/system/: Contains the Android operating system and pre-installed system apps
/data/: Stores user data, installed applications, and user preferences
/boot/: Contains the kernel and ramdisk needed to start the system
This partitioning is crucial because it allows the system to protect core OS files separately from user data, which is a foundational security principle.
Root Access and Device Control
Root access is the highest level of privilege on an Android device. It grants complete control over the entire system, including the ability to modify system files, install any software without restrictions, and bypass security mechanisms.
There are two primary ways to obtain root access:
1. Exploiting Security Flaws Attackers or security researchers can potentially gain root access by discovering and exploiting vulnerabilities in the Android OS or device firmware.
2. Unlocking the Bootloader Many device manufacturers allow users to unlock their bootloader through the OEM unlock option in Developer Settings. This is a legitimate but serious action—unlocking the bootloader typically erases all user data and removes security protections. Devices like the Google Pixel, OnePlus, and Nothing phones support this feature via the Fastboot tool.
The key insight here is that obtaining root access is a trade-off: gaining complete control requires sacrificing security protections that normally keep the system protected.
Core Android Security Features
The Application Sandbox
One of Android's most important security innovations is the application sandbox. This is an isolated environment where each application runs independently and has no direct access to other apps' data or system resources.
Think of it this way: even if you install 10 different apps, they cannot see each other's files or interfere with each other. Each app only has access to:
Its own dedicated storage space
System resources it explicitly requests
Data it creates itself
This isolation is enforced at the operating system level, making it difficult (though not impossible) for a compromised app to affect other parts of the system.
The Permissions System
Android uses an explicit permissions model to control what apps can access. Rather than assuming all apps are trustworthy, Android requires apps to declare what they need to do (like accessing your camera or location) and gives users control over whether to grant those permissions.
Evolution: From Installation-Time to Runtime Permissions
Before Android 6.0 (Marshmallow): Users had to grant all permissions at installation time. If an app requested permissions you didn't like, you had to choose between installing it anyway or not installing it at all.
Android 6.0 and Later: The model shifted to runtime permissions. Now users are prompted to grant or deny individual permissions the first time an app actually needs them. You can also revoke permissions later without uninstalling the app.
This change significantly improved user control. However, one limitation remains: pre-installed system apps often have permissions that cannot be revoked and cannot be fully disabled by users.
Google Play Protect and Malware Scanning
Google introduced several automated systems to protect users from malicious apps:
Google Play Protect (formerly Bouncer) has scanned apps in the Play Store for malware since February 2012. This is an automated analysis system that looks for suspicious code patterns and behaviors before apps are made available.
Verify Apps (introduced in Android 4.2) goes further by scanning apps that are already installed on your device for malicious behavior. Originally a background process, it was updated in 2014 for continuous scanning and became visible to users in 2017, so you can see when scanning occurs and view results.
These tools work together as multiple layers of defense, but they're not perfect—no automated system can catch all threats.
Verified Boot and Integrity Protection
The Verified Boot Chain
One of Android's most critical security mechanisms is the verified boot chain, which ensures that every piece of software loaded during startup hasn't been modified or tampered with.
Here's how it works:
When your device powers on, the bootloader loads first
The bootloader verifies the kernel's cryptographic signature
The kernel verifies the system partition's integrity
Each step only proceeds if verification succeeds
This creates a chain of trust: a hardware-level guarantee that the core system hasn't been compromised. If any part of this chain fails verification, the device refuses to boot, preventing modified or malicious systems from running.
A crucial aspect of this system is rollback protection: verified boot prevents you from installing older versions of Android. This protects you from downgrade attacks—where an attacker tries to roll back your device to an older version with known security vulnerabilities.
dm-verity: Continuous Integrity Checking
While verified boot checks integrity at startup, dm-verity (device mapper-verity) continuously protects the system while it's running. It provides transparent integrity checking of read-only partitions like /system/.
Here's why this matters: if malware somehow got into the system partition, dm-verity would detect when the kernel tries to read a modified block and prevent the operation. This helps prevent persistent rootkits—malware that survives reboots by modifying system files.
The word "transparent" is important here: the integrity checking happens automatically without requiring app developers or users to do anything special.
Security Updates and Patch Distribution
The Update Challenge
Google's vision for Android security includes regular security patches. Starting in 2015, Google announced that Nexus devices (now called Pixel) would receive monthly security patches and major OS updates for at least two years.
However, the industry has struggled to meet this standard. The reality is:
Major manufacturers (Samsung, LG, etc.) often take weeks or months to deliver patches after Google releases them
Older devices rarely receive updates—support is often limited to 2-3 years
Budget devices may receive few or no patches after purchase
Fragmentation means some devices never reach the latest Android version
The fundamental problem is economic: manufacturers prioritize creating new devices over maintaining old ones. This leaves many devices vulnerable to known exploits long after patches are available.
<extrainfo>
The Stagefright vulnerability discovered in 2015 was so serious that it prompted Samsung and LG to adopt monthly security patches in August 2015. This vulnerability affected how Android processes media files and could allow remote code execution.
</extrainfo>
Key Takeaways
Android's security approach combines multiple layers:
Isolation (sandboxing) prevents apps from interfering with each other
Permissions control gives users authority over what apps can access
Verified boot and dm-verity protect the system from tampering
Automated scanning detects malicious apps
Regular patches fix discovered vulnerabilities
However, no system is perfectly secure. Users must understand that:
Security depends on timely updates, which aren't always guaranteed
Rooting or unlocking the bootloader removes important protections
Even well-designed systems rely on responsible practices from manufacturers and users
Flashcards
Which Android partition is used to store the operating system?
/system/
Which Android partition is used to store user data and applications?
/data/
What are the two primary ways to obtain root access on an Android device?
Exploiting security flaws
Unlocking the bootloader
What typically happens to user data when the Android bootloader is unlocked?
All user data is erased
Which developer setting must be enabled to allow bootloader unlocking via Fastboot?
OEM unlocking
How does the Android application sandbox restrict app access to system resources?
Apps are isolated and require explicit user-granted permissions
Which Android version introduced runtime permission prompts for individual permissions?
Android 6.0 "Marshmallow"
What is a major security limitation regarding permissions for pre-installed Android apps?
Permissions may be non-revocable and apps cannot be fully disabled
Which three components does the Android verified boot chain check for integrity?
Bootloader
Kernel
System partitions
How does Verified Boot's rollback protection mitigate downgrade attacks?
It prevents the installation of older Android versions
What is the primary purpose of the Verified Boot process during start-up?
To check the integrity of the OS and prevent tampering
What type of malware does dm-verity help prevent by checking block device integrity?
Persistent rootkits
Which specific types of partitions does dm-verity provide transparent integrity checking for?
Read-only partitions
What commitment did Google make in 2015 regarding Nexus device security updates?
Monthly security patches for at least two years
Why do core OS bug patches often fail to reach certain Android users?
They often do not reach older or low-priced devices
Quiz
Android (operating system) - Security Model and Integrity Quiz Question 1: What is a typical consequence of unlocking the bootloader on an Android device?
- All user data on the device is erased (correct)
- Battery life is significantly extended
- Screen resolution is automatically changed
- Wi‑Fi passwords are reset
Android (operating system) - Security Model and Integrity Quiz Question 2: Which vulnerability prompted Samsung and LG to adopt monthly security patches in August 2015?
- Stagefright (correct)
- Heartbleed
- BlueBorne
- Spectre
Android (operating system) - Security Model and Integrity Quiz Question 3: What does Android’s verified boot chain establish across the boot process?
- Hardware‑level chain of trust (correct)
- User‑level permission model
- App sandbox isolation
- Automatic update schedule
Android (operating system) - Security Model and Integrity Quiz Question 4: What type of integrity does Verified Boot verify at start‑up?
- Operating‑system integrity (correct)
- Battery health integrity
- Network connection integrity
- User interface integrity
Android (operating system) - Security Model and Integrity Quiz Question 5: What common issue has limited the effectiveness of monthly security updates across Android devices?
- Many manufacturers do not meet promised update schedules (correct)
- All devices receive updates promptly
- Google restricts updates to Nexus devices only
- Updates are automatically installed without user consent
Android (operating system) - Security Model and Integrity Quiz Question 6: Which Android security mechanism provides transparent integrity checking of block devices?
- dm‑verity (correct)
- SELinux
- Verified Boot
- TrustZone
Android (operating system) - Security Model and Integrity Quiz Question 7: In Android’s security architecture, dm‑verity protects which type of partitions?
- Read‑only partitions (correct)
- Writable data partitions
- Temporary cache partitions
- Encrypted user partitions
Android (operating system) - Security Model and Integrity Quiz Question 8: Which line of Google devices did the company commit to delivering monthly security patches for starting in 2015?
- Nexus devices (correct)
- Pixel devices
- Android One devices
- Motorola Moto series
Android (operating system) - Security Model and Integrity Quiz Question 9: How does Android ensure that an app can only access protected system resources?
- By requiring explicit user‑granted permissions (correct)
- By sharing a common process space among apps
- By automatically granting all requested permissions
- By limiting apps to a read‑only filesystem
Android (operating system) - Security Model and Integrity Quiz Question 10: Which Android security feature, introduced in Android 4.2, continuously scans installed apps for potentially malicious behavior?
- Verify Apps (correct)
- Google Play Protect
- Bouncer scanner
- SafetyNet
Android (operating system) - Security Model and Integrity Quiz Question 11: What is a common limitation affecting the distribution of core OS security patches on Android?
- They often do not reach older or low‑priced devices (correct)
- They are delayed by a full year before release
- They are only provided for flagship models
- They require manual installation by the user
Android (operating system) - Security Model and Integrity Quiz Question 12: On a non‑rooted Android device, which partition can users write their own data and install apps to?
- /data (correct)
- /system
- /cache
- /boot
Android (operating system) - Security Model and Integrity Quiz Question 13: What does Google’s Bouncer scanner, part of Play Protect, do when apps are uploaded to the Play Store?
- Scans the apps for malware (correct)
- Improves app download speed
- Optimizes app battery usage
- Verifies app screenshots
What is a typical consequence of unlocking the bootloader on an Android device?
1 of 13
Key Concepts
Android Security Mechanisms
Android Verified Boot
Application Sandbox (Android)
Google Play Protect
Runtime Permissions (Android)
Android Security Patches
Android Vulnerabilities and Access
Android Rooting
Bootloader Unlocking
Stagefright Vulnerability
Android System Structure
Android Partition Layout
dm‑verity
Definitions
Android Verified Boot
A hardware‑level chain of trust that checks the integrity of the bootloader, kernel, and system partitions at startup.
dm‑verity
A kernel feature that provides transparent integrity verification of read‑only block devices to prevent persistent rootkits.
Application Sandbox (Android)
An isolation mechanism that runs each app in its own restricted environment, limiting access to system resources unless granted permission.
Google Play Protect
A security service that scans apps in the Play Store and on devices for malware using the Bouncer scanner.
Runtime Permissions (Android)
A permission model introduced in Android 6.0 that prompts users to grant or deny individual permissions at the time an app requests them.
Android Rooting
The process of obtaining superuser access on a device, often by exploiting vulnerabilities or unlocking the bootloader, which typically erases user data.
Android Partition Layout
The division of flash storage into partitions such as /system for the OS and /data for user apps and data.
Bootloader Unlocking
An OEM‑provided option that allows the device’s bootloader to be unlocked via Fastboot, enabling custom firmware installation.
Stagefright Vulnerability
A critical media‑framework bug in Android that led to widespread security patches and heightened focus on timely updates.
Android Security Patches
Periodic updates, originally promised as monthly for Nexus devices, that address OS bugs and vulnerabilities across the Android ecosystem.