• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Android.bpD23-Mar-20241.5 KiB5952

README.mdD23-Mar-20241.1 KiB3121

wrapagentproperties.ccD23-Mar-202412.7 KiB347285

README.md

1# wrapagentproperties
2
3wrapagentproperties is a JVMTI agent that lets one change the returned values of
4an agents GetSystemPropert{y,ies} calls.
5
6# Usage
7### Build
8>    `m libwrapagentproperties`  # or 'm libwrapagentpropertiesd' with debugging checks enabled
9
10The libraries will be built for 32-bit, 64-bit, host and target. Below examples
11assume you want to use the 64-bit version.
12
13### Command Line
14#### ART
15>    `art -Xplugin:$ANDROID_HOST_OUT/lib64/libopenjdkjvmti.so -agentpath:$ANDROID_HOST_OUT/lib64/libwrapagentproperties.so=/path/to/prop.file,/path/to/agent=agent-args -cp tmp/java/helloworld.dex -Xint helloworld`
16
17* `-Xplugin` and `-agentpath` need to be used, otherwise libtitrace agent will fail during init.
18* If using `libartd.so`, make sure to use the debug version of jvmti.
19
20### prop file format.
21
22The property file is a text file containing the values of java properties you
23wish to override. The format is property=value on each line. Blank lines and
24lines beginning with "#" are ignored.
25
26#### Example prop file
27
28    # abc.prop
29    abc.def=123
30    def.hij=a big deal
31