nowinandroid
nowinandroid copied to clipboard
[Question]: Is the baseline profile functioning correctly ?
Is there an existing issue for this?
- [X] I have searched the existing issues
Is there a StackOverflow question about this issue?
- [X] I have searched StackOverflow
What happened?
We are trying to add a baseline profile to our app and we saw that it is supposed to be working properly on this app. However, after following the documentation on the Android documentation here, we had some questions as to measuring the profile: https://developer.android.com/topic/performance/baselineprofiles#measuring-baseline.
After building a release version of the NowInAndroid apk (with ./gradlew app:assembleProdRelease) on an Android API 30 emulator (root active) and sideloading the baseline profile by using the commands given in the docs :
# Check dexopt state
adb shell dumpsys package dexopt | grep -A 1 com.google.samples.apps.nowinandroid
Gave us the following result :
[com.google.samples.apps.nowinandroid]
path: /data/app/~~52vBZMT5SXHA04XFrAYciA==/com.google.samples.apps.nowinandroid-lFMMjOCyE-gJpkk9Bmmn0Q==/base.apk
arm64: [status=run-from-apk] [reason=unknown]
Our issue with this result is the status that is run-from-apk which, when reading the docs, should be speed-profile as one can read here : https://source.android.com/devices/tech/dalvik/configure#compilation_options.
Given the issue we tried several fixes without any success :
- Updating the AGP to
7.3.0-beta02(because your app is using multidex and a known issue is to use the latest AGP in this case). - Adding the
android.experimental.enableArtProfiles=trueflag according to the ProfileInstaller docs https://developer.android.com/jetpack/androidx/releases/profileinstaller#1.0.0-beta01
Further questions :
-
Why do we get this log when launching the app
com.google.samples.apps.nowinandroid D/ProfileInstaller: Installing profile for com.google.samples.apps.nowinandroid? Shouldn't the profile be installed when installing the app and not when launching it ? -
Why isn't the latest Android Gradle plugin used in the app (7.3.0-beta02) ?
-
When trying to reset the compiled state by using this command that is in the docs :
adb shell cmd package compile --reset com.google.samples.apps.nowinandroidwe always get the following errorFailure: package com.google.samples.apps.nowinandroid could not be compiled -
How can we be sure that the baseline profile is working correctly ?
Many thanks for open sourcing this project. It really helps when looking for best practices and insights.
Relevant logcat output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct