Commit 72619142 authored by swift_gan's avatar swift_gan

fix accessFlag on Android Q

parent d7dcb659
...@@ -55,11 +55,6 @@ public class MyApp extends Application { ...@@ -55,11 +55,6 @@ public class MyApp extends Application {
XposedCompat.classLoader = getClassLoader(); XposedCompat.classLoader = getClassLoader();
XposedCompat.isFirstApplication= true; XposedCompat.isFirstApplication= true;
// //some error when invoke backup in Android Q
if (SandHookConfig.SDK_INT >= 29) {
XposedCompat.useNewCallBackup = false;
}
XposedHelpers.findAndHookMethod(Activity.class, "onResume", new XC_MethodHook() { XposedHelpers.findAndHookMethod(Activity.class, "onResume", new XC_MethodHook() {
@Override @Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable { protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
......
...@@ -106,10 +106,16 @@ namespace SandHook { ...@@ -106,10 +106,16 @@ namespace SandHook {
"testAccessFlag"); "testAccessFlag");
if (accessFlag == 0) { if (accessFlag == 0) {
accessFlag = 524313; accessFlag = 524313;
//kAccPublicApi
if (SDK_INT >= ANDROID_Q) {
accessFlag |= 0x10000000;
}
} }
int offset = findOffset(p, getParentSize(), 2, accessFlag); int offset = findOffset(p, getParentSize(), 2, accessFlag);
if (offset < 0) { if (offset < 0) {
if (SDK_INT == ANDROID_L2) { if (SDK_INT >= ANDROID_Q) {
return 4;
} else if (SDK_INT == ANDROID_L2) {
return 20; return 20;
} else if (SDK_INT == ANDROID_L) { } else if (SDK_INT == ANDROID_L) {
return 56; return 56;
......
...@@ -61,7 +61,7 @@ TEMP_STUB_INFO = """ ...@@ -61,7 +61,7 @@ TEMP_STUB_INFO = """
STUB_SIZES = [10,20,30,30,30,30,30,20,10,10,5,5,3] STUB_SIZES = [10,20,30,30,30,30,30,20,10,10,5,5,3]
HAS_BACKUP = True; HAS_BACKUP = False
def getMethodId(args, index): def getMethodId(args, index):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment