Small OSHI patching agent
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-15 20:52:57 +04:00
src/main/java/ru/whbex/agent/patcher Init[project]: OSHI Patcher project 2026-07-15 20:47:11 +04:00
.gitignore Init[project]: OSHI Patcher project 2026-07-15 20:47:11 +04:00
pom.xml Init[project]: OSHI Patcher project 2026-07-15 20:47:11 +04:00
README.md Feat[readme]: add README 2026-07-15 20:52:57 +04:00

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