Format:ART baseline profile
| Platforms | Platform:Android |
|---|---|
| Magic | 70 72 6F 00 ("pro\0") |
| Extensions | .prof, .profm |
| On this wiki | Facts · Code · Notes · Topics |
Binary ART profile listing hot classes and methods per DEX file: shipped in an APK as assets/dexopt/baseline.prof (with baseline.profm metadata) and transcoded by androidx ProfileInstaller to the runtime primary.prof. Magic "pro\0" followed by a 4-byte ASCII version such as "015\0".
Where it lives
- In the APK:
assets/dexopt/baseline.profandassets/dexopt/baseline.profm(metadata, magicprm\0). Dex metadata (.dm) files used by Play delivery are ZIPs that carry aprimary.prof; Unverified. - On device:
/data/misc/profiles/cur/<user>/<package>/primary.prof; ProfileInstaller writes it from the asset (androidxProfileInstaller.java:PROFILE_SOURCE_LOCATION = "dexopt/baseline.prof",PROFILE_META_LOCATION = "dexopt/baseline.profm", base dir/data/misc/profiles/cur/). The profile drives dex2oat compilation (Format:OAT).
Header
ProfileTranscoder.java: MAGIC_PROF = 'p','r','o',0 and MAGIC_PROFM = 'p','r','m',0; then a 4-byte version, then a version-specific body.
Versions (ProfileVersion.java, all 4-byte ASCII with NUL): 001\0 Android N (7.0), 005\0 O, 009\0 O MR1, 010\0 P, 015\0 S (12). Metadata versions: 001\0 (N) and 002\0. The DEX key separator inside the profile is : for 001 and 005 and ! for later versions. MIN_SUPPORTED_SDK is N.
Method flags in the transcoder: HOT=1, STARTUP=1<<1, POST_STARTUP=1<<2. Inline-cache encodings 6 (missing types) and 7 (megamorphic) are special values.
Why it matters when reversing
- It lists which methods are hot or startup: a free map of the interesting code in a stripped, obfuscated app. Methods are identified by DEX method index per dex file (keyed by dex location and checksum), so pair it with the matching classes*.dex.
- Presence of the asset (plus
androidx.profileinstaller) shows the app ships Baseline Profiles.
Unverified: the layout of the body (dex headers, class ids, method bitmaps) was not read line by line; read ProfileTranscoder.java or ART profile_compilation_info.cc before parsing.
Code & repositories
- https://github.com/androidx/androidx @
0e2330e89a086173c5841cadb6604cc6b6b6c176· license: Apache-2.0
profileinstaller sources: baseline.prof magic, versions and transcoder (sparse: profileinstaller/)
Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-18