Set up CTS automated testing  |  Android Open Source Project Skip to main content Docs What's new? Release notes Latest security bulletins Latest Compatibility Definition Document (CDD) Site updates Getting Started About Start Download Builds Test Create Contribute Community Tools, build, and related reference Security Overview Bulletins Features Testing Best Practices Core Topics Architecture Audio Camera Connectivity Data Display Fonts Graphics Interaction Media Performance Permissions Power Runtime Settings Storage Tests Updates Virtualization Compatibility Compatibility Definition Document (CDD) Compatibility Test Suite (CTS) Android Devices Cuttlefish Enterprise TV Automotive Overview Software Defined Vehicle In-vehicle Infotainment Release Details Reference HIDL HAL Trade Federation Security Test Suite Android Code Search / English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어 Sign in Documentation What's New? Getting Started Security Core Topics Compatibility Android Devices Automotive Reference Docs More What's New? Getting Started Security Core Topics Compatibility Android Devices Automotive Reference Android Code Search Overview Compatibility Android Compatibility program overview Compatibility Definition Document Compatibility Definition Document preview Changelog (Android 14 and 15) CDDs in HTML Android 17 (current) Android 16 Android 15 Android 14 Android 13 Android 12 Android 11 Android 10 Android 9 Android 8.1 Android 8.0 Android 7.1 Android 7.0 Android 6.0 Android 5.1 Android 5.0 Android 4.4 Android 4.3 Android 4.2 Android 4.1 Android 4.0 Android 2.3 Android 2.2 Android 2.1 Android 1.6 CDDs as PDF Android 12 Android 11 Android 10 Android 9 Android 8.1 Android 8.0 Android 7.1 Android 7.0 Android 6.0 Android 5.1 Android 5.0 Android 4.4 Android 4.3 Android 4.2 Android 4.1 Android 4.0 Android 2.3 Android 2.3.3 Android 2.2 Android 2.1 Android 1.6 Compatibility FAQs Compatibility Test Suite (CTS) Overview Set up CTS automated testing Set up CTS (AOSP 10 or lower) Run automated tests Run automated tests Run CTS automated tests (AOSP 10 or lower) Run media tests locally CTS device interaction helper module Troubleshoot CTS CTS v2 command console CTS v1 command console Instant apps CTS test for Secure Element Run media performance class tests Run NPU Manager Mobly tests Optimize the CTS Run CTS-V tests Run CTS-V tests CTS Verifier test guidance Test multidevice Run CTS Verifier multidevice tests Set up the BananaPi-R3 access point Run multidevice NFC tests (Android 15) Test audio CTS Verifier audio tests Near ultrasound tests Run audio framework CTS Verifier tests USB audio CTS Verifier tests CTS Verifier Pro Audio test CTS Verifier MIDI tests CTS Verifier audio data paths tests Audio Loopback Calibration panel CTS Verifier audio peripherals CTS Verifier multichannel mixdown test Audio Devices panel Audio loopback latency test Test audio multi-channel input and output Audio workload test Test camera Test camera images Overview Test camera images on foldables Test camera images using automation Obtain a modular rig system Obtain a Gen2 rig Obtain a regular FOV rig Obtain a wide FOV rig Purchase a foldable kit Test camera sensors Test sensor fusion Obtain a sensor fusion box Android 13 controller Obtain sensor fusion box for tablets Test camera HAL Test camera HAL Reference Camera ITS tests Android 17 Camera ITS release notes Android 16 Camera ITS release notes Android 15 Camera ITS release notes Android 14 Camera ITS release notes Android 13 Camera ITS release notes Android 12 Camera ITS release notes Android 11 Camera ITS release notes Run CTS Verifier media playback tests Rotation vector CV crosscheck CTS Verifier for instant apps CTS Verifier for head tracking latency test Barometer measurement tests Interpret results CTS development Developer-Powered CTS Downloads CTS release notes CTS 17 release notes CTS 16.1 release notes CTS 16 release notes CTS 15 release notes CTS 14 release notes CTS 13 release notes CTS 12L release notes CTS 12 release notes CTS FAQs What's new? Release notes Latest security bulletins Latest Compatibility Definition Document (CDD) Site updates Getting Started About Start Download Builds Test Create Contribute Community Tools, build, and related reference Security Overview Bulletins Features Testing Best Practices Core Topics Architecture Audio Camera Connectivity Data Display Fonts Graphics Interaction Media Performance Permissions Power Runtime Settings Storage Tests Updates Virtualization Compatibility Compatibility Definition Document (CDD) Compatibility Test Suite (CTS) Android Devices Cuttlefish Enterprise TV Automotive Overview Software Defined Vehicle In-vehicle Infotainment Release Details Reference HIDL HAL Trade Federation Security Test Suite Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, use android-latest-release. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP. AOSP Docs Compatibility Set up CTS automated testing Stay organized with collections Save and categorize content based on your preferences. Before you can execute automated CTS tests, prepare your physical environment, set up your workstation, and configure the device you're testing. Note: To reduce the time it takes to run tests, you can test more than one DUT at a time. For example, you can attach devices to the same test workstation using a USB hub, for example. Set up physical environment Certain CTS tests require the use of external devices to be set up near the DUT. To set up your physical environment: Note: If you're testing more than one DUT at a time, you must set up the physical environment for each DUT. If your DUT supports Bluetooth LE, place at least three Bluetooth LE beacons within 5 meters of the DUT for Bluetooth LE scan testing. Additionally: The beacons don't need to be configured or emit anything specific. The beacons can be any kind, including iBeacon, Eddystone, or even devices simulating BLE beacons. Place the DUT in front of a scene, such as a wall or the ceiling, at a distance equivalent to the DUT's minimum focus distance. Additionally: The scene must have sufficient lighting to allow the sensors under test to reach and remain at the maximum configured target frames per second (FPS) as specified in CONTROL_AE_TARGET_FPS_RANGE. This set up applies to all camera sensors reported by getCameraIdList as the test iterates over the listed devices and measures performance individually. If the DUT supports external cameras, such as USB webcams, plug in an external camera when running CTS. Otherwise, the CTS tests fail. If your DUT supports a global positioning system (GPS) or other global navigation satellite system (GNSS), provide a GNSS signal to the DUT at a suitable signal level for reception and location calculation. Additionally: The GPS must be compliant with ICD-GPS-200C. The GNSS signal can be of any type, including a satellite simulator or a repeater of outdoor signals. You can place the DUT close to a window so that it can directly receive enough GNSS signal from a satellite. Caution: For the GPS testing, the internet connection setup must not block connections to supl.google.com ports 7275, 7276, 7277, 7278, 7279 and 7280. These ports download GPS assistance data for testing position calculation on the local device. Verify that your Wi-Fi network supports IPv4 and IPv6, has an internet connection with DNS for IPv4 and IPv6, supports IP multicast, and can treat the DUT as an isolated client. Note: An isolated client is a configuration where the DUT doesn't have visibility to the broadcast or multinetwork messages on that subnetwork. To set up an isolated client, use a Wi-Fi access point (AP) configuration or run the DUT on an isolated subnetwork without other devices being connected. If you don't have access to a native IPv6 network, an IPv6 carrier network, or a VPN to pass IPv6 tests, use a Wi-Fi AP and an IPv6 tunnel. Verify that the DUT has the UP, BROADCAST, and MULTICAST flags set on the Wi-Fi interface. Verify that the Wi-Fi interface has IPv4 and IPv6 addresses assigned. To check the Wi-Fi interface properties, run adb shell ifconfig. If your DUT supports Wi-Fi STA or STA concurrency, set up at least two Wi-Fi networks. These Wi-Fi networks must run on different bands with different SSIDs or on the same SSID with different BSSIDs. If your DUT supports Wi-Fi round trip time (RTT), set up a device that supports Wi-Fi RTT: Place the Wi-Fi RTT device within 40 feet of the DUT. Power up the Wi-Fi RTT device. Here are two recommended devices supporting Wi-Fi RTT: - Google Wifi - Compulab's fitlet2 access point (set to 40 MHz bandwidth at 5 GHz). Set up your desktop machine Before running the CTS automated tests, verify that your desktop machine meets hardware and operating system requirements and has the proper software installed, as described in the following sections. Meet hardware requirements Your CTS desktop machine should meet or exceed these hardware requirements: A 64-bit x86 system At least 256 GB of free disk space to accommodate the increased number of CTS test cases and an increase in Java heap space reservation in Tradefed A minimum of 32 GB of RAM Meet operating system requirements Your development machine must run a 64-bit Linux distribution with GNU C Library (glibc) 2.17 or higher. The Operating System language should be set to "English" to allow CTS to resolve the path correctly. Install desktop software To install the proper desktop software for CTS: Install the FFmpeg package version 5.1.3 or higher. Install the most recent versions of Android Debug Bridge (adb) and Android Asset Packaging Tool (AAPT2) and add the location of those tools to the system path of your machine: Follow the instructions at the start of the SDK Manager documentation to install the sdkmanager command-line tool. The link to download the command-line tools is in the Command line tools only section at the bottom of the Android Studio download page. Update your system path to include the location of the newly installed sdkmanager. Using sdkmanager, install the latest platform-tools and build-tools packages. These packages contain adb and AAPT2. For information on installing packages, see Install packages. Update your path to include the location of the newly installed adb and AAPT2 tools. Verify that adb and AAPT2 are in your path. Note: Alternatively, if you're using Android Studio on your CTS desktop machine, you can check the Android SDK Platform-Tools and Android SDK Build-Tools options to install the platform and SDK build tools. Install the proper version of Java Development Kit (JDK): For Android 11 or higher, install JDK 11. For Android 10 or lower, see Set up CTS (AOSP 10 or lower). For Android 13 and 14, install virtualenv. The virtualenv tool is required for multidevice tests. To verify that Python is installed, type python3. The Python version and date should appear indicating python is properly installed. Download and open the CTS packages from Compatibility Test Suite downloads that match your devices' Android version and all the application binary interfaces (ABIs) that your devices support. Download and open the latest version of the CTS media files. The media files include video clips from Big Buck Bunny, which are copyrighted by the Blender Foundation under the Creative Commons Attribution 3.0 license. (optional) When you run CTS for first time, it dynamically downloads some Mainline-related CTS files. Depending on your network speed, this download adds 10 minutes or more to the CTS run time. To avoid this added CTS run time, you can download the Mainline-related CTS files before running CTS. For information on downloading the Mainline-related CTS files, see Download Mainline-related CTS files. Prepare the DUT After setting up your desktop machine, you must set up and configure the DUT. Set up the DUT To set up the DUT: Verify that the DUT is running a system image based on the known to be compatible user build (Android 4.0 or higher) from Codenames, Tags, and Build Numbers and uses the user build variant. For more on build variants, see Choose a target. If the DUT is running Android 13 or higher, verify the build has ro.product.first_api_level set to the API level that the device was commercially launched with. To set this value, make the following change to the device.mk file: PRODUCT_SHIPPING_API_LEVEL := 21 Certain CTS requirements depend on the build that a device was originally shipped with. For example, devices that originally ship with earlier builds might be excluded from system requirements that apply to devices that ship with later builds. For valid API level values, see Codenames, Tags, and Build Numbers. For more information on ro.product.first_api_level, see Vendor API level. For Android 10 or lower, see Set up CTS (AOSP 10 or lower). If your device supports APEX package management: Download the APEX shim package for your specific Android version and hardware architecture. The left two columns in shim packages table provide links to the package to download. Copy the downloaded package to /system/apex. Rename the file to com.android.apex.cts.shim.apex. If your device doesn't support APEX package management: Download the APEX shim packages for your specific Android version and hardware architecture. The right two columns in the shim packages table provide links to the packages to download. Copy the CtsShim.apk to /system/app/ Rename the CtsShim.apk to CtsShimPrebuilt.apk Copy the CtsShimPriv.apk to /system/priv-app/ Rename the CtsShimPriv.apk to CtsShimPrivPrebuilt.apk If your device reports more than one secure element: Download google-cardlet.cap. Copy the downloaded file to /data/uicc/cardlets/. If your device reports more than one secure element, install the sample applet into the embedded Secure Element (eSE) of the DUT or into the SIM card used by the DUT. For more information, see CTS test for Secure Element. If your device doesn't have an embedded screen, connect a screen to the device. If the device has a memory card slot, plug in an empty SD card. Use an SD card that supports an ultra high speed (UHS) bus with SDHC or SDXC capacity or a card with speed class 10 or better to verify that it can pass the CTS. Warning: CTS might modify or erase data on the SD card plugged into the device. If the device has SIM card slots, plug an activated SIM card into each slot. If the device supports SMS, each SIM card must have its own number field populated. For devices running Android 12 or higher, all SIM cards must have support for storing abbreviated dialing numbers (ADN). GSM and USIM cards with the telecom dedicated file (DFTelecom) satisfy this requirement. Warning: CTS might modify or erase data on the SIM cards plugged into the device. Verify that your device has a SIM with CTS carrier privileges meeting the requirements specified in Prepare the UICC. Note: If you're testing more than one DUT at a time, you must set up each DUT. Configure the DUT Use the following steps to configure your DUT for use with CTS. Note: If you're using Android 10 or lower, read Configure the DUT. On the DUT: Factory data reset the device. Warning: This reset erases all user data from the device. Set the device's language to English (United States). If the device supports customizing default fonts, verify the default sans-serif font family is set to Roboto. If there's a GPS or a Wi-Fi or mobile network feature on the device, enable the location setting. Connect to a Wi-Fi network that supports IPv6, can treat the DUT as an isolated client, and has an internet connection. For an explanation of isolated clients, see Set up physical environment. Verify that there isn't a lock pattern or password set. Enable USB debugging: Navigate to Settings > About phone and tap Build number seven times. The Developer options appears within the System settings category. Tap USB debugging. To enable USB debugging on Android 10 or lower, see Set up CTS (AOSP 10 or lower). Set the time to the 12-hour format. Enable Developer options > Stay awake. Disable USB app verification: Navigate to Developer options. Tap Verify apps over USB. In Android 13 or higher, enable mock modem: Navigate to Developer options. Tap Allow Mock Modem. This setting is required for specific telephony tests. On the desktop machine: Launch the browser and dismiss any startup or setup screen. Connect the DUT to the desktop machine using a USB cable. If the system prompts you to accept an RSA key allowing debugging through this computer, click Allow USB debugging. Set Roboto2 as the sans-serif font using a user accessible affordance (not hidden) setting. Copy the CTS media files to the DUT: Navigate (cd) to the path where the media files are downloaded and unzipped. Change the file permissions: chmod u+x copy_media.sh Copy the files: To copy clips up to a resolution of 720x480, run: ./copy_media.sh 720x480 If you aren't sure of the maximum resolution, copy all of the files: ./copy_media.sh all If there are multiple DUTs, add the serial option (-s) of a specific device to the end. For example, to copy up to 720x480 to the device with serial 1234567, run: ./copy_media.sh 720x480 -s 1234567 Download Mainline-related CTS files To download the Mainline-related CTS files: Get the Android API level on the device by running: adb shell getprop ro.build.version.sdk Follow the instructions in the download_mcts.sh script to download the Mainline CTS files. The download takes at least 10 minutes, depending on your network speed. Shim packages The following table lists the packages available for each device version and architecture: Device Version Packages (if APEX supported) Packages (if APEX isn't supported) ARM x86 ARM x86 Android 17 17-arm-release android17-x86-release android17-arm-CtsShim.apk android17-arm-CtsShimPriv.apk android17-x86-CtsShim.apk android17-x86-CtsShimPriv.apk Android 16 QPR2 16-arm-release android16-x86-release android16-arm-CtsShim.apk android16-arm-CtsShimPriv.apk android16-x86-CtsShim.apk android16-x86-CtsShimPriv.apk Android 16 16-arm-release android16-x86-release android16-arm-CtsShim.apk android16-arm-CtsShimPriv.apk android16-x86-CtsShim.apk android16-x86-CtsShimPriv.apk Android 15 15-arm-release android15-x86-release android15-arm-CtsShim.apk android15-arm-CtsShimPriv.apk android15-x86-CtsShim.apk android15-x86-CtsShimPriv.apk Android 14 android14-arm-release android14-x86-release android14-arm-CtsShim.apk android14-arm-CtsShimPriv.apk android14-x86-CtsShim.apk android14-x86-CtsShimPriv.apk Android 13 android13-arm-release android13-x86-release android13-arm-CtsShim.apk android13-arm-CtsShimPriv.apk android13-x86-CtsShim.apk android13-x86-CtsShimPriv.apk Android 12 android12-arm-release android12-x86-release android12-arm-CtsShim.apk android12-arm-CtsShimPriv.apk android12-x86-CtsShim.apk android12-x86-CtsShimPriv.apk Android 11 android11-arm-release android11-x86-release android11-arm-CtsShim.apk android11-arm-CtsShimPriv.apk android11-x86-CtsShim.apk android11-x86-CtsShimPriv.apk Android 10 android10-release android10-arm-CtsShim.apk android10-arm-CtsShimPriv.apk android10-x86-CtsShim.apk android10-x86-CtsShimPriv.apk Android 9, O, and O-MR1 N/A N/A arm-CtsShim.apk arm-CtsShimPriv.apk x86-CtsShim.apk x86-CtsShimPriv.apk What's next? After reading this document, continue to Run automated CTS tests. Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Last updated 2026-07-13 UTC. [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-13 UTC."],[],[]] Build Android repository Requirements Downloading Preview binaries Factory images Driver binaries Connect @Android on X @AndroidDev on X Android Blog Google Security Blog Platform on Google Groups Building on Google Groups Porting on Google Groups Get help Android Help Center Pixel Help Center www.android.com Google Mobile Services Stack Overflow Issue Tracker About Android Community Legal License Privacy Site feedback Manage cookies English Deutsch Español – América Latina Français Indonesia Italiano Polski Português – Brasil Tiếng Việt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文 – 简体 中文 – 繁體 日本語 한국어