Small OSHI patching agent
- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src/main/java/ru/whbex/agent/patcher | ||
| .gitignore | ||
| pom.xml | ||
| README.md | ||
OSHI Patcher
A tiny Java agent intended for runtime patching OSHI library to return the CPU model/brand from a predefined system property.
Intended for Android usage.
Build
$ git clone https://github.com/whitebelyash/oshi-patcher
$ cd oshi-patcher
$ mvn package
The resulting library is in target/oshi-patcher-1.0.jar
Usage
Add a Java agent into your JVM flags:
java ... -javaagent:/path/to/oshi-patcher-1.0.jar
By default, if the brand property is not provided it will fallback to default behaviour.
To set the CPU brand use following system property:
-Dmojo.cpu.brand=%CpuNameGoesHere%
TODO
- Make it less mojified