2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
이동통신사 ID
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android 9를 실행하는 기기는 ID 및 이동통신사 이름을 제공할 수 있도록 가입된 이동통신사 정보를 인식할 수 있습니다. Android는 각 이동통신사와 고유한 이동통신사 ID의 매칭 규칙으로 이동통신사 ID 데이터베이스를 유지합니다. AOSP의 carrier_list.textpb
파일에는 이동통신사 ID 데이터베이스의 콘텐츠가 포함됩니다.
통합 데이터베이스는 이동통신사를 식별해야 하는 앱의 중복 로직을 최소화하고 이동통신사를 식별하는 속성의 노출을 제한합니다.
이동통신사 ID의 범위 및 정확성을 개선하기 위해 Android는 대역 외 업데이트 및 이동통신사 ID 테이블 업데이트를 지원합니다. 각 업데이트는 버전 번호와 함께 제공되며 AOSP에 게시됩니다.
구현
대역 외 업데이트를 구현하려는 사용자는 AOSP에서 carrier_list.pb
바이너리를 다운로드할 수 있습니다. 읽을 수 있는 테이블 형식을 보려면 carrier_list.textpb
를 확인하세요.
이동통신사 ID 테이블을 기기의 /data/misc/carrierid/
데이터 파티션에 배치합니다. 이동통신사 ID 테이블이 기존 버전보다 최신이면 기기는 테이블을 이동통신사 ID 데이터베이스 클래스에 유지합니다.
이동통신사 ID 데이터베이스의 최신 정보는 공개 메서드 getSimCarrierId()
및 getSimCarrierIdName()
을 통해 가져올 수 있습니다.
이동통신사 ID를 데이터베이스에 추가하거나 업데이트하려면 이동통신사 ID 정보 양식을 사용하여 요청을 제출합니다.
요청이 검토 및 승인되면 변경사항이 carrier_list.pb
의 ASOP 코드베이스로 푸시됩니다.
그러면 업데이트된 목록을 복사한 후 맞춤설정된 빌드에 통합할 수 있습니다.
CarrierConfig와 이동통신사 ID 통합
Android 10부터는 이동통신사 구성에서 이동통신사 ID를 키로 사용하여 CarrierService
에서 이동통신사 관련 구성을 가져오도록 지원합니다.
이동통신사 ID를 CarrierConfig
와 통합하면 다음과 같은 이점을 얻을 수 있습니다.
- 각 이동통신사의 모든 MCC/MNC 쌍을 단일 위치로 통합하여 중복 또는 불일치 데이터를 삭제할 수 있습니다.
- 각 이동통신사의 표준 식별자를 생성하여 모호함을 없앨 수 있습니다.
- 구성을 모바일 네트워크 운영자(MNO)의 일부로 보유하는 대신 개별 ID로 가상 모바일 네트워크 운영자(MVNO)를 식별할 수 있습니다.
구성 데이터를 이동통신사 ID로 이전
MCC/MNC 쌍의 구성 데이터를 이동통신사 ID로 이전하려면 아래의 단계를 따르세요.
단일 이동통신사의 carrier_config_mccmnc.xml
파일을 함께 그룹화합니다.
carrier_list.textpb
를 참조로 사용하여 MCC, MNC 및 MVNO 정보를 특정 이동통신사에 매핑합니다.
구성을 단일 파일로 병합합니다.
(선택사항) MNO의 데이터를 상속합니다. MVNO는 레거시 carrier_config_mccmnc.xml
파일에서 MNO의 구성을 상속합니다. 이동통신사 ID를 사용하면 MVNO를 포함한 모든 이동통신사가 전용 구성 파일을 보유할 수 있으므로 이전 도중에 MNO 데이터를 포함하는 것이 좋습니다.
MVNO 이동통신사 ID의 구성이 존재하지 않으면 getCarrierIdFromSimMccMnc
를 사용하여 MNO 이동통신사 ID에서 구성을 가져옵니다.
새 파일의 이름을 carrier_config_carrierid_carrierid_carriername.xml
로 변경합니다. 여기서 carrierid는 canonical_id
와 일치해야 하며 carriername은 carrier_list.textpb
의 carrier_name
과 일치해야 합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-26(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-07-26(UTC)"],[],[],null,["# Carrier identification\n\nDevices running Android 9 can recognize subscription\ncarrier information to\nprovide an ID and a carrier name. Android maintains a carrier ID database, with\nmatching rules for each carrier and its unique carrier ID. AOSP includes the\ncontent of the carrier ID database, in the file\n[`carrier_list.textpb`](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android16-release/assets/latest_carrier_id/carrier_list.textpb).\nThe unified database minimizes duplicate logic in apps that need to identify\ncarriers and limits the exposure of carrier-identifying attributes.\n\nTo improve the coverage and accuracy of carrier identification, Android supports\nout-of-band and carrier ID table updates. Each update comes with a version\nnumber and is published to AOSP.\n\nImplementation\n--------------\n\nUsers who want to implement out-of-band updates can download the\n[`carrier_list.pb`](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android16-release/assets/latest_carrier_id/carrier_list.pb)\nbinary from AOSP. To view the readable format of the table, see\n[`carrier_list.textpb`](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android16-release/assets/latest_carrier_id/carrier_list.textpb).\n\nPlace the carrier ID table in the `/data/misc/carrierid/` data partition of the\ndevice. If the carrier ID table is newer than the existing version, the device\npersists the table to the\n[carrier ID database class](https://developer.android.com/reference/android/provider/Telephony.CarrierId).\nThe most recent information from the carrier ID database is picked up by the\npublic methods\n[`getSimCarrierId()`](https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierId())\nand\n[`getSimCarrierIdName()`](https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCarrierIdName()).\n\nAdd carrier ID information to the database\n------------------------------------------\n\nTo add or update a carrier ID to the database, submit a request using the\n[Carrier identification information form](https://docs.google.com/forms/d/1KjwTaExKRjkE9tbR9yavBrGzwvuz1dNku2Ae_7GrdUQ/viewform?edit_requested=true).\n\nYour request is reviewed and if approved, the change is pushed to the AOSP code\nbase at\n[`carrier_list.pb`](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android16-release/assets/latest_carrier_id/carrier_list.pb).\nYou can then copy the updated list and incorporate it into your customized\nbuild.\n\nIntegrate carrier IDs with CarrierConfig\n----------------------------------------\n\nStarting from Android 10,\n[carrier configuration](/docs/core/connect/carrier) supports\nusing carrier IDs as keys to fetch carrier-specific configurations from\n[`CarrierService`](https://developer.android.com/reference/android/service/carrier/CarrierService).\n\nIntegrating carrier IDs with `CarrierConfig` has the following advantages:\n\n- Consolidates all MCC/MNC pairs for each carrier into a single location removing duplicate or inconsistent data.\n- Creates a canonical identifier for each carrier and removes ambiguity.\n- Allows mobile virtual network operators (MVNOs) to be identified with individual IDs instead of having configurations as part of a mobile network operator (MNO).\n\n### Migrate configuration data to carrier IDs\n\nTo migrate configuration data from MCC/MNC pairs to carrier IDs, follow\nthese steps:\n\n1. Group the `carrier_config_mccmnc.xml` files from a single carrier together.\n Use\n [`carrier_list.textpb`](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android16-release/assets/latest_carrier_id/carrier_list.textpb)\n as a reference to map the MCC, MNC, and MVNO information to a particular\n carrier.\n\n2. Merge the configurations into a single file.\n\n3. (Optional) Inherit data from MNOs. MVNOs inherit configurations from\n MNOs in the legacy `carrier_config_mccmnc.xml` file. Because carrier IDs\n allow all carriers including MVNOs to have a dedicated config file, it's\n recommended to include MNO data during migration.\n\n4. If the configuration for an MVNO carrier ID doesn't exist, fetch the\n configuration from its MNO carrier ID using\n [`getCarrierIdFromSimMccMnc`](https://developer.android.com/reference/android/telephony/TelephonyManager#getCarrierIdFromSimMccMnc()).\n\n5. Rename the new file as\n `carrier_config_carrierid_`\u003cvar translate=\"no\"\u003ecarrierid\u003c/var\u003e`_`\u003cvar translate=\"no\"\u003ecarriername\u003c/var\u003e`.xml`\n where \u003cvar translate=\"no\"\u003ecarrierid\u003c/var\u003e must correspond to a `canonical_id` and\n \u003cvar translate=\"no\"\u003ecarriername\u003c/var\u003e should correspond to a `carrier_name` in\n [`carrier_list.textpb`](https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/android16-release/assets/latest_carrier_id/carrier_list.textpb)\n\n| **Note:** If a `carrier_config_mccmnc` file doesn't have a matching carrier ID, submit a request to add a carrier ID by following the steps in [Adding carrier ID information to the database](#adding_carrier_id_information_to_the_database)."]]