public static boolean isOreo() { return (Build.VERSION.SDK_INT == 25 && getPreviewSDKInt() > 0) || Build.VERSION.SDK_INT > 25; }
private static RefStaticMethod<IInterface> getInterfaceMethod() { if (BuildCompat.isOreo()) { return IStorageManager.Stub.asInterface; } else { return IMountService.Stub.asInterface; } } }
private static boolean isOreo() { return BuildCompat.isOreo() && !DeviceUtil.isSamsung() || ClipboardManager.getService == null; } }
public static void enableIORedirect() { try { String soPath = String.format("/data/data/%s/lib/libva++.so", VirtualCore.get().getHostPkg()); if (!new File(soPath).exists()) { throw new RuntimeException("io redirect failed."); } redirectDirectory(VESCAPE, "/"); nativeEnableIORedirect(soPath, Build.VERSION.SDK_INT, BuildCompat.getPreviewSDKInt()); } catch (Throwable e) { VLog.e(TAG, VLog.getStackTraceString(e)); } }
public static IInterface asInterface(IBinder binder) { if (BuildCompat.isOreo()) { return IApplicationThreadOreo.Stub.asInterface.call(binder); } return ApplicationThreadNative.asInterface.call(binder); } }
public static boolean isOreo() { return (Build.VERSION.SDK_INT == 25 && getPreviewSDKInt() > 0) || Build.VERSION.SDK_INT > 25; }
private static void clearContentProvider(Object cache) { if (BuildCompat.isOreo()) { Object holder = Settings.NameValueCacheOreo.mProviderHolder.get(cache); if (holder != null) { Settings.ContentProviderHolder.mContentProvider.set(holder, null); } } else { Settings.NameValueCache.mContentProvider.set(cache, null); } }
public static boolean isOreo() { return (Build.VERSION.SDK_INT == 25 && getPreviewSDKInt() > 0) || Build.VERSION.SDK_INT > 25; }
Map clientMap = ActivityThread.mProviderMap.get(VirtualCore.mainThread()); for (Object clientRecord : clientMap.values()) { if (BuildCompat.isOreo()) { IInterface provider = ActivityThread.ProviderClientRecordJB.mProvider.get(clientRecord); Object holder = ActivityThread.ProviderClientRecordJB.mHolder.get(clientRecord);
public static void enableIORedirect() { try { String soPath = String.format("/data/data/%s/lib/libva++.so", VirtualCore.get().getHostPkg()); if (!new File(soPath).exists()) { throw new RuntimeException("Unable to find the so."); } nativeEnableIORedirect(soPath, Build.VERSION.SDK_INT, BuildCompat.getPreviewSDKInt()); } catch (Throwable e) { VLog.e(TAG, VLog.getStackTraceString(e)); } }
@Override public void inject() throws Throwable { if (BuildCompat.isOreo()) { //Android Oreo(8.X) Object singleton = ActivityManagerOreo.IActivityManagerSingleton.get(); Singleton.mInstance.set(singleton, getInvocationStub().getProxyInterface()); } else { if (ActivityManagerNative.gDefault.type() == IActivityManager.TYPE) { ActivityManagerNative.gDefault.set(getInvocationStub().getProxyInterface()); } else if (ActivityManagerNative.gDefault.type() == Singleton.TYPE) { Object gDefault = ActivityManagerNative.gDefault.get(); Singleton.mInstance.set(gDefault, getInvocationStub().getProxyInterface()); } } BinderInvocationStub hookAMBinder = new BinderInvocationStub(getInvocationStub().getBaseInterface()); hookAMBinder.copyMethodProxies(getInvocationStub()); ServiceManager.sCache.get().put(Context.ACTIVITY_SERVICE, hookAMBinder); }
public static void enableIORedirect() { try { String soPath = String.format("/data/data/%s/lib/libva++.so", VirtualCore.get().getHostPkg()); if (!new File(soPath).exists()) { throw new RuntimeException("io redirect failed."); } redirectDirectory(VESCAPE, "/"); nativeEnableIORedirect(soPath, Build.VERSION.SDK_INT, BuildCompat.getPreviewSDKInt()); } catch (Throwable e) { VLog.e(TAG, VLog.getStackTraceString(e)); } }
@Override protected void onBindMethods() { super.onBindMethods(); addMethodProxy(new ResultStaticMethodProxy("addPermissionAsync", true)); addMethodProxy(new ResultStaticMethodProxy("addPermission", true)); addMethodProxy(new ResultStaticMethodProxy("performDexOpt", true)); addMethodProxy(new ResultStaticMethodProxy("performDexOptIfNeeded", false)); addMethodProxy(new ResultStaticMethodProxy("performDexOptSecondary", true)); addMethodProxy(new ResultStaticMethodProxy("addOnPermissionsChangeListener", 0)); addMethodProxy(new ResultStaticMethodProxy("removeOnPermissionsChangeListener", 0)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { addMethodProxy(new ResultStaticMethodProxy("checkPackageStartable", 0)); } if (BuildCompat.isOreo()) { addMethodProxy(new ResultStaticMethodProxy("notifyDexLoad", 0)); addMethodProxy(new ResultStaticMethodProxy("notifyPackageUse", 0)); addMethodProxy(new ResultStaticMethodProxy("setInstantAppCookie", false)); addMethodProxy(new ResultStaticMethodProxy("isInstantApp", false)); } }
private static RefStaticMethod<IInterface> getInterfaceMethod() { if (BuildCompat.isOreo()) { return IStorageManager.Stub.asInterface; } else { return IMountService.Stub.asInterface; } } }
private static RefStaticMethod<IInterface> getInterfaceMethod() { if (BuildCompat.isOreo()) { return IStorageManager.Stub.asInterface; } else { return IMountService.Stub.asInterface; } } }
private static boolean isOreo() { return BuildCompat.isOreo() && !DeviceUtil.isSamsung() || ClipboardManager.getService == null; } }
public static IInterface asInterface(IBinder binder) { if (BuildCompat.isOreo()) { return IApplicationThreadOreo.Stub.asInterface.call(binder); } return ApplicationThreadNative.asInterface.call(binder); } }
public static IInterface asInterface(IBinder binder) { if (BuildCompat.isOreo()) { return IApplicationThreadOreo.Stub.asInterface.call(binder); } return ApplicationThreadNative.asInterface.call(binder); } }
private static void clearContentProvider(Object cache) { if (BuildCompat.isOreo()) { Object holder = Settings.NameValueCacheOreo.mProviderHolder.get(cache); if (holder != null) { Settings.ContentProviderHolder.mContentProvider.set(holder, null); } } else { Settings.NameValueCache.mContentProvider.set(cache, null); } }