July 9, 2025
10 min read

CTS, VTS, GTS, and More: Decoding Android’s xTS Testing Landscape

Android
AOSP
Testing
Compatibility
xTS
SSamir Dubey
Samir Dubey

AOSP Engineer

An in-depth exploration of Android’s xTS testing suites (CTS, VTS, GTS, STS, CTS-on-GSI), their roles in ensuring compatibility, hardware functionality, and security across diverse devices.

Introduction

Android, with its billions of devices worldwide, owes much of its success to its promise of compatibility. This means that an app designed for one Android phone should generally work as expected on another, even if they have very different hardware. This compatibility isn’t an accident; it’s meticulously engineered through extensive testing. The xTS test suites play a critical role in this process.

Why Test?

  • Maintaining Compatibility: Android’s vast hardware landscape means there’s potential for subtle variations in the way its core software interacts with devices. xTS suites ensure apps experience consistent behavior, guaranteeing that “it works on Android” promise.
  • Ensuring Hardware Works: Device manufacturers customize Android with vendor-specific code. xTS suites help them verify that cameras, sensors, Wi-Fi chips, and other components perform as intended.
  • Verifying System Images: Generic System Images (GSIs) promise a “pure” Android experience across devices. xTS suites confirm that a GSI will boot and function correctly.
  • Protecting Against Vulnerabilities: Android takes security seriously. xTS suites include dedicated tests to uncover and address potential security weaknesses, keeping user data safe.

Understanding the xTS Suites

  1. CTS (Compatibility Test Suite): This suite forms the bedrock of Android compatibility testing. It encompasses numerous tests targeting the core Android framework and bundled apps. Its primary goal is to ensure consistency in app interactions with the system across different devices. By passing CTS, developers can assure users that their apps will work seamlessly on various Android devices.
  2. VTS (Vendor Test Suite): VTS is tailored for device manufacturers, providing them with tools to validate hardware-specific implementations known as Hardware Abstraction Layers (HALs). These implementations cover areas like cameras, sensors, audio, and more. VTS ensures that regardless of the hardware differences between devices, the user experience remains smooth and consistent.
  3. GTS (Google Mobile Services Test Suite): The Google Mobile Services Test Suite (GTS) is a comprehensive set of tests aimed at verifying the compatibility and functionality of Google Mobile Services (GMS) on Android devices. Covering a wide array of proprietary Google applications and APIs, such as the core GMS apps like Google Play Store, Gmail, YouTube, Google Maps, and Google Drive, along with APIs and frameworks like Google Play Services, Firebase, and Google Cast, the GTS ensures that GMS apps and services operate as intended across diverse Android devices. It evaluates aspects like app compatibility, API compliance, performance, and security to guarantee a consistent and optimal user experience. Manufacturers seeking GMS licensing for their devices must successfully pass the GTS to demonstrate compliance with Google’s compatibility standards.
  4. Testing GSI Compatibility with CTS-on-AOSP: Project Treble made Generic System Images (GSIs), which are like standard versions of Android for different devices. To make sure these GSIs work well on any device, there’s CTS-on-AOSP (Compatibility Test Suite on Android Open Source Project). It checks if a GSI (or any regular Android version) gets along with the basic Android code (AOSP). It looks at how different parts of the system talk to each other, making sure they follow the rules and work as they should. This careful testing makes sure any version of Android, including GSIs, fits smoothly with the main Android system, so users get the same experience on any device they use.
  5. STS (Security Test Suite): Security is paramount in Android, given its widespread usage. STS plays a crucial role in safeguarding Android devices against potential threats. By simulating real-world exploits, STS helps identify vulnerabilities and weaknesses in the Android system, allowing developers to patch them before they can be exploited by malicious actors.
  6. CTS-on-GSI: This hybrid testing approach combines elements of CTS with the use of GSIs. By running a subset of CTS tests on a device utilizing a GSI, developers can validate compatibility even when using a generic Android image. This ensures that the promise of compatibility holds true across a wide range of devices, regardless of the specific system image used.

How xTS Works with Image Types, GMS, and Release Processes

Image Types:

  1. GSI-Specific Tests: Generic System Images (GSIs) are standardized Android images that can run on various devices. xTS suites include specific tests designed to verify the functionality and compatibility of GSIs, ensuring that they provide the expected Android experience across different hardware configurations.
  2. Custom Manufacturer Images: Some device manufacturers create custom Android images with unique features or modifications. In such cases, additional tests may be necessary to ensure that these customizations do not compromise compatibility with Android apps or services. xTS suites can be adapted to include tests tailored to these custom manufacturer images, ensuring that they meet the required standards for functionality and compatibility.

GMS vs. Non-GMS Devices:

  1. GMS Devices: Devices that include Google Mobile Services (GMS) come pre-installed with a suite of Google apps and services such as Gmail, Google Maps, and the Google Play Store. Ensuring compatibility with GMS requires additional testing and certification to ensure that these devices can seamlessly integrate with Google’s ecosystem of apps and services. xTS suites may include specific tests to verify compatibility with GMS, ensuring that devices meet the necessary standards to access and use Google’s services.
  2. Non-GMS Devices: Devices without GMS may still run Android but do not include Google’s suite of apps and services. While these devices may not require the same level of testing for GMS compatibility, they still need to undergo testing to ensure compatibility with other Android apps and services. xTS suites play a crucial role in verifying compatibility with the core Android framework and ensuring that non-GMS devices offer a reliable user experience.

Release Processes:

  1. Testing on Custom Images: Developers and manufacturers can run xTS suites on custom Android images during the development and testing phases to identify and address compatibility issues early in the process. This allows them to iteratively improve the quality and compatibility of their devices before the official release.
  2. Certification for Official Releases: Official Android device releases typically undergo comprehensive testing and certification processes to ensure compatibility with core components, services, and standards set by Google. Devices must pass xTS suites and other required tests to receive necessary certifications, such as the Google Play Services certification. These certifications are essential for demonstrating that devices meet the required standards for functionality, security, and compatibility with the Android ecosystem.

Conclusion

The xTS test suites collectively act as a quality control system for Android. They safeguard the Android experience for users and developers alike. Each new Android release undergoes this rigorous testing, ensuring that apps function as intended, hardware works seamlessly, GSIs are reliable, and security is top-notch. While unseen to most users, the xTS suites are fundamental to maintaining a healthy and robust Android ecosystem.