- syntax:
<profileable android:shell=["true" | "false"] android:enabled=["true" | "false"] />
- contained in:
<application>
- description:
- Specifies how profilers can access this application.
- attributes:
android:shell
-
Specifies whether the user of the device can profile this application through local debugging
tools. These include
android.os.Trace
tracing APIs (Android 11 and lower)simpleperf
am profile
commandsperfetto profilers
(native memory, Java memory, CPU).
false
, these tools and APIs will work only when an app isdebuggable
. Debuggable apps incur significant and varied performance degradation, and are not useful for measuring timing accurately. This element is strongly recommended for local performance measurements, in order to capture accurate results.This element is designed to be usable in release, production builds to enable local profiling. It incurs minimal concern of data exposure - no memory data is readable by the host profiling tools and the shell process. Only stack traces are readable, which are typically obfuscated or lacking symbols in release builds.
android:enabled
-
Specifies whether the application can be profiled by system services or shell tools
(for the latter, you must also set
android:shell
). If false, the application cannot be profiled at all. Defaults to true. This attribute was added in API level 30.
- introduced in:
- API Level 29
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-09-09 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]