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.
For more information on boot image profiles, see Boot image profiles.
Boot image profile data
AAOS boot image profiles include the following:
- Profile for the boot classpath
(
vendor/auto/embedded/products/boot-image-profile.txt
). Determines which methods from the boot classpath get optimized.
Example profile contents
Landroid/accounts/AccountManager;
Landroid/app/ActivityManager;
Landroid/app/ActivityTaskManager;
Landroid/app/ActivityThread;
Landroid/app/AlarmManager;
Landroid/app/AlertDialog;
Landroid/car/Car;
Landroid/car/input/CarInputManager;
Landroid/car/media/CarAudioManager;
Generate boot image profiles
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
):
source build/envsetup.sh
lunch <target>
m
Launch Cuttlefish
Follow Get started to launch the Cuttlefish target.
Run the script
python3 art/tools/boot-image-profile-aaos-sample-generate.py
Optional: Specify ADB device
export ANDROID_SERIAL=<your_device_serial>