Skip to content

[android] Investigate reliance on ActivityManager vs ActivityTaskManager in adb logs #4779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ivanpovazan opened this issue Mar 19, 2025 · 4 comments · Fixed by #4780
Closed
Assignees

Comments

@ivanpovazan
Copy link
Member

Description

When parsing adb logs for Android startup measurements:

f"logcat -d | grep 'ActivityTaskManager: Fully drawn {self.packagename}'"

we expect that the TTID event gets reported by: ActivityTaskManager

However, official docs suggests that TTID gets reported by ActivityManager: https://developer.android.com/topic/performance/vitals/launch-time#time-initial

The issue does not seem to happen on "newer" Androids ie:

  • Pixel7 pro Android 15 generates:
03-19 15:10:25.296  1547  1658 I ActivityTaskManager: Displayed com.companyname.dotnetnewmauisamplecontent/crc646280ffa8b0b9e474.MainActivity for user 0: +1s435ms
  • Oneplus3T Android 9 generates:
03-19 09:52:20.543  1315  1424 I ActivityManager: Displayed com.companyname.dotnet_new_android/crc6456e79b14b408fe9d.MainActivity: +478ms

Proposal

Support both variants, ie add a fallback option to cover both variants.

@ivanpovazan
Copy link
Member Author

@LoopedBard3 @matouskozak

@matouskozak
Copy link
Member

matouskozak commented Mar 19, 2025

We could possibly change the logcat grep

f"logcat -d | grep 'ActivityTaskManager: Displayed {androidHelper.activityname}'"
to f"logcat -d | grep -E 'ActivityManager|ActivityTaskManager: Displayed {androidHelper.activityname}'"

and the same for TTFD

@LoopedBard3
Copy link
Member

Do we happen to know or have a solid grasp on whether this should be only one or the other and that both won't show up in the same log? Based on my understanding, that seems to be the case as it will be dependent on some version of Android or some other system version.

@ivanpovazan
Copy link
Member Author

Do we happen to know or have a solid grasp on whether this should be only one or the other and that both won't show up in the same log? Based on my understanding, that seems to be the case as it will be dependent on some version of Android or some other system version.

I am not aware of any potential problems regarding this. I think if we support both variants it would be "good-enough" for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants