Understanding which version of the operating system is installed on the device is a fundamental skill not only for ordinary users, but also for software testing specialists. When you are faced with the question of how to find the Android API, we are talking not just about numbers like 12 or 13, but about a specific level of the application programming interface, which determines the compatibility of the software with your gadget. API level is a unique identifier assigned to each new version of the platform, allowing developers to clearly differentiate the functionality of the system.

Knowledge of this parameter is critical when installing specific applications, emulators, or when debugging your own apps. Users often confuse the marketing version name, such as Android 14, with the technical level number, which in this case is 34. The difference between these concepts can cause compatibility errors, especially if you are trying to run software that requires specific libraries or access rights that are not available in older builds.

In this material we will analyze in detail all the available ways to obtain this information: from simple settings menus to advanced command line tools. You will learn to interpret the data received and understand why the same device on different firmware may have different levels of application support. This knowledge will help you avoid many problems when setting up a working environment or choosing a new smartphone for development.

The concept of the API level in the Android ecosystem

In the world of mobile development, the term API Level plays the role of a kind of standard of quality and functionality. Each new version of the operating system brings with it new methods, classes, and changes in the behavior of existing functions. To prevent developers from having to guess which version the user is running, Google enters an integer value that strictly corresponds to the specific release version of the platform.

For example, if an application requires a minimum API level of 21, it will not install on a device with API 19, even if the user tries to bypass the restrictions. This is a mechanism to protect app stability. Knowing your current level is important to understand what modern features, such as improved notifications or new security permissions, are available to your device out of the box.

โš ๏ธ Warning: Do not confuse API level with Build Number. The build number may change with each security update, while the API level remains unchanged within a single major version of Android.

Developers use this parameter in the application manifest file (AndroidManifest.xml), specifying the minSdkVersion and targetSdkVersionattributes. For the average user, this information becomes important when he sees the error message โ€œThe application is not supported on your device.โ€ In such cases, checking the API level helps to quickly diagnose that the problem is precisely an outdated version of the system kernel, and not a lack of RAM or processing power.

๐Ÿ’ก

If you are developing an application, always test it on devices with the minimum supported API level to ensure that there are no critical errors on older systems.

Checking through the device's standard settings

The most obvious and accessible way to find out the necessary information is hidden in the depths of the system menu, although smartphone manufacturers often try to hide this data away from the eyes of the average user. In โ€œpureโ€ Android, which can be found on smartphones Google Pixel or Moto, the path to this data is as simplified and logical as possible. You do not need to connect a cable or install additional software.

First, you need to go to section Settings and scroll the list to the very bottom to item About phone or Phone information. A large number for the Android version is usually displayed here. However, to see exactly the API level, you often need to make an additional click on the item Software information or quickly click on the item several times Build numberto activate developer mode, although in modern versions this information is often available immediately.

  • ๐Ÿ“ฑ Open the menu Settings on your smartphone.
  • ๐Ÿ“ฑ Find the section About phone at the very bottom of the list.
  • ๐Ÿ“ฑ Go to the subsection Software information or Android Version.
  • ๐Ÿ“ฑ Look for the line that says API Level or API Level.

The situation becomes more complicated if you are using a device with a proprietary shell, such as One UI from Samsung, MIUI from Xiaomi or ColorOS from Oppo. In these interfaces, manufacturers often hide technical details, leaving only the marketing name of the version. In this case, only โ€œAndroid Version 13โ€ may be displayed in the menu, without indicating the number 33. This is done to simplify perception, but creates difficulties for those who need accurate technical data.

๐Ÿ“Š What shell is installed on your smartphone?
Pure Android (Pixel, Motorola)
One UI (Samsung)
MIUI / HyperOS (Xiaomi)
Other custom firmware

If you didnโ€™t find the treasured number in the standard menu, donโ€™t despair. There are many third-party utilities in the store Google Playthat read system properties and display them in a convenient form. Applications like CPU-Z, AIDA64 or Device Info HW show the API level on the main screen in the "System" or "Android" section. This is the fastest way for owners of smartphones with heavily modified interfaces.

Using developer mode and USB debugging

For a deeper dive into the system and obtaining comprehensive information about the state of the device, it is advisable to use the developer mode. This hidden menu section provides access to debugging tools, which can be useful not only for programmers, but also for advanced users who want to control the operation of their gadget. This mode is activated by repeatedly clicking on the build number.

After enabling developer mode, a new item will appear in the settings menu, often simply called For developers. Inside this section you can find information about current debugging, Running Services and other system processes. However, even here the API level may not be exposed explicitly. To obtain accurate data in this mode, most often you need to connect to a computer and use the platform Android Debug Bridge (ADB).

โš ๏ธ Attention: Enabling developer mode and USB debugging opens up additional options for accessing the system. Do not connect your phone to untested computers or public charging stations that support data transfer in this mode.

To use this method, you will need to install the drivers for your smartphone on your PC and download the SDK platform tools. After connecting the cable and confirming permission to debug on the phone screen, you will be able to send commands directly to the device shell. This provides the most reliable information, since the data is read directly from system properties, bypassing the shell graphical interface.

โ˜‘๏ธ Preparing to use ADB

Done: 0 / 4

The command for getting the API version via the console looks concise and is executed instantly. It accesses the system property that stores this value. This property is part of the interface android.os.Buildreadable by any process on the system. Using the command line eliminates any visual distortion that may be present in the settings menu due to localization or customization.

Receiving data through the ADB command line

The toolkit ADB is the gold standard for low-level interaction with Android devices. If you have access to a computer, this method guarantees accurate data regardless of phone model or firmware version. You do not need to install heavy development environments like Android Studio, just download the minimal package Platform Tools from the official website.

The process begins by connecting the smartphone to the PC via USB and putting it in debugging mode. After this, you must enter a special instruction in the command line (Terminal on macOS/Linux or CMD/PowerShell on Windows). This instruction requests the value of a property ro.build.version.sdkthat is hard-coded into the system partition and cannot be changed by the user or the shell.

adb shell getprop ro.build.version.sdk

Running this command will return you an integer, which is the API level you are looking for. For example, output 30 will indicate that the device is running Android 11. This method also allows you to find out other useful settings, such as the security version or device ID, simply by changing the name of the requested property. This makes ADB a universal diagnostic tool.

What to do if the command does not execute?

If the console displays a "device not found" error, check the USB cable, try a different port, or reinstall the drivers. Make sure that a window asking you to allow debugging appears on your phone screen and you click Allow.

There is also an alternative command that provides more detailed information about the build, including the API level in the context of other data. The command adb shell getprop without arguments will display a huge list of all system properties, where you can find the line [ro.build.version.sdk]: [33]. Using filtering through grep (on Linux/Mac) or findstr (on Windows) will help you quickly find the desired line in this data stream.

Programmatic way to get the API version

If you are a developer or learning Android programming, it will be useful for you to know how to get this information directly from the application code. The class Build in the package android.os provides static fields containing data about the current device. This knowledge is necessary for writing code that dynamically adapts to the capabilities of the system.

The main field that interests us is called VERSION.SDK_INT. It returns an API level integer value. Unlike field VERSION.RELEASEwhich returns a string like "13.0", field SDK_INT returns a number useful for programmatic comparisons. This allows you to write conditions like โ€œif the API version is greater than or equal to 29, then use a new method of working with storage.โ€

Android version Name (code) API level Release year
Android 14 Upside Down Cake 34 2023
Android 13 Tiramisu 33 2022
Android 12 Snow Cone 31-32 2021
Android 11 Red Velvet Cake 30 2020
Android 10 Quince Tart 29 2019

Using this field in the code allows you to implement a backwards compatibility mechanism. You can check the current API level when you run the application and enable or disable certain features. For example, access to the clipboard or background geolocation require different levels of permissions depending on the system version, and verification SDK_INT is a key element of such logic.

๐Ÿ’ก

Using Build.VERSION.SDK_INT in code is the only reliable way to dynamically adapt the behavior of the application to different versions of Android without crashing on older devices.

It is worth noting that there are also compatibility libraries (AndroidX) that abstract the developer from the need to constantly check API versions for many tasks. However, understanding which API level is currently running on a device remains fundamental to optimizing performance and taking advantage of the latest platform features that have not yet been wrapped in support libraries.

Version and API level mapping table

To quickly navigate the variety of Android versions, it is useful to have a reference table on hand. Google assigns API levels sequentially, starting with the first versions of the system. Knowing this numbering helps to quickly determine the age of the device and its potential. Below is a table for modern versions of the system that are most relevant today.

Please note that some versions of Android may have multiple API levels. This happens when intermediate updates are released with new features that do not change the main version name. For example, Android 12 had level 31, and the updated Android 12L received level 32. Such nuances are important to consider when testing specific functionality.

  • ๐Ÿš€ API 34: Latest stable version with improved security and new emoji.
  • ๐Ÿš€ API 33: Implementation of notification rights and support for language settings for each application.
  • ๐Ÿš€ API 31: Global update of the Material You design and improvement of privacy.
  • ๐Ÿš€ API 29: Introduction of Scoped Storage, which limits application access to the file system.

Understanding the evolution of API levels helps to understand why old applications may not work correctly on new phones, and vice versa. Each API level increase introduces new security restrictions and changes in system behavior. Developers must continually update their Targeting API Levels (targetSdkVersion) to ensure their apps meet Google Play Store requirements.

โš ๏ธ Note: Google Play requires new apps and updates to target API levels to be at least the current requirement (usually the level of the previous or current version of Android). Publishing applications with an outdated targetSdkVersion may be blocked.

This table serves not just as a reference, but also as an indicator of the device's life cycle. If your smartphone is stuck at API level 24 (Android 7.0), this is a sign that manufacturer support has likely ended and many modern applications will soon no longer run on it. Monitoring this parameter helps you make a timely decision to replace the gadget.

Why are API levels sometimes skipped?

Google reserves some API numbers for internal tests or canceled versions. In addition, the transition from 28 to 29 was especially significant due to changes in file access, so this jump is often mentioned in the documentation.

Frequently asked questions about the Android API version

Is it possible to artificially increase the API level on an old phone?

You can officially increase the API level only by installing a system update from manufacturer. Unofficially, this is possible through the installation of custom firmware (for example, LineageOS), which can bring a newer version of Android to old hardware. However, this requires unlocking the bootloader and carries the risk of losing the warranty or turning the phone into a brick.

Does the API level affect the speed of the smartphone?

The API number itself does not affect the speed. However, new versions of Android (with high API) often require more powerful hardware. If an old phone is software updated to a new version, it may start to work slower due to increased system requirements, despite the same processor.

Where can I find the API level in the Android Studio emulator?

In the emulator, this information can be found in the same way as on a real device: in the settings of the emulated phone. When you create an AVD, you explicitly select a system image with a specific API level, for example, "API 33: Android 13 (Google APIs)".

What does the "MinSdkVersion" error mean when installing an application?

This error means that the application is designed to run on a newer version of Android than the one you have installed. The API level of your device is below the minimum required by the developer, and installation is impossible without updating the system or searching for an old version of the application.

How to find out which API a particular library supports?

The documentation for any Android library always contains a "Requirements" or "Compatibility" section, where the minimum API level is indicated. You can also view this information in the project file build.gradle if you are analyzing the source code of an open library.