मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी10k · #11933

android-permissions-security

यह क्या करती है

यह स्किल Android permissions और उन components की सुरक्षा का ऑडिट करती है जिन तक दूसरे ऐप पहुँच सकते हैं। इसमें runtime permission अनुरोध भी शामिल हैं। यह उन Android डेवलपरों के लिए है जो अपने ऐप में न्यूनतम अनुमति का सिद्धांत लागू करना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप AndroidManifest की permissions की समीक्षा करके वे हटाना चाहते हैं जिनकी ऐप को ज़रूरत नहीं।
  • ✓जब आप अपने ऐप के exported components की रक्षा के लिए custom permission परिभाषित करना चाहते हैं।
  • ✓जब आपको service या provider में कॉल करने वाले ऐप की पहचान जाँचनी हो।

Skill का लिंक

https://github.com/android/skills/blob/main/security/android-permissions-security/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/android/skills/blob/main/security/android-permissions-security/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे AndroidManifest की permissions की समीक्षा कीजिए और जो सेवाएँ व receivers दूसरे ऐप बुला सकते हैं, उन्हें सुरक्षित कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल manifest में जोखिम भरी permission सेटिंग और exported components जाँचती है। फिर वह सुधार सुझाती है, जैसे custom permissions, caller की signature जाँच और सही runtime permission फ़्लो।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Guidelines for auditing permission vulnerabilities, enforcing least privilege, securing IPC boundaries, and handling runtime permissions across the Android ecosystem.

Glossary

  • Runtime Permission: Dangerous permission (e.g., Camera, Location) that must be granted by the user at runtime on Android 6.0+ (API 23+).
  • Custom Permission: A permission defined by an app (<permission>) to restrict access to its exported components.
  • Protection Level: Attribute defining how the OS grants the permission (normal, dangerous, signature, knownSigner).
  • knownSigner: Protection flag (API 31+) granting signature-level access to partner apps matching trusted certificate digests.
  • SigningInfo: Object (API 28+) providing signing history and multiple signer certificates for an application.
  • Binder Calling Identity: Reliable UID representing the calling process obtained using Binder.getCallingUid().
  • URI Permission: Temporary, granular access granted to a content URI using grantUriPermissions and intent flags.

Prerequisites

  • Add androidx.core:core-ktx and androidx.activity:activity-ktx (or androidx.fragment:fragment-ktx) dependencies to the app-level build.gradle file for ContextCompat and ActivityResultContracts.
  • For knownSigner partner permissions (android:knownCerts), ensure the project compileSdk and targetSdk are at least 31 (Android 12).
  • For broadcast identity sharing (BroadcastOptions.setShareIdentityEnabled), ensure compileSdk and targetSdk are at least 34 (Android 14).

1. Security audit and permission gap detection playbook

When auditing an Android project for permission and IPC security vulnerabilities, systematically inspect each area:

Vulnerability Area Search In / Pattern Risk Remediation Action
Weak Custom Permission Protection AndroidManifest.xml with android:protectionLevel="normal", "dangerous", or "signatureOrSystem" Unauthorized apps request or claim permission without restriction Upgrade to signature or signature with knownSigner and android:knownCerts.
Overly Broad URI Permission Grants <grant-uri-permission android:pathPrefix="/" /> or pathPrefix="" in <provider> Leaks all provider data to third parties Replace with explicit scoped subpath (e.g. android:pathPrefix="/shared/"). Retain android:grantUriPermissions="true". Remove any wildcard pathPrefix="/".
Missing ContentProvider Split Permissions <provider> with only generic android:permission or missing android:readPermission and android:writePermission Read-only callers execute write operations or write-only callers access read operations Configure granular android:readPermission="...READ_DATA" and android:writePermission="...WRITE_DATA", AND declare the custom <permission> tags with android:protectionLevel="signature" (or signature with knownSigner) at the <manifest> root.
Spoofable Caller Identity Checks intent.getStringExtra("calling_package"), intent.getStringExtra("sender"), callingPackage == "..." in Services Malicious callers forge intent extras or strings Remove string checks; authenticate caller UID cryptographically using Binder.getCallingUid() and pm.hasSigningCertificate().
Bound Service Permission Bypass checkCallingOrSelfPermission() or enforceCallingOrSelfPermission() in Binder AIDL stubs Falls back to host app UID outside IPC or when identity is cleared, causing Confused Deputy bypass Replace with enforceCallingPermission("...WRITE_DATA", ...) or checkCallingPermission("...WRITE_DATA").
Missing Method-Level Checks in Bound Services Bound Service AIDL methods mutating state without enforcing write permissions Callers with read-only binding access invoke mutating write operations Add enforceCallingPermission("...WRITE_DATA", "Caller lacks WRITE_DATA permission") inside mutating AIDL methods.
Flawed Runtime Permission Flow Missing shouldShowRequestPermissionRationale(), missing permanent denial handling, or re-requesting in loops Poor user experience, infinite loops, or inability to recover permissions Implement 3-state flow: check grant -> check rationale dialog -> launch contract. On permanent denial, redirect to Settings.ACTION_APPLICATION_DETAILS_SETTINGS.
Simultaneous Location Requests `arrayOf(ACCESS_FINE_LOCATION, ACCESS_BACKGROUN
अक्सर पूछे जाने वाले सवाल

signature permission क्या है?

यह ऐसी permission है जो सिर्फ़ उन ऐप को मिलती है जो उसी developer key से साइन हों, और स्किल इससे पहुँच सीमित कर सकती है।

क्या यह runtime permission prompts संभालती है?

हाँ। यह Android 6.0 और नए वर्शन पर खतरनाक permissions के लिए runtime permission फ़्लो कवर करती है।

क्या इसे अतिरिक्त लाइब्रेरी चाहिए?

हाँ। स्किल बताती है कि जो कोड वह जोड़ती है, उसके लिए कुछ AndroidX लाइब्रेरी ज़रूरी हैं।

जानकारी

लेखक का मूल विवरण

Audits, detects gaps, and remediates Android permissions and IPC component security vulnerabilities. Use when reviewing AndroidManifest.xml, defining custom permissions, securing Services, Receivers, and Providers, verifying caller signatures and UID using Binder, or implementing runtime permission flows.

repo: android/skills

लोकप्रियता

GitHub स्टार
10k
रैंकिंग में स्थान
#11933
लाइसेंस
Apache-2.0
अपडेट की गई
29/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agp-9-upgrade

10k

आपके एजेंट को Android ऐप को Android Gradle Plugin 9 पर ले जाने और उसके breaking changes सुधारने में मदद करती है। मल्टीप्लेटफ़ॉर्म प्रोजेक्ट के लिए नहीं।

कोडिंगमोबाइल ऐप

camerax

10k

आपके एजेंट को CameraX से Android कैमरा फ़ीचर बनाने में मदद करती है, जिसमें वीडियो रिकॉर्डिंग, हार्डवेयर कंट्रोल, ML Kit और Media3 इफ़ेक्ट शामिल हैं।

कोडिंगमोबाइल ऐप

android-for-cars-parked-apps

10k

आपके एजेंट को Android वीडियो, गेम या ब्राउज़र ऐप को Android Auto और Android Automotive पर parked ऐप के रूप में चलाने के लिए ढालने में मदद करती है।

कोडिंगमोबाइल ऐप

appfunctions

10k

आपके एजेंट को Android ऐप के मुख्य काम ढूँढकर उन्हें AppFunctions के रूप में देने में मदद करती है, ताकि AI एजेंट और वॉइस कमांड उन्हें चला सकें।

AI और एजेंटएजेंट

मिलती-जुलती skills