← Back to Blogs

Framework Compatibility in Android

How Android keeps apps working across versions

1 min read

One of Android's greatest engineering challenges is keeping apps that were written years ago working on the latest OS - and keeping the OS upgradeable without breaking vendor hardware. Android solves these through a layered compatibility system.

App Compatibility - minSdk and targetSdk

How targetSdk Affects Behavior

  App targets SDK 29 (Android 10)
  Running on Android 14 (SDK 34)
              │
              ▼
  Android 14 applies compatibility shims:
  ┌──────────────────────────────────────────┐
  │ 'This app expects Android 10 behavior'   │
  │                                          │
  │ • Scoped storage not enforced strictly   │
  │ • Background activity launch allowed     │
  │ • Older permission model used            │
  └──────────────────────────────────────────┘
              │
              ▼
  App works, but Google Play may warn users
  (Play requires targetSdk ≥ 33 for new apps)

Vendor Compatibility - VNDK

VNDK (Vendor NDK) is a curated set of system libraries that vendor code (HALs, vendor daemons) is allowed to link against. By restricting which /system libraries vendor code can use, Android ensures a new /system image can be installed on an old /vendor partition without breaking vendor code.

HAL Interface Stability

AIDL HAL interfaces can be marked @VintfStability, meaning they are frozen in the VINTF (Vendor Interface object) manifest. Once frozen, the interface cannot break backward compatibility - new methods can be added but old ones cannot change. This guarantees the framework and HAL can interoperate even after an OTA.

CTS - Compatibility Test Suite

CTS is the test suite that OEMs must pass before shipping an Android device or an OTA update. It verifies that the device behaves correctly according to the Android specification - ensuring all apps have a consistent environment regardless of manufacturer.

Key takeaway: targetSdkVersion = app vs framework compatibility. VNDK = vendor code vs framework compatibility. AIDL @VintfStability = HAL interface vs framework compatibility. Each layer has its own contract.