-
Notifications
You must be signed in to change notification settings - Fork 629
[Android] Implement exit info extraction and process crash parsing #5454
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
Changes from all commits
1de7e32
a37d5dc
93a76b9
9851715
87f4050
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -915,3 +915,29 @@ def write_data_to_file(contents, file_path, should_reboot=True): | |
| else: | ||
| # Manually revert /system to read-only since we aren't rebooting. | ||
| run_shell_command('mount -o ro,remount /system', root=True) | ||
|
|
||
|
|
||
| def get_activity_exit_info(app_package: str) -> str: | ||
| """Get dumpsys activity exit-info output for the given application package. | ||
| Example dumpsys output: | ||
| package: org.chromium.chrome | ||
| Historical Process Exit for uid=10154 | ||
| ApplicationExitInfo #0: | ||
| timestamp=2026-09-03 11:19:03.480 pid=27098 realUid=10154 | ||
| packageUid=10154 definingUid=10154 user=0 | ||
| process=org.chromium.chrome reason=2 (SIGNALED) | ||
| subreason=0 (UNKNOWN) status=9 | ||
| importance=100 pss=0.00 rss=0.00 state=empty trace=null | ||
| description=null | ||
| anrInfo=null | ||
|
|
||
|
|
||
| Args: | ||
| app_package: Name of the application package. | ||
|
|
||
| Returns: | ||
| Dumpsys output for the application package. | ||
| """ | ||
| dumpsys_output = run_shell_command( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how long is the dumpsys activity kept around? And is it written to immediately following a crash? This approach seems like it would work but it's a bit indirect
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is persistent in the disk, but it can be deleted using: |
||
| ['dumpsys', 'activity', 'exit-info', app_package]) | ||
| return dumpsys_output | ||
Uh oh!
There was an error while loading. Please reload this page.