
Significant security enchancements of recent major Android versions.
Significant security enhancements of recent major Android versions, starting with Android 5.0 Lollipop (API 21).
Security Enhancements - Android 5
WebView is a separate package, see Security Enhancements in Android 5.0 and The Updatable WebView on Android 5.0 Lollipop What Is It and Why Should You Care?Security Enhancements in Android 6
isInsideSecureHardware) for checking whether a KeyStore key is stored in secure hardware (e.g., Trusted Execution Environment (TEE) or Secure Element (SE)), see isInsideSecureHardware method of KeyInfoSecurity Enhancements - Android 7
Security Enhancements - Android 8
WebView so JavaScript code cannot access the app's memory so easily, see What’s new in WebView security and Security section of Android 8.0 Behavior Changes for All AppsWebView respects Network Security Config and cleartextTrafficPermitted flag (on older Android versions it loads HTTP sites even if clear text traffic should not be allowed by the config), see Security section of Android 8.0 Behavior Changes for Apps Targeting Android 8.0WebView so users would be warned when trying to navigating to a potentially unsafe website (verified by Google Safe Browsing) if enabled, see WebView APIs section of Android 8.0 Features and APIsFLAG_SECURE Window flag is supported more and disallows taking screenshots of the screen where this is setAndroid 9 release notes - Security features
cleartextTrafficPermitted to true in their Network Security Config it if they still want to use it (not recommended), see Network TLS enabled by default section of Behavior changes: apps targeting API level 28+ and Android: Cleartext HTTP traffic not permitted Android 9Security Enhancements - Android 10
Android 10 release notes - Security features
WebView, see setAllowFileAccess method of WebSettingsAndroid 11 release notes - Secure
taskAffinity to the same as the target to trick the user to launch it even if they inteded to launch the target app and used it's legitimate app icon) no longer possible, see StrandHogg Attack / Task Affinity Vulnerability and Strandhogg VulnerabilityrequestLegacyExternalStorage, see Storage updates in Android 11 and Opt out in your production app section of Android storage use cases and best practicesSecurity Enhancements - Android 12
android:exported flag needs to be defined explicitly in Manifests for components (Activities, Content Providers, etc.) that declare Intent Filters, see Safer component exporting section of Behavior changes: Apps targeting Android 12requestLegacyExternalStorage is no longer possible, see Opt out in your production app section of Android storage use cases and best practicesSecurity Enhancements - Android 13
Android 13 release notes - Security
POST_NOTIFICATIONS runtime permission added for sending non-exempt (including Foreground Services (FGS)) notifications from an app, see Notification runtime permission and android.permission.POST_NOTIFICATIONSSecurity Enhancements - Android 14
Android 14 Security Release Notes
targetSdk requirement: apps that target Android versions older than Android 6 (API 23) can no longer be installed. This means that you can assume that the security restrictions (noteworthily Runtime Permission handling in this case) introduced with Android 6 (API 23) now applies to all apps installed on the device (this minimum is expected to increase with each future Android versions), see Minimum installable target API level section of Behavior changes: all appsQUERY_ALL_PACKAGES permission granted - which requires special manual Google Play review to attain), see Media owner package names might be redacted section of Behavior changes: all appsAndroid 15 Security Release Notes
PendingIntent creators now block background Activity launches by default if your app targets Android 15 (API 35), see Other changes section of Behavior changes: Apps targeting Android 15 or higherPendingIntent creator allows background activity launch privileges or the sender has background activity launch privileges, if your app targets Android 15 (API 35), see Other changes section of Behavior changes: Apps targeting Android 15 or higherAndroid 16 Security Release Notes
RESULT_DISCOVERY_TIMEOUT. Instead, the user is notified of timeout events with a visual dialog. When the user dismisses the dialog, the app is alerted of the association failure with RESULT_USER_REJECTED, see Companion apps no longer notified of discovery timeouts section of Behavior changes: all appsMediaStore#getVersion() will now be unique to each app. This eliminates identifying properties from the version string to prevent abuse and usage for fingerprinting techniques, see MediaStore version lockdown section of Behavior changes: Apps targeting Android 16 or higher and getVersion method of MediaStoreAndroid 17 Security Release Notes
READ_CONTATCS permission, see Android contacts picker section of Features and APIsKeyStoreException, see Per-app keystore limits section of Behavior changes: all appssetViewsetViewBiometricPrompt for authentication.FLAG_SECURE flag is added for biometric or device credential (PIN, pattern or password) prompts, including both unlocking the device and BiometricPrompt in apps - this means you cannot take a screenshot of these screens and they also appear blacked out in screen shares, see source for com.android.systemui.biometrics.AuthContainerView on Android Code Searchapksigner will use the v3.1 signature scheme by default to target rotation for Android 13 and higher.Exception, see Safer dynamic code loading section of Behavior changes: Apps targeting Android 14 or highernull) will no longer match any intent-filters. This means that intents used to start activities or services must have a clearly defined action, see Safer Intents section of Behavior changes: Apps targeting Android 15 or higherPendingIntent is treated as the sender of the enclosing intent, not the sender of the pending intent, see Safer Intents section of Behavior changes: Apps targeting Android 15 or higherBiometricPrompt: it cannot "fall back" to device credentials after failing with biometrics to still complete the user authentication. Note that the user can still use device credentials by choice via a button on the prompt if that authenticator is allowed (and if they did not fail the prompt too many times already). When the device gets locked, the prompt will be cancelled and a new prompt needs to be triggered after the device is unlocked to succeed with the authentication. See Android 15 makes sure thieves can't clean out your bank account if they steal your unlocked phonemoduleHash field in the KeyDescription structure, which can be used to verify the integrity of loaded APEX modules, see Device integrity section of Android 16 release notes and Key and ID attestation