2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
Android OS 식별
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
keywords: AiAssisted,release16,androidconnectivity,bluetooth,category:AndroidConnectivity,docType:Guide
Android 14부터 Android 프레임워크에는 Android 정보 서비스(AIS)라는 일반 속성 (GATT) 서비스가 포함되어 있어 블루투스 기기가 Android API 수준을 서비스의 GATT 특성으로 읽을 수 있습니다.
이 서비스를 통해 블루투스 기기 제조업체는 블루투스 주변기기가 Android OS를 실행하는 중앙 기기와 페어링되는지 알 수 있으며 API 수준에 따라 전문화된 로직을 관리할 수 있습니다.
AIS는 표준 GATT 서비스이며 기기에 AIS 인스턴스가 하나만 있을 수 있습니다. 기본 서비스 UUID는 e73e0001-ef1b-4e74-8291-2e4f3164f3b5
입니다.
Android API 수준 특성 (UUID: e73e0002-ef1b-4e74-8291-2e4f3164f3b5
)에는 기기의 API 수준이 바이너리 형식 (리틀 엔디언)의 부호 없는 32비트 정수로 포함됩니다. Android API 수준 특성 값의 길이는 4옥텟입니다 (예: API 수준 36은 0x24_00_00_00
). 기기를 검색할 수 있는 경우 인증이나 승인 없이 Android API 수준 특성 값을 읽을 수 있습니다.
기기를 검색할 수 없는 경우 Android API 수준 특성은 인증 및 승인을 통해서만 읽을 수 있습니다.
서비스 알아보기
블루투스 기기는 GATT 클라이언트 역할에 있고 Android 지원 기기는 서버 역할에 있습니다. AIS를 검색하고 Android API 수준을 읽기 위해 블루투스 기기는 기본 서비스 검색, 특성 검색, 특성 값 읽기 절차와 같은 GATT 프로필 절차를 사용합니다. 이러한 절차에 관한 자세한 내용은 GATT 프로필 사양을 참고하세요.
API 수준은 ro.build.version.sdk
시스템 속성으로 정의됩니다. 기본 서비스를 검색할 수 없는 경우 시스템 속성이 정의되지 않았거나 값이 비어 있거나 호스트 운영체제가 Android가 아님을 의미합니다.
유효성 검사
AIS를 검색할 수 있는지 확인하려면 블루투스 주변기기를 Android 지원 기기와 페어링한 후 검색된 기본 서비스에서 AIS 서비스 UUID를 조회하여 수동 테스트를 실행합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-22(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-22(UTC)"],[],[],null,["# Android OS identification\n\nkeywords: AiAssisted,release16,androidconnectivity,bluetooth,category:AndroidConnectivity,docType:Guide\n\nStarting in Android 14, the Android framework includes a Generic Attribute\n(GATT) service called Android information service (AIS), which lets Bluetooth\ndevices read the Android API level as a GATT characteristic of the service.\nThis service lets Bluetooth device manufacturers know whether a Bluetooth\nperipheral is pairing with a central device that is running the Android OS,\nand manage specialized logic based on the API level.\n\nAndroid information service (AIS)\n---------------------------------\n\nAIS is a standard GATT service and there can be only one instance of AIS on\na device. The primary service UUID is `e73e0001-ef1b-4e74-8291-2e4f3164f3b5`.\nThe Android API level characteristic (UUID:\n`e73e0002-ef1b-4e74-8291-2e4f3164f3b5`) contains the API level of the device as\nan unsigned 32-bit integer in binary form (little-endian). The value of the\nAndroid API level characteristic is 4 octets in length (for example, API\nlevel 36 is `0x24_00_00_00`). When the device is discoverable, the Android API\nlevel characteristic value is readable without authentication or authorization.\nWhen the device isn't discoverable, the Android API level characteristic is\nreadable only with authentication and authorization.\n\nDiscover the service\n--------------------\n\nThe Bluetooth device is on the GATT client role and the Android-powered device\nis on the server role. To discover AIS and read the Android API level, Bluetooth\ndevices use GATT profile procedures such as the *primary service discovery* ,\n*characteristic discovery* , and *characteristic value read* procedures. For\ndetails on these procedures, see the [GATT profile specification](https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-54/out/en/host/generic-attribute-profile--gatt-.html).\n\nThe API level is defined by the `ro.build.version.sdk` system property. If the\nprimary service can't be discovered, it means that the system property isn't\ndefined or the value is set to empty, or the host operation system isn't\nAndroid.\n\nValidation\n----------\n\nTo verify that AIS can be discovered, run a manual test by pairing a Bluetooth\nperipheral with an Android-powered device, and then looking up the AIS service\nUUID in the discovered primary services."]]