हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
SDK टूल के एक्सटेंशन
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
SDK टूल के एक्सटेंशन मॉड्यूल से, डिवाइस के एक्सटेंशन SDK टूल के लेवल का पता चलता है. साथ ही, ऐप्लिकेशन के लिए एपीआई उपलब्ध कराए जाते हैं, ताकि वे एक्सटेंशन SDK टूल के लेवल के बारे में क्वेरी कर सकें. इस मॉड्यूल को अपडेट किया जा सकता है. इसका मतलब है कि Android के सामान्य रिलीज़ साइकल के अलावा, इस मॉड्यूल के फ़ंक्शन के लिए अपडेट मिल सकते हैं.
SDK एक्सटेंशन की ये ज़िम्मेदारियां हैं:
- डिवाइस के एक्सटेंशन SDK टूल के लेवल का फ़ैसला करना.
- ऐप्लिकेशन के लिए एपीआई उपलब्ध कराना, ताकि वे एक्सटेंशन SDK टूल के लेवल के बारे में क्वेरी कर सकें.
- (Android 12 से)
BOOTCLASSPATH
, DEX2OATBOOTCLASSPATH
, और
SYSTEMSERVERCLASSPATH
एनवायरमेंट वैरिएबल की वैल्यू तय करना.
SDK टूल एक्सटेंशन मॉड्यूल (com.android.sdkext
), APEX फ़ॉर्मैट में है. यह Android 11 या इसके बाद के वर्शन वाले डिवाइसों के लिए उपलब्ध है.
SDK टूल के एक्सटेंशन मॉड्यूल (com.google.android.sdkext
) का फ़ॉर्मैट APEX है. इसमें ये कॉम्पोनेंट शामिल होते हैं:
(Android 12 से) bin/derive_classpath
: डिवाइस के बूट होने की प्रोसेस के शुरू में चलने वाला नेटिव बाइनरी. यह सिस्टम और अन्य मॉड्यूल से अलग-अलग क्लासपथ कॉन्फ़िगरेशन फ़ाइलें पढ़ता है, उन्हें मर्ज करता है, और CLASSPATH
एनवायरमेंट वैरिएबल की परिभाषा तय करता है.
bin/derive_sdk
: यह एक नेटिव बाइनरी है, जो डिवाइस के बूट होने की प्रोसेस के शुरुआती चरणों में चलती है. साथ ही, एक्सटेंशन SDK टूल (उदाहरण के लिए, build.version.extensions.r
) से जुड़ी सिस्टम प्रॉपर्टी सेट करने के लिए, अन्य मॉड्यूल का मेटाडेटा पढ़ती है.
javalib/framework-sdkextension.jar
: यह फ़ाइल, बूटक्लॉसपैथ पर होती है. यह ऐप्लिकेशन के लिए एपीआई को एक्सपोज़ करती है, ताकि एक्सटेंशन SDK लेवल के बारे में क्वेरी की जा सके.
एक्सटेंशन के SDK टूल का लेवल तय करना
derive_sdk
प्रोग्राम, हर APEX मॉड्यूल के अंदर etc/sdkinfo.binarypb
सबपाथ में, बाइनरी प्रोटोबस फ़ाइलों के तौर पर सेव किए गए मेटाडेटा को पढ़ता है. प्रोटोबबल स्ट्रक्चर के बारे में जानकारी पाने के लिए, protobuf
फ़ाइल देखें.
एक्सटेंशन SDK टूल का लेवल देखना
SDK टूल के एक्सटेंशन मॉड्यूल में, android.os.ext
पैकेज में SdkExtensions
वाली एक Java क्लास शामिल होती है. किसी SDK टूल के एक्सटेंशन (उदाहरण के लिए, getExtensionVersion(Build.VERSION_CODES.R)
) का वर्शन पढ़ने के लिए, getExtensionVersion(int)
तरीका इस्तेमाल करें.
क्लासपाथ बनाना
derive_classpath
सेवा, /system/etc/classpaths/
और /apex/*/etc/classpaths/
में मौजूद अलग-अलग कॉन्फ़िगरेशन फ़ाइलों को पढ़ती है और उन्हें मर्ज करती है. हर कॉन्फ़िगरेशन, classpaths.proto
से मिले प्रोटोबबल मैसेज को प्रोटो बाइनरी फ़ॉर्मैट में सेव करता है. क्लासपथ एंट्री के क्रम का पता लगाने वाले एल्गोरिदम के बारे में derive_classpath.cpp
में बताया गया है. यह एल्गोरिदम समय के साथ बदल सकता है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (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-27 (UTC) को अपडेट किया गया."],[],[],null,["# SDK Extensions\n\nThe SDK Extensions module decides the extension SDK level of the device and\nprovides APIs for apps to query the extension SDK level. This module is\nupdatable, meaning it can receive updates to functionality outside of the normal\nAndroid release cycle.\n\nSDK Extensions is responsible for:\n\n- Deciding the extension SDK level of the device.\n- Providing APIs for apps to query the extension SDK level.\n- (Starting Android 12) Determining the values for the `BOOTCLASSPATH`, `DEX2OATBOOTCLASSPATH`, and `SYSTEMSERVERCLASSPATH` environment variables.\n\nModule format\n-------------\n\nThe SDK Extensions module (`com.android.sdkext`) is in\n[APEX](/docs/core/ota/apex) format and is available for devices\nrunning Android 11 or higher.\n\nPackage format\n--------------\n\nThe SDK Extensions module (`com.google.android.sdkext`) is in\n[APEX](/devices/tech/ota/apex) format and\ncontains the following components:\n\n- (Starting Android 12) `bin/derive_classpath`: A\n native binary that runs early in the device boot\n process. It reads individual classpath configs files from the system and\n other modules, merges them, and defines the definition of `CLASSPATH`\n environment variables.\n\n- `bin/derive_sdk`: A native binary that runs early in the device boot process\n and reads metadata of other modules to set system properties related to the\n extension SDK (for example, `build.version.extensions.r`).\n\n- `javalib/framework-sdkextension.jar`: This file is on the bootclasspath that\n exposes APIs to apps to query the extension SDK level.\n\nDerive extension SDK level\n--------------------------\n\nThe `derive_sdk` program reads metadata stored as binary protobuf files in the\n`etc/sdkinfo.binarypb` subpath inside each APEX module. For details on protobuf\nstructure, refer to the\n[`protobuf`](https://android.googlesource.com/platform/external/protobuf.git)\nfile.\n\nRead extension SDK level\n------------------------\n\nThe SDK Extensions module exposes an\n[`SdkExtensions`](https://android.googlesource.com/platform/packages/modules/SdkExtensions/)\njava class in the `android.os.ext` package. Use the `getExtensionVersion(int)`\nmethod to read the version of an SDK extension (for example,\n`getExtensionVersion(Build.VERSION_CODES.R)`).\n\nDerive classpaths\n-----------------\n\nThe `derive_classpath` service reads and merges individual config files in\n`/system/etc/classpaths/` and `/apex/*/etc/classpaths/`. Each config stores\nprotobuf message from [`classpaths.proto`](https://android.googlesource.com/platform/packages/modules/common/+/android16-release/proto/classpaths.proto)\nin a proto binary format. The exact merging algorithm that determines the order\nof the classpath entries is described in\n[`derive_classpath.cpp`](https://android.googlesource.com/platform/packages/modules/SdkExtensions/+/android16-release/derive_classpath/derive_classpath.cpp)\nand might change over time."]]