Android 将函数放到主线程运行
有时候,app会检测加密函数是否在主线程运行,为了逃避这种检测,要将函数放到主线程运行
Class<?> aClass = RposedHelpers.findClass("com.yuanrenxue.challenge.three.ChallengeThreeNativeLib", RatelToolKit.hostClassLoader);
Object o = RposedHelpers.newInstance(aClass);
new Handler(Looper.getMainLooper()).post(new Runnable() { //放到主线程运行
@Override
public void run() {
byte[] sign = (byte[])RposedHelpers.callMethod(o, "sign", page);
sekiroResponse.send(OooOooo(sign));
}
});