File: README.md

package info (click to toggle)
android-platform-art 11.0.0%2Br48-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,932 kB
  • sloc: cpp: 459,858; java: 163,268; asm: 22,644; python: 9,815; sh: 6,330; ansic: 4,117; xml: 2,855; perl: 77; makefile: 73
file content (36 lines) | stat: -rw-r--r-- 1,326 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# chainagent

The chainagents agent is a JVMTI agent that chain loads other agents from a file found at a
location relative to a passed in path. It can be used in combination with android startup_agents
in order to implement more complicated agent-loading rules.

It will open the file `chain_agents.txt` from the directory passed in as an argument and read it
line-by-line loading the agents (with the arguments) listed in the file.

Errors in loading are logged then ignored.

# Usage
### Build
>    `m libchainagents`

The libraries will be built for 32-bit, 64-bit, host and target. Below examples
assume you want to use the 64-bit version.

### Command Line
#### ART
>    `art -Xplugin:$ANDROID_HOST_OUT/lib64/libopenjdkjvmti.so -agentpath:$ANDROID_HOST_OUT/lib64/libchainagents.so=/some/path/here -Xint helloworld`

* `-Xplugin` and `-agentpath` need to be used, otherwise libtitrace agent will fail during init.
* If using `libartd.so`, make sure to use the debug version of jvmti.

### chain_agents.txt file format.

The chain-agents file is a list of agent files and arguments to load in the same format as the
`-agentpath` argument.

#### Example chain_agents.txt file

```
/data/data/com.android.launcher3/code_cache/libtifast32.so=ClassLoad
/data/data/com.android.launcher3/code_cache/libtifast64.so=ClassLoad
```