Android 6 이상에서는 Wi-Fi 서비스 제공업체 및 패킷 분석업체가 네트워크 요청의 Wi-Fi 스택을 통해 기기의 공장 출고 시 MAC 주소를 가져올 수 없도록 제한되었습니다. Android 10부터는 기기 식별자(ID) 액세스를 독점권한 수준이 있는 앱으로 제한하는 추가 제한이 적용되었습니다. 이렇게 하면 다음과 같은 기기 ID를 보호할 수 있습니다.
전화통신 IMEI, MEID, ESN 및 IMSI 번호
빌드, SIM 또는 USB 일련번호
기기 ID에 액세스 가능한 사용자
앱이 Android 9 이하를 타겟팅하는 경우에도 기기 ID가 모든 Android 10 기기에서 제한됩니다. 기기 ID에 액세스할 수 있는 주체는 다음과 같습니다.
패키지는 기기 ID에 액세스하는 권한이 있어야 합니다. 패키지는 Manifest.permission 클래스의
READ_PRIVILEGED_PHONE_STATE 권한을 보유하고 privapp-permission.xml 파일의 허용 목록에 추가되어 있어야 합니다. 허용 목록 프로세스에 관한 자세한 내용은 독점 권한 허용 목록을 참고하세요.
기기 ID를 추가로 제한하기 위해 Android 10을 실행하는 모든 기기는 프로브 및 관련 요청 모두의 무작위 MAC 주소를 기본적으로 전송하며 SSID별로 다른 무작위 MAC 주소가 있어야 합니다. 클라이언트 모드, 유연한 액세스 포인트(AP) 또는 Wi-Fi Direct 사용 사례에는 기기 공장 출고 시 MAC 주소를 사용하지 마세요. 이는 권한 있는 앱이 아닌 공개적으로 액세스 가능한 API에서 숨겨진 상태로 유지되어야 합니다. 공장 출고 시 MAC 주소를 요구하는 권한 있는 앱은 LOCAL_MAC_ADDRESS 권한을 보유해야 합니다.
사용자는 원하는 경우 각 SSID에 할당된 기본 무작위 MAC 주소를 유지할 수 있습니다.
이 옵션은 설정 > 네트워크 세부정보의 개인 정보 보호에서 볼 수 있습니다. 무작위 MAC 주소 획득에 관한 자세한 내용은 무작위 MAC 주소를 참조하세요.
그림 1.네트워크 세부정보의 개인 정보 보호에서 무작위로 표시된 MAC 주소
기기 ID API를 호출하는 앱
기기 ID API를 호출하는 앱은 Android 10 요구사항을 충족해야 합니다. 그렇지 않으면 기기 ID에 액세스하려고 할 때 다음과 같은 내용이 반환됩니다.
앱이 기기 일련번호(및 적용되는 경우 IMEI/MEID, SIM 일련번호 및 구독자 ID)에 액세스할 수 없어야 합니다. 이러한 ID에 액세스하는 권한을 보유한 앱은 기기 ID에 액세스 가능한 사용자에 나열된 기준 중 하나도 충족해야 합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2024-05-07(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"]],["최종 업데이트: 2024-05-07(UTC)"],[],[],null,["# Immutable device IDs\n\nIn Android 6 and higher, Wi-Fi service providers and packet analyzers have\nbeen restricted from retrieving a device's factory MAC address through the\nWi-Fi stack from network requests. Starting in Android 10, additional restrictions are in place that limit access to device\nidentifiers (IDs) to apps with the [privileged](/docs/core/permissions/perms-allowlist)[permission\nlevel](https://developer.android.com/reference/android/R.attr.html#protectionLevel). This protects device IDs such as\n\n- telephony IMEI, MEID, ESN, and IMSI numbers.\n- build, SIM, or USB serial numbers.\n\n### Who can access device IDs\n\nDevice IDs are restricted on all Android 10\ndevices, even if apps target Android 9 or lower. Device IDs can be accessed by:\n\n- The default SMS app.\n- Apps with both [READ_PRIVILEGED_PHONE_STATE](/docs/core/permissions/perms-allowlist#customizing-allowlists) permission in the `\n `[Manifest.permission](https://developer.android.com/reference/android/Manifest.permission) class, and allowlisting in the `privapp-permission.xml` file. These must also be loaded in the `priv-app` directory.\n- Apps with carrier privileges as defined in [UICC Carrier\n Privileges](/docs/core/connect/uicc).\n- A device owner or profile owner with [READ_PHONE_STATE](https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE) permission granted in the [Manifest.permission](https://developer.android.com/reference/android/Manifest.permission) class. (Allowlisting isn't required.)\n\n#### Privileged packages access\n\nA package must be privileged to access device IDs. It must have\n[READ_PRIVILEGED_PHONE_STATE](/docs/core/permissions/perms-allowlist#customizing-allowlists) permission in the\n`Manifest.permission` class, and be allowlisted in the\n`privapp-permission.xml` file. For information on the allowlist\nprocess, see [Privileged\nPermission Allowlisting](/docs/core/permissions/perms-allowlist).\n\nFor information on getting a unique ID for a *nonprivileged* package,\nrefer to [Common use cases and the appropriate identifier to use](https://developer.android.com/training/articles/user-data-ids#common-use-cases).\n\n#### Restricted device IDs and randomized MAC addresses\n\nTo further restrict device IDs, all devices on Android 10 transmit randomized MAC addresses by default for both\nprobe and associated requests, and must have a different randomized MAC address\nfor each SSID. Don't use the device factory MAC address in client mode, soft\naccess point (AP), or Wi-Fi Direct use cases. It must remain hidden from\npublicly accessible APIs that aren't privileged apps. Privileged apps that\nrequire the factory MAC address to be returned are required to have\n`LOCAL_MAC_ADDRESS` permission.\n\nUsers have the option to keep the *default randomized* MAC address that's assigned to each SSID.\nThe option is viewable under **Privacy** in\n**Settings** \\\u003e **Network details** . To learn about\nobtaining a randomized MAC address see [Randomized MAC addresses](https://developer.android.com/about/versions/10/privacy/changes#data-ids).\n\n**Figure 1.**MAC address shows as randomized under Privacy in Network details.\n\n#### Apps that invoke device ID APIs\n\nApps that invoke device ID APIs must meet the Android 10 requirements. Otherwise, when they try to access\ndevice IDs the following is returned:\n\n- Apps targeting Android 10\n - [SecurityException](https://developer.android.com/reference/java/lang/SecurityException) is thrown from the device ID APIs.\n- Apps targeting Android 9 or earlier\n - If they have the [READ_PHONE_STATE](https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE) permission, either a `null` response or placeholder data is returned.\n - If they don't, the device ID APIs throw [SecurityException](https://developer.android.com/reference/java/lang/SecurityException) that contains the name of the method called, and an indication that the calling app doesn't meet the requirements to access the requested ID.\n\nFor more on immutable device IDs see [Nonresettable\ndevice identifiers](https://developer.android.com/about/versions/10/privacy/changes#data-ids) and [best practices\nfor unique identifiers](https://developer.android.com/training/articles/user-data-ids).\n\n### Testing\n\nApps *must* be prevented from accessing the device serial number and,\nwhere applicable, IMEI or MEID, SIM serial number, and subscriber ID. Apps with\npermission to access these IDs must also meet one of the criteria listed under\n[Who can access device IDs](#who-access)."]]