-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
@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: |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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.
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" ] | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
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. |
Closing the PR without merging as this is not ready yet. (As discussed and confirmed with the team as on Feb 13, 2024) |
A first draft of the system tracing topic leveraged from the internal docs.
This will need additional changes to
index.md
andhowto/android/landing.md
that are part of this PR: https://github.com/canonical/anbox-cloud-docs/pull/33/files