Android, सुरक्षा से जुड़ी सुविधाओं और ऑफ़र को लगातार बेहतर बनाता रहता है. बाईं ओर मौजूद नेविगेशन में, रिलीज़ के हिसाब से बेहतर सुविधाओं की सूचियां देखें.
Android 14
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 14:
- Hardware-assisted AddressSanitizer (HWASan), introduced in Android 10, is a memory error detection tool similar to AddressSanitizer. Android 14 brings significant improvements to HWASan. Learn how it helps prevent bugs from making it into Android releases, HWAddressSanitizer
- In Android 14, starting with apps that share location data with third-parties, the system runtime permission dialog now includes a clickable section that highlights the app's data-sharing practices, including information such as why an app may decide to share data with third parties.
- Android 12 introduced an option to disable 2G support at the modem level, which protects users from the inherent security risk from 2G's obsolete security model. Recognizing how critical disabling 2G could be for enterprise customers, Android 14 enables this security feature in Android Enterprise, introducing support for IT admins to restrict the ability of a managed device to downgrade to 2G connectivity.
- Added support to reject null-ciphered cellular connections, ensuring that circuit-switched voice and SMS traffic is always encrypted and protected from passive over-the-air interception. Learn more about Android's program to harden cellular connectivity.
- Added support for multiple IMEIs
- Since Android 14, AES-HCTR2 is the preferred mode of filenames encryption for devices with accelerated cryptography instructions.
- Cellular connectivity
- Documentation added for Android Safety Center
- If your app targets Android 14 and uses Dynamic Code Loading (DCL), all dynamically-loaded files must be marked as read-only. Otherwise, the system throws an exception. We recommend that apps avoid dynamically loading code whenever possible, as doing so greatly increases the risk that an app can be compromised by code injection or code tampering.
Check out our full AOSP release notes and the Android Developer features and changes list.
Android 13
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 13:
- Android 13 adds multi-document presentation support. This new Presentation Session interface enables an app to do a multi-document presentation, something which isn't possible with the existing API. For further information, refer to Identity Credential
- In Android 13, intents originating from external apps are delivered to an exported component if and only if the intents match their declared intent-filter elements.
- Open Mobile API (OMAPI) is a standard API used to communicate with a device's Secure Element. Before Android 13, only apps and framework modules had access to this interface. By converting it to a vendor stable interface, HAL modules are also capable of communicating with the secure elements through the OMAPI service. For more information, see OMAPI Vendor Stable Interface.
- As of Android 13-QPR, shared UIDs are deprecated. Users of Android 13 or higher should put the line `android:sharedUserMaxSdkVersion="32"` in their manifest. This entry prevents new users from getting a shared UID. For further information on UIDs, see App signing.
- Android 13 added support Keystore symmetric cryptographic primitives such as AES (Advanced Encryption Standard), HMAC (Keyed-Hash Message Authentication Code), and asymmetric cryptographic algorithms (including Elliptic Curve, RSA2048, RSA4096, and Curve 25519)
- Android 13 (API level 33) and higher supports a runtime permission for sending non-exempt notifications from an app. This gives users control over which permission notifications they see.
- Added per-use prompt for apps requesting access to all device logs, giving users the ability to allow or deny access.
- introduced the Android Virtualization Framework (AVF), which brings together different hypervisors under one framework with standardized APIs. It provides secure and private execution environments for executing workloads isolated by hypervisor.
- Introduced APK signature scheme v3.1 All new key rotations that use apksigner use the v3.1 signature scheme by default to target rotation for Android 13 and higher.
Check out our full AOSP release notes and the Android Developer features and changes list.
Android 12
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 12:
- Android 12 introduces the BiometricManager.Strings API, which provides localized strings for apps that use BiometricPrompt for authentication. These strings are intended to be device-aware and provide more specificity about which authentication types might be used. Android 12 also includes support for under-display fingerprint sensors
- Support added for under-display fingerprint sensors
- Introduction of the Fingerprint Android Interface Definition Language (AIDL)
- Support for new Face AIDL
- Introduction of Rust as a language for platform development
- The option for users to grant access only to their approximate location added
- Added Privacy indicators on the status bar when an app is using the camera or microphone
- Android's Private Compute Core (PCC)
- Added an option to disable 2G support
Android 11
Android के हर रिलीज़ में, उपयोगकर्ताओं को सुरक्षित रखने के लिए सुरक्षा से जुड़ी कई सुविधाएं शामिल की जाती हैं. Android 11 में उपलब्ध सुरक्षा से जुड़े कुछ अहम सुधारों की सूची के लिए, Android रिलीज़ के नोट देखें.
Android 10
Android के हर रिलीज़ में, उपयोगकर्ताओं को सुरक्षित रखने के लिए सुरक्षा से जुड़ी कई सुविधाएं शामिल की जाती हैं. Android 10 में सुरक्षा और निजता से जुड़ी कई सुविधाएं बेहतर की गई हैं. Android 10 में हुए बदलावों की पूरी सूची के लिए, Android 10 के रिलीज़ नोट देखें.
सुरक्षा
BoundsSanitizer
Android 10, ब्लूटूथ और कोडेक में BoundsSanitizer (BoundSan) को डिप्लॉय करता है. BoundSan, UBSan के bounds sanitizer का इस्तेमाल करता है. यह समस्या हल करने की सुविधा, हर मॉड्यूल के लेवल पर चालू होती है. इससे Android के अहम कॉम्पोनेंट को सुरक्षित रखने में मदद मिलती है. इसलिए, इसे बंद नहीं किया जाना चाहिए. BoundSan इन कोडेक में चालू है:
libFLAC
libavcdec
libavcenc
libhevcdec
libmpeg2
libopus
libvpx
libspeexresampler
libvorbisidec
libaac
libxaac
सिर्फ़ एक्ज़ीक्यूट करने के लिए मेमोरी
डिफ़ॉल्ट रूप से, AArch64 सिस्टम बाइनरी के लिए एक्ज़ीक्यूटेबल कोड सेक्शन को सिर्फ़-इस्तेमाल करने के लिए (नहीं पढ़ा जा सकता) के तौर पर मार्क किया जाता है. ऐसा, सिर्फ़-समय पर कोड का फिर से इस्तेमाल करने से जुड़े हमलों को रोकने के लिए किया जाता है. डेटा और कोड को एक साथ मिलाने वाला कोड और ऐसे कोड जो पहले से ही मेमोरी सेगमेंट को पढ़ने लायक के तौर पर फिर से मैप किए बिना, इन सेक्शन की जांच करते हैं, अब काम नहीं करते. अगर कोई ऐप्लिकेशन, सिर्फ़-इंप्लिकेशन (XOM) वाली सिस्टम लाइब्रेरी के कोड सेक्शन को पढ़ने की कोशिश करता है, तो उस पर असर पड़ता है. ऐसा तब होता है, जब ऐप्लिकेशन पहले सेक्शन को पढ़ने लायक के तौर पर मार्क किए बिना, उसे मेमोरी में पढ़ने की कोशिश करता है. यह असर, Android 10 (एपीआई लेवल 29 या इसके बाद के वर्शन) के टारगेट SDK टूल वाले ऐप्लिकेशन पर पड़ता है.
एक्सटेंडेड ऐक्सेस
भरोसेमंद एजेंट, तीसरे पक्ष की पुष्टि करने वाले तरीकों, जैसे कि Smart Lock के लिए इस्तेमाल किए जाने वाले बुनियादी तरीके हैं. ये एजेंट, Android 10 में ही डिवाइस के अनलॉक होने की अवधि बढ़ा सकते हैं. भरोसेमंद एजेंट, अब लॉक किए गए डिवाइस को अनलॉक नहीं कर सकते. साथ ही, वे किसी डिवाइस को ज़्यादा से ज़्यादा चार घंटे तक ही अनलॉक रख सकते हैं.
चेहरे से अनलॉक करें
चेहरे की पुष्टि करने की सुविधा की मदद से, उपयोगकर्ता अपने डिवाइस के सामने देखकर उसे अनलॉक कर सकते हैं. Android 10 में, चेहरे की पहचान करने के लिए एक नया स्टैक जोड़ा गया है. यह स्टैक, कैमरे के फ़्रेम को सुरक्षित तरीके से प्रोसेस कर सकता है. साथ ही, चेहरे की पहचान करने की सुविधा के साथ काम करने वाले हार्डवेयर पर, सुरक्षा और निजता को बनाए रखता है. Android 10 में, सुरक्षा से जुड़ी शर्तों को पूरा करने के लिए, ऐप्लिकेशन को आसानी से इंटिग्रेट करने का तरीका भी दिया गया है. इससे, ऑनलाइन बैंकिंग या अन्य सेवाओं जैसे लेन-देन के लिए, ऐप्लिकेशन को इंटिग्रेट किया जा सकता है.
पूर्णांक के ओवरफ़्लो को सैनिटाइज़ करना
Android 10, सॉफ़्टवेयर कोडेक में इंटिजर ओवरफ़्लो को ठीक करने की सुविधा (IntSan) चालू करता है. पक्का करें कि डिवाइस के हार्डवेयर पर काम न करने वाले कोडेक के लिए, वीडियो चलाने की परफ़ॉर्मेंस ठीक हो. IntSan इन कोडेक में चालू है:
libFLAC
libavcdec
libavcenc
libhevcdec
libmpeg2
libopus
libvpx
libspeexresampler
libvorbisidec
मॉड्यूलर सिस्टम के कॉम्पोनेंट
Android 10, Android सिस्टम के कुछ कॉम्पोनेंट को मॉड्यूलर बनाता है. इससे, उन्हें Android के सामान्य रिलीज़ साइकल के बाहर अपडेट किया जा सकता है. कुछ मॉड्यूल में ये शामिल हैं:
- Android रनटाइम
- Conscrypt
- डीएनएस रिज़ॉल्वर
- DocumentsUI
- ExtServices
- मीडिया
- ModuleMetadata
- नेटवर्किंग
- PermissionController
- टाइम ज़ोन का डेटा
OEMCrypto
Android 10, OEMCrypto API के वर्शन 15 का इस्तेमाल करता है.
Scudo
Scudo, डाइनैमिक उपयोगकर्ता-मोड मेमोरी ऐलोकेटर है. इसे हेप से जुड़ी कमजोरियों से ज़्यादा सुरक्षित रखने के लिए डिज़ाइन किया गया है. यह स्टैंडर्ड C एलोकेशन और डिएलोकेशन प्राइमिटिव के साथ-साथ C++ प्राइमिटिव भी उपलब्ध कराता है.
ShadowCallStack
ShadowCallStack
(SCS)
एक LLVM
इंस्ट्रूमेंटेशन मोड है. यह रिटर्न पते को ओवरराइट होने (जैसे कि स्टैक बफ़र ओवरफ़्लो) से बचाता है. इसके लिए, यह किसी फ़ंक्शन के रिटर्न पते को, अलग से लिए गए ShadowCallStack
इंस्टेंस में सेव करता है. यह इंस्टेंस, नॉन-लीफ़ फ़ंक्शन के फ़ंक्शन प्रोलॉग में होता है. साथ ही, यह फ़ंक्शन एपिलॉग में ShadowCallStack
इंस्टेंस से रिटर्न पता लोड करता है.
WPA3 और Wi-Fi Enhanced Open
Android 10 में वाई-फ़ाई प्रोटेक्टेड ऐक्सेस 3 (WPA3) और वाई-फ़ाई बेहतर ओपन सिक्योरिटी स्टैंडर्ड के लिए सहायता जोड़ी गई है. इससे, जाने-पहचाने हमलों से बेहतर निजता और सुरक्षा मिलती है.
निजता
Android 9 या इससे पहले के वर्शन को टारगेट करते समय ऐप्लिकेशन का ऐक्सेस
अगर आपका ऐप्लिकेशन Android 10 या उसके बाद के वर्शन पर काम करता है, लेकिन Android 9 (एपीआई लेवल 28) या उससे पहले के वर्शन को टारगेट करता है, तो प्लैटफ़ॉर्म इस तरह काम करता है:
- अगर आपके ऐप्लिकेशन में
ACCESS_FINE_LOCATION
याACCESS_COARSE_LOCATION
के लिए<uses-permission>
एलिमेंट का एलान किया गया है, तो इंस्टॉलेशन के दौरान सिस्टम,ACCESS_BACKGROUND_LOCATION
के लिए<uses-permission>
एलिमेंट अपने-आप जोड़ देता है. - अगर आपका ऐप्लिकेशन
ACCESS_FINE_LOCATION
याACCESS_COARSE_LOCATION
का अनुरोध करता है, तो सिस्टम अनुरोध मेंACCESS_BACKGROUND_LOCATION
को अपने-आप जोड़ देता है.
बैकग्राउंड गतिविधि पर पाबंदियां
Android 10 में, सिस्टम बैकग्राउंड से गतिविधियां शुरू करने पर पाबंदियां लगाता है. इस बदलाव से, उपयोगकर्ता को कम रुकावटों का सामना करना पड़ता है. साथ ही, उपयोगकर्ता के पास अपनी स्क्रीन पर दिखने वाली जानकारी को कंट्रोल करने का ज़्यादा विकल्प होता है. जब तक आपका ऐप्लिकेशन, उपयोगकर्ता के इंटरैक्शन के सीधे नतीजे के तौर पर गतिविधियां शुरू करता है, तब तक इन पाबंदियों का आपके ऐप्लिकेशन पर असर पड़ने की संभावना नहीं है.
बैकग्राउंड से गतिविधियां शुरू करने के सुझाए गए विकल्प के बारे में ज़्यादा जानने के लिए, अपने ऐप्लिकेशन में समय के हिसाब से ज़रूरी इवेंट के बारे में उपयोगकर्ताओं को सूचना देने का तरीका बताने वाली गाइड देखें.
कैमरे का मेटाडेटा
Android 10, getCameraCharacteristics()
तरीका से डिफ़ॉल्ट रूप से मिलने वाली जानकारी में बदलाव करता है. खास तौर पर, आपके ऐप्लिकेशन के पास CAMERA
अनुमति होनी चाहिए, ताकि वह इस तरीके की रिटर्न वैल्यू में शामिल, डिवाइस के हिसाब से मेटाडेटा को ऐक्सेस कर सके.
इन बदलावों के बारे में ज़्यादा जानने के लिए, ऐसे कैमरा फ़ील्ड के बारे में सेक्शन देखें जिनके लिए अनुमति की ज़रूरत होती है.
क्लिपबोर्ड का डेटा
अगर आपका ऐप्लिकेशन डिफ़ॉल्ट इनपुट तरीका एडिटर (आईएमई) नहीं है या फ़िलहाल फ़ोकस में नहीं है, तो वह Android 10 या इसके बाद के वर्शन पर क्लिपबोर्ड का डेटा ऐक्सेस नहीं कर सकता.
डिवाइस की जगह की जानकारी
Android 10 में ACCESS_BACKGROUND_LOCATION
अनुमति को शामिल किया गया है. इससे उपयोगकर्ताओं को यह कंट्रोल करने में मदद मिलती है कि ऐप्लिकेशन को जगह की जानकारी का ऐक्सेस कब दिया जाए.
ACCESS_FINE_LOCATION
और ACCESS_COARSE_LOCATION
अनुमतियों के उलट, ACCESS_BACKGROUND_LOCATION
अनुमति का असर सिर्फ़ तब पड़ता है, जब ऐप्लिकेशन बैकग्राउंड में चल रहा हो. जब तक किसी ऐप्लिकेशन के लिए इनमें से कोई एक शर्त पूरी नहीं होती, तब तक उसे बैकग्राउंड में जगह की जानकारी ऐक्सेस करने वाला ऐप्लिकेशन माना जाता है:
- ऐप्लिकेशन से जुड़ी कोई गतिविधि दिख रही हो.
- ऐप्लिकेशन, ऐसी फ़ोरग्राउंड सेवा चला रहा है जिसने
location
के फ़ोरग्राउंड सेवा टाइप का एलान किया है.
अपने ऐप्लिकेशन में किसी सेवा के लिए, फ़ोरग्राउंड सेवा के टाइप का एलान करने के लिए, अपने ऐप्लिकेशन केtargetSdkVersion
याcompileSdkVersion
को29
या उससे ज़्यादा पर सेट करें. इस बारे में ज़्यादा जानें कि फ़ोरग्राउंड सेवाएं, उपयोगकर्ता की शुरू की गई उन कार्रवाइयों को जारी कैसे रख सकती हैं जिनके लिए जगह की जानकारी का ऐक्सेस ज़रूरी है.
बाहरी मेमोरी
Android 10 और उसके बाद के वर्शन को टारगेट करने वाले ऐप्लिकेशन को डिफ़ॉल्ट रूप से, बाहरी स्टोरेज का सीमित ऐक्सेस या स्कोप किया गया स्टोरेज दिया जाता है. ऐसे ऐप्लिकेशन, बाहरी स्टोरेज डिवाइस में इन टाइप की फ़ाइलें देख सकते हैं. इसके लिए, उन्हें स्टोरेज से जुड़ी उपयोगकर्ता की अनुमतियों का अनुरोध करने की ज़रूरत नहीं होती:
- ऐप्लिकेशन के हिसाब से बनी डायरेक्ट्री में मौजूद फ़ाइलें, जिन्हें
getExternalFilesDir()
का इस्तेमाल करके ऐक्सेस किया जाता है. - मीडिया स्टोर से ऐप्लिकेशन ने जो फ़ोटो, वीडियो, और ऑडियो क्लिप बनाई हैं.
स्कोप वाले स्टोरेज के बारे में ज़्यादा जानने के साथ-साथ, बाहरी स्टोरेज वाले डिवाइसों पर सेव की गई फ़ाइलों को शेयर करने, ऐक्सेस करने, और उनमें बदलाव करने का तरीका जानने के लिए, बाहरी स्टोरेज में फ़ाइलों को मैनेज करने और मीडिया फ़ाइलों को ऐक्सेस करने और उनमें बदलाव करने के बारे में गाइड देखें.
एमएसी पते को रैंडम पर सेट करना
Android 10 या इसके बाद के वर्शन वाले डिवाइसों पर, सिस्टम डिफ़ॉल्ट रूप से रैंडम मैक पता भेजता है.
अगर आपका ऐप्लिकेशन एंटरप्राइज़ के इस्तेमाल के उदाहरण को मैनेज करता है, तो प्लैटफ़ॉर्म, MAC पतों से जुड़े कई ऑपरेशन के लिए एपीआई उपलब्ध कराता है:
- अपने-आप चुना गया मैक पता पाना: डिवाइस के मालिक के ऐप्लिकेशन और प्रोफ़ाइल के मालिक के ऐप्लिकेशन,
getRandomizedMacAddress()
को कॉल करके किसी नेटवर्क के लिए असाइन किया गया, अपने-आप चुना गया मैक पता पा सकते हैं. - असल, फ़ैक्ट्री मैक पता पाना: डिवाइस के मालिक के ऐप्लिकेशन,
getWifiMacAddress()
को कॉल करके, डिवाइस का असल हार्डवेयर मैक पता पा सकते हैं. यह तरीका, डिवाइसों के फ़्लीट को ट्रैक करने के लिए काम का है.
ऐसे डिवाइस आइडेंटिफ़ायर जिन्हें रीसेट नहीं किया जा सकता
Android 10 के बाद, डिवाइस के ऐसे आइडेंटिफ़ायर को ऐक्सेस करने के लिए, ऐप्लिकेशन के पास READ_PRIVILEGED_PHONE_STATE
खास अनुमति होनी चाहिए जिन्हें रीसेट नहीं किया जा सकता. इनमें IMEI और सीरियल नंबर, दोनों शामिल हैं.
Build
TelephonyManager
अगर आपके ऐप्लिकेशन के पास अनुमति नहीं है और फिर भी, रीसेट नहीं किए जा सकने वाले आइडेंटिफ़ायर के बारे में जानकारी मांगी जाती है, तो टारगेट किए गए SDK टूल के वर्शन के आधार पर प्लैटफ़ॉर्म का जवाब अलग-अलग होता है:
- अगर आपका ऐप्लिकेशन Android 10 या उसके बाद के वर्शन को टारगेट करता है, तो
SecurityException
ऐप्लिकेशन के लिए एक समस्या दिखती है. - अगर आपका ऐप्लिकेशन Android 9 (एपीआई लेवल 28) या उससे पहले के वर्शन को टारगेट करता है, तो यह तरीका
null
या प्लेसहोल्डर डेटा दिखाता है. हालांकि, ऐसा तब ही होता है, जब ऐप्लिकेशन के पासREAD_PHONE_STATE
अनुमति हो. ऐसा न होने पर,SecurityException
दिखता है.
शारीरिक गतिविधि की पहचान करने की सुविधा
Android 10 में, android.permission.ACTIVITY_RECOGNITION
रनटाइम की अनुमति की सुविधा जोड़ी गई है. यह सुविधा उन ऐप्लिकेशन के लिए है जिन्हें उपयोगकर्ता के कदमों की संख्या का पता लगाना है या उपयोगकर्ता की शारीरिक गतिविधि की कैटगरी तय करनी है. जैसे, पैदल चलना, साइकल चलाना या वाहन चलाना. इसे इस तरह से डिज़ाइन किया गया है कि उपयोगकर्ताओं को यह जानकारी मिल सके कि सेटिंग में डिवाइस के सेंसर डेटा का इस्तेमाल कैसे किया जाता है.
Google Play services की कुछ लाइब्रेरी, नतीजे तब तक नहीं दिखातीं, जब तक उपयोगकर्ता ने आपके ऐप्लिकेशन को अनुमति न दी हो. जैसे, Activity
Recognition API और Google
Fit API.
डिवाइस में पहले से मौजूद सिर्फ़ कदमों की गिनती करने वाले और कदमों का पता लगाने वाले सेंसर के लिए, आपको यह अनुमति देनी होगी.
अगर आपका ऐप्लिकेशन Android 9 (एपीआई लेवल 28) या इससे पहले के वर्शन को टारगेट करता है, तो सिस्टम आपके ऐप्लिकेशन को android.permission.ACTIVITY_RECOGNITION
अनुमति अपने-आप देता है. हालांकि, इसके लिए ज़रूरी है कि आपका ऐप्लिकेशन इन सभी शर्तों को पूरा करता हो:
- मेनिफ़ेस्ट फ़ाइल में
com.google.android.gms.permission.ACTIVITY_RECOGNITION
अनुमति शामिल है. - मेनिफ़ेस्ट फ़ाइल में
android.permission.ACTIVITY_RECOGNITION
अनुमति शामिल नहीं है.
अगर सिस्टम अपने-आप android.permission.ACTIVITY_RECOGNITION
अनुमति देता है, तो Android 10 को टारगेट करने के लिए ऐप्लिकेशन को अपडेट करने के बाद भी, आपके ऐप्लिकेशन के पास यह अनुमति बनी रहती है. हालांकि, उपयोगकर्ता कभी भी सिस्टम सेटिंग में जाकर, इस अनुमति को रद्द कर सकता है.
/proc/net फ़ाइल सिस्टम से जुड़ी पाबंदियां
Android 10 या इसके बाद के वर्शन वाले डिवाइसों पर, ऐप्लिकेशन /proc/net
को ऐक्सेस नहीं कर सकते. इसमें डिवाइस के नेटवर्क की स्थिति की जानकारी शामिल होती है. जिन ऐप्लिकेशन को इस जानकारी का ऐक्सेस चाहिए, जैसे कि वीपीएन, उन्हें NetworkStatsManager
या ConnectivityManager
क्लास का इस्तेमाल करना चाहिए.
यूज़र इंटरफ़ेस (यूआई) से अनुमतियों के ग्रुप हटाए गए
Android 10 के बाद, ऐप्लिकेशन यह नहीं देख सकते कि यूज़र इंटरफ़ेस (यूआई) में अनुमतियां कैसे ग्रुप की गई हैं.
संपर्कों की जानकारी हटाना
Android 10 से, प्लैटफ़ॉर्म संपर्कों की अफ़िनिटी की जानकारी को ट्रैक नहीं करता. इसलिए, अगर आपका ऐप्लिकेशन उपयोगकर्ता के संपर्कों को खोजता है, तो नतीजों को इंटरैक्शन की फ़्रीक्वेंसी के हिसाब से क्रम में नहीं लगाया जाता.
ContactsProvider
के बारे में गाइड में एक सूचना दी गई है. इसमें, Android 10 वाले सभी डिवाइसों पर, ऐसे फ़ील्ड और तरीकों के बारे में बताया गया है जो अब काम नहीं करते.
स्क्रीन पर दिखने वाले कॉन्टेंट का ऐक्सेस सीमित करना
उपयोगकर्ताओं की स्क्रीन पर मौजूद कॉन्टेंट को सुरक्षित रखने के लिए, Android 10 ने READ_FRAME_BUFFER
, CAPTURE_VIDEO_OUTPUT
, और CAPTURE_SECURE_VIDEO_OUTPUT
अनुमतियों के दायरे में बदलाव किया है. इससे, डिवाइस की स्क्रीन पर मौजूद कॉन्टेंट को चुपचाप ऐक्सेस करने से रोका जा सकता है. Android 10 के बाद, ये अनुमतियां सिर्फ़ हस्ताक्षर का ऐक्सेस के लिए होती हैं.
जिन ऐप्लिकेशन को डिवाइस की स्क्रीन पर मौजूद कॉन्टेंट को ऐक्सेस करना है उन्हें MediaProjection
एपीआई का इस्तेमाल करना चाहिए. यह एपीआई, उपयोगकर्ता से सहमति देने के लिए कहने वाला प्रॉम्प्ट दिखाता है.
यूएसबी डिवाइस का सीरियल नंबर
अगर आपका ऐप्लिकेशन Android 10 या उसके बाद के वर्शन को टारगेट करता है, तो आपका ऐप्लिकेशन सीरियल नंबर तब तक नहीं पढ़ सकता, जब तक उपयोगकर्ता आपके ऐप्लिकेशन को यूएसबी डिवाइस या ऐक्सेसरी को ऐक्सेस करने की अनुमति नहीं देता.
यूएसबी डिवाइसों के साथ काम करने के बारे में ज़्यादा जानने के लिए, यूएसबी होस्ट को कॉन्फ़िगर करने का तरीका बताने वाली गाइड देखें.
वाई-फ़ाई
Android 10 या उसके बाद के वर्शन को टारगेट करने वाले ऐप्लिकेशन, वाई-फ़ाई को चालू या बंद नहीं कर सकते. WifiManager.setWifiEnabled()
वाला तरीका, हमेशा false
दिखाता है.
अगर आपको उपयोगकर्ताओं को वाई-फ़ाई को चालू और बंद करने के लिए कहना है, तो सेटिंग पैनल का इस्तेमाल करें.
कॉन्फ़िगर किए गए वाई-फ़ाई नेटवर्क को सीधे ऐक्सेस करने पर पाबंदियां
उपयोगकर्ता की निजता को सुरक्षित रखने के लिए, वाई-फ़ाई नेटवर्क की सूची को मैन्युअल तरीके से कॉन्फ़िगर करने की अनुमति सिर्फ़ सिस्टम ऐप्लिकेशन और डिवाइस नीति कंट्रोलर (डीपीसी) को है. कोई डीपीसी, डिवाइस का मालिक या प्रोफ़ाइल का मालिक हो सकता है.
अगर आपका ऐप्लिकेशन Android 10 या उसके बाद के वर्शन को टारगेट करता है और यह सिस्टम ऐप्लिकेशन या डीपीसी नहीं है, तो नीचे दिए गए तरीके काम के डेटा नहीं दिखाते:
getConfiguredNetworks()
वाला तरीका, हमेशा खाली सूची दिखाता है.- नेटवर्क ऑपरेशन का हर वह तरीका जो पूर्णांक वैल्यू दिखाता है—
addNetwork()
औरupdateNetwork()
—हमेशा -1 दिखाता है. - हर नेटवर्क ऑपरेशन,
removeNetwork()
,reassociate()
,enableNetwork()
,disableNetwork()
,reconnect()
, औरdisconnect()
जैसी बूलियन वैल्यू दिखाता है.false
Android 9
Every Android release includes dozens of security enhancements to protect users. For a list of some of the major security enhancements available in Android 9, see the Android Release Notes.
Android 8
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 8.0:
- Encryption. Added support to evict key in work profile.
- Verified Boot. Added Android Verified Boot (AVB). Verified Boot codebase supporting rollback protection for use in boot loaders added to AOSP. Recommend bootloader support for rollback protection for the HLOS. Recommend boot loaders can only be unlocked by user physically interacting with the device.
- Lock screen. Added support for using tamper-resistant hardware to verify lock screen credential.
- KeyStore. Required key attestation for all devices that ship with Android 8.0+. Added ID attestation support to improve Zero Touch Enrollment.
- Sandboxing. More tightly sandboxed many components using Project Treble's standard interface between framework and device-specific components. Applied seccomp filtering to all untrusted apps to reduce the kernel's attack surface. WebView is now run in an isolated process with very limited access to the rest of the system.
- Kernel hardening. Implemented hardened usercopy, PAN emulation, read-only after init, and KASLR.
- Userspace hardening. Implemented CFI for the media stack. App overlays can no longer cover system-critical windows and users have a way to dismiss them.
- Streaming OS update. Enabled updates on devices that are are low on disk space.
- Install unknown apps. Users must grant permission to install apps from a source that isn't a first-party app store.
- Privacy. Android ID (SSAID) has a different value for
each app and each user on the device. For web browser apps, Widevine Client ID
returns a different value for each app package name and web origin.
net.hostname
is now empty and the dhcp client no longer sends a hostname.android.os.Build.SERIAL
has been replaced with theBuild.SERIAL
API which is protected behind a user-controlled permission. Improved MAC address randomization in some chipsets.
Android 7
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 7.0:
- File-based encryption. Encrypting at the file level, instead of encrypting the entire storage area as a single unit, better isolates and protects individual users and profiles (such as personal and work) on a device.
- Direct Boot. Enabled by file-based encryption, Direct Boot allows certain apps such as alarm clock and accessibility features to run when device is powered on but not unlocked.
- Verified Boot. Verified Boot is now strictly enforced to prevent compromised devices from booting; it supports error correction to improve reliability against non-malicious data corruption.
- SELinux. Updated SELinux configuration and increased seccomp coverage further locks down the Application Sandbox and reduces attack surface.
- Library load-order randomization and improved ASLR. Increased randomness makes some code-reuse attacks less reliable.
- Kernel hardening. Added additional memory protection for newer kernels by marking portions of kernel memory as read-only, restricting kernel access to userspace addresses and further reducing the existing attack surface.
- APK signature scheme v2. Introduced a whole-file signature scheme that improves verification speed and strengthens integrity guarantees.
- Trusted CA store. To make it easier for apps to control access to their secure network traffic, user-installed certificate authorities and those installed through Device Admin APIs are no longer trusted by default for apps targeting API Level 24+. Additionally, all new Android devices must ship with the same trusted CA store.
- Network Security Config. Configure network security and TLS through a declarative configuration file.
Android 6
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 6.0:
- Runtime Permissions. Apps request permissions at runtime instead of being granted at App install time. Users can toggle permissions on and off for both M and pre-M apps.
- Verified Boot. A set of cryptographic checks of system software are conducted prior to execution to ensure the phone is healthy from the bootloader all the way up to the operating system.
- Hardware-Isolated Security. New Hardware Abstraction Layer (HAL) used by Fingerprint API, Lockscreen, Device Encryption, and Client Certificates to protect keys against kernel compromise and/or local physical attacks
- Fingerprints. Devices can now be unlocked with just a touch. Developers can also take advantage of new APIs to use fingerprints to lock and unlock encryption keys.
- SD Card Adoption. Removable media can be adopted to a device and expand available storage for app local data, photos, videos, etc., but still be protected by block-level encryption.
- Clear Text Traffic. Developers can use a new StrictMode to make sure their app doesn't use cleartext.
- System Hardening. Hardening of the system via policies enforced by SELinux. This offers better isolation between users, IOCTL filtering, reduce threat of exposed services, further tightening of SELinux domains, and extremely limited /proc access.
- USB Access Control: Users must confirm to allow USB access to files, storage, or other functionality on the phone. Default is now charge only with access to storage requiring explicit approval from the user.
Android 5
5.0
Every Android release includes dozens of security enhancements to protect users. Here are some of the major security enhancements available in Android 5.0:
- Encrypted by default. On devices that ship with L out-of-the-box, full disk encryption is enabled by default to improve protection of data on lost or stolen devices. Devices that update to L can be encrypted in Settings > Security .
- Improved full disk encryption. The user password is
protected against brute-force attacks using
scrypt
and, where available, the key is bound to the hardware keystore to prevent off-device attacks. As always, the Android screen lock secret and the device encryption key are not sent off the device or exposed to any application. - Android sandbox reinforced with SELinux . Android now requires SELinux in enforcing mode for all domains. SELinux is a mandatory access control (MAC) system in the Linux kernel used to augment the existing discretionary access control (DAC) security model. This new layer provides additional protection against potential security vulnerabilities.
- Smart Lock. Android now includes trustlets that provide more flexibility for unlocking devices. For example, trustlets can allow devices to be unlocked automatically when close to another trusted device (through NFC, Bluetooth) or being used by someone with a trusted face.
- Multi user, restricted profile, and guest modes for phones and tablets. Android now provides for multiple users on phones and includes a guest mode that can be used to provide easy temporary access to your device without granting access to your data and apps.
- Updates to WebView without OTA. WebView can now be updated independent of the framework and without a system OTA. This allows for faster response to potential security issues in WebView.
- Updated cryptography for HTTPS and TLS/SSL. TLSv1.2 and TLSv1.1 is now enabled, Forward Secrecy is now preferred, AES-GCM is now enabled, and weak cipher suites (MD5, 3DES, and export cipher suites) are now disabled. See https://developer.android.com/reference/javax/net/ssl/SSLSocket.html for more details.
- non-PIE linker support removed. Android now requires all dynamically linked executables to support PIE (position-independent executables). This enhances Android's address space layout randomization (ASLR) implementation.
- FORTIFY_SOURCE improvements. The following libc
functions now implement FORTIFY_SOURCE protections:
stpcpy()
,stpncpy()
,read()
,recvfrom()
,FD_CLR()
,FD_SET()
, andFD_ISSET()
. This provides protection against memory-corruption vulnerabilities involving those functions. - Security Fixes. Android 5.0 also includes fixes for Android-specific vulnerabilities. Information about these vulnerabilities has been provided to Open Handset Alliance members, and fixes are available in Android Open Source Project. To improve security, some devices with earlier versions of Android may also include these fixes.
Android 4 और उससे पहले के वर्शन
Every Android release includes dozens of security enhancements to protect users. The following are some of the security enhancements available in Android 4.4:
- Android sandbox reinforced with SELinux. Android now uses SELinux in enforcing mode. SELinux is a mandatory access control (MAC) system in the Linux kernel used to augment the existing discretionary access control (DAC) based security model. This provides additional protection against potential security vulnerabilities.
- Per User VPN. On multi-user devices, VPNs are now applied per user. This can allow a user to route all network traffic through a VPN without affecting other users on the device.
- ECDSA Provider support in AndroidKeyStore. Android now has a keystore provider that allows use of ECDSA and DSA algorithms.
- Device Monitoring Warnings. Android provides users with a warning if any certificate has been added to the device certificate store that could allow monitoring of encrypted network traffic.
- FORTIFY_SOURCE. Android now supports FORTIFY_SOURCE level 2, and all code is compiled with these protections. FORTIFY_SOURCE has been enhanced to work with clang.
- Certificate Pinning. Android 4.4 detects and prevents the use of fraudulent Google certificates used in secure SSL/TLS communications.
- Security Fixes. Android 4.4 also includes fixes for Android-specific vulnerabilities. Information about these vulnerabilities has been provided to Open Handset Alliance members and fixes are available in Android Open Source Project. To improve security, some devices with earlier versions of Android may also include these fixes.
Every Android release includes dozens of security enhancements to protect users. The following are some of the security enhancements available in Android 4.3:
- Android sandbox reinforced with SELinux. This release strengthens the Android sandbox using the SELinux mandatory access control system (MAC) in the Linux kernel. SELinux reinforcement is invisible to users and developers, and adds robustness to the existing Android security model while maintaining compatibility with existing apps. To ensure continued compatibility this release allows the use of SELinux in a permissive mode. This mode logs any policy violations, but will not break apps or affect system behavior.
- No
setuid
orsetgid
programs. Added support for filesystem capabilities to Android system files and removed allsetuid
orsetgid
programs. This reduces root attack surface and the likelihood of potential security vulnerabilities. - ADB authentication. Starting in Android 4.2.2, connections to ADB are authenticated with an RSA keypair. This prevents unauthorized use of ADB where the attacker has physical access to a device.
- Restrict Setuid from Android Apps.
The
/system
partition is now mounted nosuid for zygote-spawned processes, preventing Android apps from executingsetuid
programs. This reduces root attack surface and the likelihood of potential security vulnerabilities. - Capability bounding.
Android zygote and ADB now use
prctl(PR_CAPBSET_DROP)
to drop unnecessary capabilities prior to executing apps. This prevents Android apps and apps launched from the shell from acquiring privileged capabilities. - AndroidKeyStore Provider. Android now has a keystore provider that allows apps to create exclusive use keys. This provides apps with an API to create or store private keys that cannot be used by other apps.
- KeyChain
isBoundKeyAlgorithm
. Keychain API now provides a method (isBoundKeyType
) that allows apps to confirm that system-wide keys are bound to a hardware root of trust for the device. This provides a place to create or store private keys that can't be exported off the device, even in the event of a root compromise. NO_NEW_PRIVS
. Android zygote now usesprctl(PR_SET_NO_NEW_PRIVS)
to block addition of new privileges prior to execution app code. This prevents Android apps from performing operations that can elevate privileges through execve. (This requires Linux kernel version 3.5 or greater).FORTIFY_SOURCE
enhancements. EnabledFORTIFY_SOURCE
on Android x86 and MIPS and fortifiedstrchr()
,strrchr()
,strlen()
, andumask()
calls. This can detect potential memory corruption vulnerabilities or unterminated string constants.- Relocation protections. Enabled read only relocations (relro) for statically linked executables and removed all text relocations in Android code. This provides defense in depth against potential memory corruption vulnerabilities.
- Improved EntropyMixer. EntropyMixer now writes entropy at shutdown or reboot, in addition to periodic mixing. This allows retention of all entropy generated while devices are powered on, and is especially useful for devices that are rebooted immediately after provisioning.
- Security fixes. Android 4.3 also includes fixes for Android-specific vulnerabilities. Information about these vulnerabilities has been provided to Open Handset Alliance members and fixes are available in Android Open Source Project. To improve security, some devices with earlier versions of Android may also include these fixes.
Android provides a multi-layered security model described in the Android Security Overview. Each update to Android includes dozens of security enhancements to protect users. The following are some of the security enhancements introduced in Android 4.2:
- App verification: Users can choose to enable Verify Apps and have apps screened by an app verifier, prior to installation. App verification can alert the user if they try to install an app that might be harmful; if an app is especially bad, it can block installation.
- More control of premium SMS: Android provides a notification if an app attempts to send SMS to a short code that uses premium services that might cause additional charges. The user can choose whether to allow the app to send the message or block it.
- Always-on VPN: VPN can be configured so that apps won't have access to the network until a VPN connection is established. This prevents apps from sending data across other networks.
- Certificate pinning: The Android core libraries now support certificate pinning. Pinned domains receive a certificate validation failure if the certificate doesn't chain to a set of expected certificates. This protects against possible compromise of certificate authorities.
- Improved display of Android permissions: Permissions are organized into groups that are more easily understood by users. During review of the permissions, the user can click on the permission to see more detailed information about the permission.
- installd hardening: The
installd
daemon does not run as the root user, reducing potential attack surface for root privilege escalation. - init script hardening: init scripts now apply
O_NOFOLLOW
semantics to prevent symlink related attacks. FORTIFY_SOURCE
: Android now implementsFORTIFY_SOURCE
. This is used by system libraries and apps to prevent memory corruption.- ContentProvider default configuration: Apps that target API
level 17 have
export
set tofalse
by default for each Content Provider, reducing default attack surface for apps. - Cryptography: Modified the default implementations of SecureRandom and Cipher.RSA to use OpenSSL. Added SSL Socket support for TLSv1.1 and TLSv1.2 using OpenSSL 1.0.1
- Security fixes: Upgraded open source libraries with security fixes include WebKit, libpng, OpenSSL, and LibXML. Android 4.2 also includes fixes for Android-specific vulnerabilities. Information about these vulnerabilities has been provided to Open Handset Alliance members and fixes are available in Android Open Source Project. To improve security, some devices with earlier versions of Android may also include these fixes.
Android provides a multi-layered security model described in the Android Security Overview. Each update to Android includes dozens of security enhancements to protect users. The following are some of the security enhancements introduced in Android versions 1.5 through 4.1:
- Android 1.5
- ProPolice to prevent stack buffer overruns (-fstack-protector)
- safe_iop to reduce integer overflows
- Extensions to OpenBSD dlmalloc to prevent double free() vulnerabilities and to prevent chunk consolidation attacks. Chunk consolidation attacks are a common way to exploit heap corruption.
- OpenBSD calloc to prevent integer overflows during memory allocation
- Android 2.3
- Format string vulnerability protections (-Wformat-security -Werror=format-security)
- Hardware-based No eXecute (NX) to prevent code execution on the stack and heap
- Linux mmap_min_addr to mitigate null pointer dereference privilege escalation (further enhanced in Android 4.1)
- Android 4.0
- Address Space Layout Randomization (ASLR) to randomize key locations in memory
- Android 4.1
- PIE (Position Independent Executable) support
- Read-only relocations / immediate binding (-Wl,-z,relro -Wl,-z,now)
- dmesg_restrict enabled (avoid leaking kernel addresses)
- kptr_restrict enabled (avoid leaking kernel addresses)