I created a baseline profile for the project according to the instructions here; Baseline Profiles
then I put baseline-prof.txt in the src/main folder and add dependencies in app.build.gradle
implementation 'androidx.profileinstaller:profileinstaller:1.3.0-alpha03'
After that, I generated a release apk and sideloaded it to my devices according to;
Create and measure Baseline Profiles without Macrobenchmark.
Startup time is counted by ActivityTaskManager log:
I ActivityTaskManager: Displayed packageName/ActivityName +2s685ms
I have two devices, one rooted device and another unrooted device, both Android 10(Api29).
I compared startup time between baseline-profile and none on both devices,
found it works on rooted device, startup time has reduced a lot when use baseline-profile,
but there is no difference on unrooted device
I have some problems:
- Can baseline profile work on unrooted device?
- Why baseline profiles doesn't work on my device?
- I want to test baseline profile locally without benchmark, is there any way else? Can this way work on unrooted device?