- 문법:
<profileable android:shell=["true" | "false"] android:enabled=["true" | "false"] />
- 포함된 위치:
<application>
- 설명
- 프로파일러가 이 애플리케이션에 액세스할 수 있는 방법을 지정합니다.
- 속성:
android:shell
- 기기 사용자가 다음과 같은 로컬 디버깅 도구를 통해 이 애플리케이션을 프로파일링할 수 있는지 지정합니다.
android.os.Trace
추적 API(Android 11 이하)simpleperf
am profile
명령어perfetto
프로파일러(네이티브 메모리, Java 메모리, CPU)
false
로 설정하면 이러한 도구 및 API는 앱이debuggable
일 때만 작동합니다. 디버그 가능한 앱은 크고 다양한 성능 저하를 야기하며 타이밍을 정확하게 측정하는 데 유용하지 않습니다. 이 요소는 정확한 결과를 캡처하기 위해 로컬 성능 측정에 사용하는 것이 좋습니다.이 요소는 출시 또는 프로덕션 빌드에서 사용할 수 있도록 설계되었으며, 이를 통해 로컬 프로파일링이 가능합니다. 데이터 노출에 대한 위험이 최소화됩니다. 호스트 프로파일링 도구 및 셸 프로세스에서 메모리 데이터를 읽을 수 없습니다. 스택 트레이스만 읽을 수 있으며 일반적으로 출시 빌드에서 난독화되거나 기호가 없습니다.
android:enabled
- 애플리케이션을 시스템 서비스 또는 셸 도구로 프로파일링할 수 있는지 지정합니다.
후자의 경우
android:shell
도 설정합니다. false인 경우 애플리케이션을 전혀 프로파일링할 수 없습니다. 기본값은 true입니다. 이 속성은 API 수준 30에 추가되었습니다.
- 도입 시기
- API 수준 29
<profileable>
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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,["# <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"]]