- بناء الجملة:
<profileable android:shell=["true" | "false"] android:enabled=["true" | "false"] />
- الواردة في:
<application>
- description:
- يحدد هذا الإعداد كيفية وصول المحلِّلين إلى هذا التطبيق.
- :
android:shell
-
تحدِّد هذه السياسة ما إذا كان يمكن لمستخدم الجهاز تحليل هذا التطبيق من خلال تصحيح الأخطاء على الجهاز.
مثل ما يلي:
- واجهات برمجة تطبيقات التتبُّع في
android.os.Trace
(الإصدار 11 والإصدارات الأقدم من نظام التشغيل Android) simpleperf
am profile
طلباتperfetto
أدوات تحليل البيانات (الذاكرة الأصلية وذاكرة Java ووحدة المعالجة المركزية)
false
، لن تعمل هذه الأدوات وواجهات برمجة التطبيقات إلا عندما يكون التطبيق:debuggable
تتعرض التطبيقات التي يمكن تصحيح الأخطاء فيها لتدهور كبير ومتنوّع في الأداء ولا تكون مفيدة في قياس التوقيت بدقة. يُنصَح باستخدام هذا العنصر بشدة للأداء المحلي. القياسات، للحصول على نتائج دقيقة.تم تصميم هذا العنصر ليكون قابلاً للاستخدام في الإصدار أو الإنتاج، ويتم إنشاؤه لتفعيل التحليل المحلي. تتسبب في الحد الأدنى من مخاطر الكشف عن البيانات: لا يمكن قراءة أي بيانات للذاكرة من خلال أدوات تحليل المضيف وعملية واجهة أوامر. يمكن قراءة عمليات تتبُّع تسلسل استدعاء الدوال البرمجية فقط، والتي عادةً ما يتم تشويشها أو تفتقر إلى رموز. في إصدارات الإصدارات.
- واجهات برمجة تطبيقات التتبُّع في
android:enabled
-
تحدِّد هذه السياسة ما إذا كان يمكن تحليل التطبيق من خلال خدمات النظام أو أدوات الواجهة.
بالنسبة إلى الخيار الثاني، يمكنك أيضًا ضبط
android:shell
. وفي حال اختيار القيمة "false"، لا يمكن إنشاء ملف تعريفي للتطبيق على الإطلاق. وتكون القيمة التلقائية هي true. تمّت إضافة هذه السمة في المستوى 30 من واجهة برمجة التطبيقات.
- تم تقديمها في:
- المستوى 29 من واجهة برمجة التطبيقات
<profileable>
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ 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,["# <profileable\u003e\n\nsyntax:\n:\n\n ```xml\n \u003cprofileable android:shell=[\"true\" | \"false\"] android:enabled=[\"true\" | \"false\"] /\u003e\n ```\n\ncontained in:\n: [\u003capplication\u003e](/guide/topics/manifest/application-element)\n\ndescription:\n: Specifies how profilers can access this application.\n\nattributes:\n:\n\n `android:shell`\n :\n Specifies whether the user of the device can profile this application through local debugging\n tools such as the following:\n\n - [android.os.Trace](/reference/kotlin/android/os/Trace) tracing APIs (Android 11 and lower)\n - [simpleperf](/ndk/guides/simpleperf)\n - [am profile](/studio/command-line/adb#am) commands\n - [`perfetto` profilers](/studio/command-line/perfetto) (native memory, Java memory, CPU)\n\n\n If this isn't set, or is set to `false`, these tools and APIs work only when an app is\n [debuggable](/guide/topics/manifest/application-element#debug).\n Debuggable apps incur significant and varied performance degradation and aren't useful for\n measuring timing accurately. This element is strongly recommended for local performance\n measurements, to capture accurate results.\n\n This element is designed to be usable in release, or production, builds to enable local profiling.\n It incurs minimal risk of data exposure: no memory data is readable by the host profiling tools\n and the shell process. Only stack traces are readable, which are typically obfuscated or lacking symbols\n in release builds.\n\n:\n\n `android:enabled`\n :\n Specifies whether the application can be profiled by system services or shell tools.\n For the latter, you also set [`android:shell`](#shell).\n If false, the application can't be profiled at all. The default is true.\n\n This attribute was added in API level 30.\n\nintroduced in:\n: API Level 29"]]