اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
إنّ الاتصال بشبكة الجيل الثاني هو أكبر تهديد لأمان المستخدم وخصوصيته عند استخدام شبكة
جوّال. مع أنّ الشبكات الخلوية ذات الجيل الثاني (2G) الشرعية يتم
إيقافها نهائيًا في جميع أنحاء العالم، لا تزال الأجهزة عرضة للهجوم من محطات قاعدة
زائفة (FBS). يمكن للخصم الذي يمتلك جهاز توجيه لاسلكي خاطئ خداع الجهاز للاتصال
به بدلاً من شبكة خلوية مشروعة. ويتم ذلك في أغلب الأحيان
من خلال خفض مستوى اتصال الجهاز إلى شبكة الجيل الثاني، ما يسمح لمشغّل
FBS باعتراض حركة المرور أو إدخالها إلى الجهاز.
يسمح نظام التشغيل Android للمستخدمين بإيقاف شبكة الجيل الثاني على مستوى أجهزة الراديو في أي جهاز
يطبّق ثابت الإمكانات،
"CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK". يؤدي ذلك إلى إيقاف الجهاز عن
البحث عن شبكات الجيل الثاني أو الاتصال بها.
اعتبارًا من الإصدار 14 من Android، يجب أن يكون لديك إذن MODIFY_PRIVILEGED_PHONE_STATE لإيقاف شبكة G2 باستخدام السبب ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G. لا تكون امتيازات مشغّل شبكة الجوّال
كافية.
TelephonyManager tm = getSystemService(TelephonyManager.class);
if (tm != null && tm.isRadioInterfaceCapabilitySupported("CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK")) {
long disable2gBitMask = 0xFFFF &~ TelephonyManager.NETWORK_CLASS_BITMASK_2G;
tm.setAllowedNetworkTypesForReason(TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G, disable2gBitMask);
}
الأسئلة الشائعة
هل يظل المستخدمون عرضة للاختراق إذا توقّفت مشغّلو شبكات الجوّال عن توفير شبكة الجيل الثاني؟
يُعد إيقاف شبكة الجيل الثاني إجراءً أمانًا مهمًا حتى إذا لم يعد مشغّل شبكة الجوّال يدير البنية الأساسية لشبكة الجيل الثاني. لا يزال جهاز المستخدم يتيح البحث عن
محطات الجيل الثاني والاتصال بها، لذا يظل عرضة لهجوم تهدف إلى
الرجوع إلى الجيل الثاني إذا لم يتم إيقاف شبكة الجيل الثاني على جهازه.
كيف يؤثر إيقاف شبكة الجيل الثاني في خدمة التجوال؟
عند إيقاف شبكة الجيل الثاني لأغراض الأمان، لن تتم إعادة تفعيلها، حتى إذا كان
الجهاز في وضع التجوال. تعتمد مناطق معيّنة في العالم على تغطية شبكة الجيل الثاني، وتفترض بعض
اتفاقيات التجوال أنّ الأجهزة ستتمكّن من الاتصال بشبكة الجيل الثاني. في هذه
الحالات، لن يتمكّن المستخدم من الاتصال بالإنترنت ما لم يُعيد تفعيل شبكة الجيل الثاني.
لا يمكن رصد شبكة الجيل الثاني (2G) بشكل موثوق بسبب عدم توفُّر مصادقة متبادلة في شبكة الجيل الثاني (2G). يمنع إبقاء شبكة الجيل الثاني غير مفعّلة على الرغم من إشارات التجوال FBS
من انتحال معرّفات شبكتها لإقناع الجهاز بإعادة تفعيل شبكة الجيل الثاني.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Disable 2G\n\nThe most severe threat to a user's security and privacy when using a mobile\nnetwork is 2G connections. While legitimate 2G cellular networks are being\nphased out across the world, devices are still susceptible to attacks from false\nbase stations (FBS). An adversary with a FBS can trick a device into connecting\nto it instead of a legitimate cellular network. This is most often accomplished\nby downgrading a device's connection to 2G, and it allows the operator of the\nFBS to intercept or inject traffic to a device.\n\nAndroid allows users to disable 2G at the radio hardware level on any device\nthat implements the capability constant,\n\"CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK\". This stops a device from\nscanning or connecting to 2G networks.\n| **Note:** Emergency calling is never impacted. A device still scans and connects to 2G networks for emergency services.\n\nStarting in Android 14, you must have MODIFY_PRIVILEGED_PHONE_STATE to disable\n2G with reason ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G. Carrier privileges don't\nsuffice. \n\n TelephonyManager tm = getSystemService(TelephonyManager.class);\n\n if (tm != null && tm.isRadioInterfaceCapabilitySupported(\"CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK\")) {\n long disable2gBitMask = 0xFFFF &~ TelephonyManager.NETWORK_CLASS_BITMASK_2G;\n tm.setAllowedNetworkTypesForReason(TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G, disable2gBitMask);\n }\n\nFAQs\n----\n\n### Are users still vulnerable if their carriers no longer support 2G?\n\nDisabling 2G is an important security measure even if the user's carrier no\nlonger maintains 2G infrastructure. The user's device still supports scanning\nand connecting to 2G base stations, so they are still vulnerable to a 2G\ndowngrade attack if they do not disable 2G on their device.\n\n### How does disabling 2G impact roaming?\n\nWhen 2G is disabled for security purposes it will not be re-enabled, even if the\ndevice is roaming. Certain areas in the world depend on 2G coverage and some\nroaming agreements assume devices will be able to connect to 2G. In these\nsituations, the user will not have connectivity unless they re-enable 2G.\nIt's not possible to reliably detect 2G roaming because of the lack of mutual\nauthentication in 2G. Leaving 2G off despite roaming signals, prevents a FBS\nfrom spoofing its network identifiers to convince a device to re-enable 2G."]]