Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
A boot image profile is designed to enhance system performance by guiding the
optimization of code at compile time. In essence, it's a set of data that
informs the system about which parts of the code are most frequently used
during the boot process and by core system components. This information allows
the system's runtime environment to preemptively compile and optimize this
critical code, leading to faster boot times, smoother app launches, and
improved overall system responsiveness.
To effectively profile and generate a realistic boot image profile, refer to
Generate boot image profiles
with your customized CUJs.
For a quick generation of a boot image profile specifically for sample AAOS
CUJs, that is launching Google Maps and Google Play, use the
art/tools/boot-image-profile-aaos-sample-generate.py script. This script
incorporates the steps outlined in the aforementioned link.
Get started
Run the following to build Android, launch Cuttlefish, and run the script to
generate a sample AAOS boot image profile.
Build Android
Choose a target and run the following (for example
aosp_cf_x86_64_auto-ap4a-userdebug):
sourcebuild/envsetup.sh
lunch<target>
m
Launch Cuttlefish
Follow Get started
to launch the Cuttlefish target.
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 2025-07-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-14 UTC."],[],[],null,["# Boot image profiles\n\nA *boot image profile* is designed to enhance system performance by guiding the\noptimization of code at compile time. In essence, it's a set of data that\ninforms the system about which parts of the code are most frequently used\nduring the boot process and by core system components. This information allows\nthe system's runtime environment to preemptively compile and optimize this\ncritical code, leading to faster boot times, smoother app launches, and\nimproved overall system responsiveness.\n\nFor more information on boot image profiles, see\n[Boot image profiles](/docs/core/runtime/boot-image-profiles).\n\nBoot image profile data\n-----------------------\n\nAAOS boot image profiles include the following:\n\n- **Profile for the boot classpath** (`vendor/auto/embedded/products/boot-image-profile.txt`). Determines which methods from the boot classpath get optimized.\n\n### Example profile contents\n\n Landroid/accounts/AccountManager;\n Landroid/app/ActivityManager;\n Landroid/app/ActivityTaskManager;\n Landroid/app/ActivityThread;\n Landroid/app/AlarmManager;\n Landroid/app/AlertDialog;\n Landroid/car/Car;\n Landroid/car/input/CarInputManager;\n Landroid/car/media/CarAudioManager;\n\nGenerate boot image profiles\n----------------------------\n\nTo effectively profile and generate a realistic boot image profile, refer to\n[Generate boot image profiles](/docs/core/runtime/boot-image-profiles#generating-boot-image-profiles)\nwith your customized CUJs.\n\nFor a quick generation of a boot image profile specifically for sample AAOS\nCUJs, that is launching Google Maps and Google Play, use the\n`art/tools/boot-image-profile-aaos-sample-generate.py` script. This script\nincorporates the steps outlined in the aforementioned link.\n\n### Get started\n\nRun the following to build Android, launch Cuttlefish, and run the script to\ngenerate a sample AAOS boot image profile.\n\n#### Build Android\n\nChoose a target and run the following (for example\n`aosp_cf_x86_64_auto-ap4a-userdebug`): \n\n source build/envsetup.sh\n lunch \u003ctarget\u003e\n m\n\n#### Launch Cuttlefish\n\nFollow [Get started](/docs/devices/cuttlefish/get-started)\nto launch the Cuttlefish target.\n\n#### Run the script\n\n python3 art/tools/boot-image-profile-aaos-sample-generate.py\n\n| **Note:** The current `LOGCAT_READY_PATTERN` is set to when CarLauncher is displayed, to enable logcat wait functionality. You can customize your `LOGCAT_READY_PATTERN` by modifying the script.\n\n#### Optional: Specify ADB device\n\n export ANDROID_SERIAL=\u003cyour_device_serial\u003e\n\n| **Note:** If multiple devices are connected, set the `ANDROID_SERIAL` environment variable to specify the default ADB device. To revert, run `unset\n| ANDROID_SERIAL`."]]