80,351
社区成员
发帖
与我相关
我的任务
分享
findAndHookMethod("android.os.SystemProperties", lpparam.classLoader,
"get", new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param)
throws Throwable {
// TODO Auto-generated method stub
String s = "";
try {
Class c = Class
.forName("android.os.SystemProperties");
Method method = c.getMethod("set", new Class[] {
String.class, String.class });
method.invoke(c.newInstance(), new Object[] {
"ro.product.name", "666" });
method = c.getMethod("get", new Class[] {
String.class, String.class });
s = (String) method.invoke(
c.newInstance(),
new Object[] { "ro.product.name", "unknown" });
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
protected void afterHookedMethod(MethodHookParam param)
throws Throwable {
// TODO Auto-generated method stub
}
});