Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Android/art/art/tools/jvmti-agents/chain-agents/   (Android Betriebssystem Version 17©)  Datei vom 26.5.2026 mit Größe 1 kB image not shown  

Quelle  README.md   Sprache: unbekannt

 
Spracherkennung für: .md vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

# 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
```

[Dauer der Verarbeitung: 0.2 Sekunden, vorverarbeitet 2026-06-29]