Android Marshmallow
Android Marshmallow, also known as Android 6.0, is the sixth major release of the Android mobile operating system developed by Google, featuring API level 23 and introducing significant enhancements in power management, security, and user assistance.[1] It was first previewed as "Android M" at the Google I/O conference on May 28, 2015, with developer previews made available that day for testing on select Nexus devices.[2] Officially named Android Marshmallow on August 17, 2015, alongside the release of the final SDK, it became available to the public starting October 5, 2015, via over-the-air updates for Nexus devices and pre-installed on the new Nexus 5X and 6P smartphones.[3][4] This version emphasized battery efficiency through innovative features like Doze and App Standby, which automatically optimize idle devices and underused apps to extend battery life by up to 30% on average during standby.[4][5] Runtime permissions allowed users to grant or revoke app access to sensitive features like the camera or location at the point of use, rather than during installation, enhancing privacy control.[1][6] Now on Tap, a contextual assistance tool powered by the new Assist API, enabled quick access to relevant Google services—such as search, calendar events, or app shortcuts—directly from within other apps by long-pressing the home button.[4][7] Additional notable improvements included native support for fingerprint authentication, allowing secure device unlocking, app access, and payments via Android Pay without passwords.[1] Direct Share streamlined sharing content to specific contacts or apps, while Chrome Custom Tabs improved web viewing within apps by integrating a customized Chrome browser experience.[8] Android Marshmallow also introduced adoptable storage, enabling users to expand internal storage using microSD cards formatted as internal partitions, and enhanced Android for Work profiles for better separation of personal and professional data.[5] Overall, these updates focused on making Android more intuitive, efficient, and secure, paving the way for its successor, Android 7.0 Nougat, in 2016.[9]Development and Release
Announcement and Preview
Android Marshmallow, internally codenamed Android M during development, was first publicly announced on May 28, 2015, during the opening keynote at the Google I/O developer conference.[2] The announcement highlighted the upcoming major version of the Android operating system, focusing on enhancements to user experience, security, and performance, with a planned stable release later that year.[10] Google emphasized that Android M would introduce significant API changes aimed at improving app integration and device efficiency, setting the stage for broader ecosystem adoption. Alongside the announcement, Google immediately released the Android M Developer Preview 1, making it available for download on the same day for select Nexus devices including the Nexus 5, Nexus 6, Nexus 9, and Nexus Player.[10] This early preview build allowed developers to access and test the platform ahead of the final release, providing factory images and over-the-air updates for compatible hardware.[2] The primary goals of the preview were to collect developer feedback on emerging features and APIs, enabling iterative improvements based on real-world testing and compatibility checks. Key elements teased in the preview included runtime permissions, which allow users to grant app permissions at runtime rather than during installation, and Doze mode, a battery optimization feature that restricts background activity when the device is idle.[2] Developers were encouraged to experiment with these APIs to ensure app compatibility, with Google committing to multiple preview updates throughout the summer to refine the platform. Additionally, the announcement included demonstrations of potential multi-window support for multitasking, though this feature was ultimately not included in the final release, and enhancements to notifications such as direct replies from lock screens.[11] These previews marked a shift toward more collaborative development, with developers quickly participating in the early access program.Beta Testing
The beta testing phase for Android Marshmallow was conducted via Google's Developer Preview program, which allowed developers and enthusiasts to test early builds on supported Nexus devices. The second Developer Preview, released on July 9, 2015, provided updated platform code, near-final APIs, and refinements to system images for Nexus 5, Nexus 6, Nexus 9, and Nexus Player, enabling broader testing and feedback collection.[12] Public access to the previews was available through manual flashing or over-the-air (OTA) updates for eligible Nexus devices, with the program expanding participation following the initial May 2015 release at Google I/O. A total of three previews were issued, allowing iterative testing leading up to the final version, with enrollment open to any owner of compatible hardware. Key areas of feedback included bug reports related to the runtime permissions user interface, Doze mode for battery optimization, and App Standby functionality for managing background app activity. Developers and testers reported issues with permission granting flows and battery drain scenarios under Doze, prompting Google to iterate on these features across previews. In response to community input, Google refined the permissions UI for improved clarity and user control, enhanced Doze's battery savings by addressing edge cases in idle detection, and adjusted App Standby to better balance app restrictions with usability. Additional changes incorporated tester feedback on Now on Tap integration, optimizing its contextual search activation within apps, and fingerprint authentication APIs, which saw updates for better error handling and enrollment reliability.[3]Official Launch
The name Android Marshmallow and version 6.0 were officially announced on August 17, 2015, alongside Developer Preview 3 and the final SDK.[3] A press event on September 29, 2015, revealed new Nexus hardware pre-installed with Marshmallow and confirmed the upcoming stable release, emphasizing Marshmallow's performance improvements and integration with features like Now on Tap.[13] The stable version launched on October 5, 2015, as Android 6.0 with API level 23, marking a significant update from Android 5.1 Lollipop.[4][1] Over-the-air (OTA) updates began rolling out immediately to select Nexus devices, including the Nexus 5, Nexus 6, Nexus 7 (2013, Nexus 9, and Nexus Player, while the newly released Nexus 5X and Nexus 6P shipped pre-installed with Marshmallow.[4] Sony also announced on October 6, 2015, that its Xperia Z3 and Z4 series would receive the update, positioning them among the first non-Nexus devices in the initial rollout phase. Google prioritized OTA updates for its Nexus lineup to ensure rapid adoption among developers and early users, with the full source code released to the Android Open Source Project (AOSP) shortly thereafter on October 6, 2015, under the tag android-6.0.0_r1.[14][15] This AOSP availability enabled the swift development of custom ROMs and adaptations by the open-source community, broadening Marshmallow's reach beyond stock devices.[14]Core Features
User Interface Improvements
Android Marshmallow brought several enhancements to the user interface, focusing on greater personalization and contextual interaction to streamline daily use. A major update was to the notification panel, where users gained the ability to customize quick settings tiles for the first time. This allowed rearrangement of tiles via a simple edit mode, enabling prioritization of essential toggles such as Wi-Fi, Bluetooth, location, or screen rotation, while hiding less-used ones to reduce clutter.[4] The system also supported more interactive notifications on the lock screen, permitting users to expand and reply directly to messages from supported apps without unlocking the device, leveraging the RemoteInput API for seamless responses.[5] Google Now on Tap marked a significant step in contextual assistance, accessible by long-pressing the home button. This feature scanned the current screen—whether an app, webpage, or media—and surfaced relevant information, shortcuts, or actions from Google services, such as nearby directions from a restaurant mention in a text or music details from a video. It respected user privacy by requiring explicit screen context sharing and worked across apps to minimize context switching.[4][16] Limited multi-window functionality was introduced in split-screen mode, primarily for larger devices like the Nexus 9, where compatible apps could run side-by-side after activation via recent apps overview. This experimental support enhanced productivity on tablets by allowing simultaneous use of two apps, though it required developer opt-in and was not universally available across all devices or apps.[17] The emoji library saw an expansion with the addition of over 180 new characters in Android 6.0.1, incorporating Unicode 8.0 symbols like the middle finger gesture, taco, and unicorn face to broaden expressive options in communications. These updates aligned with global standards for richer visual messaging without altering core rendering mechanics.[18]Battery and Performance Enhancements
Android Marshmallow introduced significant battery-saving mechanisms to extend device longevity during idle periods. The primary feature, Doze mode, activates when the device is unplugged, stationary, and the screen is off for an extended time, entering a low-power state that restricts apps' access to the network, defers CPU-intensive tasks and syncing, and ignores most wake locks while allowing periodic maintenance windows for priority activities. This results in up to 30% longer standby battery life on average, as demonstrated in tests on Nexus 5 and Nexus 6 devices. Doze prioritizes essential notifications and alarms, ensuring critical functionality remains available without fully compromising usability. Complementing Doze, App Standby identifies infrequently used apps based on user interaction patterns and places them into a restricted state, limiting their background data usage, job scheduling, and network access until the user actively engages with them again. This optimization shifts resources toward frequently used applications, further conserving power by preventing unnecessary battery drain from dormant apps. Together, Doze and App Standby represent proactive system-level interventions that adapt to user behavior, significantly improving overall efficiency on idle devices. On the runtime side, enhancements to the Android Runtime (ART) compiler in Android 6.0 improved app execution by properly enforcing access rules for methods like newInstance(), enabling more reliable and efficient code handling that contributes to smoother performance and faster app launches overall.Security and Privacy Updates
Android Marshmallow introduced a significant overhaul to the permissions model with runtime permissions, shifting from the previous install-time granting to on-demand requests for sensitive data access. Apps targeting API level 23 must request "dangerous" permissions—such as access to the camera, contacts, location, or microphone—only when they are needed during usage, allowing users to make informed decisions in context. Users can subsequently revoke these permissions at any time through the device settings without uninstalling the app, enhancing privacy by limiting unnecessary data exposure and reducing the risk of over-privileged applications. This feature applies to both new and updated apps, with legacy apps receiving a one-time prompt on first use after upgrade.[5] A key addition for authentication was the public API supporting fingerprint-based security, integrated with the Android Keystore system for hardware-backed operations. Developers can utilize the FingerprintManager class to initiate authentication via theauthenticate() method, which securely verifies a user's enrolled fingerprint against the sensor data without exposing raw biometric information. This API supports multiple enrolled fingerprints per user, enabling flexible and convenient secure logins for apps like banking or payment services, while ensuring cryptographic keys remain protected in the Trusted Execution Environment (TEE). Devices must declare the USE_FINGERPRINT permission and hardware capability for compatibility.[8]
To bolster boot-time integrity, Android Marshmallow implemented Verified Boot, a cryptographic verification mechanism that checks the authenticity and integrity of the operating system partitions before loading. Using a hardware root of trust, the bootloader verifies the boot chain from the initial key to the system image with algorithms like SHA-256 for hashing and RSA-2048 for signatures, preventing the execution of modified or malicious firmware. Compatible devices must declare the android.software.verified_boot feature in their compatibility definition, ensuring users boot into a trusted state and mitigating risks from tampered system partitions. This was particularly emphasized for new devices shipping with Marshmallow, providing a verifiable good boot state.[19][20]
As a precursor to Google Play Protect, Marshmallow enhanced malware detection through improved app verification in Google Play, scanning downloads for known threats before installation to protect against harmful software. This built on existing Play Store safeguards with tighter integration of machine learning-based analysis, contributing to broader device security by blocking potentially malicious apps proactively.[21]
Storage and Connectivity
Adoptable Storage
Adoptable storage, introduced in Android 6.0 Marshmallow, enables users to designate external storage devices, such as microSD cards, as an extension of the device's internal storage.[8] This feature formats and encrypts the external media to integrate it seamlessly with the internal partition, allowing applications and user data to be stored and installed directly on the adopted storage without distinguishing it from internal memory in everyday use.[22] The primary goal is to address storage limitations on lower-end devices by dynamically allocating space across both internal and adopted storage based on availability, with the system preferring faster internal storage for performance-critical operations.[8] To adopt an external storage device, users access the settings menu under Storage, where the system prompts for confirmation before proceeding.[22] The adoption process wipes all existing data on the card, formats it using a filesystem like ext4 or the recommended f2fs for flash media, and encrypts it with device-specific keys—either full-disk encryption (FDE) or file-based encryption (FBE) tied to the adopting device.[22] Once adopted, the storage appears as a single unified pool, and users have the option to migrate existing files from the portable /sdcard directory to free up internal space.[22] This integration supports dynamic file path adjustments in APIs, ensuring apps can access data without hardcoded paths, though developers must use runtime checks for compatibility.[8] Despite its benefits, adoptable storage has notable limitations that impact its practicality. Not all devices support the feature, as it requires kernel-level modifications and stable media slots, excluding many budget handsets without manufacturer implementation.[22] Performance is generally slower than internal eMMC or UFS storage due to the external medium's lower read/write speeds, prompting the system to issue warnings for sluggish cards and potentially relocating apps to internal storage if issues arise.[22] Additionally, the encryption binds the storage exclusively to the adopting device, rendering it unusable or inaccessible if removed, which poses risks of data loss for removable media like SD cards.[22] USB OTG drives can be adopted in limited stable configurations, such as on Android TV devices, but this is not viable for typical mobile scenarios.[22] For backward compatibility, adoptable storage respects theandroid:installLocation attribute in app manifests, allowing legacy applications targeting pre-6.0 APIs to opt out of installation on adopted storage if set to internal-only.[8] Developers of older apps may need to incorporate API level checks to handle dynamic storage paths, but no mandatory code changes are required for basic functionality.[8] This design was particularly aimed at alleviating storage constraints on entry-level devices, enabling larger app installations without frequent user intervention.[22]
USB and Hardware Support
Android Marshmallow introduced native support for USB Type-C connectors, enabling reversible plugging and simplifying user interaction with compatible devices. This implementation allowed for faster charging capabilities through USB Power Delivery (USB-PD) standards and supported alternate modes such as DisplayPort over USB-C for video output, as demonstrated on the Nexus 5X and 6P smartphones, which could connect to external displays via adapters. Android continued support for USB audio peripherals, introduced in Android 5.0, permitting audio playback from external USB devices like DACs, though high-resolution formats often required third-party apps for full compatibility. This feature leveraged the Android Open Accessory protocol to ensure low-latency audio streaming and compatibility with a broader range of USB audio peripherals.[23] Android Marshmallow included optimizations for low-latency rendering and sensor fusion to support virtual reality experiences compatible with Google Cardboard and similar low-cost headsets, allowing developers to create 360-degree video and interactive VR content using standard hardware like gyroscopes and accelerometers.[8] Sensor handling saw enhancements in activity recognition APIs, enabling more accurate step counting and physical activity detection through improved processing of data from existing accelerometers and other motion sensors, without necessitating new hardware. This built on prior sensor batching to reduce power consumption while providing real-time fitness tracking insights. Fingerprint hardware integration was also supported natively, allowing secure authentication on devices equipped with compatible sensors.Developer Platform
API Changes
Android 6.0 Marshmallow introduced API level 23, which brought significant updates to the Android SDK and framework to enhance developer capabilities in handling permissions, power management, and biometrics. A key change was the shift to runtime permissions, allowing apps to request dangerous permissions at runtime rather than install time. Developers can use new utility classes in the support library, such asContextCompat.checkSelfPermission() to verify if an app has a specific permission and ActivityCompat.requestPermissions() to prompt the user for granting it. These APIs enable more granular control, with permissions categorized as normal or dangerous, where dangerous ones require explicit user approval. Additionally, device and profile owners can manage permission policies via DevicePolicyManager.setPermissionPolicy().[5]
To optimize for battery life, API level 23 introduced Doze mode and App Standby, which restrict background activity on idle devices and unused apps. Developers must make their apps Doze-aware by using APIs like JobScheduler for scheduling jobs that respect these restrictions, ensuring tasks such as syncing defer until the device is active. The AlarmManager was updated to support inexact alarms via setAndAllowWhileIdle(), allowing alarms to fire even in Doze but with relaxed timing precision. These changes require apps to handle partial wake locks and network access limitations during maintenance windows.[5][24]
Biometric authentication saw the addition of the FingerprintManager class, enabling apps to authenticate users using fingerprint sensors. This API requires the USE_FINGERPRINT permission and provides methods like authenticate() to initiate the process, returning results via a callback. It supports integration with KeyStore for secure key generation tied to the user's fingerprint, enhancing security for sensitive operations without storing credentials. Apps targeting API level 23 can leverage this for features like secure payments or app locking.[8]
Older storage access methods were deprecated, pushing developers toward modern alternatives like the Storage Access Framework introduced in earlier versions but refined here for API level 23 compliance. Apps must now use internal storage or scoped access to avoid security risks from external storage reads.[5]
Build tools received updates with the release of SDK Tools Revision 24.3 alongside Android Studio 1.3, improving integration for targeting API level 23. This included enhanced support for multi-APK publishing via build variants in the Gradle plugin, allowing developers to generate APKs optimized for different device configurations like screen densities or ABIs without a single monolithic build.[3]
App Compatibility
Android Marshmallow introduced runtime permissions, significantly impacting app compatibility by shifting from install-time grants to user-controlled access for dangerous permissions such as camera, location, and storage. Apps targeting API level 23 or higher must explicitly request these permissions at runtime using methods likecheckSelfPermission() and requestPermissions(), with users able to grant or revoke them individually without reinstalling the app.[6] For apps targeting API levels below 23, permissions are granted automatically at install time on Android 6.0 devices, maintaining backward compatibility without runtime prompts during initial installation or OS upgrades. However, upon upgrading such an app to target API 23, developers must implement runtime permission handling, as previously granted dangerous permissions may require user re-approval if not already confirmed.[6]
Storage access underwent changes through the runtime permission model, requiring explicit user consent for READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE in apps targeting API 23. This prevents unauthorized full filesystem reads or writes to external storage, limiting access to only granted directories and files unless the user approves broader scope. Legacy apps targeting pre-23 continue to receive full storage access at install time, but developers are encouraged to test and migrate to runtime checks to avoid future breakage on updated devices.[5]
Background behavior changes in Marshmallow, particularly Doze and App Standby modes, impose stricter restrictions on apps to optimize battery life, affecting compatibility for those relying on continuous execution. When the device is idle (screen off, stationary, and unplugged), Doze defers background jobs, alarms, and network activity, with brief maintenance windows for syncing; App Standby further buckets infrequently used apps, suspending their sync adapters and jobs when the device is idle. Apps facing these restrictions can adapt by using the JobScheduler API for deferred, power-aware task scheduling, ensuring reliable execution during allowed windows without violating power-saving policies.[5]
Vendor fragmentation posed challenges for app compatibility on non-Nexus devices, as original equipment manufacturers (OEMs) often delayed Marshmallow updates or introduced custom modifications. The Android 6.0 Compatibility Definition Document (CDD) mandated that compatible devices implement all core APIs without alteration, support the Compatibility Test Suite (CTS) for verification, and provide mechanisms for over-the-air (OTA) updates to address compatibility issues, including accurate reporting of hardware features via PackageManager. OEMs were required to base implementations on the Android Open Source Project to minimize API inconsistencies, though delays in rolling out updates—sometimes months or years after the official launch—left many devices vulnerable to unpatched compatibility gaps until certified.[19]