[[["容易理解","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-15 (世界標準時間)。"],[],[],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`."]]