Skip to content
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

Document Android system tracing #34

Closed
wants to merge 1 commit into from

Conversation

keirthana
Copy link
Collaborator

@keirthana keirthana commented Feb 2, 2024

A first draft of the system tracing topic leveraged from the internal docs.

This will need additional changes to index.md and howto/android/landing.md that are part of this PR: https://github.com/canonical/anbox-cloud-docs/pull/33/files

@keirthana keirthana requested a review from adglkh February 2, 2024 10:16
@keirthana
Copy link
Collaborator Author

@adglkh I pulled out the content for system tracing with some modifications into this PR. Please leave your feedback.


## Enable Android System Tracing

1. To enable Android system tracing, add the `android.enable_tracing` flag into the feature file. In the Android container, run:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Android container

I changed the "development container" to "Android container". Is it correct? Or should this be "In the Anbox instance"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android runs in a container nested in an instance (container or VM), so that seems accurate to me.

@keirthana keirthana added this to the 1.21.0 milestone Feb 2, 2024
@keirthana keirthana mentioned this pull request Feb 2, 2024
5 tasks
@keirthana keirthana removed this from the 1.21.0 milestone Feb 2, 2024
Comment on lines +12 to +20
For instance, to enable the graphics category, add the following to the `/var/lib/anbox/android.json` file:

```json
{
"hardware": "ranchu",
"api_level": 31,
"properties": [ "debug.atrace.tags.enableflags=2" ]
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to reboot the instance after changing the android.json file, but we need to double-check this with @morphis or @adglkh.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly necessary to define the property here. This is only needed if you want to trace system services. However if that is the intention you need to put it here.

```bash
curl --unix-socket /run/user/1000/anbox/sockets/api.unix --request POST --data '{"enable":false}' s/1.0/tracing
```
The resulting trace file is available in the response once tracing is disabled. The trace file should look similar to:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... The file is not available then, the _path_to the file is available in the response.


## Enable Android System Tracing

1. To enable Android system tracing, add the `android.enable_tracing` flag into the feature file. In the Android container, run:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android runs in a container nested in an instance (container or VM), so that seems accurate to me.

@keirthana keirthana added the documentation Improvements or additions to documentation label Feb 12, 2024
@keirthana
Copy link
Collaborator Author

Putting this on hold as there is some dilemma about whether to include this for 1.21.

@morphis
Copy link
Collaborator

morphis commented Feb 12, 2024

Putting this on hold as there is some dilemma about whether to include this for 1.21.

What I agreed with @adglkh was that we don't document this yet officially as it's use is rather harry and we haven't completed the implementation yet to be fully integrated to what people expect from Android.

@keirthana keirthana requested review from morphis and ajanon February 12, 2024 15:50
@keirthana
Copy link
Collaborator Author

Closing the PR without merging as this is not ready yet. (As discussed and confirmed with the team as on Feb 13, 2024)

@keirthana keirthana closed this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants