Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
Android.bp | D | 23-Nov-2023 | 1.5 KiB | 58 | 51 | |
README.md | D | 23-Nov-2023 | 1.1 KiB | 31 | 21 | |
wrapagentproperties.cc | D | 22-Nov-2023 | 12.7 KiB | 347 | 285 |
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