This page describes significant revisions to source.android.com. Please see the Android Open Source Project (AOSP) docs/source.android.com log for the complete list of changes to this site.
Android 8.0 has been released! This section describes the major new features in the Android 8.0 platform.
Android 8.0 includes support for Treble, a major re-architect of the Android OS framework designed to make it easier, faster, and less costly for manufacturers to update devices to a new version of Android. Documentation includes details on the HAL interface definition language (HIDL), a new ConfigStore HAL, Device Tree Overlays, the Vendor Native Development Kit (VNDK), Vendor Interface Objects (VINTF), Modular Kernel requirements, and the Vendor Test Suite (VTS) and Infrastructure.
Kernel enhancements to LLDB/C++ debugging
The Android 8.0 release includes kernel enhancements that help developers create better applications by improving their debugging experience. For more information, see Implementing kernel enhancements to LLDB/C++ debugging.
Upstreamed kernel hardening features and tools to find bugs in kernel drivers. For more information, see Kernel Hardening.
Optimizing SquashFS at the Kernel Level
SquashFS is a compressed read-only filesystem for Linux, suitable for use on the system partition. The optimizations in this document help improve the performance of SquashFS. For more information, see Optimizing SquashFS at the Kernel Level.
ART and Dalvik
The Android Open Source Project (AOSP) offers a new fuzzing testing suite for testing the Android runtime (ART) infrastructure. The new toolset, JFuzz and an improved DexFuzz, are directly available in AOSP now with accompanying documentation. See: https://android.googlesource.com/platform/art/+/master/tools/jfuzz/README.md https://android.googlesource.com/platform/art/+/master/tools/dexfuzz/README
Nothing is required to implement or use the new tools. You may make changes to the tools if required, just like you can make changes to the runtime/compiler already.
VDEX files: Improve System Update Performance
VDEX files improve the performance and user experience of software updates. VDEX
files store pre-validated DEX files with verifier dependencies so that during
system updates ART does not need to extract and verify the DEX files again. No
action is needed to implement this feature. It is enabled by default. To
disable the feature, set the
ART_ENABLE_VDEX environment variable
ART performance improvements
The Android runtime (ART) has been improved significantly in the Android 8.0 release. This document summarizes enhancements device manufacturers can expect in ART. For more information, see Improving ART Performance in Android 8.0.
Android A/B OTA Updates
This update answers common questions device manufacturers have regarding Android A/B (seamless) system updates. For more information, see A/B (Seamless) System Updates Frequently asked questions.
Bluetooth connection management
Android 8.0 provides Bluetooth connection management in in-vehicle infotainment systems for a more seamless Bluetooth user experience. For more information, see Bluetooth connection management.
Bluetooth multi-device HFP
Bluetooth multi-device connectivity lets users connect multiple devices to telephony profiles in an Android Automotive IVI Bluetooth. For more information, see IVI Connectivity.
Vehicle Camera HAL
Describes the design of an exterior view system (EVS) stack and provides the HAL specification for supporting the acquisition and presentation of vehicle camera data. For more information, see Exterior View System (EVS) Vehicle Camera HAL.
See the updated Bluetooth overview.
Verifying and debugging Bluetooth
A new page about how to verify and debug the native Bluetooth stack. See this page at Verifying and Debugging.
Bluetooth provides a variety of features that enable core services between devices, such as audio streaming, phone calls, and messaging. For more information about the Android Bluetooth services, see Bluetooth Services.
Bluetooth 5 supports different modes of data advertisements for Bluetooth Low Energy, including higher bandwidth or increased range. For more information, see Bluetooth Low Energy Advertising.
Bluetooth support for audio codecs
The Android 8.0 release includes support for Bluetooth high-definition audio codecs. For more information, see Advanced audio codecs.
Critical camera features
The Android 8.0 release contains these key enhancements to the Camera service: shared surfaces, enable multiple surfaces sharing the same OutputConfiguration System API for custom camera modes, and onCaptureQueueEmpty. For more information, see Camera Version Support.
Capabilities allow Linux processes to drop most root-like privileges, while
retaining the subset of privileges that they require to perform their function.
Ambient capabilities allows system services to configure capabilities in their
.rc files, bringing all their configuration into a single file. For
more information, see Implementing
Privileged Permission Whitelist Requirement
Starting in Android 8.0, all privileged apps must be explicitly whitelisted in
system configuration XML files in the
If they are not, then the device will boot, but the device implementation will
not pass CTS. For more information, see Privileged
Permission Whitelist Requirement.
Implementing USB HAL
The Android 8.0 release moves handling of USB commands out of init scripts and into a native USB daemon for better configuration and code reliability. For more information, see Implementing USB HAL.
Customizing Device Behavior for Out-of-balance Users
Android devices with no data balance allow network traffic through, requiring carriers and telecoms to implement mitigation protocols. This feature implements a generic solution that allows carriers and telcos to indicate when a device has run out of balance. For more information, see Customizing device behavior for out-of-balance users.
Enabling sanitizers in the Android build system
Sanitizers are compiler-based instrumentation components to use during development and testing in order to identify bugs and make Android better. Android's current set of sanitizers can discover and diagnose memory misuse bugs and potentially dangerous undefined behavior. For more information, see Enabling Sanitizers in the Android Build System.
Recover devices in reboot loops
Android 8.0 includes a feature that sends out a "rescue party" when it notices core system components stuck in crash loops. Rescue Party then escalates through a series of actions to recover the device. For more information, see Rescue Party.
Android 8.0 adds support for
storaged, an Android native daemon that
collects and publishes storage metrics on Android devices. For more information,
Air Traffic Control for floating windows
Android 8.0 introduces Air Traffic Control for floating windows in order to simplify and unify how apps display on top of other apps. Everything necessary to use the feature is included in the Android Open Source Project (AOSP).
Air Traffic Control allows developers to create a new (managed) floating layer/window type for apps to use to display windows on-top of other apps. The feature displays ongoing notifications for all apps using a floating layer that lets the user manage the alert window.
The Android Compatibility Test Suite (CTS) confirms:
- The current alert window types are:
- Apps targeting the O SDK won't be able to use the window types above to display windows above other apps. They will need to use a new window type TYPE_APPLICATION_OVERLAY.
- Apps targeting older SDKs can still use the current window types; however, the windows will be z-ordered below the new TYPE_APPLICATION_OVERLAY windows.
- The system can move or resize windows in the new layer to reduce clutter.
- Device manufacturers must keep the notification that lets users control what is displayed over other apps.
Launching activities on secondary displays
Virtual displays are available to everyone, and they don't require any special hardware. Any application can create an instance of virtual display; and in the Android 8.0 release, activities can be launched on that virtual display if the associated feature is enabled.
To support multi-display features, you should either use one of the existing supported ways of connecting secondary devices or build new hardware. The supported ways of connecting displays on Nexus and Pixel devices are Google Cast and virtual displays inside apps. Support of other ways depends on kernel driver support for each particular case (like MHL or DisplayPort over USB-C) and fully implementing interface definitions that are related to displays in HardwareComposer HAL (IComposerCallback.hal and IComposerClient.hal).
Each of the ways may require SoC or OEM support. For example, to enable DisplayPort over USB-C, both hardware (SOC) and software (drivers) support is required. You might need to implement drivers for your hardware to support connecting external displays.
The default implementation will allow launching fullscreen stacks of activities on secondary displays. You can customize the stacks and System UI and behavior on secondary displays.
Support for generic tooltip
Android 8.0 allows developers to provide descriptive action names and other
helpful information on mouse hover over buttons and other icons. Device
manufacturers may style the tooltip popup. Its layout is defined in
OEMs may replace the layout or change its dimensions and style parameters. Use only text and keep the size reasonably small. The feature is implemented entirely inside the View class, and there are quite exhaustive CTS tests that check many aspects of Tooltip behavior.
Support for extended aspect ratio
Android 8.0 includes a new manifest attribute, maxAspectRatio, which lets an activity or app specify the maximum aspect ratio it supports. maxAspectRatio replaces the previous meta-data tag with a first-class API and allows devices to support an aspect ratio greater than 16:9.
- If an activity or app is resizable, allow the activity to fill the screen.
- If an activity or app is non-resizeable or the platform is force resizing
the activity, allow the app window to display up to the maximum aspect ratio,
according to the maxAspectRatio
- For applications on devices running Android 8.0, the default value is the aspect ratio of the current device.
- For applications on devices running earlier versions of Android, the default value is 16:9.
Implementing Adaptive Icons
Adaptive Icons maintain a consistent shape intra-device but vary from device to device with only one icon asset provided by the developer. Additionally, icons support two layers (foreground and background) that can be used for motion to provide visual delight to users. For more information, see Implementing Adaptive Icons.
Night Light, introduced in Android 7.0.1, allows users to reduce the amount of blue light that their screen emits. Android 8.0 gives users more control over the intensity of this effect. For more information, see Implementing Night Light.
Android 8.0 includes support for picture-in-picture (PIP) on Android handheld devices. PIP allows users to resize an app with an ongoing activity, such as a video, into a small window. For more information, see Picture-in-Picture on Android handsets.
Better Split-Screen Interactions
Multi-window lets multiple apps simultaneously display on users' device screens. Android 8.0 improves the default mode, split-screen, by compressing the top pane and resizing the launcher if a user taps Home after entering split-screen. For more information, see Better Split-Screen Interactions.
A new API in Android 8.0 allows application developers to add shortcuts and widgets from inside the app instead of relying on the widget tray. The older method of adding shortcuts by sending a broadcast has been deprecated for security reasons. For more information, see Implementing Add Widgets/Shortcuts.
Downloading and Building
Android LLVM Toolchain improvements
OEMs who wish to use our latest toolchain/tools will need to ensure that any of their private code compiles successfully with the updated toolchains. This may require them to fix existing issues in their code with undefined behavior. (Of course, they are free to use whatever tools they prefer to compile their own code too.)
They must ensure their code is free of undefined behavior (by using tools like UBSan), so they are less susceptible to problems caused by newer toolchains. All of the toolchains are always updated directly in AOSP. Everything will be available well before OC even ships, so OEMs should be following along already.
See the public Clang/LLVM documentation for general instructions and the Android Clang/LLVM documentation set within AOSP for Android-specific guidance. Finally, join the android-llvm public group to get help and take part in development.
DRM / KMS
DRM/KMS in Linux Kernel Version 4.9
The Direct Rendering Manager (DRM)/Kernel Mode Setting (KMS) framework used by Android is developed and maintained by Linux kernel developers in the Linux kernel. Android merges down from the Linux kernel. By merging down from our common kernel, device manufacturers gain the DRM/KMS framework automatically.
DRM/KMS became viable in Linux kernel version 4.9, and Android strongly encourages OEM partners to use DRM/KMS starting with this kernel version. Atomic Display Framework (ADF), the display framework officially supported by Android today, will not be supported in 4.9 and higher versions of the common Android kernel; instead, Android will support DRM/KMS from this version. OEMs can continue to use ADF (or any other framework), but Android will not support them in the common Android kernel.
To implement DRM/KMS, you will need to write your own drivers using DRM/KMS in addition to merging down the DRM/KMS framework from the android common kernel.
Android 8.0 updates Keymaster, the keystore HAL, by extending the capabilities of hardware-backed key storage on Android devices. This builds upon the Android 7.1.2 updates to Keymaster 2. For more information, see Keymaster 3 documentation.
Insecure TLS Version Fallback removed from HttpsURLConnection
Insecure TLS/SSL protocol version fallback is a workaround for buggy implementations of TLS protocol downgrade negotiation in some servers. This is vulnerable to POODLE. When Chrome 45 dropped the insecure fallback in September 2015, less than 0.01% of servers relied on it. To improve security, insecure TLS version fallback has been removed from HttpsURLConnection in Android 8.0. For more details, see this blog post.
To test this feature on devices with Android 8.0, run this CTS test case:
cts-tradefed run cts -m CtsLibcoreOkHttpTestCases
Flash Wear Management
Describes eMMC behavior and new features to help OEMs lower the risk of a failing eMMC in the automotive environment. For more information, see Flash Wear Management in Android Automotive.
Optimizing Boot Times
Guidance for improving boot times for specific Android devices. For more information, see Optimizing boot times.
Task Snapshots is infrastructure introduced in Android 8.0 that combines screenshots for Recents Thumbnails as well as Saved Surfaces from Window Manager to save memory. For more information, see Task Snapshots.
Default Print Services
A print service is an app that discovers and presents printers to a device's print framework. In earlier Android versions, users had to search for and install third-party print services to be able to print.
Android 8.0 includes a default print service in
that lets users print on modern printers without installing any additional apps.
This implementation supports printers that use the Internet Printing Protocol
(IPP) to communicate with the printer and use PCLm, PWG-Raster, or PDF to send
printable content. For older printers, users should install the app recommended
by the PrintRecommendationService
as seen in this this I/O presentation.
The Reference section has been added to the top-level navigation. As part of the Treble release, a HIDL reference section was added. The Trade Federation and the legacy HAL reference documentation has been updated.
Settings: Patterns and Components
In Android 8.0, the Settings menu gains several components and widgets that cover common uses. For more information, see Patterns and Components.
Settings: Updated information architecture
Android 8.0 introduces a new information architecture for the Settings app. The goal of the new information architecture is to simplify the way settings are organized and make it easier for users to quickly find the settings needed to customize their Android devices. For more information, see Implementing Updated Information Architecture.
The Android Settings app provides a list of suggestions to the users. This feature provides ranking for suggestions, based on any contextual signal or the user's past interactions with suggestions. For more information, see Personalized Settings.
Implementing Settings: Universal Search
Android 8.0 adds expanded search capabilities for the Settings menu. This document describes how to add a setting and ensure it is properly indexed for Settings. For more information, see Universal Search.
Faster storage statistics
Android 8.0 leverages the ext4 filesystem's "quota" support to return disk usage statistics almost instantly. For more information, see Implementing faster storage statistics.
Welcome to a new source.android.com! The site has been overhauled to make it easier for you to navigate, search, and read its ever-growing set of information. Here is a summary of enhancements:
More screen real estate, larger type size
The entire site is wider, allowing you to view more content at once. Code samples and commands are more visible, and all text has been enlarged.
The new site renders more cleanly on handheld devices with a dedicated mobile view.
New top-level tabs
Security at the forefront
Better reference materials
Persistent code links
The AOSP code repository is always just a click away with the Go to Code button at the top right of every page.
In addition to the existing About, Community, and Legal footers, you can now find a complete list of links at the bottom of every page for building Android, connecting with the ecosystem, and getting help with the operating system's use.