Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Identifikasi operator
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Perangkat yang menjalankan Android 9 dapat mengenali informasi
operator langganan untuk
memberikan ID dan nama operator. Android mengelola database ID operator, dengan
aturan pencocokan untuk setiap operator dan ID operator uniknya. AOSP menyertakan
konten database ID operator, dalam file
carrier_list.textpb
.
Database terpadu meminimalkan logika duplikat di aplikasi yang perlu mengidentifikasi
operator dan membatasi eksposur atribut identifikasi operator.
Untuk meningkatkan cakupan dan akurasi identifikasi operator, Android mendukung
update tabel ID operator dan di luar band. Setiap update dilengkapi dengan nomor
versi dan dipublikasikan ke AOSP.
Implementasi
Pengguna yang ingin menerapkan update out-of-band dapat mendownload
biner
carrier_list.pb
dari AOSP. Untuk melihat format tabel yang dapat dibaca, lihat
carrier_list.textpb
.
Tempatkan tabel ID operator di partisi data /data/misc/carrierid/
perangkat. Jika tabel ID operator lebih baru dari versi yang ada, perangkat
akan mempertahankan tabel ke
class database ID operator.
Informasi terbaru dari database ID ekspedisi diambil oleh
metode publik
getSimCarrierId()
dan
getSimCarrierIdName()
.
Untuk menambahkan atau memperbarui ID operator ke database, kirim permintaan menggunakan
Formulir informasi identifikasi operator.
Permintaan Anda akan ditinjau dan jika disetujui, perubahan akan didorong ke basis kode
AOSP di
carrier_list.pb
.
Kemudian, Anda dapat menyalin daftar yang diperbarui dan menggabungkannya ke dalam build
kustom.
Mengintegrasikan ID jasa kurir dengan CarrierConfig
Mulai Android 10,
konfigurasi operator mendukung
penggunaan ID operator sebagai kunci untuk mengambil konfigurasi khusus operator dari
CarrierService
.
Mengintegrasikan ID operator dengan CarrierConfig
memiliki keuntungan berikut:
- Menggabungkan semua pasangan MCC/MNC untuk setiap operator ke dalam satu lokasi
yang menghapus data duplikat atau tidak konsisten.
- Membuat ID kanonis untuk setiap operator dan menghilangkan ambiguitas.
- Memungkinkan operator jaringan virtual seluler (MVNO) diidentifikasi dengan
ID individual, bukan memiliki konfigurasi sebagai bagian dari operator jaringan
seluler (MNO).
Memigrasikan data konfigurasi ke ID operator
Untuk memigrasikan data konfigurasi dari pasangan MCC/MNC ke ID operator, ikuti
langkah-langkah berikut:
Mengelompokkan file carrier_config_mccmnc.xml
dari satu operator bersama-sama.
Gunakan
carrier_list.textpb
sebagai referensi untuk memetakan informasi MCC, MNC, dan MVNO ke operator
tertentu.
Gabungkan konfigurasi menjadi satu file.
(Opsional) Wariskan data dari MNO. MVNO mewarisi konfigurasi dari
MNO dalam file carrier_config_mccmnc.xml
lama. Karena ID operator
memungkinkan semua operator, termasuk MVNO, memiliki file konfigurasi khusus, sebaiknya
sertakan data MNO selama migrasi.
Jika konfigurasi untuk ID operator MVNO tidak ada, ambil
konfigurasi dari ID operator MNO-nya menggunakan
getCarrierIdFromSimMccMnc
.
Ganti nama file baru menjadi
carrier_config_carrierid_carrierid_carriername.xml
dengan carrierid harus sesuai dengan canonical_id
dan
carriername harus sesuai dengan carrier_name
di
carrier_list.textpb
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)."]]