├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── AndHook.dex │ └── OaceOaT8w5Xda6wa │ ├── java │ └── io │ │ └── virtualapp │ │ ├── VApp.java │ │ ├── VCommends.java │ │ ├── abs │ │ ├── BasePresenter.java │ │ ├── BaseView.java │ │ ├── Callback.java │ │ ├── Value.java │ │ ├── nestedadapter │ │ │ ├── RecyclerViewAdapterWrapper.java │ │ │ └── SmartRecyclerAdapter.java │ │ ├── percent │ │ │ └── PercentLinearLayout.java │ │ ├── reflect │ │ │ └── ReflectException.java │ │ └── ui │ │ │ ├── VActivity.java │ │ │ ├── VFragment.java │ │ │ └── VUiKit.java │ │ ├── delegate │ │ ├── MyAppRequestListener.java │ │ ├── MyComponentDelegate.java │ │ ├── MyPhoneInfoDelegate.java │ │ └── MyTaskDescriptionDelegate.java │ │ ├── effects │ │ ├── ExplosionAnimator.java │ │ └── ExplosionField.java │ │ ├── home │ │ ├── HomeActivity.java │ │ ├── HomeContract.java │ │ ├── HomePresenterImpl.java │ │ ├── ListAppActivity.java │ │ ├── ListAppContract.java │ │ ├── ListAppFragment.java │ │ ├── ListAppPresenterImpl.java │ │ ├── LoadingActivity.java │ │ ├── adapters │ │ │ ├── AppPagerAdapter.java │ │ │ ├── CloneAppListAdapter.java │ │ │ ├── LaunchpadAdapter.java │ │ │ └── decorations │ │ │ │ └── ItemOffsetDecoration.java │ │ ├── models │ │ │ ├── AppData.java │ │ │ ├── AppInfo.java │ │ │ ├── AppInfoLite.java │ │ │ ├── EmptyAppData.java │ │ │ ├── MultiplePackageAppData.java │ │ │ └── PackageAppData.java │ │ ├── platform │ │ │ ├── PlatformInfo.java │ │ │ └── WechatPlatformInfo.java │ │ └── repo │ │ │ ├── AppDataSource.java │ │ │ ├── AppRepository.java │ │ │ └── PackageAppDataStorage.java │ │ ├── splash │ │ └── SplashActivity.java │ │ ├── vs │ │ └── VSManagerActivity.java │ │ └── widgets │ │ ├── BallGridBeatIndicator.java │ │ ├── BallPulseIndicator.java │ │ ├── BaseView.java │ │ ├── CardStackAdapter.java │ │ ├── CardStackLayout.java │ │ ├── CircularAnim.java │ │ ├── DragSelectRecyclerView.java │ │ ├── DragSelectRecyclerViewAdapter.java │ │ ├── EatBeansView.java │ │ ├── Indicator.java │ │ ├── LabelView.java │ │ ├── LauncherIconView.java │ │ ├── LoadingIndicatorView.java │ │ ├── MarqueeTextView.java │ │ ├── MaterialRippleLayout.java │ │ ├── RippleButton.java │ │ ├── ShadowProperty.java │ │ ├── ShadowViewDrawable.java │ │ ├── Shimmer.java │ │ ├── ShimmerViewBase.java │ │ ├── ShimmerViewHelper.java │ │ ├── TwoGearsView.java │ │ └── ViewHelper.java │ └── res │ ├── drawable-hdpi │ ├── ic_add.png │ ├── ic_check.png │ ├── ic_crash.png │ ├── ic_menu.png │ ├── ic_no_check.png │ └── ic_shortcut.png │ ├── drawable-xxhdpi │ └── ic_user.png │ ├── drawable │ ├── blue_circle.xml │ ├── fab_bg.xml │ ├── home_bg.xml │ ├── icon_bg.xml │ ├── sel_clone_app_btn.xml │ ├── sel_guide_btn.xml │ ├── shape_clone_app_btn.xml │ └── shape_clone_app_btn_pressed.xml │ ├── layout │ ├── activity_clone_app.xml │ ├── activity_home.xml │ ├── activity_install.xml │ ├── activity_loading.xml │ ├── activity_splash.xml │ ├── activity_users.xml │ ├── fragment_list_app.xml │ ├── fragment_setup.xml │ ├── item_app.xml │ ├── item_clone_app.xml │ ├── item_launcher_app.xml │ └── item_user.xml │ ├── menu │ └── user_menu.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── attrs.xml │ ├── colors.xml │ ├── dimens.xml │ ├── ids.xml │ ├── integers.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── examples └── VirtualPhone │ ├── .classpath │ ├── .project │ ├── .settings │ └── org.eclipse.jdt.core.prefs │ ├── AndroidManifest.xml │ ├── lint.xml │ ├── project.properties │ └── src │ └── io │ └── virtualhook │ ├── LogUtil.java │ ├── PostHook.java │ └── PreHook.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ ├── android │ │ ├── accounts │ │ │ ├── IAccountAuthenticator.aidl │ │ │ ├── IAccountAuthenticatorResponse.aidl │ │ │ └── IAccountManagerResponse.aidl │ │ ├── app │ │ │ ├── IActivityManager │ │ │ │ └── ContentProviderHolder.aidl │ │ │ ├── IServiceConnection.aidl │ │ │ ├── IStopUserCallback.aidl │ │ │ └── job │ │ │ │ ├── IJobCallback.aidl │ │ │ │ └── IJobService.aidl │ │ ├── content │ │ │ ├── IIntentReceiver.aidl │ │ │ └── pm │ │ │ │ ├── IPackageDataObserver.aidl │ │ │ │ ├── IPackageDeleteObserver2.aidl │ │ │ │ ├── IPackageInstallObserver.aidl │ │ │ │ ├── IPackageInstallObserver2.aidl │ │ │ │ ├── IPackageInstallerCallback.aidl │ │ │ │ └── IPackageInstallerSession.aidl │ │ └── net │ │ │ └── wifi │ │ │ └── IWifiScanner.aidl │ └── com │ │ └── lody │ │ └── virtual │ │ ├── client │ │ └── IVClient.aidl │ │ ├── os │ │ └── VUserInfo.aidl │ │ ├── remote │ │ ├── AppTaskInfo.aidl │ │ ├── InstallResult.aidl │ │ ├── InstalledAppInfo.aidl │ │ ├── PendingIntentData.aidl │ │ ├── PendingResultData.aidl │ │ ├── Problem.aidl │ │ ├── ReceiverInfo.aidl │ │ └── VParceledListSlice.aidl │ │ └── server │ │ ├── IAccountManager.aidl │ │ ├── IActivityManager.aidl │ │ ├── IAppManager.aidl │ │ ├── IBinderDelegateService.aidl │ │ ├── IJobScheduler.aidl │ │ ├── INotificationManager.aidl │ │ ├── IPackageInstaller.aidl │ │ ├── IPackageInstallerSession.aidl │ │ ├── IPackageManager.aidl │ │ ├── IUserManager.aidl │ │ ├── IVirtualStorageService.aidl │ │ ├── interfaces │ │ ├── IAppRequestListener.aidl │ │ ├── IIntentFilterObserver.aidl │ │ ├── IPackageObserver.aidl │ │ ├── IProcessObserver.aidl │ │ ├── IServiceFetcher.aidl │ │ └── IUiCallback.aidl │ │ └── pm │ │ └── installer │ │ ├── SessionInfo.aidl │ │ └── SessionParams.aidl │ ├── java │ ├── android │ │ └── content │ │ │ └── pm │ │ │ └── PackageParser.java │ ├── com │ │ └── lody │ │ │ └── virtual │ │ │ ├── Build.java │ │ │ ├── client │ │ │ ├── NativeEngine.java │ │ │ ├── VClientImpl.java │ │ │ ├── core │ │ │ │ ├── CrashHandler.java │ │ │ │ ├── InstallStrategy.java │ │ │ │ ├── InvocationStubManager.java │ │ │ │ └── VirtualCore.java │ │ │ ├── env │ │ │ │ ├── Constants.java │ │ │ │ ├── DeadServerException.java │ │ │ │ ├── SpecialComponentList.java │ │ │ │ └── VirtualRuntime.java │ │ │ ├── fixer │ │ │ │ ├── ActivityFixer.java │ │ │ │ ├── ComponentFixer.java │ │ │ │ └── ContextFixer.java │ │ │ ├── hook │ │ │ │ ├── base │ │ │ │ │ ├── BinderInvocationProxy.java │ │ │ │ │ ├── BinderInvocationStub.java │ │ │ │ │ ├── Inject.java │ │ │ │ │ ├── LogInvocation.java │ │ │ │ │ ├── MethodInvocationProxy.java │ │ │ │ │ ├── MethodInvocationStub.java │ │ │ │ │ ├── MethodProxy.java │ │ │ │ │ ├── ReplaceCallingPkgMethodProxy.java │ │ │ │ │ ├── ReplaceLastPkgMethodProxy.java │ │ │ │ │ ├── ReplaceLastUidMethodProxy.java │ │ │ │ │ ├── ReplaceSequencePkgMethodProxy.java │ │ │ │ │ ├── ReplaceSpecPkgMethodProxy.java │ │ │ │ │ ├── ReplaceUidMethodProxy.java │ │ │ │ │ ├── ResultStaticMethodProxy.java │ │ │ │ │ ├── SkipInject.java │ │ │ │ │ └── StaticMethodProxy.java │ │ │ │ ├── delegate │ │ │ │ │ ├── AppInstrumentation.java │ │ │ │ │ ├── ComponentDelegate.java │ │ │ │ │ ├── InstrumentationDelegate.java │ │ │ │ │ ├── PhoneInfoDelegate.java │ │ │ │ │ └── TaskDescriptionDelegate.java │ │ │ │ ├── providers │ │ │ │ │ ├── DownloadProviderHook.java │ │ │ │ │ ├── ExternalProviderHook.java │ │ │ │ │ ├── InternalProviderHook.java │ │ │ │ │ ├── ProviderHook.java │ │ │ │ │ └── SettingsProviderHook.java │ │ │ │ ├── proxies │ │ │ │ │ ├── account │ │ │ │ │ │ └── AccountManagerStub.java │ │ │ │ │ ├── alarm │ │ │ │ │ │ └── AlarmManagerStub.java │ │ │ │ │ ├── am │ │ │ │ │ │ ├── ActivityManagerStub.java │ │ │ │ │ │ ├── HCallbackStub.java │ │ │ │ │ │ └── MethodProxies.java │ │ │ │ │ ├── appops │ │ │ │ │ │ └── AppOpsManagerStub.java │ │ │ │ │ ├── appwidget │ │ │ │ │ │ └── AppWidgetManagerStub.java │ │ │ │ │ ├── audio │ │ │ │ │ │ └── AudioManagerStub.java │ │ │ │ │ ├── backup │ │ │ │ │ │ └── BackupManagerStub.java │ │ │ │ │ ├── bluetooth │ │ │ │ │ │ └── BluetoothStub.java │ │ │ │ │ ├── clipboard │ │ │ │ │ │ └── ClipBoardStub.java │ │ │ │ │ ├── connectivity │ │ │ │ │ │ └── ConnectivityStub.java │ │ │ │ │ ├── content │ │ │ │ │ │ └── ContentServiceStub.java │ │ │ │ │ ├── context_hub │ │ │ │ │ │ └── ContextHubServiceStub.java │ │ │ │ │ ├── display │ │ │ │ │ │ └── DisplayStub.java │ │ │ │ │ ├── dropbox │ │ │ │ │ │ └── DropBoxManagerStub.java │ │ │ │ │ ├── graphics │ │ │ │ │ │ └── GraphicsStatsStub.java │ │ │ │ │ ├── imms │ │ │ │ │ │ └── MmsStub.java │ │ │ │ │ ├── input │ │ │ │ │ │ ├── InputMethodManagerStub.java │ │ │ │ │ │ └── MethodProxies.java │ │ │ │ │ ├── isms │ │ │ │ │ │ └── ISmsStub.java │ │ │ │ │ ├── isub │ │ │ │ │ │ └── ISubStub.java │ │ │ │ │ ├── job │ │ │ │ │ │ └── JobServiceStub.java │ │ │ │ │ ├── libcore │ │ │ │ │ │ ├── LibCoreStub.java │ │ │ │ │ │ └── MethodProxies.java │ │ │ │ │ ├── location │ │ │ │ │ │ └── LocationManagerStub.java │ │ │ │ │ ├── media │ │ │ │ │ │ ├── router │ │ │ │ │ │ │ └── MediaRouterServiceStub.java │ │ │ │ │ │ └── session │ │ │ │ │ │ │ └── SessionManagerStub.java │ │ │ │ │ ├── mount │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ └── MountServiceStub.java │ │ │ │ │ ├── network │ │ │ │ │ │ └── NetworkManagementStub.java │ │ │ │ │ ├── notification │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ └── NotificationManagerStub.java │ │ │ │ │ ├── persistent_data_block │ │ │ │ │ │ └── PersistentDataBlockServiceStub.java │ │ │ │ │ ├── phonesubinfo │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ └── PhoneSubInfoStub.java │ │ │ │ │ ├── pm │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ └── PackageManagerStub.java │ │ │ │ │ ├── power │ │ │ │ │ │ └── PowerManagerStub.java │ │ │ │ │ ├── restriction │ │ │ │ │ │ └── RestrictionStub.java │ │ │ │ │ ├── search │ │ │ │ │ │ └── SearchManagerStub.java │ │ │ │ │ ├── shortcut │ │ │ │ │ │ └── ShortcutServiceStub.java │ │ │ │ │ ├── telephony │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ ├── TelephonyRegistryStub.java │ │ │ │ │ │ └── TelephonyStub.java │ │ │ │ │ ├── user │ │ │ │ │ │ └── UserManagerStub.java │ │ │ │ │ ├── vibrator │ │ │ │ │ │ └── VibratorStub.java │ │ │ │ │ ├── wifi │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ └── WifiManagerStub.java │ │ │ │ │ ├── wifi_scanner │ │ │ │ │ │ ├── GhostWifiScannerImpl.java │ │ │ │ │ │ └── WifiScannerStub.java │ │ │ │ │ └── window │ │ │ │ │ │ ├── MethodProxies.java │ │ │ │ │ │ ├── WindowManagerStub.java │ │ │ │ │ │ └── session │ │ │ │ │ │ ├── BaseMethodProxy.java │ │ │ │ │ │ └── WindowSessionPatch.java │ │ │ │ ├── secondary │ │ │ │ │ ├── GmsSupport.java │ │ │ │ │ ├── HackAppUtils.java │ │ │ │ │ ├── ProxyServiceFactory.java │ │ │ │ │ ├── ServiceConnectionDelegate.java │ │ │ │ │ └── StubBinder.java │ │ │ │ └── utils │ │ │ │ │ └── MethodParameterUtils.java │ │ │ ├── interfaces │ │ │ │ └── IInjector.java │ │ │ ├── ipc │ │ │ │ ├── ActivityClientRecord.java │ │ │ │ ├── LocalProxyUtils.java │ │ │ │ ├── ProviderCall.java │ │ │ │ ├── ServiceManagerNative.java │ │ │ │ ├── VAccountManager.java │ │ │ │ ├── VActivityManager.java │ │ │ │ ├── VJobScheduler.java │ │ │ │ ├── VNotificationManager.java │ │ │ │ ├── VPackageManager.java │ │ │ │ └── VirtualStorageManager.java │ │ │ ├── natives │ │ │ │ └── NativeMethods.java │ │ │ └── stub │ │ │ │ ├── ChooserActivity.java │ │ │ │ ├── DaemonService.java │ │ │ │ ├── ResolverActivity.java │ │ │ │ ├── ShortcutHandleActivity.java │ │ │ │ ├── StubActivity.java │ │ │ │ ├── StubContentProvider.java │ │ │ │ ├── StubDialog.java │ │ │ │ ├── StubJob.java │ │ │ │ ├── StubManifest.java │ │ │ │ ├── StubPendingActivity.java │ │ │ │ ├── StubPendingReceiver.java │ │ │ │ └── StubPendingService.java │ │ │ ├── helper │ │ │ ├── ParcelHelper.java │ │ │ ├── PersistenceLayer.java │ │ │ ├── collection │ │ │ │ ├── ArrayMap.java │ │ │ │ ├── ArraySet.java │ │ │ │ ├── ContainerHelpers.java │ │ │ │ ├── IntArray.java │ │ │ │ ├── MapCollections.java │ │ │ │ ├── SimpleArrayMap.java │ │ │ │ └── SparseArray.java │ │ │ ├── compat │ │ │ │ ├── AccountManagerCompat.java │ │ │ │ ├── ActivityManagerCompat.java │ │ │ │ ├── ApplicationThreadCompat.java │ │ │ │ ├── BuildCompat.java │ │ │ │ ├── BundleCompat.java │ │ │ │ ├── ContentProviderCompat.java │ │ │ │ ├── IApplicationThreadCompat.java │ │ │ │ ├── NativeLibraryHelperCompat.java │ │ │ │ ├── ObjectsCompat.java │ │ │ │ ├── PackageParserCompat.java │ │ │ │ ├── ParceledListSliceCompat.java │ │ │ │ ├── StorageManagerCompat.java │ │ │ │ └── SystemPropertiesCompat.java │ │ │ └── utils │ │ │ │ ├── ArrayUtils.java │ │ │ │ ├── AtomicFile.java │ │ │ │ ├── BitmapUtils.java │ │ │ │ ├── ClassUtils.java │ │ │ │ ├── ComponentUtils.java │ │ │ │ ├── DrawableUtils.java │ │ │ │ ├── FastXmlSerializer.java │ │ │ │ ├── FileUtils.java │ │ │ │ ├── MD5Utils.java │ │ │ │ ├── Mark.java │ │ │ │ ├── OSUtils.java │ │ │ │ ├── Reflect.java │ │ │ │ ├── ReflectException.java │ │ │ │ ├── Singleton.java │ │ │ │ └── VLog.java │ │ │ ├── os │ │ │ ├── VBinder.java │ │ │ ├── VEnvironment.java │ │ │ ├── VUserHandle.java │ │ │ ├── VUserInfo.java │ │ │ └── VUserManager.java │ │ │ ├── remote │ │ │ ├── AppTaskInfo.java │ │ │ ├── InstallResult.java │ │ │ ├── InstalledAppInfo.java │ │ │ ├── PendingIntentData.java │ │ │ ├── PendingResultData.java │ │ │ ├── Problem.java │ │ │ ├── ReceiverInfo.java │ │ │ ├── StubActivityRecord.java │ │ │ └── VParceledListSlice.java │ │ │ └── server │ │ │ ├── BinderProvider.java │ │ │ ├── ServiceCache.java │ │ │ ├── accounts │ │ │ ├── AppAccountParser.java │ │ │ ├── IAccountParser.java │ │ │ ├── VAccount.java │ │ │ └── VAccountManagerService.java │ │ │ ├── am │ │ │ ├── ActivityRecord.java │ │ │ ├── ActivityStack.java │ │ │ ├── AttributeCache.java │ │ │ ├── BroadcastSystem.java │ │ │ ├── PendingIntents.java │ │ │ ├── ProcessMap.java │ │ │ ├── ProcessRecord.java │ │ │ ├── ServiceRecord.java │ │ │ ├── TaskRecord.java │ │ │ ├── UidSystem.java │ │ │ └── VActivityManagerService.java │ │ │ ├── job │ │ │ └── VJobSchedulerService.java │ │ │ ├── notification │ │ │ ├── NotificationCompat.java │ │ │ ├── NotificationCompatCompatV14.java │ │ │ ├── NotificationCompatCompatV21.java │ │ │ ├── NotificationFixer.java │ │ │ ├── PendIntentCompat.java │ │ │ ├── ReflectionActionCompat.java │ │ │ ├── RemoteViewsFixer.java │ │ │ ├── VNotificationManagerService.java │ │ │ └── WidthCompat.java │ │ │ ├── pm │ │ │ ├── FastImmutableArraySet.java │ │ │ ├── IntentResolver.java │ │ │ ├── PackageCacheManager.java │ │ │ ├── PackagePersistenceLayer.java │ │ │ ├── PackageSetting.java │ │ │ ├── PackageUserState.java │ │ │ ├── ProviderIntentResolver.java │ │ │ ├── VAppManagerService.java │ │ │ ├── VPackageManagerService.java │ │ │ ├── VUserManagerService.java │ │ │ ├── installer │ │ │ │ ├── FileBridge.java │ │ │ │ ├── PackageHelper.java │ │ │ │ ├── PackageInstallInfo.java │ │ │ │ ├── PackageInstallObserver.java │ │ │ │ ├── PackageInstallerSession.java │ │ │ │ ├── SessionInfo.java │ │ │ │ ├── SessionParams.java │ │ │ │ └── VPackageInstallerService.java │ │ │ └── parser │ │ │ │ ├── PackageParserEx.java │ │ │ │ └── VPackage.java │ │ │ ├── secondary │ │ │ ├── BinderDelegateService.java │ │ │ └── FakeIdentityBinder.java │ │ │ └── vs │ │ │ ├── VSConfig.java │ │ │ ├── VSPersistenceLayer.java │ │ │ └── VirtualStorageService.java │ └── mirror │ │ ├── MethodParams.java │ │ ├── MethodReflectParams.java │ │ ├── RefBoolean.java │ │ ├── RefClass.java │ │ ├── RefConstructor.java │ │ ├── RefDouble.java │ │ ├── RefFloat.java │ │ ├── RefInt.java │ │ ├── RefLong.java │ │ ├── RefMethod.java │ │ ├── RefObject.java │ │ ├── RefStaticInt.java │ │ ├── RefStaticMethod.java │ │ ├── RefStaticObject.java │ │ ├── android │ │ ├── accounts │ │ │ └── IAccountManager.java │ │ ├── app │ │ │ ├── Activity.java │ │ │ ├── ActivityManagerNative.java │ │ │ ├── ActivityManagerOreo.java │ │ │ ├── ActivityThread.java │ │ │ ├── ActivityThreadNMR1.java │ │ │ ├── ApplicationThreadNative.java │ │ │ ├── ContextImpl.java │ │ │ ├── ContextImplICS.java │ │ │ ├── ContextImplKitkat.java │ │ │ ├── IActivityManager.java │ │ │ ├── IActivityManagerICS.java │ │ │ ├── IActivityManagerL.java │ │ │ ├── IActivityManagerN.java │ │ │ ├── IAlarmManager.java │ │ │ ├── IApplicationThread.java │ │ │ ├── IApplicationThreadICSMR1.java │ │ │ ├── IApplicationThreadJBMR1.java │ │ │ ├── IApplicationThreadKitkat.java │ │ │ ├── IApplicationThreadOreo.java │ │ │ ├── ISearchManager.java │ │ │ ├── LoadedApk.java │ │ │ ├── LoadedApkHuaWei.java │ │ │ ├── Notification.java │ │ │ ├── NotificationL.java │ │ │ ├── NotificationM.java │ │ │ ├── NotificationManager.java │ │ │ ├── PendingIntentJBMR2.java │ │ │ ├── backup │ │ │ │ └── IBackupManager.java │ │ │ └── job │ │ │ │ ├── IJobScheduler.java │ │ │ │ ├── JobInfo.java │ │ │ │ └── JobParameters.java │ │ ├── bluetooth │ │ │ └── IBluetooth.java │ │ ├── content │ │ │ ├── BroadcastReceiver.java │ │ │ ├── ClipboardManager.java │ │ │ ├── ClipboardManagerOreo.java │ │ │ ├── ContentProviderClient.java │ │ │ ├── ContentProviderHolderOreo.java │ │ │ ├── ContentProviderNative.java │ │ │ ├── ContentResolver.java │ │ │ ├── ContentResolverJBMR2.java │ │ │ ├── IClipboard.java │ │ │ ├── IContentProvider.java │ │ │ ├── IContentService.java │ │ │ ├── IIntentReceiver.java │ │ │ ├── IIntentReceiverJB.java │ │ │ ├── IRestrictionsManager.java │ │ │ ├── IntentFilter.java │ │ │ ├── pm │ │ │ │ ├── ApplicationInfoL.java │ │ │ │ ├── ApplicationInfoN.java │ │ │ │ ├── ILauncherApps.java │ │ │ │ ├── IShortcutService.java │ │ │ │ ├── LauncherApps.java │ │ │ │ ├── PackageInstaller.java │ │ │ │ ├── PackageParser.java │ │ │ │ ├── PackageParserJellyBean.java │ │ │ │ ├── PackageParserJellyBean17.java │ │ │ │ ├── PackageParserLollipop.java │ │ │ │ ├── PackageParserLollipop22.java │ │ │ │ ├── PackageParserMarshmallow.java │ │ │ │ ├── PackageParserNougat.java │ │ │ │ ├── PackageUserState.java │ │ │ │ ├── ParceledListSlice.java │ │ │ │ ├── ParceledListSliceJBMR2.java │ │ │ │ └── UserInfo.java │ │ │ └── res │ │ │ │ ├── AssetManager.java │ │ │ │ └── CompatibilityInfo.java │ │ ├── ddm │ │ │ ├── DdmHandleAppName.java │ │ │ └── DdmHandleAppNameJBMR1.java │ │ ├── graphics │ │ │ └── drawable │ │ │ │ └── Icon.java │ │ ├── hardware │ │ │ ├── display │ │ │ │ ├── DisplayManagerGlobal.java │ │ │ │ └── IDisplayManager.java │ │ │ └── location │ │ │ │ └── IContextHubService.java │ │ ├── location │ │ │ ├── ILocationListener.java │ │ │ ├── ILocationManager.java │ │ │ └── LocationRequestL.java │ │ ├── media │ │ │ ├── AudioManager.java │ │ │ ├── IAudioService.java │ │ │ ├── IMediaRouterService.java │ │ │ ├── MediaRouter.java │ │ │ └── session │ │ │ │ └── ISessionManager.java │ │ ├── net │ │ │ ├── IConnectivityManager.java │ │ │ └── wifi │ │ │ │ ├── IWifiManager.java │ │ │ │ ├── WifiInfo.java │ │ │ │ └── WifiScanner.java │ │ ├── os │ │ │ ├── Bundle.java │ │ │ ├── Handler.java │ │ │ ├── INetworkManagementService.java │ │ │ ├── IPowerManager.java │ │ │ ├── IUserManager.java │ │ │ ├── Message.java │ │ │ ├── Process.java │ │ │ ├── ServiceManager.java │ │ │ ├── StrictMode.java │ │ │ └── mount │ │ │ │ └── IMountService.java │ │ ├── providers │ │ │ ├── Downloads.java │ │ │ └── Settings.java │ │ ├── renderscript │ │ │ └── RenderScriptCacheDir.java │ │ ├── rms │ │ │ └── resource │ │ │ │ ├── ReceiverResourceLP.java │ │ │ │ ├── ReceiverResourceM.java │ │ │ │ └── ReceiverResourceN.java │ │ ├── service │ │ │ └── persistentdata │ │ │ │ └── IPersistentDataBlockService.java │ │ ├── util │ │ │ └── Singleton.java │ │ ├── view │ │ │ ├── Display.java │ │ │ ├── HardwareRenderer.java │ │ │ ├── IGraphicsStats.java │ │ │ ├── IWindowManager.java │ │ │ ├── RenderScript.java │ │ │ ├── SurfaceControl.java │ │ │ ├── ThreadedRenderer.java │ │ │ └── WindowManagerGlobal.java │ │ ├── webkit │ │ │ ├── IWebViewUpdateService.java │ │ │ └── WebViewFactory.java │ │ └── widget │ │ │ ├── RemoteViews.java │ │ │ └── Toast.java │ │ ├── com │ │ └── android │ │ │ └── internal │ │ │ ├── R_Hide.java │ │ │ ├── app │ │ │ └── IAppOpsService.java │ │ │ ├── appwidget │ │ │ └── IAppWidgetService.java │ │ │ ├── content │ │ │ ├── NativeLibraryHelper.java │ │ │ └── ReferrerIntent.java │ │ │ ├── os │ │ │ ├── IDropBoxManagerService.java │ │ │ ├── IVibratorService.java │ │ │ └── UserManager.java │ │ │ ├── policy │ │ │ └── PhoneWindow.java │ │ │ ├── telephony │ │ │ ├── IMms.java │ │ │ ├── IPhoneSubInfo.java │ │ │ ├── ISms.java │ │ │ ├── ISub.java │ │ │ ├── ITelephony.java │ │ │ ├── ITelephonyRegistry.java │ │ │ └── PhoneConstantsMtk.java │ │ │ └── view │ │ │ ├── IInputMethodManager.java │ │ │ └── inputmethod │ │ │ └── InputMethodManager.java │ │ ├── dalvik │ │ └── system │ │ │ └── VMRuntime.java │ │ ├── java │ │ └── lang │ │ │ ├── ThreadGroup.java │ │ │ └── ThreadGroupN.java │ │ └── libcore │ │ └── io │ │ ├── ForwardingOs.java │ │ ├── Libcore.java │ │ └── Os.java │ ├── jni │ ├── Android.mk │ ├── Application.mk │ ├── Core.cpp │ ├── Core.h │ ├── Foundation │ │ ├── IOUniformer.cpp │ │ ├── IOUniformer.h │ │ ├── VMPatch.cpp │ │ ├── VMPatch.h │ │ └── dalvik_vm.h │ ├── Helper.h │ └── MSHook │ │ ├── ARM.cpp │ │ ├── ARM.h │ │ ├── CydiaSubstrate.h │ │ ├── Debug.cpp │ │ ├── Debug.h │ │ ├── Hooker.cpp │ │ ├── Hooker.h │ │ ├── Log.h │ │ ├── PosixMemory.cpp │ │ ├── PosixMemory.h │ │ ├── SubstrateStruct.h │ │ ├── Thumb.cpp │ │ ├── Thumb.h │ │ ├── x86.cpp │ │ ├── x86.h │ │ ├── x86_64.cpp │ │ └── x86_64.h │ └── res │ ├── layout │ ├── custom_notification.xml │ ├── custom_notification_lite.xml │ └── resolve_list_item.xml │ └── values │ ├── dimens.xml │ ├── integer.xml │ ├── strings.xml │ └── styles.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .idea 7 | .DS_Store 8 | /build 9 | /captures 10 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lody/Desktop/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/assets/AndHook.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/assets/AndHook.dex -------------------------------------------------------------------------------- /app/src/main/assets/OaceOaT8w5Xda6wa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/assets/OaceOaT8w5Xda6wa -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/VCommends.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | public class VCommends { 7 | 8 | public static final String TAG_NEW_VERSION = "First launch new Version"; 9 | public static final String TAG_SHOW_ADD_APP_GUIDE = "Should show add app guide"; 10 | 11 | public static final int REQUEST_SELECT_APP = 5; 12 | 13 | public static final String EXTRA_APP_INFO_LIST = "va.extra.APP_INFO_LIST"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | public interface BasePresenter { 7 | void start(); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/BaseView.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | public interface BaseView { 10 | Activity getActivity(); 11 | Context getContext(); 12 | void setPresenter(T presenter); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/Callback.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public interface Callback { 8 | void callback(T result); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/Value.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public class Value { 8 | public T val; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/reflect/ReflectException.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs.reflect; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | public class ReflectException extends RuntimeException { 7 | 8 | private static final long serialVersionUID = 663038727503637969L; 9 | 10 | public ReflectException(Throwable cause) { 11 | super(cause); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/ui/VFragment.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs.ui; 2 | 3 | import org.jdeferred.android.AndroidDeferredManager; 4 | 5 | import android.app.Activity; 6 | import android.support.v4.app.Fragment; 7 | 8 | import io.virtualapp.abs.BasePresenter; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | public class VFragment extends Fragment { 14 | 15 | protected T mPresenter; 16 | 17 | public T getPresenter() { 18 | return mPresenter; 19 | } 20 | 21 | public void setPresenter(T presenter) { 22 | this.mPresenter = presenter; 23 | } 24 | 25 | protected AndroidDeferredManager defer() { 26 | return VUiKit.defer(); 27 | } 28 | 29 | public void finishActivity() { 30 | Activity activity = getActivity(); 31 | if (activity != null) { 32 | activity.finish(); 33 | } 34 | } 35 | 36 | public void destroy() { 37 | finishActivity(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/abs/ui/VUiKit.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.abs.ui; 2 | 3 | import android.content.Context; 4 | import android.os.Handler; 5 | import android.os.Looper; 6 | import android.util.TypedValue; 7 | 8 | import org.jdeferred.android.AndroidDeferredManager; 9 | 10 | /** 11 | * @author Lody 12 | *

13 | * A set of tools for UI. 14 | */ 15 | public class VUiKit { 16 | private static final AndroidDeferredManager gDM = new AndroidDeferredManager(); 17 | private static final Handler gUiHandler = new Handler(Looper.getMainLooper()); 18 | 19 | public static AndroidDeferredManager defer() { 20 | return gDM; 21 | } 22 | 23 | public static int dpToPx(Context context, int dp) { 24 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 25 | context.getResources().getDisplayMetrics()); 26 | } 27 | 28 | public static void post(Runnable r) { 29 | gUiHandler.post(r); 30 | } 31 | 32 | public static void postDelayed(long delay, Runnable r) { 33 | gUiHandler.postDelayed(r, delay); 34 | } 35 | 36 | public static void sleep(long time) { 37 | try { 38 | Thread.sleep(time); 39 | } catch (InterruptedException e) { 40 | e.printStackTrace(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/delegate/MyPhoneInfoDelegate.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.delegate; 2 | 3 | import com.lody.virtual.client.hook.delegate.PhoneInfoDelegate; 4 | 5 | 6 | /** 7 | * Fake the Device ID. 8 | */ 9 | public class MyPhoneInfoDelegate implements PhoneInfoDelegate { 10 | 11 | @Override 12 | public String getDeviceId(String oldDeviceId, int userId) { 13 | return oldDeviceId; 14 | } 15 | 16 | @Override 17 | public String getBluetoothAddress(String oldAddress, int userId) { 18 | return oldAddress; 19 | } 20 | 21 | @Override 22 | public String getMacAddress(String oldAddress, int userId) { 23 | return oldAddress; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/delegate/MyTaskDescriptionDelegate.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.delegate; 2 | 3 | import android.annotation.TargetApi; 4 | import android.app.ActivityManager; 5 | import android.os.Build; 6 | 7 | import com.lody.virtual.client.hook.delegate.TaskDescriptionDelegate; 8 | import com.lody.virtual.os.VUserManager; 9 | 10 | 11 | /** 12 | * Patch the task description with the (Virtual) user name 13 | */ 14 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 15 | public class MyTaskDescriptionDelegate implements TaskDescriptionDelegate { 16 | @Override 17 | public ActivityManager.TaskDescription getTaskDescription(ActivityManager.TaskDescription oldTaskDescription) { 18 | String labelPrefix = "[" + VUserManager.get().getUserName() + "] "; 19 | 20 | if (!oldTaskDescription.getLabel().startsWith(labelPrefix)) { 21 | // Is it really necessary? 22 | return new ActivityManager.TaskDescription(labelPrefix + oldTaskDescription.getLabel(), oldTaskDescription.getIcon(), oldTaskDescription.getPrimaryColor()); 23 | } else { 24 | return oldTaskDescription; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/ListAppContract.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home; 2 | 3 | import java.util.List; 4 | 5 | import io.virtualapp.abs.BasePresenter; 6 | import io.virtualapp.abs.BaseView; 7 | import io.virtualapp.home.models.AppInfo; 8 | 9 | /** 10 | * @author Lody 11 | * @version 1.0 12 | */ 13 | /*package*/ class ListAppContract { 14 | interface ListAppView extends BaseView { 15 | 16 | void startLoading(); 17 | 18 | void loadFinish(List infoList); 19 | } 20 | 21 | interface ListAppPresenter extends BasePresenter { 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/ListAppPresenterImpl.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | 6 | import java.io.File; 7 | 8 | import io.virtualapp.VCommends; 9 | import io.virtualapp.home.repo.AppDataSource; 10 | import io.virtualapp.home.models.PackageAppData; 11 | import io.virtualapp.home.repo.AppRepository; 12 | 13 | /** 14 | * @author Lody 15 | */ 16 | class ListAppPresenterImpl implements ListAppContract.ListAppPresenter { 17 | 18 | private Activity mActivity; 19 | private ListAppContract.ListAppView mView; 20 | private AppDataSource mRepository; 21 | 22 | private File from; 23 | 24 | ListAppPresenterImpl(Activity activity, ListAppContract.ListAppView view, File fromWhere) { 25 | mActivity = activity; 26 | mView = view; 27 | mRepository = new AppRepository(activity); 28 | mView.setPresenter(this); 29 | this.from = fromWhere; 30 | } 31 | 32 | @Override 33 | public void start() { 34 | mView.setPresenter(this); 35 | mView.startLoading(); 36 | if (from == null) 37 | mRepository.getInstalledApps(mActivity).done(mView::loadFinish); 38 | else 39 | mRepository.getStorageApps(mActivity, from).done(mView::loadFinish); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/adapters/decorations/ItemOffsetDecoration.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.adapters.decorations; 2 | 3 | import android.content.Context; 4 | import android.graphics.Rect; 5 | import android.support.annotation.DimenRes; 6 | import android.support.annotation.NonNull; 7 | import android.support.v7.widget.RecyclerView; 8 | import android.view.View; 9 | 10 | public class ItemOffsetDecoration extends RecyclerView.ItemDecoration { 11 | 12 | private int mItemOffset; 13 | 14 | public ItemOffsetDecoration(int itemOffset) { 15 | mItemOffset = itemOffset; 16 | } 17 | 18 | public ItemOffsetDecoration(@NonNull Context context, @DimenRes int itemOffsetId) { 19 | this(context.getResources().getDimensionPixelSize(itemOffsetId)); 20 | } 21 | 22 | @Override 23 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, 24 | RecyclerView.State state) { 25 | outRect.set(mItemOffset, mItemOffset, mItemOffset, mItemOffset); 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/models/AppData.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.models; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public interface AppData { 10 | 11 | boolean isLoading(); 12 | 13 | boolean isFirstOpen(); 14 | 15 | Drawable getIcon(); 16 | 17 | String getName(); 18 | 19 | boolean canReorder(); 20 | 21 | boolean canLaunch(); 22 | 23 | boolean canDelete(); 24 | 25 | boolean canCreateShortcut(); 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/models/AppInfo.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.models; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class AppInfo { 10 | public String packageName; 11 | public String path; 12 | public boolean fastOpen; 13 | public Drawable icon; 14 | public CharSequence name; 15 | public int cloneCount; 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/models/EmptyAppData.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.models; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class EmptyAppData implements AppData { 10 | 11 | @Override 12 | public boolean isLoading() { 13 | return false; 14 | } 15 | 16 | @Override 17 | public boolean isFirstOpen() { 18 | return false; 19 | } 20 | 21 | @Override 22 | public Drawable getIcon() { 23 | return null; 24 | } 25 | 26 | @Override 27 | public String getName() { 28 | return null; 29 | } 30 | 31 | @Override 32 | public boolean canReorder() { 33 | return false; 34 | } 35 | 36 | @Override 37 | public boolean canLaunch() { 38 | return false; 39 | } 40 | 41 | @Override 42 | public boolean canDelete() { 43 | return false; 44 | } 45 | 46 | @Override 47 | public boolean canCreateShortcut() { 48 | return false; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/platform/PlatformInfo.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.platform; 2 | 3 | import android.content.pm.PackageInfo; 4 | 5 | import java.util.Collections; 6 | import java.util.HashSet; 7 | import java.util.Set; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | public abstract class PlatformInfo { 13 | 14 | private final Set platformPkgs = new HashSet<>(); 15 | 16 | public PlatformInfo(String... pkgs) { 17 | Collections.addAll(platformPkgs, pkgs); 18 | } 19 | 20 | public abstract boolean relyOnPlatform(PackageInfo info); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/platform/WechatPlatformInfo.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.platform; 2 | 3 | import android.content.pm.ActivityInfo; 4 | import android.content.pm.PackageInfo; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | 10 | public class WechatPlatformInfo extends PlatformInfo { 11 | 12 | public WechatPlatformInfo() { 13 | super("com.tencent.mm"); 14 | } 15 | 16 | @Override 17 | public boolean relyOnPlatform(PackageInfo info) { 18 | if (info.activities == null) { 19 | return false; 20 | } 21 | for (ActivityInfo activityInfo : info.activities) { 22 | if (activityInfo.name.endsWith("WXEntryActivity")) { 23 | return true; 24 | } 25 | } 26 | return false; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/home/repo/AppDataSource.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.home.repo; 2 | 3 | import android.content.Context; 4 | 5 | import com.lody.virtual.remote.InstallResult; 6 | 7 | import org.jdeferred.Promise; 8 | 9 | import java.io.File; 10 | import java.util.List; 11 | 12 | import io.virtualapp.home.models.AppData; 13 | import io.virtualapp.home.models.AppInfo; 14 | import io.virtualapp.home.models.AppInfoLite; 15 | 16 | /** 17 | * @author Lody 18 | * @version 1.0 19 | */ 20 | public interface AppDataSource { 21 | 22 | /** 23 | * @return All the Applications we Virtual. 24 | */ 25 | Promise, Throwable, Void> getVirtualApps(); 26 | 27 | /** 28 | * @param context Context 29 | * @return All the Applications we Installed. 30 | */ 31 | Promise, Throwable, Void> getInstalledApps(Context context); 32 | 33 | Promise, Throwable, Void> getStorageApps(Context context, File rootDir); 34 | 35 | InstallResult addVirtualApp(AppInfoLite info); 36 | 37 | boolean removeVirtualApp(String packageName, int userId); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/vs/VSManagerActivity.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.vs; 2 | 3 | import io.virtualapp.abs.ui.VActivity; 4 | 5 | /** 6 | * @author Lody 7 | * 8 | * 9 | * 10 | */ 11 | public class VSManagerActivity extends VActivity { 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/widgets/MarqueeTextView.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.widgets; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.support.v7.widget.AppCompatTextView; 6 | import android.util.AttributeSet; 7 | 8 | public class MarqueeTextView extends AppCompatTextView { 9 | 10 | private boolean isStop = false; 11 | 12 | public MarqueeTextView(Context context) { 13 | super(context); 14 | } 15 | 16 | public MarqueeTextView(Context context, AttributeSet attrs) { 17 | super(context, attrs); 18 | } 19 | 20 | public MarqueeTextView(Context context, AttributeSet attrs, int defStyleAttr) { 21 | super(context, attrs, defStyleAttr); 22 | } 23 | 24 | public boolean isFocused() { 25 | if (this.isStop) { 26 | return super.isFocused(); 27 | } 28 | return true; 29 | } 30 | 31 | public void stopScroll() { 32 | this.isStop = true; 33 | } 34 | 35 | public void start() { 36 | this.isStop = false; 37 | } 38 | 39 | protected void onDetachedFromWindow() { 40 | stopScroll(); 41 | super.onDetachedFromWindow(); 42 | } 43 | } -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/widgets/ShimmerViewBase.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.widgets; 2 | 3 | public interface ShimmerViewBase { 4 | 5 | float getGradientX(); 6 | 7 | void setGradientX(float gradientX); 8 | 9 | boolean isShimmering(); 10 | 11 | void setShimmering(boolean isShimmering); 12 | 13 | boolean isSetUp(); 14 | 15 | void setAnimationSetupCallback(ShimmerViewHelper.AnimationSetupCallback callback); 16 | 17 | int getPrimaryColor(); 18 | 19 | void setPrimaryColor(int primaryColor); 20 | 21 | int getReflectionColor(); 22 | 23 | void setReflectionColor(int reflectionColor); 24 | } -------------------------------------------------------------------------------- /app/src/main/java/io/virtualapp/widgets/ViewHelper.java: -------------------------------------------------------------------------------- 1 | package io.virtualapp.widgets; 2 | 3 | import io.virtualapp.VApp; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | public class ViewHelper { 9 | 10 | public static int dip2px(float dpValue) { 11 | final float scale = VApp.getApp().getResources().getDisplayMetrics().density; 12 | return (int) (dpValue * scale + 0.5f); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-hdpi/ic_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-hdpi/ic_check.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_crash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-hdpi/ic_crash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-hdpi/ic_menu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_no_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-hdpi/ic_no_check.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-hdpi/ic_shortcut.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/drawable-xxhdpi/ic_user.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/blue_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/home_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icon_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/sel_clone_app_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/sel_guide_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 10 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_clone_app_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_clone_app_btn_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_clone_app.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_install.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 17 | 18 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_users.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_app.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 16 | 17 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_user.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/menu/user_menu.xml: -------------------------------------------------------------------------------- 1 | 2 |

4 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 7 | 60dp 8 | 5dp 9 | 30dp 10 | 8dp 11 | 10dp 12 | 80dp 13 | 5dp 14 | 16dp 15 | 24dp 16 | 17 | 18 | 0.5dp 19 | 60dp 20 | 21 | 56dp 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -2 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | VirtualHook 3 | Welcome to VirtualHook 4 | Enter new world 5 | Please wait… 6 | Desktop 7 | Add App 8 | Opening the app… 9 | Delete 10 | Create shortcut 11 | Install your app to the SandBox 12 | 13 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.3.2' 9 | classpath 'me.tatarka:gradle-retrolambda:3.6.0' 10 | classpath 'com.android.tools.build:gradle-experimental:0.8.0' 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | maven { 20 | url "https://jitpack.io" 21 | } 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /examples/VirtualPhone/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/VirtualPhone/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | VirtualPhone 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/VirtualPhone/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /examples/VirtualPhone/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/VirtualPhone/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/VirtualPhone/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | -------------------------------------------------------------------------------- /examples/VirtualPhone/src/io/virtualhook/PostHook.java: -------------------------------------------------------------------------------- 1 | package io.virtualhook; 2 | 3 | import android.app.Application; 4 | import apk.andhook.AndHook; 5 | 6 | public class PostHook { 7 | 8 | public static void Init(ClassLoader patchClassLoader, Application app, 9 | String processName) { 10 | LogUtil.i("Begin " + processName); 11 | 12 | LogUtil.i("End " + processName); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | android.useDeprecatedNdk=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Jan 15 17:29:32 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | .externalNativeBuild/ 3 | obj/ 4 | -------------------------------------------------------------------------------- /lib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.3" 6 | defaultConfig { 7 | minSdkVersion 19 8 | targetSdkVersion 25 9 | versionCode 1 10 | versionName "1.0" 11 | externalNativeBuild { 12 | ndkBuild { 13 | abiFilters "armeabi-v7a" 14 | } 15 | } 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | externalNativeBuild { 24 | ndkBuild { 25 | path file("src/main/jni/Android.mk") 26 | } 27 | } 28 | lintOptions { 29 | checkReleaseBuilds false 30 | // Or, if you prefer, you can continue to check for errors in release builds, 31 | // but continue the build even when errors are found: 32 | abortOnError false 33 | } 34 | productFlavors { 35 | } 36 | } 37 | 38 | 39 | dependencies { 40 | compile fileTree(include: ['*.jar'], dir: 'libs') 41 | } 42 | -------------------------------------------------------------------------------- /lib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lody/Desktop/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/accounts/IAccountAuthenticatorResponse.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package android.accounts; 18 | import android.os.Bundle; 19 | 20 | /** 21 | * The interface used to return responses from an {@link IAccountAuthenticator} 22 | */ 23 | interface IAccountAuthenticatorResponse { 24 | void onResult(in Bundle value); 25 | void onRequestContinued(); 26 | void onError(int errorCode, String errorMessage); 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/accounts/IAccountManagerResponse.aidl: -------------------------------------------------------------------------------- 1 | package android.accounts; 2 | 3 | import android.os.Bundle; 4 | 5 | /** 6 | * The interface used to return responses for asynchronous calls to the {@link IAccountManager} 7 | */ 8 | interface IAccountManagerResponse { 9 | void onResult(in Bundle value); 10 | void onError(int errorCode, String errorMessage); 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/app/IActivityManager/ContentProviderHolder.aidl: -------------------------------------------------------------------------------- 1 | // ContentProviderHolder.aidl 2 | package android.app.IActivityManager; 3 | 4 | parcelable ContentProviderHolder; -------------------------------------------------------------------------------- /lib/src/main/aidl/android/app/IServiceConnection.aidl: -------------------------------------------------------------------------------- 1 | /* //device/java/android/android/app/IServiceConnection.aidl 2 | ** 3 | ** Copyright 2007, The Android Open Source Project 4 | ** 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); 6 | ** you may not use this file except in compliance with the License. 7 | ** You may obtain a copy of the License at 8 | ** 9 | ** http://www.apache.org/licenses/LICENSE-2.0 10 | ** 11 | ** Unless required by applicable law or agreed to in writing, software 12 | ** distributed under the License is distributed on an "AS IS" BASIS, 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ** See the License for the specific language governing permissions and 15 | ** limitations under the License. 16 | */ 17 | 18 | package android.app; 19 | 20 | import android.content.ComponentName; 21 | 22 | /** @hide */ 23 | interface IServiceConnection { 24 | void connected(in ComponentName name, IBinder service); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/app/IStopUserCallback.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2012, The Android Open Source Project 3 | ** 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); 5 | ** you may not use this file except in compliance with the License. 6 | ** You may obtain a copy of the License at 7 | ** 8 | ** http://www.apache.org/licenses/LICENSE-2.0 9 | ** 10 | ** Unless required by applicable law or agreed to in writing, software 11 | ** distributed under the License is distributed on an "AS IS" BASIS, 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ** See the License for the specific language governing permissions and 14 | ** limitations under the License. 15 | */ 16 | 17 | package android.app; 18 | 19 | /** 20 | * Callback to find out when we have finished stopping a user. 21 | * {@hide} 22 | */ 23 | interface IStopUserCallback 24 | { 25 | void userStopped(int userId); 26 | void userStopAborted(int userId); 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/app/job/IJobService.aidl: -------------------------------------------------------------------------------- 1 | package android.app.job; 2 | 3 | import android.app.job.JobParameters; 4 | 5 | /** 6 | * Interface that the framework uses to communicate with application code that implements a 7 | * JobService. End user code does not implement this interface directly; instead, the app's 8 | * service implementation will extend android.app.job.JobService. 9 | */ 10 | interface IJobService { 11 | /** Begin execution of application's job. */ 12 | void startJob(in JobParameters jobParams); 13 | /** Stop execution of application's job. */ 14 | void stopJob(in JobParameters jobParams); 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/content/pm/IPackageDataObserver.aidl: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | /** 4 | * API for package data change related callbacks from the Package Manager. 5 | * Some usage scenarios include deletion of cache directory, generate 6 | * statistics related to code, data, cache usage(TODO) 7 | */ 8 | interface IPackageDataObserver { 9 | void onRemoveCompleted(in String packageName, boolean succeeded); 10 | } 11 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/content/pm/IPackageDeleteObserver2.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package android.content.pm; 18 | 19 | import android.content.Intent; 20 | 21 | interface IPackageDeleteObserver2 { 22 | void onUserActionRequired(in Intent intent); 23 | void onPackageDeleted(String packageName, int returnCode, String msg); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/content/pm/IPackageInstallObserver.aidl: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | /** 4 | * API for installation callbacks from the Package Manager. 5 | */ 6 | interface IPackageInstallObserver { 7 | void packageInstalled(in String packageName, int returnCode); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/content/pm/IPackageInstallerCallback.aidl: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | interface IPackageInstallerCallback { 4 | void onSessionCreated(int sessionId); 5 | void onSessionBadgingChanged(int sessionId); 6 | void onSessionActiveChanged(int sessionId, boolean active); 7 | void onSessionProgressChanged(int sessionId, float progress); 8 | void onSessionFinished(int sessionId, boolean success); 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/content/pm/IPackageInstallerSession.aidl: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.content.pm.IPackageInstallObserver2; 4 | import android.content.IntentSender; 5 | import android.os.ParcelFileDescriptor; 6 | 7 | interface IPackageInstallerSession { 8 | void setClientProgress(float progress); 9 | void addClientProgress(float progress); 10 | 11 | String[] getNames(); 12 | ParcelFileDescriptor openWrite(String name, long offsetBytes, long lengthBytes); 13 | ParcelFileDescriptor openRead(String name); 14 | 15 | void removeSplit(String splitName); 16 | 17 | void close(); 18 | void commit(in IntentSender statusReceiver); 19 | void abandon(); 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/main/aidl/android/net/wifi/IWifiScanner.aidl: -------------------------------------------------------------------------------- 1 | package android.net.wifi; 2 | 3 | import android.os.Messenger; 4 | import android.os.Bundle; 5 | 6 | interface IWifiScanner 7 | { 8 | Messenger getMessenger(); 9 | 10 | Bundle getAvailableChannels(int band); 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/client/IVClient.aidl: -------------------------------------------------------------------------------- 1 | // IVClient.aidl 2 | package com.lody.virtual.client; 3 | 4 | import android.content.pm.ActivityInfo; 5 | import android.content.pm.ApplicationInfo; 6 | import android.content.pm.ProviderInfo; 7 | 8 | import com.lody.virtual.remote.PendingResultData; 9 | 10 | interface IVClient { 11 | void scheduleReceiver(in String processName,in ComponentName component, in Intent intent, in PendingResultData resultData); 12 | void scheduleNewIntent(in String creator, in IBinder token, in Intent intent); 13 | void finishActivity(in IBinder token); 14 | IBinder createProxyService(in ComponentName component, in IBinder binder); 15 | IBinder acquireProviderClient(in ProviderInfo info); 16 | IBinder getAppThread(); 17 | IBinder getToken(); 18 | String getDebugInfo(); 19 | } -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/os/VUserInfo.aidl: -------------------------------------------------------------------------------- 1 | // VUserInfo.aidl 2 | package com.lody.virtual.os; 3 | 4 | parcelable VUserInfo; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/AppTaskInfo.aidl: -------------------------------------------------------------------------------- 1 | // AppTaskInfo.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable AppTaskInfo; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/InstallResult.aidl: -------------------------------------------------------------------------------- 1 | // InstallResult.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable InstallResult; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/InstalledAppInfo.aidl: -------------------------------------------------------------------------------- 1 | // AppSetting.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable InstalledAppInfo; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/PendingIntentData.aidl: -------------------------------------------------------------------------------- 1 | // PendingIntentData.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable PendingIntentData; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/PendingResultData.aidl: -------------------------------------------------------------------------------- 1 | // PendingResultData.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable PendingResultData; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/Problem.aidl: -------------------------------------------------------------------------------- 1 | // Problem.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable Problem; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/ReceiverInfo.aidl: -------------------------------------------------------------------------------- 1 | // ReceiverInfo.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable ReceiverInfo; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/remote/VParceledListSlice.aidl: -------------------------------------------------------------------------------- 1 | // VParceledListSlice.aidl 2 | package com.lody.virtual.remote; 3 | 4 | parcelable VParceledListSlice; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/IBinderDelegateService.aidl: -------------------------------------------------------------------------------- 1 | // IBinderDelegateService.aidl 2 | package com.lody.virtual.server; 3 | 4 | import android.content.ComponentName; 5 | 6 | interface IBinderDelegateService { 7 | 8 | ComponentName getComponent(); 9 | 10 | IBinder getService(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/IJobScheduler.aidl: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server; 2 | 3 | import android.app.job.JobInfo; 4 | 5 | /** 6 | * IPC interface that supports the app-facing {@link #JobScheduler} api. 7 | */ 8 | interface IJobScheduler { 9 | int schedule(in JobInfo job); 10 | void cancel(int jobId); 11 | void cancelAll(); 12 | List getAllPendingJobs(); 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/INotificationManager.aidl: -------------------------------------------------------------------------------- 1 | // INotificationManager.aidl 2 | package com.lody.virtual.server; 3 | 4 | // Declare any non-default types here with import statements 5 | import android.app.Notification; 6 | 7 | interface INotificationManager { 8 | int dealNotificationId(int id, String packageName, String tag, int userId); 9 | String dealNotificationTag(int id, String packageName, String tag, int userId); 10 | boolean areNotificationsEnabledForPackage(String packageName, int userId); 11 | void setNotificationsEnabledForPackage(String packageName, boolean enable, int userId); 12 | void addNotification(int id, String tag, String packageName, int userId); 13 | void cancelAllNotification(String packageName, int userId); 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/IPackageInstallerSession.aidl: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server; 2 | 3 | import android.content.IntentSender; 4 | import android.os.ParcelFileDescriptor; 5 | 6 | interface IPackageInstallerSession { 7 | void setClientProgress(float progress); 8 | void addClientProgress(float progress); 9 | 10 | String[] getNames(); 11 | ParcelFileDescriptor openWrite(String name, long offsetBytes, long lengthBytes); 12 | ParcelFileDescriptor openRead(String name); 13 | void close(); 14 | void commit(in IntentSender statusReceiver); 15 | void abandon(); 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/IUserManager.aidl: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server; 2 | 3 | import android.os.ParcelFileDescriptor; 4 | import com.lody.virtual.os.VUserInfo; 5 | import android.graphics.Bitmap; 6 | 7 | /** 8 | * 9 | */ 10 | interface IUserManager { 11 | VUserInfo createUser(in String name, int flags); 12 | boolean removeUser(int userHandle); 13 | void setUserName(int userHandle, String name); 14 | void setUserIcon(int userHandle, in Bitmap icon); 15 | Bitmap getUserIcon(int userHandle); 16 | List getUsers(boolean excludeDying); 17 | VUserInfo getUserInfo(int userHandle); 18 | void setGuestEnabled(boolean enable); 19 | boolean isGuestEnabled(); 20 | void wipeUser(int userHandle); 21 | int getUserSerialNumber(int userHandle); 22 | int getUserHandle(int userSerialNumber); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/IVirtualStorageService.aidl: -------------------------------------------------------------------------------- 1 | // IVirtualStorageService.aidl 2 | package com.lody.virtual.server; 3 | 4 | 5 | interface IVirtualStorageService { 6 | 7 | void setVirtualStorage(in String packageName, in int userId, in String vsPath); 8 | 9 | String getVirtualStorage(in String packageName, in int userId); 10 | 11 | void setVirtualStorageState(in String packageName, in int userId, in boolean enable); 12 | 13 | boolean isVirtualStorageEnable(in String packageName, in int userId); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/interfaces/IAppRequestListener.aidl: -------------------------------------------------------------------------------- 1 | // IAppRequestListener.aidl 2 | package com.lody.virtual.server.interfaces; 3 | 4 | interface IAppRequestListener { 5 | void onRequestInstall(in String path); 6 | void onRequestUninstall(in String pkg); 7 | } 8 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/interfaces/IIntentFilterObserver.aidl: -------------------------------------------------------------------------------- 1 | // IIntentFilterObserver.aidl 2 | package com.lody.virtual.server.interfaces; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface IIntentFilterObserver { 7 | /** 8 | * Demonstrates some basic types that you can use as parameters 9 | * and return values in AIDL. 10 | */ 11 | 12 | Intent filter(in Intent intent); 13 | void setCallBack(IBinder callBack); 14 | IBinder getCallBack(); 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/interfaces/IPackageObserver.aidl: -------------------------------------------------------------------------------- 1 | // IPackageObserver.aidl 2 | package com.lody.virtual.server.interfaces; 3 | 4 | interface IPackageObserver { 5 | void onPackageInstalled(in String packageName); 6 | void onPackageUninstalled(in String packageName); 7 | void onPackageInstalledAsUser(in int userId, in String packageName); 8 | void onPackageUninstalledAsUser(in int userId, in String packageName); 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/interfaces/IProcessObserver.aidl: -------------------------------------------------------------------------------- 1 | // IProcessObserver.aidl 2 | package com.lody.virtual.server.interfaces; 3 | 4 | interface IProcessObserver { 5 | void onProcessCreated(in String pkg, in String processName); 6 | 7 | void onProcessDied(in String pkg, in String processName); 8 | } 9 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/interfaces/IServiceFetcher.aidl: -------------------------------------------------------------------------------- 1 | // IServiceFetcher.aidl 2 | package com.lody.virtual.server.interfaces; 3 | 4 | interface IServiceFetcher { 5 | IBinder getService(String name); 6 | void addService(String name,in IBinder service); 7 | void removeService(String name); 8 | } -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/interfaces/IUiCallback.aidl: -------------------------------------------------------------------------------- 1 | // IUiCallback.aidl 2 | package com.lody.virtual.server.interfaces; 3 | 4 | interface IUiCallback { 5 | void onAppOpened(in String packageName, in int userId); 6 | } 7 | -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/pm/installer/SessionInfo.aidl: -------------------------------------------------------------------------------- 1 | // SessionInfo.aidl 2 | package com.lody.virtual.server.pm.installer; 3 | 4 | parcelable SessionInfo; -------------------------------------------------------------------------------- /lib/src/main/aidl/com/lody/virtual/server/pm/installer/SessionParams.aidl: -------------------------------------------------------------------------------- 1 | // SessionParams.aidl 2 | package com.lody.virtual.server.pm.installer; 3 | 4 | parcelable SessionParams; -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/Build.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual; 2 | 3 | /** 4 | * 5 | * Version info of VirtualApp project. 6 | * 7 | * @author Lody 8 | * 9 | */ 10 | 11 | public class Build { 12 | 13 | public static final String VERSION_NAME = "Build-822-03"; 14 | 15 | public static final int VERSION_CODE = 8220003; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/core/CrashHandler.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.core; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public interface CrashHandler { 8 | 9 | void handleUncaughtException(Thread t, Throwable e); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/core/InstallStrategy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.core; 2 | 3 | /** 4 | * @author Lody 5 | * 6 | * 7 | */ 8 | public interface InstallStrategy { 9 | int TERMINATE_IF_EXIST = 0x01 << 1; 10 | int UPDATE_IF_EXIST = 0x01 << 2; 11 | int COMPARE_VERSION = 0X01 << 3; 12 | int IGNORE_NEW_VERSION = 0x01 << 4; 13 | int DEPEND_SYSTEM_IF_EXIST = 0x01 << 5; 14 | int ART_FLY_MODE = 0x01 << 6; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/env/DeadServerException.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.env; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public class DeadServerException extends RuntimeException { 8 | 9 | public DeadServerException() { 10 | } 11 | 12 | public DeadServerException(String message) { 13 | super(message); 14 | } 15 | 16 | public DeadServerException(String message, Throwable cause) { 17 | super(message, cause); 18 | } 19 | 20 | public DeadServerException(Throwable cause) { 21 | super(cause); 22 | } 23 | 24 | public DeadServerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 25 | super(message, cause, enableSuppression, writableStackTrace); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/fixer/ComponentFixer.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.fixer; 2 | 3 | import android.content.pm.ComponentInfo; 4 | import android.text.TextUtils; 5 | 6 | import com.lody.virtual.server.pm.PackageSetting; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | public class ComponentFixer { 13 | 14 | public static String fixComponentClassName(String pkgName, String className) { 15 | if (className != null) { 16 | if (className.charAt(0) == '.') { 17 | return pkgName + className; 18 | } 19 | return className; 20 | } 21 | return null; 22 | } 23 | 24 | public static void fixComponentInfo(PackageSetting setting, ComponentInfo info, int userId) { 25 | if (info != null) { 26 | if (TextUtils.isEmpty(info.processName)) { 27 | info.processName = info.packageName; 28 | } 29 | info.name = fixComponentClassName(info.packageName, info.name); 30 | if (info.processName == null) { 31 | info.processName = info.applicationInfo.processName; 32 | } 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/Inject.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * @author Lody 10 | * 11 | */ 12 | @Target(ElementType.TYPE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface Inject { 15 | Class value(); 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceCallingPkgMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import com.lody.virtual.client.hook.utils.MethodParameterUtils; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class ReplaceCallingPkgMethodProxy extends StaticMethodProxy { 12 | 13 | public ReplaceCallingPkgMethodProxy(String name) { 14 | super(name); 15 | } 16 | 17 | @Override 18 | public boolean beforeCall(Object who, Method method, Object... args) { 19 | MethodParameterUtils.replaceFirstAppPkg(args); 20 | return super.beforeCall(who, method, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceLastPkgMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import com.lody.virtual.client.hook.utils.MethodParameterUtils; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class ReplaceLastPkgMethodProxy extends StaticMethodProxy { 12 | 13 | public ReplaceLastPkgMethodProxy(String name) { 14 | super(name); 15 | } 16 | 17 | @Override 18 | public boolean beforeCall(Object who, Method method, Object... args) { 19 | MethodParameterUtils.replaceLastAppPkg(args); 20 | return super.beforeCall(who, method, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceLastUidMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import android.os.Process; 4 | 5 | import com.lody.virtual.helper.utils.ArrayUtils; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | public class ReplaceLastUidMethodProxy extends StaticMethodProxy { 10 | 11 | public ReplaceLastUidMethodProxy(String name) { 12 | super(name); 13 | } 14 | 15 | @Override 16 | public boolean beforeCall(Object who, Method method, Object... args) { 17 | int index = ArrayUtils.indexOfLast(args, Integer.class); 18 | if (index != -1) { 19 | int uid = (int) args[index]; 20 | if (uid == Process.myUid()) { 21 | args[index] = getRealUid(); 22 | } 23 | } 24 | return super.beforeCall(who, method, args); 25 | } 26 | } -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceSequencePkgMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | import com.lody.virtual.client.hook.utils.MethodParameterUtils; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class ReplaceSequencePkgMethodProxy extends StaticMethodProxy { 12 | 13 | private int sequence; 14 | 15 | public ReplaceSequencePkgMethodProxy(String name, int sequence) { 16 | super(name); 17 | this.sequence = sequence; 18 | } 19 | 20 | @Override 21 | public boolean beforeCall(Object who, Method method, Object... args) { 22 | MethodParameterUtils.replaceSequenceAppPkg(args, sequence); 23 | return super.beforeCall(who, method, args); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceSpecPkgMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class ReplaceSpecPkgMethodProxy extends StaticMethodProxy { 10 | 11 | private int index; 12 | 13 | public ReplaceSpecPkgMethodProxy(String name, int index) { 14 | super(name); 15 | this.index = index; 16 | } 17 | 18 | @Override 19 | public boolean beforeCall(Object who, Method method, Object... args) { 20 | if (args != null) { 21 | int i = index; 22 | if (i < 0) { 23 | i += args.length; 24 | } 25 | if (i >= 0 && i < args.length && args[i] instanceof String) { 26 | args[i] = getHostPkg(); 27 | } 28 | } 29 | return super.beforeCall(who, method, args); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceUidMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | public class ReplaceUidMethodProxy extends StaticMethodProxy { 6 | 7 | private final int index; 8 | public ReplaceUidMethodProxy(String name, int index) { 9 | super(name); 10 | this.index = index; 11 | } 12 | 13 | @Override 14 | public boolean beforeCall(Object who, Method method, Object... args) { 15 | int uid = (int) args[index]; 16 | if (uid == getVUid() || uid == getBaseVUid()) { 17 | args[index] = getRealUid(); 18 | } 19 | return super.beforeCall(who, method, args); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/ResultStaticMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.reflect.Method; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class ResultStaticMethodProxy extends StaticMethodProxy { 10 | 11 | Object mResult; 12 | 13 | public ResultStaticMethodProxy(String name, Object result) { 14 | super(name); 15 | mResult = result; 16 | } 17 | 18 | public Object getResult() { 19 | return mResult; 20 | } 21 | 22 | @Override 23 | public Object call(Object who, Method method, Object... args) throws Throwable { 24 | return mResult; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/SkipInject.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * @author Lody 10 | * 11 | */ 12 | @Target(ElementType.TYPE) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface SkipInject { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/base/StaticMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.base; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public class StaticMethodProxy extends MethodProxy { 8 | 9 | private String mName; 10 | 11 | public StaticMethodProxy(String name) { 12 | this.mName = name; 13 | } 14 | 15 | @Override 16 | public String getMethodName() { 17 | return mName; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/delegate/PhoneInfoDelegate.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.delegate; 2 | 3 | public interface PhoneInfoDelegate { 4 | 5 | /*** 6 | * Fake the Device ID. 7 | * 8 | * @param oldDeviceId old DeviceId 9 | * @param userId user 10 | */ 11 | String getDeviceId(String oldDeviceId, int userId); 12 | 13 | /*** 14 | * Fake the BluetoothAddress 15 | * 16 | * @param oldBluetoothAddress old BluetoothAddress 17 | * @param userId user 18 | */ 19 | String getBluetoothAddress(String oldBluetoothAddress, int userId); 20 | 21 | /*** 22 | * Fake the macAddress 23 | * 24 | * @param oldMacAddress old MacAddress 25 | * @param userId user 26 | */ 27 | String getMacAddress(String oldMacAddress, int userId); 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/delegate/TaskDescriptionDelegate.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.delegate; 2 | 3 | import android.annotation.TargetApi; 4 | import android.app.Activity; 5 | import android.app.ActivityManager; 6 | import android.os.Build; 7 | 8 | public interface TaskDescriptionDelegate { 9 | public ActivityManager.TaskDescription getTaskDescription(ActivityManager.TaskDescription oldTaskDescription); 10 | } 11 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/providers/DownloadProviderHook.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.providers; 2 | 3 | import android.net.Uri; 4 | 5 | import java.lang.reflect.InvocationTargetException; 6 | import java.lang.reflect.Method; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | class DownloadProviderHook extends ExternalProviderHook { 13 | 14 | DownloadProviderHook(Object base) { 15 | super(base); 16 | } 17 | 18 | @Override 19 | protected void processArgs(Method method, Object... args) { 20 | // empty 21 | } 22 | 23 | @Override 24 | public Uri insert(Method method, Object[] args) throws InvocationTargetException, IllegalAccessException { 25 | return super.insert(method, args); 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/providers/ExternalProviderHook.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.providers; 2 | 3 | import com.lody.virtual.client.core.VirtualCore; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class ExternalProviderHook extends ProviderHook { 12 | 13 | public ExternalProviderHook(Object base) { 14 | super(base); 15 | } 16 | 17 | @Override 18 | protected void processArgs(Method method, Object... args) { 19 | if (args != null && args.length > 0 && args[0] instanceof String) { 20 | String pkg = (String) args[0]; 21 | if (VirtualCore.get().isAppInstalled(pkg)) { 22 | args[0] = VirtualCore.get().getHostPkg(); 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/providers/InternalProviderHook.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.providers; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public class InternalProviderHook extends ProviderHook { 8 | 9 | public InternalProviderHook(Object base) { 10 | super(base); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/connectivity/ConnectivityStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.connectivity; 2 | 3 | import android.content.Context; 4 | 5 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 6 | import com.lody.virtual.client.hook.base.ReplaceLastPkgMethodProxy; 7 | 8 | import mirror.android.net.IConnectivityManager; 9 | 10 | /** 11 | * @author legency 12 | */ 13 | public class ConnectivityStub extends BinderInvocationProxy { 14 | 15 | public ConnectivityStub() { 16 | super(IConnectivityManager.Stub.asInterface, Context.CONNECTIVITY_SERVICE); 17 | } 18 | 19 | @Override 20 | protected void onBindMethods() { 21 | super.onBindMethods(); 22 | addMethodProxy(new ReplaceLastPkgMethodProxy("getActiveNetworkInfo")); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/content/ContentServiceStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.content; 2 | 3 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 4 | 5 | import mirror.android.content.IContentService; 6 | 7 | /** 8 | * @author Lody 9 | * 10 | * @see IContentService 11 | */ 12 | 13 | public class ContentServiceStub extends BinderInvocationProxy { 14 | 15 | public ContentServiceStub() { 16 | super(IContentService.Stub.asInterface, "content"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/context_hub/ContextHubServiceStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.context_hub; 2 | 3 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 4 | import com.lody.virtual.client.hook.base.ResultStaticMethodProxy; 5 | 6 | import mirror.android.hardware.location.IContextHubService; 7 | 8 | public class ContextHubServiceStub extends BinderInvocationProxy { 9 | 10 | public ContextHubServiceStub() { 11 | super(IContextHubService.Stub.asInterface, "contexthub_service"); 12 | } 13 | 14 | @Override 15 | protected void onBindMethods() { 16 | super.onBindMethods(); 17 | addMethodProxy(new ResultStaticMethodProxy("registerCallback", 0)); 18 | } 19 | } -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/dropbox/DropBoxManagerStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.dropbox; 2 | 3 | import android.content.Context; 4 | 5 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 6 | import com.lody.virtual.client.hook.base.ResultStaticMethodProxy; 7 | 8 | import mirror.com.android.internal.os.IDropBoxManagerService; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | public class DropBoxManagerStub extends BinderInvocationProxy { 14 | public DropBoxManagerStub() { 15 | super(IDropBoxManagerService.Stub.asInterface, Context.DROPBOX_SERVICE); 16 | } 17 | 18 | @Override 19 | protected void onBindMethods() { 20 | super.onBindMethods(); 21 | addMethodProxy(new ResultStaticMethodProxy("getNextEntry", null)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/graphics/GraphicsStatsStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.graphics; 2 | 3 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 4 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy; 5 | 6 | import mirror.android.view.IGraphicsStats; 7 | 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | public class GraphicsStatsStub extends BinderInvocationProxy { 13 | 14 | public GraphicsStatsStub() { 15 | super(IGraphicsStats.Stub.asInterface, "graphicsstats"); 16 | } 17 | 18 | @Override 19 | protected void onBindMethods() { 20 | super.onBindMethods(); 21 | addMethodProxy(new ReplaceCallingPkgMethodProxy("requestBufferForProcess")); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/media/router/MediaRouterServiceStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.media.router; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.os.Build; 6 | 7 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 8 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy; 9 | 10 | import mirror.android.media.IMediaRouterService; 11 | 12 | /** 13 | * @author Lody 14 | * @see android.media.MediaRouter 15 | */ 16 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN) 17 | public class MediaRouterServiceStub extends BinderInvocationProxy { 18 | 19 | public MediaRouterServiceStub() { 20 | super(IMediaRouterService.Stub.asInterface, Context.MEDIA_ROUTER_SERVICE); 21 | } 22 | 23 | @Override 24 | protected void onBindMethods() { 25 | super.onBindMethods(); 26 | addMethodProxy(new ReplaceCallingPkgMethodProxy("registerClientAsUser")); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/media/session/SessionManagerStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.media.session; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.os.Build; 6 | 7 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 8 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy; 9 | 10 | import mirror.android.media.session.ISessionManager; 11 | 12 | /** 13 | * @author Lody 14 | */ 15 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 16 | public class SessionManagerStub extends BinderInvocationProxy { 17 | 18 | public SessionManagerStub() { 19 | super(ISessionManager.Stub.asInterface, Context.MEDIA_SESSION_SERVICE); 20 | } 21 | 22 | @Override 23 | protected void onBindMethods() { 24 | super.onBindMethods(); 25 | addMethodProxy(new ReplaceCallingPkgMethodProxy("createSession")); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/mount/MountServiceStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.mount; 2 | 3 | import com.lody.virtual.client.hook.base.Inject; 4 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 5 | 6 | import mirror.android.os.mount.IMountService; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | @Inject(MethodProxies.class) 12 | public class MountServiceStub extends BinderInvocationProxy { 13 | 14 | public MountServiceStub() { 15 | super(IMountService.Stub.asInterface, "mount"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/network/NetworkManagementStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.network; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | 6 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 7 | import com.lody.virtual.client.hook.base.ReplaceUidMethodProxy; 8 | 9 | import mirror.android.os.INetworkManagementService; 10 | 11 | @TargetApi(Build.VERSION_CODES.M) 12 | public class 13 | NetworkManagementStub extends BinderInvocationProxy { 14 | 15 | public NetworkManagementStub() { 16 | super(INetworkManagementService.Stub.asInterface, "network_management"); 17 | } 18 | 19 | @Override 20 | protected void onBindMethods() { 21 | super.onBindMethods(); 22 | addMethodProxy(new ReplaceUidMethodProxy("setUidCleartextNetworkPolicy", 0)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/restriction/RestrictionStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.restriction; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.os.Build; 6 | 7 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 8 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy; 9 | 10 | import mirror.android.content.IRestrictionsManager; 11 | 12 | /** 13 | * @author Lody 14 | */ 15 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 16 | 17 | public class RestrictionStub extends BinderInvocationProxy { 18 | public RestrictionStub() { 19 | super(IRestrictionsManager.Stub.asInterface, Context.RESTRICTIONS_SERVICE); 20 | } 21 | 22 | @Override 23 | protected void onBindMethods() { 24 | super.onBindMethods(); 25 | addMethodProxy(new ReplaceCallingPkgMethodProxy("getApplicationRestrictions")); 26 | addMethodProxy(new ReplaceCallingPkgMethodProxy("notifyPermissionResponse")); 27 | addMethodProxy(new ReplaceCallingPkgMethodProxy("requestPermission")); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/telephony/MethodProxies.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.telephony; 2 | 3 | import com.lody.virtual.client.core.VirtualCore; 4 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy; 5 | 6 | import java.lang.reflect.Method; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | class MethodProxies { 13 | 14 | static class GetDeviceId extends ReplaceCallingPkgMethodProxy { 15 | 16 | public GetDeviceId() { 17 | super("getDeviceId"); 18 | } 19 | 20 | @Override 21 | public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable { 22 | if (VirtualCore.get().getPhoneInfoDelegate() != null) { 23 | String res = VirtualCore.get().getPhoneInfoDelegate().getDeviceId((String) result, getAppUserId()); 24 | if (res != null) { 25 | return res; 26 | } 27 | } 28 | return super.afterCall(who, method, args, result); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/telephony/TelephonyRegistryStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.telephony; 2 | 3 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 4 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy; 5 | import com.lody.virtual.client.hook.base.ReplaceSequencePkgMethodProxy; 6 | 7 | import mirror.com.android.internal.telephony.ITelephonyRegistry; 8 | 9 | public class TelephonyRegistryStub extends BinderInvocationProxy { 10 | 11 | public TelephonyRegistryStub() { 12 | super(ITelephonyRegistry.Stub.asInterface, "telephony.registry"); 13 | } 14 | 15 | @Override 16 | protected void onBindMethods() { 17 | super.onBindMethods(); 18 | addMethodProxy(new ReplaceCallingPkgMethodProxy("listen")); 19 | addMethodProxy(new ReplaceSequencePkgMethodProxy("listenForSubscriber", 1)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/wifi_scanner/GhostWifiScannerImpl.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.wifi_scanner; 2 | 3 | import android.net.wifi.IWifiScanner; 4 | import android.os.Bundle; 5 | import android.os.Handler; 6 | import android.os.Looper; 7 | import android.os.Messenger; 8 | import android.os.RemoteException; 9 | 10 | import java.util.ArrayList; 11 | 12 | import mirror.android.net.wifi.WifiScanner; 13 | 14 | /** 15 | * @author Lody 16 | */ 17 | 18 | public class GhostWifiScannerImpl extends IWifiScanner.Stub { 19 | 20 | private final Handler mHandler = new Handler(Looper.getMainLooper()); 21 | 22 | @Override 23 | public Messenger getMessenger() throws RemoteException { 24 | return new Messenger(mHandler); 25 | } 26 | 27 | @Override 28 | public Bundle getAvailableChannels(int band) throws RemoteException { 29 | Bundle bundle = new Bundle(); 30 | bundle.putIntegerArrayList(WifiScanner.GET_AVAILABLE_CHANNELS_EXTRA.get(), new ArrayList(0)); 31 | return bundle; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/wifi_scanner/WifiScannerStub.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.wifi_scanner; 2 | 3 | import com.lody.virtual.client.hook.base.BinderInvocationProxy; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class WifiScannerStub extends BinderInvocationProxy { 10 | 11 | public WifiScannerStub() { 12 | super(new GhostWifiScannerImpl(), "wifiscanner"); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/proxies/window/session/BaseMethodProxy.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.proxies.window.session; 2 | 3 | import android.view.WindowManager; 4 | 5 | import com.lody.virtual.client.hook.base.StaticMethodProxy; 6 | import com.lody.virtual.helper.utils.ArrayUtils; 7 | 8 | import java.lang.reflect.Method; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | /*package*/ class BaseMethodProxy extends StaticMethodProxy { 14 | 15 | public BaseMethodProxy(String name) { 16 | super(name); 17 | } 18 | 19 | @Override 20 | public Object call(Object who, Method method, Object... args) throws Throwable { 21 | int index = ArrayUtils.indexOfFirst(args, WindowManager.LayoutParams.class); 22 | if (index != -1) { 23 | WindowManager.LayoutParams attrs = (WindowManager.LayoutParams) args[index]; 24 | if (attrs != null) { 25 | attrs.packageName = getHostPkg(); 26 | } 27 | } 28 | return method.invoke(who, args); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/hook/secondary/HackAppUtils.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.hook.secondary; 2 | 3 | import com.lody.virtual.helper.utils.Reflect; 4 | import com.lody.virtual.helper.utils.ReflectException; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | 10 | public class HackAppUtils { 11 | 12 | /** 13 | * Enable the Log output of QQ. 14 | * 15 | * @param packageName package name 16 | * @param classLoader class loader 17 | */ 18 | public static void enableQQLogOutput(String packageName, ClassLoader classLoader) { 19 | if ("com.tencent.mobileqq".equals(packageName)) { 20 | try { 21 | Reflect.on("com.tencent.qphone.base.util.QLog", classLoader).set("UIN_REPORTLOG_LEVEL", 100); 22 | } catch (ReflectException e) { 23 | // ignore 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/interfaces/IInjector.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.interfaces; 2 | 3 | /** 4 | * @author Lody 5 | * 6 | * The Objects who implemention this interface will be able to inject other object. 7 | * 8 | */ 9 | public interface IInjector { 10 | 11 | /** 12 | * 13 | * Do injection. 14 | * 15 | * @throws Throwable if inject failed 16 | */ 17 | void inject() throws Throwable; 18 | 19 | /** 20 | * Check if the injection has bad. 21 | * 22 | * @return If the injection has bad 23 | */ 24 | boolean isEnvBad(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/ipc/ActivityClientRecord.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.ipc; 2 | 3 | import android.app.Activity; 4 | import android.content.pm.ActivityInfo; 5 | 6 | public class ActivityClientRecord { 7 | public Activity activity; 8 | public ActivityInfo info; 9 | } -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/stub/StubPendingActivity.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.stub; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | 7 | import com.lody.virtual.client.ipc.VActivityManager; 8 | import com.lody.virtual.remote.StubActivityRecord; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class StubPendingActivity extends Activity { 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | finish(); 20 | Intent intent = getIntent(); 21 | StubActivityRecord r = new StubActivityRecord(intent); 22 | if (r.intent == null) { 23 | return; 24 | } 25 | r.intent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); 26 | VActivityManager.get().startActivity(r.intent, r.userId); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/stub/StubPendingReceiver.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.stub; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import com.lody.virtual.helper.utils.ComponentUtils; 8 | import com.lody.virtual.os.VUserHandle; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class StubPendingReceiver extends BroadcastReceiver { 15 | 16 | @Override 17 | public void onReceive(Context context, Intent intent) { 18 | Intent realIntent = intent.getParcelableExtra("_VA_|_intent_"); 19 | int userId = intent.getIntExtra("_VA_|_user_id_", VUserHandle.USER_ALL); 20 | if (realIntent != null) { 21 | Intent newIntent = ComponentUtils.redirectBroadcastIntent(realIntent, userId); 22 | if (newIntent != null) { 23 | context.sendBroadcast(newIntent); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/client/stub/StubPendingService.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.client.stub; 2 | 3 | import com.lody.virtual.client.ipc.VActivityManager; 4 | 5 | import android.app.Service; 6 | import android.content.Intent; 7 | import android.os.IBinder; 8 | 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class StubPendingService extends Service { 15 | @Override 16 | public IBinder onBind(Intent intent) { 17 | return null; 18 | } 19 | 20 | @Override 21 | public int onStartCommand(Intent intent, int flags, int startId) { 22 | // _VA_|_from_inner_ marked 23 | if (intent != null) { 24 | Intent realIntent = intent.getParcelableExtra("_VA_|_intent_"); 25 | int userId = intent.getIntExtra("_VA_|_user_id_", 0); 26 | if (realIntent != null) { 27 | VActivityManager.get().startService(null, realIntent, null, userId); 28 | } 29 | } 30 | stopSelf(); 31 | return START_NOT_STICKY; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/ParcelHelper.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper; 2 | 3 | import android.os.Bundle; 4 | import android.os.Parcel; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class ParcelHelper { 14 | 15 | public static void writeMeta(Parcel p, Bundle meta) { 16 | Map map = new HashMap<>(); 17 | if (meta != null) { 18 | for (String key : meta.keySet()) { 19 | map.put(key, meta.getString(key)); 20 | } 21 | } 22 | p.writeMap(map); 23 | } 24 | 25 | public static Bundle readMeta(Parcel p) { 26 | Bundle meta = new Bundle(); 27 | //noinspection unchecked 28 | Map map = p.readHashMap(String.class.getClassLoader()); 29 | for (Map.Entry entry : map.entrySet()) { 30 | meta.putString(entry.getKey(), entry.getValue()); 31 | } 32 | return meta; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/compat/ApplicationThreadCompat.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.compat; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.android.app.ApplicationThreadNative; 7 | import mirror.android.app.IApplicationThreadOreo; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class ApplicationThreadCompat { 14 | 15 | public static IInterface asInterface(IBinder binder) { 16 | if (BuildCompat.isOreo()) { 17 | return IApplicationThreadOreo.Stub.asInterface.call(binder); 18 | } 19 | return ApplicationThreadNative.asInterface.call(binder); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/compat/BuildCompat.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.compat; 2 | 3 | import android.os.Build; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class BuildCompat { 10 | 11 | public static boolean isOreo() { 12 | 13 | return (Build.VERSION.SDK_INT == 25 && Build.VERSION.PREVIEW_SDK_INT > 0) 14 | || Build.VERSION.SDK_INT > 25; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/compat/BundleCompat.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.compat; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.os.IBinder; 6 | 7 | /** 8 | * @author Lody 9 | * 10 | */ 11 | public class BundleCompat { 12 | public static IBinder getBinder(Bundle bundle, String key) { 13 | if (Build.VERSION.SDK_INT >= 18) { 14 | return bundle.getBinder(key); 15 | } else { 16 | return mirror.android.os.Bundle.getIBinder.call(bundle, key); 17 | } 18 | } 19 | 20 | public static void putBinder(Bundle bundle, String key, IBinder value) { 21 | if (Build.VERSION.SDK_INT >= 18) { 22 | bundle.putBinder(key, value); 23 | } else { 24 | mirror.android.os.Bundle.putIBinder.call(bundle, key, value); 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/compat/ObjectsCompat.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.compat; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public class ObjectsCompat { 8 | 9 | /** 10 | * Null-safe equivalent of {@code a.equals(b)}. 11 | */ 12 | public static boolean equals(Object a, Object b) { 13 | return (a == null) ? (b == null) : a.equals(b); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/compat/ParceledListSliceCompat.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.compat; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.List; 5 | 6 | import mirror.android.content.pm.ParceledListSlice; 7 | import mirror.android.content.pm.ParceledListSliceJBMR2; 8 | 9 | /** 10 | * @author Lody 11 | * 12 | */ 13 | public class ParceledListSliceCompat { 14 | 15 | public static boolean isReturnParceledListSlice(Method method) { 16 | return method != null && method.getReturnType() == ParceledListSlice.TYPE; 17 | } 18 | 19 | public static Object create(List list) { 20 | if (ParceledListSliceJBMR2.ctor != null) { 21 | return ParceledListSliceJBMR2.ctor.newInstance(list); 22 | } else { 23 | Object slice = ParceledListSlice.ctor.newInstance(); 24 | for (Object item : list) { 25 | ParceledListSlice.append.call(slice, item); 26 | } 27 | ParceledListSlice.setLastSlice.call(slice, true); 28 | return slice; 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/utils/BitmapUtils.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.utils; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.Canvas; 5 | import android.graphics.PixelFormat; 6 | import android.graphics.drawable.BitmapDrawable; 7 | import android.graphics.drawable.Drawable; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | public class BitmapUtils { 13 | 14 | public static Bitmap drawableToBitmap(Drawable drawable) { 15 | if (drawable instanceof BitmapDrawable) { 16 | BitmapDrawable bitmapDrawable = ((BitmapDrawable) drawable); 17 | return bitmapDrawable.getBitmap(); 18 | } else { 19 | Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), 20 | drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565); 21 | 22 | Canvas canvas = new Canvas(bitmap); 23 | drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); 24 | drawable.draw(canvas); 25 | return bitmap; 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/utils/ClassUtils.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.utils; 2 | 3 | /** 4 | * @author Lody 5 | * 6 | */ 7 | public class ClassUtils { 8 | 9 | public static boolean isClassExist(String className) { 10 | try { 11 | Class.forName(className); 12 | return true; 13 | } catch (ClassNotFoundException e) { 14 | return false; 15 | } 16 | } 17 | 18 | public static void fixArgs(Class[] types, Object[] args) { 19 | for (int i = 0; i < types.length; i++) { 20 | if (types[i] == int.class && args[i] == null) { 21 | args[i] = 0; 22 | } else if (types[i] == boolean.class && args[i] == null) { 23 | args[i] = false; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/utils/DrawableUtils.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.utils; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.Canvas; 5 | import android.graphics.PixelFormat; 6 | import android.graphics.drawable.BitmapDrawable; 7 | import android.graphics.drawable.Drawable; 8 | 9 | public class DrawableUtils { 10 | public static Bitmap drawableToBitMap(Drawable drawable) { 11 | if (drawable == null) { 12 | return null; 13 | } 14 | if (drawable instanceof BitmapDrawable) { 15 | BitmapDrawable bitmapDrawable = ((BitmapDrawable) drawable); 16 | return bitmapDrawable.getBitmap(); 17 | } else { 18 | Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), 19 | drawable.getOpacity() != PixelFormat.OPAQUE ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565); 20 | Canvas canvas = new Canvas(bitmap); 21 | drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); 22 | drawable.draw(canvas); 23 | return bitmap; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/utils/Mark.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.utils; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | 9 | @Target(ElementType.METHOD) 10 | @Retention(RetentionPolicy.SOURCE) 11 | public @interface Mark { 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/utils/ReflectException.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.utils; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | public class ReflectException extends RuntimeException { 7 | 8 | public ReflectException(String message, Throwable cause) { 9 | super(message, cause); 10 | } 11 | 12 | public ReflectException(Throwable cause) { 13 | super(cause); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/helper/utils/Singleton.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.helper.utils; 2 | 3 | /** 4 | * Singleton helper class for lazily initialization. 5 | * 6 | * Modeled after frameworks/base/include/utils/Singleton.h 7 | * 8 | * @hide 9 | */ 10 | public abstract class Singleton { 11 | private T mInstance; 12 | 13 | protected abstract T create(); 14 | 15 | public final T get() { 16 | synchronized (this) { 17 | if (mInstance == null) { 18 | mInstance = create(); 19 | } 20 | return mInstance; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/os/VBinder.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.os; 2 | 3 | import android.os.Binder; 4 | 5 | import com.lody.virtual.client.ipc.VActivityManager; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class VBinder { 12 | 13 | public static int getCallingUid() { 14 | return VActivityManager.get().getUidByPid(Binder.getCallingPid()); 15 | } 16 | 17 | public static int getBaseCallingUid() { 18 | return VUserHandle.getAppId(getCallingUid()); 19 | } 20 | 21 | public static int getCallingPid() { 22 | return Binder.getCallingPid(); 23 | } 24 | 25 | public static VUserHandle getCallingUserHandle() { 26 | return new VUserHandle(VUserHandle.getUserId(getCallingUid())); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/remote/Problem.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.remote; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | /** 7 | * @author Lody 8 | * 9 | */ 10 | public class Problem implements Parcelable { 11 | public static final Creator CREATOR = new Creator() { 12 | public Problem createFromParcel(Parcel source) { 13 | return new Problem(source); 14 | } 15 | 16 | public Problem[] newArray(int size) { 17 | return new Problem[size]; 18 | } 19 | }; 20 | public Throwable e; 21 | 22 | public Problem(Throwable e) { 23 | this.e = e; 24 | } 25 | 26 | protected Problem(Parcel in) { 27 | this.e = (Throwable) in.readSerializable(); 28 | } 29 | 30 | @Override 31 | public int describeContents() { 32 | return 0; 33 | } 34 | 35 | @Override 36 | public void writeToParcel(Parcel dest, int flags) { 37 | dest.writeSerializable(this.e); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/server/ServiceCache.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server; 2 | 3 | import android.os.IBinder; 4 | 5 | import com.lody.virtual.helper.collection.ArrayMap; 6 | 7 | import java.util.Map; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class ServiceCache { 14 | 15 | private static final Map sCache = new ArrayMap<>(5); 16 | 17 | public static void addService(String name, IBinder service) { 18 | sCache.put(name, service); 19 | } 20 | 21 | public static IBinder removeService(String name) { 22 | return sCache.remove(name); 23 | } 24 | 25 | public static IBinder getService(String name) { 26 | return sCache.get(name); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/server/accounts/IAccountParser.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server.accounts; 2 | 3 | import android.content.Context; 4 | import android.content.pm.ApplicationInfo; 5 | import android.content.pm.ServiceInfo; 6 | import android.content.res.Resources; 7 | import android.content.res.XmlResourceParser; 8 | 9 | public interface IAccountParser { 10 | XmlResourceParser getParser(Context context, ServiceInfo serviceInfo, String name); 11 | Resources getResources(Context context, ApplicationInfo appInfo) throws Exception; 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/server/am/ActivityRecord.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server.am; 2 | 3 | import android.content.ComponentName; 4 | import android.os.IBinder; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | 10 | /* package */ class ActivityRecord { 11 | public TaskRecord task; 12 | public ComponentName component; 13 | public ComponentName caller; 14 | public IBinder token; 15 | public int userId; 16 | public ProcessRecord process; 17 | public int launchMode; 18 | public int flags; 19 | public boolean marked; 20 | public String affinity; 21 | 22 | public ActivityRecord(TaskRecord task, ComponentName component, ComponentName caller, IBinder token, int userId, ProcessRecord process, int launchMode, int flags, String affinity) { 23 | this.task = task; 24 | this.component = component; 25 | this.caller = caller; 26 | this.token = token; 27 | this.userId = userId; 28 | this.process = process; 29 | this.launchMode = launchMode; 30 | this.flags = flags; 31 | this.affinity = affinity; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/server/am/ProcessMap.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server.am; 2 | 3 | import com.lody.virtual.helper.collection.ArrayMap; 4 | import com.lody.virtual.helper.collection.SparseArray; 5 | 6 | class ProcessMap { 7 | private final ArrayMap> mMap = new ArrayMap<>(); 8 | 9 | public E get(String name, int uid) { 10 | SparseArray uids = mMap.get(name); 11 | if (uids == null) 12 | return null; 13 | return uids.get(uid); 14 | } 15 | 16 | public E put(String name, int uid, E value) { 17 | SparseArray uids = mMap.get(name); 18 | if (uids == null) { 19 | uids = new SparseArray(2); 20 | mMap.put(name, uids); 21 | } 22 | uids.put(uid, value); 23 | return value; 24 | } 25 | 26 | public E remove(String name, int uid) { 27 | SparseArray uids = mMap.get(name); 28 | if (uids != null) { 29 | final E old = uids.removeReturnOld(uid); 30 | if (uids.size() == 0) { 31 | mMap.remove(name); 32 | } 33 | return old; 34 | } 35 | return null; 36 | } 37 | 38 | public ArrayMap> getMap() { 39 | return mMap; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/src/main/java/com/lody/virtual/server/pm/installer/PackageInstallInfo.java: -------------------------------------------------------------------------------- 1 | package com.lody.virtual.server.pm.installer; 2 | 3 | /** 4 | * @author Lody 5 | */ 6 | 7 | public class PackageInstallInfo { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/MethodParams.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target({ElementType.FIELD}) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface MethodParams { 11 | Class[] value(); 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/MethodReflectParams.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target({ElementType.FIELD}) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface MethodReflectParams { 11 | String[] value(); 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefBoolean.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | public class RefBoolean { 6 | private Field field; 7 | 8 | public RefBoolean(Class cls, Field field) throws NoSuchFieldException { 9 | this.field = cls.getDeclaredField(field.getName()); 10 | this.field.setAccessible(true); 11 | } 12 | 13 | public boolean get(Object object) { 14 | try { 15 | return this.field.getBoolean(object); 16 | } catch (Exception e) { 17 | return false; 18 | } 19 | } 20 | 21 | public void set(Object obj, boolean value) { 22 | try { 23 | this.field.setBoolean(obj, value); 24 | } catch (Exception e) { 25 | //Ignore 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefDouble.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | public class RefDouble { 6 | private Field field; 7 | 8 | public RefDouble(Class cls, Field field) throws NoSuchFieldException { 9 | this.field = cls.getDeclaredField(field.getName()); 10 | this.field.setAccessible(true); 11 | } 12 | 13 | public double get(Object object) { 14 | try { 15 | return this.field.getDouble(object); 16 | } catch (Exception e) { 17 | return 0; 18 | } 19 | } 20 | 21 | public void set(Object obj, double value) { 22 | try { 23 | this.field.setDouble(obj, value); 24 | } catch (Exception e) { 25 | //Ignore 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefFloat.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | public class RefFloat { 6 | private Field field; 7 | 8 | public RefFloat(Class cls, Field field) throws NoSuchFieldException { 9 | this.field = cls.getDeclaredField(field.getName()); 10 | this.field.setAccessible(true); 11 | } 12 | 13 | public float get(Object object) { 14 | try { 15 | return this.field.getFloat(object); 16 | } catch (Exception e) { 17 | return 0; 18 | } 19 | } 20 | 21 | public void set(Object obj, float value) { 22 | try { 23 | this.field.setFloat(obj, value); 24 | } catch (Exception e) { 25 | //Ignore 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefInt.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | public class RefInt { 6 | private Field field; 7 | 8 | public RefInt(Class cls, Field field) throws NoSuchFieldException { 9 | this.field = cls.getDeclaredField(field.getName()); 10 | this.field.setAccessible(true); 11 | } 12 | 13 | public int get(Object object) { 14 | try { 15 | return this.field.getInt(object); 16 | } catch (Exception e) { 17 | return 0; 18 | } 19 | } 20 | 21 | public void set(Object obj, int intValue) { 22 | try { 23 | this.field.setInt(obj, intValue); 24 | } catch (Exception e) { 25 | //Ignore 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefLong.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | public class RefLong { 6 | private Field field; 7 | 8 | public RefLong(Class cls, Field field) throws NoSuchFieldException { 9 | this.field = cls.getDeclaredField(field.getName()); 10 | this.field.setAccessible(true); 11 | } 12 | 13 | public long get(Object object) { 14 | try { 15 | return this.field.getLong(object); 16 | } catch (Exception e) { 17 | return 0; 18 | } 19 | } 20 | 21 | public void set(Object obj, long value) { 22 | try { 23 | this.field.setLong(obj, value); 24 | } catch (Exception e) { 25 | //Ignore 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefObject.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | @SuppressWarnings("unchecked") 6 | public class RefObject { 7 | private Field field; 8 | 9 | public RefObject(Class cls, Field field) throws NoSuchFieldException { 10 | this.field = cls.getDeclaredField(field.getName()); 11 | this.field.setAccessible(true); 12 | } 13 | 14 | public T get(Object object) { 15 | try { 16 | return (T) this.field.get(object); 17 | } catch (Exception e) { 18 | return null; 19 | } 20 | } 21 | 22 | public void set(Object obj, T value) { 23 | try { 24 | this.field.set(obj, value); 25 | } catch (Exception e) { 26 | //Ignore 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefStaticInt.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | public class RefStaticInt { 6 | private Field field; 7 | 8 | public RefStaticInt(Class cls, Field field) throws NoSuchFieldException { 9 | this.field = cls.getDeclaredField(field.getName()); 10 | this.field.setAccessible(true); 11 | } 12 | 13 | public int get() { 14 | try { 15 | return this.field.getInt(null); 16 | } catch (Exception e) { 17 | return 0; 18 | } 19 | } 20 | 21 | public void set(int value) { 22 | try { 23 | this.field.setInt(null, value); 24 | } catch (Exception e) { 25 | //Ignore 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/RefStaticObject.java: -------------------------------------------------------------------------------- 1 | package mirror; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | @SuppressWarnings("unchecked") 6 | public class RefStaticObject { 7 | private Field field; 8 | 9 | public RefStaticObject(Class cls, Field field) throws NoSuchFieldException { 10 | this.field = cls.getDeclaredField(field.getName()); 11 | this.field.setAccessible(true); 12 | } 13 | 14 | public Class type() { 15 | return field.getType(); 16 | } 17 | 18 | public T get() { 19 | T obj = null; 20 | try { 21 | obj = (T) this.field.get(null); 22 | } catch (Exception e) { 23 | //Ignore 24 | } 25 | return obj; 26 | } 27 | 28 | public void set(T obj) { 29 | try { 30 | this.field.set(null, obj); 31 | } catch (Exception e) { 32 | //Ignore 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/accounts/IAccountManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.accounts; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IAccountManager { 11 | public static Class TYPE = RefClass.load(IAccountManager.class, "android.accounts.IAccountManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.accounts.IAccountManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/Activity.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | 4 | import android.content.Intent; 5 | import android.content.pm.ActivityInfo; 6 | import android.os.IBinder; 7 | 8 | import mirror.RefBoolean; 9 | import mirror.RefClass; 10 | import mirror.RefObject; 11 | import mirror.RefInt; 12 | 13 | public class Activity { 14 | public static Class TYPE = RefClass.load(Activity.class, "android.app.Activity"); 15 | public static RefObject mActivityInfo; 16 | public static RefBoolean mFinished; 17 | public static RefObject mParent; 18 | public static RefInt mResultCode; 19 | public static RefObject mResultData; 20 | public static RefObject mToken; 21 | public static RefObject mEmbeddedID; 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ActivityManagerNative.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefStaticObject; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ActivityManagerNative { 11 | public static Class TYPE = RefClass.load(ActivityManagerNative.class, "android.app.ActivityManagerNative"); 12 | public static RefStaticObject gDefault; 13 | public static RefStaticMethod getDefault; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ActivityManagerOreo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticMethod; 7 | import mirror.RefStaticObject; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class ActivityManagerOreo { 14 | 15 | public static Class TYPE = RefClass.load(ActivityManagerOreo.class, "android.app.ActivityManager"); 16 | 17 | public static RefStaticMethod getService; 18 | public static RefStaticObject IActivityManagerSingleton; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ActivityThreadNMR1.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IBinder; 4 | 5 | import java.util.List; 6 | 7 | import mirror.MethodParams; 8 | import mirror.RefClass; 9 | import mirror.RefMethod; 10 | 11 | /** 12 | * @author Lody 13 | */ 14 | 15 | public class ActivityThreadNMR1 { 16 | public static Class Class = RefClass.load(ActivityThreadNMR1.class, "android.app.ActivityThread"); 17 | @MethodParams({IBinder.class, List.class, boolean.class}) 18 | public static RefMethod performNewIntents; 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ApplicationThreadNative.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | public class ApplicationThreadNative { 14 | public static Class TYPE = RefClass.load(ApplicationThreadNative.class, "android.app.ApplicationThreadNative"); 15 | 16 | @MethodParams({IBinder.class}) 17 | public static RefStaticMethod asInterface; 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ContextImpl.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | 4 | import android.content.Context; 5 | import android.content.pm.PackageManager; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefMethod; 9 | import mirror.RefObject; 10 | import mirror.MethodParams; 11 | 12 | public class ContextImpl { 13 | public static Class TYPE = RefClass.load(ContextImpl.class, "android.app.ContextImpl"); 14 | @MethodParams({Context.class}) 15 | public static RefObject mBasePackageName; 16 | public static RefObject mPackageInfo; 17 | public static RefObject mPackageManager; 18 | 19 | public static RefMethod getReceiverRestrictedContext; 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ContextImplICS.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import java.io.File; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class ContextImplICS { 9 | public static Class TYPE = RefClass.load(ContextImplICS.class, "android.app.ContextImpl"); 10 | public static RefObject mExternalCacheDir; 11 | public static RefObject mExternalFilesDir; 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ContextImplKitkat.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import java.io.File; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class ContextImplKitkat { 9 | public static Class TYPE = RefClass.load(ContextImplKitkat.class, "android.app.ContextImpl"); 10 | public static RefObject mExternalCacheDirs; 11 | public static RefObject mExternalFilesDirs; 12 | public static RefObject mOpPackageName; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IActivityManagerICS.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.content.Intent; 4 | import android.os.IBinder; 5 | import mirror.RefClass; 6 | import mirror.RefMethod; 7 | import mirror.MethodParams; 8 | 9 | public class IActivityManagerICS { 10 | public static Class TYPE = RefClass.load(IActivityManagerICS.class, "android.app.IActivityManager"); 11 | @MethodParams({IBinder.class, int.class, Intent.class}) 12 | public static RefMethod finishActivity; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IActivityManagerL.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.content.Intent; 4 | import android.os.IBinder; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefMethod; 8 | import mirror.MethodParams; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IActivityManagerL { 15 | public static Class TYPE = RefClass.load(IActivityManagerL.class, "android.app.IActivityManager"); 16 | @MethodParams({IBinder.class, int.class, Intent.class, boolean.class}) 17 | public static RefMethod finishActivity; 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IActivityManagerN.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.content.Intent; 4 | import android.os.IBinder; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IActivityManagerN { 15 | public static Class TYPE = RefClass.load(IActivityManagerN.class, "android.app.IActivityManager"); 16 | @MethodParams({IBinder.class, int.class, Intent.class, int.class}) 17 | public static RefMethod finishActivity; 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IAlarmManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IAlarmManager { 15 | public static Class TYPE = RefClass.load(IAlarmManager.class, "android.app.IAlarmManager"); 16 | public static class Stub { 17 | public static Class TYPE = RefClass.load(Stub.class, "android.app.IAlarmManager$Stub"); 18 | @MethodParams({IBinder.class}) 19 | public static RefStaticMethod asInterface; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IApplicationThreadICSMR1.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.content.Intent; 4 | import android.content.pm.ServiceInfo; 5 | import android.os.IBinder; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefMethod; 9 | import mirror.MethodParams; 10 | import mirror.MethodReflectParams; 11 | import mirror.android.content.res.CompatibilityInfo; 12 | 13 | /** 14 | * @author Lody 15 | */ 16 | 17 | public class IApplicationThreadICSMR1 { 18 | public static Class TYPE = RefClass.load(IApplicationThreadICSMR1.class, "android.app.IApplicationThread"); 19 | 20 | @MethodReflectParams({"android.content.Intent", "android.content.pm.ActivityInfo", "android.content.res.CompatibilityInfo", "int", "java.lang.String", "android.os.Bundle", "boolean"}) 21 | public static RefMethod scheduleReceiver; 22 | 23 | @MethodParams({IBinder.class, ServiceInfo.class, CompatibilityInfo.class}) 24 | public static RefMethod scheduleCreateService; 25 | 26 | @MethodParams({IBinder.class, boolean.class, int.class, int.class, Intent.class}) 27 | public static RefMethod scheduleServiceArgs; 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IApplicationThreadJBMR1.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefMethod; 5 | import mirror.MethodReflectParams; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class IApplicationThreadJBMR1 { 12 | public static Class TYPE = RefClass.load(IApplicationThreadJBMR1.class, "android.app.IApplicationThread"); 13 | 14 | @MethodReflectParams({"android.content.Intent", "android.content.pm.ActivityInfo", "android.content.res.CompatibilityInfo", "int", "java.lang.String", "android.os.Bundle", "boolean", "int"}) 15 | public static RefMethod scheduleReceiver; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IApplicationThreadKitkat.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.content.Intent; 4 | import android.content.pm.ServiceInfo; 5 | import android.os.IBinder; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefMethod; 9 | import mirror.MethodParams; 10 | import mirror.MethodReflectParams; 11 | import mirror.android.content.res.CompatibilityInfo; 12 | 13 | /** 14 | * @author Lody 15 | */ 16 | 17 | public class IApplicationThreadKitkat { 18 | public static Class TYPE = RefClass.load(IApplicationThreadKitkat.class, "android.app.IApplicationThread"); 19 | 20 | @MethodReflectParams({"android.content.Intent", "android.content.pm.ActivityInfo", "android.content.res.CompatibilityInfo", "int", "java.lang.String", "android.os.Bundle", "boolean", "int", "int"}) 21 | public static RefMethod scheduleReceiver; 22 | 23 | @MethodParams({IBinder.class, ServiceInfo.class, CompatibilityInfo.class, int.class}) 24 | public static RefMethod scheduleCreateService; 25 | 26 | @MethodParams({IBinder.class, Intent.class, boolean.class, int.class}) 27 | public static RefMethod scheduleBindService; 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/IApplicationThreadOreo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IApplicationThreadOreo { 15 | 16 | public static final class Stub { 17 | public static Class TYPE = RefClass.load(IApplicationThreadOreo.Stub.class, "android.app.IApplicationThread$Stub"); 18 | @MethodParams({IBinder.class}) 19 | public static RefStaticMethod asInterface; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/ISearchManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ISearchManager { 11 | public static Class TYPE = RefClass.load(ISearchManager.class, "android.app.ISearchManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.app.ISearchManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/LoadedApkHuaWei.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefObject; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | 10 | public class LoadedApkHuaWei { 11 | public static Class TYPE = RefClass.load(LoadedApkHuaWei.class, "android.app.LoadedApk"); 12 | public static RefObject mReceiverResource; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/Notification.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.app.PendingIntent; 4 | import android.content.Context; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefMethod; 9 | 10 | public class Notification { 11 | public static Class TYPE = RefClass.load(Notification.class, android.app.Notification.class); 12 | @MethodParams({Context.class, CharSequence.class, CharSequence.class, PendingIntent.class}) 13 | public static RefMethod setLatestEventInfo; 14 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/NotificationL.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.app.Notification; 4 | import android.content.Context; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class NotificationL { 11 | public static Class TYPE = RefClass.load(NotificationL.class, Notification.class); 12 | 13 | public static class Builder { 14 | public static Class TYPE = RefClass.load(Builder.class, android.app.Notification.Builder.class); 15 | 16 | @MethodParams({Context.class, Notification.class}) 17 | public static RefStaticMethod rebuild; 18 | } 19 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/NotificationM.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | 4 | import android.app.Notification; 5 | import android.graphics.drawable.Icon; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefObject; 9 | 10 | public class NotificationM { 11 | public static Class TYPE = RefClass.load(NotificationM.class, Notification.class); 12 | public static RefObject mLargeIcon; 13 | public static RefObject mSmallIcon; 14 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/NotificationManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | import mirror.RefStaticMethod; 8 | 9 | public class NotificationManager { 10 | public static Class TYPE = RefClass.load(NotificationManager.class, "android.app.NotificationManager"); 11 | 12 | public static RefStaticMethod getService; 13 | public static RefStaticObject sService; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/PendingIntentJBMR2.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app; 2 | 3 | import android.app.PendingIntent; 4 | import android.content.Intent; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefMethod; 8 | 9 | public class PendingIntentJBMR2 { 10 | public static Class Class = RefClass.load(PendingIntentJBMR2.class, PendingIntent.class); 11 | public static RefMethod getIntent; 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/backup/IBackupManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app.backup; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IBackupManager { 11 | public static Class TYPE = RefClass.load(IBackupManager.class, "android.app.backup.IBackupManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.app.backup.IBackupManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/job/IJobScheduler.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app.job; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IJobScheduler { 11 | public static Class TYPE = RefClass.load(IJobScheduler.class, "android.app.job.IJobScheduler"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.app.job.IJobScheduler$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/job/JobInfo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app.job; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.ComponentName; 5 | import android.os.Build; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefInt; 9 | import mirror.RefObject; 10 | 11 | /** 12 | * @author Lody 13 | */ 14 | 15 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 16 | public class JobInfo { 17 | public static Class TYPE = RefClass.load(JobInfo.class, android.app.job.JobInfo.class); 18 | 19 | public static RefInt jobId; 20 | public static RefObject service; 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/app/job/JobParameters.java: -------------------------------------------------------------------------------- 1 | package mirror.android.app.job; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.os.IBinder; 6 | import android.os.PersistableBundle; 7 | 8 | import mirror.MethodParams; 9 | import mirror.RefClass; 10 | import mirror.RefConstructor; 11 | import mirror.RefInt; 12 | import mirror.RefObject; 13 | 14 | /** 15 | * @author Lody 16 | */ 17 | 18 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 19 | public class JobParameters { 20 | public static Class TYPE = RefClass.load(JobParameters.class, android.app.job.JobParameters.class); 21 | 22 | public static RefObject callback; 23 | public static RefObject extras; 24 | public static RefInt jobId; 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/bluetooth/IBluetooth.java: -------------------------------------------------------------------------------- 1 | package mirror.android.bluetooth; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IBluetooth { 11 | /** 12 | * @see android.bluetooth.IBluetooth 13 | * */ 14 | public static Class TYPE = RefClass.load(IBluetooth.class, "android.bluetooth.IBluetooth"); 15 | /** 16 | * @see android.bluetooth.IBluetooth.Stub 17 | * */ 18 | public static class Stub { 19 | public static Class TYPE = RefClass.load(Stub.class, "android.bluetooth.IBluetooth$Stub"); 20 | @MethodParams({IBinder.class}) 21 | public static RefStaticMethod asInterface; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ClipboardManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | import mirror.RefStaticMethod; 8 | 9 | public class ClipboardManager { 10 | public static Class TYPE = RefClass.load(ClipboardManager.class, android.content.ClipboardManager.class); 11 | public static RefStaticMethod getService; 12 | public static RefStaticObject sService; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ClipboardManagerOreo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class ClipboardManagerOreo { 9 | public static Class TYPE = RefClass.load(ClipboardManagerOreo.class, android.content.ClipboardManager.class); 10 | public static RefObject mService; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ContentProviderClient.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class ContentProviderClient { 9 | public static Class Class = RefClass.load(ContentProviderClient.class, android.content.ContentProviderClient.class); 10 | public static RefObject mContentProvider; 11 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ContentProviderHolderOreo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.content.pm.ProviderInfo; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefBoolean; 7 | import mirror.RefClass; 8 | import mirror.RefObject; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class ContentProviderHolderOreo { 15 | public static Class TYPE = RefClass.load(ContentProviderHolderOreo.class, "android.app.ContentProviderHolder"); 16 | public static RefObject info; 17 | public static RefObject provider; 18 | public static RefBoolean noReleaseNeeded; 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ContentProviderNative.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ContentProviderNative { 11 | public static Class TYPE = RefClass.load(ContentProviderNative.class, "android.content.ContentProviderNative"); 12 | @MethodParams({IBinder.class}) 13 | public static RefStaticMethod asInterface; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ContentResolver.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | public class ContentResolver { 13 | public static Class TYPE = RefClass.load(ContentResolver.class, android.content.ContentResolver.class); 14 | public static RefStaticObject sContentService; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/ContentResolverJBMR2.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.content.ContentResolver; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class ContentResolverJBMR2 { 9 | public static Class Class = RefClass.load(ContentResolverJBMR2.class, ContentResolver.class);; 10 | public static RefObject mPackageName; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IClipboard.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import mirror.RefClass; 4 | 5 | public class IClipboard { 6 | public static Class TYPE = RefClass.load(IClipboard.class, "android.content.IClipboard"); 7 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IContentProvider.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import mirror.RefClass; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class IContentProvider { 10 | public static Class TYPE = RefClass.load(IContentProvider.class, "android.content.IContentProvider"); 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IContentService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IContentService { 15 | public static Class TYPE = RefClass.load(IContentService.class, "android.content.IContentService"); 16 | 17 | public static class Stub { 18 | public static Class TYPE = RefClass.load(Stub.class, "android.content.IContentService$Stub"); 19 | @MethodParams({IBinder.class}) 20 | public static RefStaticMethod asInterface; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IIntentReceiver.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefMethod; 8 | import mirror.MethodParams; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IIntentReceiver { 15 | public static Class TYPE = RefClass.load(IIntentReceiver.class, "android.content.IIntentReceiver"); 16 | 17 | @MethodParams({Intent.class, int.class, 18 | String.class, Bundle.class, boolean.class, boolean.class}) 19 | public static RefMethod performReceive; 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IIntentReceiverJB.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefMethod; 8 | import mirror.MethodParams; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IIntentReceiverJB { 15 | public static Class TYPE = RefClass.load(IIntentReceiverJB.class, "android.content.IIntentReceiver"); 16 | 17 | @MethodParams({Intent.class, int.class, 18 | String.class, Bundle.class, boolean.class, boolean.class, int.class}) 19 | public static RefMethod performReceive; 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IRestrictionsManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IRestrictionsManager { 11 | public static Class TYPE = RefClass.load(IRestrictionsManager.class, "android.content.IRestrictionsManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.content.IRestrictionsManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/IntentFilter.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content; 2 | 3 | import java.util.List; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | public class IntentFilter { 13 | public static Class Class = RefClass.load(IntentFilter.class, android.content.IntentFilter.class); 14 | public static RefObject> mActions; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/ApplicationInfoL.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.content.pm.ApplicationInfo; 4 | import mirror.RefClass; 5 | import mirror.RefObject; 6 | 7 | public class ApplicationInfoL { 8 | public static Class TYPE = RefClass.load(ApplicationInfoL.class, ApplicationInfo.class); 9 | public static RefObject primaryCpuAbi; 10 | public static RefObject scanPublicSourceDir; 11 | public static RefObject scanSourceDir; 12 | public static RefObject splitPublicSourceDirs; 13 | public static RefObject splitSourceDirs; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/ApplicationInfoN.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.content.pm.ApplicationInfo; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class ApplicationInfoN { 9 | public static Class TYPE = RefClass.load(ApplicationInfoN.class, ApplicationInfo.class); 10 | public static RefObject deviceProtectedDataDir; 11 | public static RefObject deviceEncryptedDataDir; 12 | public static RefObject credentialProtectedDataDir; 13 | public static RefObject credentialEncryptedDataDir; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/ILauncherApps.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticMethod; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | public class ILauncherApps { 12 | 13 | public static final class Stub { 14 | public static Class TYPE = RefClass.load(ILauncherApps.class, "android.content.pm.ILauncherApps$Stub"); 15 | public static RefStaticMethod asInterface; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/IShortcutService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticMethod; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | public class IShortcutService { 13 | 14 | public static final class Stub { 15 | public static Class TYPE = RefClass.load(IShortcutService.class, "android.content.pm.IShortcutService$Stub"); 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/LauncherApps.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.content.pm.PackageManager; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefObject; 8 | import mirror.com.android.internal.os.UserManager; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class LauncherApps { 15 | 16 | public static Class TYPE = RefClass.load(LauncherApps.class, "android.content.pm.LauncherApps"); 17 | 18 | public static RefObject mPm; 19 | public static RefObject mService; 20 | public static RefObject mUserManager; 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/PackageParserNougat.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import mirror.MethodReflectParams; 4 | import mirror.RefClass; 5 | import mirror.RefStaticMethod; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | 11 | public class PackageParserNougat { 12 | public static Class TYPE = RefClass.load(PackageParserNougat.class, "android.content.pm.PackageParser"); 13 | @MethodReflectParams({"android.content.pm.PackageParser$Package", "int"}) 14 | public static RefStaticMethod collectCertificates; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/PackageUserState.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefConstructor; 5 | 6 | public class PackageUserState { 7 | public static Class TYPE = RefClass.load(PackageUserState.class, "android.content.pm.PackageUserState"); 8 | public static RefConstructor ctor; 9 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/ParceledListSlice.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.os.Parcelable; 4 | 5 | import java.util.List; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefConstructor; 9 | import mirror.RefMethod; 10 | import mirror.RefStaticObject; 11 | 12 | /** 13 | * @author Lody 14 | */ 15 | 16 | public class ParceledListSlice { 17 | public static RefStaticObject CREATOR; 18 | public static Class TYPE = RefClass.load(ParceledListSlice.class, "android.content.pm.ParceledListSlice"); 19 | public static RefMethod append; 20 | public static RefConstructor ctor; 21 | public static RefMethod isLastSlice; 22 | public static RefMethod populateList; 23 | public static RefMethod setLastSlice; 24 | public static RefMethod> getList; 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/ParceledListSliceJBMR2.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | import android.os.Parcelable; 4 | 5 | import java.util.List; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefConstructor; 9 | import mirror.RefMethod; 10 | import mirror.MethodParams; 11 | import mirror.RefStaticObject; 12 | 13 | /** 14 | * @author Lody 15 | */ 16 | 17 | public class ParceledListSliceJBMR2 { 18 | public static RefStaticObject CREATOR; 19 | public static Class TYPE = RefClass.load(ParceledListSliceJBMR2.class, "android.content.pm.ParceledListSlice"); 20 | @MethodParams({List.class}) 21 | public static RefConstructor ctor; 22 | public static RefMethod getList; 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/pm/UserInfo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.pm; 2 | 3 | 4 | import mirror.MethodParams; 5 | import mirror.RefClass; 6 | import mirror.RefConstructor; 7 | import mirror.RefStaticInt; 8 | 9 | public class UserInfo { 10 | public static Class TYPE = RefClass.load(UserInfo.class, "android.content.pm.UserInfo"); 11 | public static RefStaticInt FLAG_PRIMARY; 12 | @MethodParams({int.class, String.class, int.class}) 13 | public static RefConstructor ctor; 14 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/res/AssetManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.res; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefConstructor; 5 | import mirror.RefMethod; 6 | import mirror.MethodParams; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | public class AssetManager { 13 | public static Class TYPE = RefClass.load(AssetManager.class, android.content.res.AssetManager.class); 14 | public static RefConstructor ctor; 15 | @MethodParams(String.class) 16 | public static RefMethod addAssetPath; 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/content/res/CompatibilityInfo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.content.res; 2 | 3 | import android.content.pm.ApplicationInfo; 4 | import mirror.RefClass; 5 | import mirror.RefConstructor; 6 | import mirror.MethodParams; 7 | import mirror.RefStaticObject; 8 | 9 | public class CompatibilityInfo { 10 | public static Class TYPE = RefClass.load(CompatibilityInfo.class, "android.content.res.CompatibilityInfo"); 11 | @MethodParams({ApplicationInfo.class, int.class, int.class, boolean.class}) 12 | public static RefConstructor ctor; 13 | public static RefStaticObject DEFAULT_COMPATIBILITY_INFO; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/ddm/DdmHandleAppName.java: -------------------------------------------------------------------------------- 1 | package mirror.android.ddm; 2 | 3 | import mirror.RefClass; 4 | import mirror.MethodParams; 5 | import mirror.RefStaticMethod; 6 | 7 | public class DdmHandleAppName { 8 | public static Class Class = RefClass.load(DdmHandleAppName.class, "android.ddm.DdmHandleAppName"); 9 | @MethodParams({String.class}) 10 | public static RefStaticMethod setAppName; 11 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/ddm/DdmHandleAppNameJBMR1.java: -------------------------------------------------------------------------------- 1 | package mirror.android.ddm; 2 | 3 | import mirror.RefClass; 4 | import mirror.MethodParams; 5 | import mirror.RefStaticMethod; 6 | 7 | public class DdmHandleAppNameJBMR1 { 8 | public static Class Class = RefClass.load(DdmHandleAppNameJBMR1.class, "android.ddm.DdmHandleAppName"); 9 | @MethodParams({String.class, int.class}) 10 | public static RefStaticMethod setAppName; 11 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/graphics/drawable/Icon.java: -------------------------------------------------------------------------------- 1 | package mirror.android.graphics.drawable; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefObject; 8 | 9 | @TargetApi(Build.VERSION_CODES.M) 10 | public class Icon { 11 | public static final int TYPE_BITMAP = 1; 12 | public static final int TYPE_RESOURCE = 2; 13 | public static final int TYPE_DATA = 3; 14 | public static final int TYPE_URI = 4; 15 | 16 | public static Class TYPE = RefClass.load(Icon.class, android.graphics.drawable.Icon.class); 17 | public static RefObject mObj1; 18 | public static RefObject mString1; 19 | public static RefObject mType; 20 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/hardware/display/DisplayManagerGlobal.java: -------------------------------------------------------------------------------- 1 | package mirror.android.hardware.display; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | import mirror.RefStaticMethod; 8 | 9 | public class DisplayManagerGlobal { 10 | public static Class TYPE = RefClass.load(DisplayManagerGlobal.class, "android.hardware.display.DisplayManagerGlobal"); 11 | public static RefStaticMethod getInstance; 12 | public static RefObject mDm; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/hardware/display/IDisplayManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.hardware.display; 2 | 3 | import mirror.RefClass; 4 | 5 | public class IDisplayManager { 6 | public static Class TYPE = RefClass.load(IDisplayManager.class, "android.hardware.display.IDisplayManager"); 7 | } 8 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/hardware/location/IContextHubService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.hardware.location; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | public class IContextHubService { 14 | public static Class TYPE = RefClass.load(IContextHubService.class, "android.hardware.location.IContextHubService"); 15 | 16 | public static class Stub { 17 | public static Class TYPE = RefClass.load(Stub.class, "android.hardware.location.IContextHubService$Stub"); 18 | @MethodParams({IBinder.class}) 19 | public static RefStaticMethod asInterface; 20 | } 21 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/location/ILocationListener.java: -------------------------------------------------------------------------------- 1 | package mirror.android.location; 2 | 3 | import android.location.Location; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | import mirror.MethodParams; 8 | import mirror.RefClass; 9 | import mirror.RefMethod; 10 | import mirror.RefStaticMethod; 11 | 12 | 13 | /** 14 | * @author legency 15 | */ 16 | public class ILocationListener { 17 | public static Class TYPE = RefClass.load(ILocationListener.class, "android.location.ILocationListener"); 18 | public static class Stub { 19 | public static Class TYPE = RefClass.load(Stub.class, "android.location.ILocationListener$Stub"); 20 | @MethodParams({IBinder.class}) 21 | public static RefStaticMethod asInterface; 22 | } 23 | @MethodParams(Location.class) 24 | public static RefMethod onLocationChanged; 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/location/ILocationManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.location; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ILocationManager { 11 | public static Class TYPE = RefClass.load(ILocationManager.class, "android.location.ILocationManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.location.ILocationManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/location/LocationRequestL.java: -------------------------------------------------------------------------------- 1 | package mirror.android.location; 2 | 3 | import mirror.RefBoolean; 4 | import mirror.RefClass; 5 | import mirror.RefMethod; 6 | import mirror.RefObject; 7 | 8 | public class LocationRequestL { 9 | public static Class TYPE = RefClass.load(LocationRequestL.class, "android.location.LocationRequest"); 10 | public static RefBoolean mHideFromAppOps; 11 | public static RefObject mWorkSource; 12 | public static RefObject mProvider; 13 | public static RefMethod getProvider; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/media/AudioManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.media; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | import mirror.RefStaticMethod; 8 | 9 | public class AudioManager { 10 | public static Class TYPE = RefClass.load(AudioManager.class, android.media.AudioManager.class); 11 | public static RefStaticMethod getService; 12 | public static RefStaticObject sService; 13 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/media/IAudioService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.media; 2 | import android.os.IBinder; 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.MethodParams; 7 | import mirror.RefStaticMethod; 8 | 9 | public class IAudioService { 10 | public static Class TYPE = RefClass.load(IAudioService.class, "android.media.IAudioService"); 11 | 12 | public static class Stub { 13 | public static Class TYPE = RefClass.load(Stub.class, "android.media.IAudioService$Stub"); 14 | @MethodParams({IBinder.class}) 15 | public static RefStaticMethod asInterface; 16 | } 17 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/media/IMediaRouterService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.media; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IMediaRouterService { 11 | public static Class TYPE = RefClass.load(IMediaRouterService.class, "android.media.IMediaRouterService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.media.IMediaRouterService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/media/MediaRouter.java: -------------------------------------------------------------------------------- 1 | package mirror.android.media; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | import mirror.RefStaticObject; 8 | 9 | public class MediaRouter { 10 | public static Class TYPE = RefClass.load(MediaRouter.class, android.media.MediaRouter.class); 11 | public static RefStaticObject sStatic; 12 | 13 | public static class Static { 14 | public static Class TYPE = RefClass.load(Static.class, "android.media.MediaRouter$Static"); 15 | public static RefObject mAudioService; 16 | } 17 | 18 | public static class StaticKitkat { 19 | public static Class TYPE = RefClass.load(StaticKitkat.class, "android.media.MediaRouter$Static"); 20 | public static RefObject mMediaRouterService; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/media/session/ISessionManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.media.session; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ISessionManager { 11 | public static Class TYPE = RefClass.load(ISessionManager.class, "android.media.session.ISessionManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.media.session.ISessionManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/net/IConnectivityManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.net; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | 11 | /** 12 | * @author Junelegency 13 | * 14 | */ 15 | public class IConnectivityManager { 16 | public static Class TYPE = RefClass.load(IConnectivityManager.class, "android.net.IConnectivityManager"); 17 | 18 | public static class Stub { 19 | public static Class TYPE = RefClass.load(Stub.class, "android.net.IConnectivityManager$Stub"); 20 | @MethodParams({IBinder.class}) 21 | public static RefStaticMethod asInterface; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/net/wifi/IWifiManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.net.wifi; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IWifiManager { 11 | public static Class TYPE = RefClass.load(IWifiManager.class, "android.net.wifi.IWifiManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.net.wifi.IWifiManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/net/wifi/WifiInfo.java: -------------------------------------------------------------------------------- 1 | package mirror.android.net.wifi; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefObject; 5 | 6 | public class WifiInfo { 7 | public static Class TYPE = RefClass.load(WifiInfo.class, android.net.wifi.WifiInfo.class); 8 | public static RefObject mMacAddress; 9 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/net/wifi/WifiScanner.java: -------------------------------------------------------------------------------- 1 | package mirror.android.net.wifi; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefStaticObject; 5 | 6 | public final class WifiScanner { 7 | public static Class Class; 8 | public static RefStaticObject GET_AVAILABLE_CHANNELS_EXTRA; 9 | 10 | static { 11 | RefClass.load(WifiScanner.class, "android.net.wifi.WifiScanner"); 12 | } 13 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/Bundle.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import android.os.IBinder; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefMethod; 7 | import mirror.MethodParams; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class Bundle { 14 | public static Class TYPE = RefClass.load(Bundle.class, android.os.Bundle.class); 15 | 16 | @MethodParams({String.class, IBinder.class}) 17 | public static RefMethod putIBinder; 18 | 19 | @MethodParams({String.class}) 20 | public static RefMethod getIBinder; 21 | } 22 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/Handler.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | 4 | import mirror.RefClass; 5 | import mirror.RefObject; 6 | 7 | public class Handler { 8 | public static Class TYPE = RefClass.load(Handler.class, "android.os.Handler"); 9 | public static RefObject mCallback; 10 | } 11 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/INetworkManagementService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class INetworkManagementService { 11 | public static Class TYPE = RefClass.load(INetworkManagementService.class, "android.os.INetworkManagementService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.os.INetworkManagementService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/IPowerManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class IPowerManager { 15 | public static Class TYPE = RefClass.load(IPowerManager.class, "android.os.IPowerManager"); 16 | 17 | public static class Stub { 18 | public static Class TYPE = RefClass.load(Stub.class, "android.os.IPowerManager$Stub"); 19 | @MethodParams({IBinder.class}) 20 | public static RefStaticMethod asInterface; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/IUserManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IUserManager { 11 | public static Class TYPE = RefClass.load(IUserManager.class, "android.os.IUserManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.os.IUserManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/Message.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import mirror.MethodParams; 4 | import mirror.RefClass; 5 | import mirror.RefMethod; 6 | import mirror.RefStaticMethod; 7 | 8 | public class Message { 9 | public static Class TYPE = RefClass.load(Message.class, android.os.Message.class); 10 | @MethodParams({int.class}) 11 | public static RefStaticMethod updateCheckRecycle; 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/Process.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import mirror.RefClass; 4 | import mirror.MethodParams; 5 | import mirror.RefStaticMethod; 6 | 7 | public class Process { 8 | public static Class TYPE = RefClass.load(Process.class, android.os.Process.class); 9 | @MethodParams({String.class}) 10 | public static RefStaticMethod setArgV0; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/ServiceManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import java.util.Map; 7 | 8 | import mirror.RefClass; 9 | import mirror.MethodParams; 10 | import mirror.RefStaticObject; 11 | import mirror.RefStaticMethod; 12 | 13 | public class ServiceManager { 14 | public static Class TYPE = RefClass.load(ServiceManager.class, "android.os.ServiceManager"); 15 | @MethodParams({String.class, IBinder.class}) 16 | public static RefStaticMethod addService; 17 | public static RefStaticMethod checkService; 18 | public static RefStaticMethod getIServiceManager; 19 | public static RefStaticMethod getService; 20 | public static RefStaticMethod listServices; 21 | public static RefStaticObject> sCache; 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/StrictMode.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os; 2 | 3 | 4 | import mirror.RefClass; 5 | import mirror.RefStaticInt; 6 | 7 | public class StrictMode { 8 | public static Class TYPE = RefClass.load(StrictMode.class, "android.os.StrictMode"); 9 | public static RefStaticInt sVmPolicyMask; 10 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/os/mount/IMountService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.os.mount; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IMountService { 11 | public static Class TYPE = RefClass.load(IMountService.class, "android.os.storage.IMountService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.os.storage.IMountService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/renderscript/RenderScriptCacheDir.java: -------------------------------------------------------------------------------- 1 | package mirror.android.renderscript; 2 | 3 | 4 | import java.io.File; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class RenderScriptCacheDir { 11 | public static Class TYPE = RefClass.load(RenderScriptCacheDir.class, "android.renderscript.RenderScriptCacheDir"); 12 | @MethodParams({File.class}) 13 | public static RefStaticMethod setupDiskCache; 14 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/rms/resource/ReceiverResourceLP.java: -------------------------------------------------------------------------------- 1 | package mirror.android.rms.resource; 2 | 3 | 4 | import mirror.RefClass; 5 | import mirror.RefObject; 6 | 7 | public class ReceiverResourceLP { 8 | public static Class TYPE = RefClass.load(ReceiverResourceLP.class, "android.rms.resource.ReceiverResource"); 9 | public static RefObject mResourceConfig; 10 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/rms/resource/ReceiverResourceM.java: -------------------------------------------------------------------------------- 1 | package mirror.android.rms.resource; 2 | 3 | 4 | import mirror.RefClass; 5 | import mirror.RefObject; 6 | 7 | public class ReceiverResourceM { 8 | public static Class TYPE = RefClass.load(ReceiverResourceM.class, "android.rms.resource.ReceiverResource"); 9 | public static RefObject mWhiteList; 10 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/rms/resource/ReceiverResourceN.java: -------------------------------------------------------------------------------- 1 | package mirror.android.rms.resource; 2 | 3 | 4 | import java.util.List; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefObject; 8 | 9 | public class ReceiverResourceN { 10 | public static Class TYPE = RefClass.load(ReceiverResourceN.class, "android.rms.resource.ReceiverResource"); 11 | public static RefObject> mWhiteList; 12 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/service/persistentdata/IPersistentDataBlockService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.service.persistentdata; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IPersistentDataBlockService { 11 | public static Class TYPE = RefClass.load(IPersistentDataBlockService.class, "android.service.persistentdata.IPersistentDataBlockService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.service.persistentdata.IPersistentDataBlockService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/util/Singleton.java: -------------------------------------------------------------------------------- 1 | package mirror.android.util; 2 | 3 | 4 | import mirror.RefClass; 5 | import mirror.RefObject; 6 | import mirror.RefMethod; 7 | 8 | public class Singleton { 9 | public static Class TYPE = RefClass.load(Singleton.class, "android.util.Singleton"); 10 | public static RefMethod get; 11 | public static RefObject mInstance; 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/Display.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | 8 | public class Display { 9 | public static Class TYPE = RefClass.load(Display.class, android.view.Display.class); 10 | public static RefStaticObject sWindowManager; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/HardwareRenderer.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | 4 | import java.io.File; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class HardwareRenderer { 11 | public static Class TYPE = RefClass.load(HardwareRenderer.class, "android.view.HardwareRenderer"); 12 | @MethodParams({File.class}) 13 | public static RefStaticMethod setupDiskCache; 14 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/IGraphicsStats.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IGraphicsStats { 11 | public static Class TYPE = RefClass.load(IGraphicsStats.class, "android.view.IGraphicsStats"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.view.IGraphicsStats$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/IWindowManager.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IWindowManager { 11 | public static Class TYPE = RefClass.load(IWindowManager.class, "android.view.IWindowManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.view.IWindowManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/RenderScript.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | import java.io.File; 4 | 5 | import mirror.MethodParams; 6 | import mirror.RefClass; 7 | import mirror.RefStaticMethod; 8 | 9 | public class RenderScript { 10 | public static Class TYPE = RefClass.load(RenderScript.class, android.renderscript.RenderScript.class); 11 | @MethodParams({File.class}) 12 | public static RefStaticMethod setupDiskCache; 13 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/SurfaceControl.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import mirror.MethodParams; 6 | import mirror.RefClass; 7 | import mirror.RefStaticMethod; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class SurfaceControl { 14 | 15 | public static Class TYPE = RefClass.load(SurfaceControl.class, "android.view.SurfaceControl"); 16 | 17 | @MethodParams({int.class/*width*/, int.class/*height*/}) 18 | public static RefStaticMethod screnshot; 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/ThreadedRenderer.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | 4 | import java.io.File; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ThreadedRenderer { 11 | public static Class TYPE = RefClass.load(ThreadedRenderer.class, "android.view.ThreadedRenderer"); 12 | @MethodParams({File.class}) 13 | public static RefStaticMethod setupDiskCache; 14 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/view/WindowManagerGlobal.java: -------------------------------------------------------------------------------- 1 | package mirror.android.view; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | 8 | public class WindowManagerGlobal { 9 | public static Class TYPE = RefClass.load(WindowManagerGlobal.class, "android.view.WindowManagerGlobal"); 10 | public static RefStaticObject sWindowManagerService; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/webkit/IWebViewUpdateService.java: -------------------------------------------------------------------------------- 1 | package mirror.android.webkit; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefMethod; 5 | 6 | /** 7 | * @author CodeHz 8 | */ 9 | 10 | public class IWebViewUpdateService { 11 | public static Class TYPE = RefClass.load(IWebViewUpdateService.class, "android.webkit.IWebViewUpdateService$Stub$Proxy"); 12 | 13 | public static RefMethod getCurrentWebViewPackageName; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/webkit/WebViewFactory.java: -------------------------------------------------------------------------------- 1 | package mirror.android.webkit; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefStaticMethod; 5 | 6 | /** 7 | * @author CodeHz 8 | */ 9 | 10 | public class WebViewFactory { 11 | public static Class TYPE = RefClass.load(WebViewFactory.class, "android.webkit.WebViewFactory"); 12 | public static RefStaticMethod getUpdateService; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/widget/RemoteViews.java: -------------------------------------------------------------------------------- 1 | package mirror.android.widget; 2 | 3 | import android.content.pm.ApplicationInfo; 4 | 5 | import java.util.ArrayList; 6 | 7 | import mirror.RefClass; 8 | import mirror.RefObject; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class RemoteViews { 15 | public static Class TYPE = RefClass.load(RemoteViews.class, android.widget.RemoteViews.class); 16 | public static RefObject mApplication; 17 | public static RefObject> mActions; 18 | public static RefObject mPackage; 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/android/widget/Toast.java: -------------------------------------------------------------------------------- 1 | package mirror.android.widget; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | 8 | public class Toast { 9 | public static Class TYPE = RefClass.load(Toast.class, android.widget.Toast.class); 10 | 11 | public static RefStaticObject sService; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/app/IAppOpsService.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.app; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IAppOpsService { 11 | public static Class TYPE = RefClass.load(IAppOpsService.class, "com.android.internal.app.IAppOpsService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.app.IAppOpsService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/appwidget/IAppWidgetService.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.appwidget; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IAppWidgetService { 11 | public static Class TYPE = RefClass.load(IAppWidgetService.class, "com.android.internal.appwidget.IAppWidgetService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.appwidget.IAppWidgetService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/content/NativeLibraryHelper.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.content; 2 | 3 | import java.io.File; 4 | 5 | import mirror.RefClass; 6 | import mirror.MethodParams; 7 | import mirror.RefStaticMethod; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class NativeLibraryHelper { 14 | public static Class TYPE = RefClass.load(NativeLibraryHelper.class, "com.android.internal.content.NativeLibraryHelper"); 15 | 16 | @MethodParams({Handle.class, File.class, String.class}) 17 | public static RefStaticMethod copyNativeBinaries; 18 | 19 | @MethodParams({Handle.class, String[].class}) 20 | public static RefStaticMethod findSupportedAbi; 21 | 22 | public static class Handle { 23 | public static Class TYPE = RefClass.load(Handle.class, "com.android.internal.content.NativeLibraryHelper$Handle"); 24 | 25 | @MethodParams({File.class}) 26 | public static RefStaticMethod create; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/content/ReferrerIntent.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.content; 2 | 3 | import android.content.Intent; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefConstructor; 7 | import mirror.MethodParams; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | 13 | public class ReferrerIntent { 14 | public static Class TYPE = RefClass.load(ReferrerIntent.class, "com.android.internal.content.ReferrerIntent"); 15 | @MethodParams({Intent.class, String.class}) 16 | public static RefConstructor ctor; 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/os/IDropBoxManagerService.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IDropBoxManagerService { 11 | public static Class TYPE = RefClass.load(IDropBoxManagerService.class, "com.android.internal.os.IDropBoxManagerService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.os.IDropBoxManagerService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/os/IVibratorService.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IVibratorService { 11 | public static Class TYPE = RefClass.load(IVibratorService.class, "android.os.IVibratorService"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.os.IVibratorService$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/os/UserManager.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.os; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class UserManager { 11 | public static Class TYPE = RefClass.load(UserManager.class, "android.os.UserManager"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "android.os.IUserManager$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/policy/PhoneWindow.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.policy; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefStaticObject; 7 | 8 | public class PhoneWindow { 9 | public static Class TYPE; 10 | public static RefStaticObject sWindowManager; 11 | 12 | static { 13 | TYPE = RefClass.load(PhoneWindow.class, "com.android.internal.policy.impl.PhoneWindow$WindowManagerHolder"); 14 | if (TYPE == null) { 15 | TYPE = RefClass.load(PhoneWindow.class, "com.android.internal.policy.PhoneWindow$WindowManagerHolder"); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/IMms.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IMms { 11 | public static Class TYPE = RefClass.load(IMms.class, "com.android.internal.telephony.IMms"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.telephony.IMms$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/IPhoneSubInfo.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class IPhoneSubInfo { 11 | public static Class TYPE = RefClass.load(IPhoneSubInfo.class, "com.android.internal.telephony.IPhoneSubInfo"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.telephony.IPhoneSubInfo$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/ISms.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ISms { 11 | public static Class TYPE = RefClass.load(ISms.class, "com.android.internal.telephony.ISms"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.telephony.ISms$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/ISub.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | /** 11 | * @author Lody 12 | */ 13 | 14 | public class ISub { 15 | public static Class TYPE = RefClass.load(ISub.class, "com.android.internal.telephony.ISub"); 16 | 17 | public static class Stub { 18 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.telephony.ISub$Stub"); 19 | @MethodParams({IBinder.class}) 20 | public static RefStaticMethod asInterface; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/ITelephony.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.RefClass; 7 | import mirror.MethodParams; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ITelephony { 11 | public static Class TYPE = RefClass.load(ITelephony.class, "com.android.internal.telephony.ITelephony"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(Stub.class, "com.android.internal.telephony.ITelephony$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/ITelephonyRegistry.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | 6 | import mirror.MethodParams; 7 | import mirror.RefClass; 8 | import mirror.RefStaticMethod; 9 | 10 | public class ITelephonyRegistry { 11 | public static Class TYPE = RefClass.load(ITelephonyRegistry.class, "com.android.internal.telephony.ITelephonyRegistry"); 12 | 13 | public static class Stub { 14 | public static Class TYPE = RefClass.load(ITelephonyRegistry.Stub.class, "com.android.internal.telephony.ITelephonyRegistry$Stub"); 15 | @MethodParams({IBinder.class}) 16 | public static RefStaticMethod asInterface; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/telephony/PhoneConstantsMtk.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.telephony; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefStaticInt; 5 | 6 | public class PhoneConstantsMtk { 7 | public static Class TYPE = RefClass.load(PhoneConstantsMtk.class, "com.android.internal.telephony.PhoneConstants"); 8 | public static RefStaticInt GEMINI_SIM_NUM; 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/view/IInputMethodManager.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.view; 2 | 3 | import mirror.RefClass; 4 | 5 | public class IInputMethodManager { 6 | public static Class TYPE = RefClass.load(IInputMethodManager.class, "com.android.internal.view.IInputMethodManager"); 7 | } 8 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/com/android/internal/view/inputmethod/InputMethodManager.java: -------------------------------------------------------------------------------- 1 | package mirror.com.android.internal.view.inputmethod; 2 | 3 | import android.os.IInterface; 4 | 5 | import mirror.RefClass; 6 | import mirror.RefObject; 7 | 8 | public class InputMethodManager { 9 | public static Class TYPE = RefClass.load(InputMethodManager.class, android.view.inputmethod.InputMethodManager.class); 10 | public static RefObject mService; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/dalvik/system/VMRuntime.java: -------------------------------------------------------------------------------- 1 | package mirror.dalvik.system; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefMethod; 5 | import mirror.MethodParams; 6 | import mirror.RefStaticMethod; 7 | 8 | /** 9 | * @author Lody 10 | */ 11 | 12 | public class VMRuntime { 13 | public static Class TYPE = RefClass.load(VMRuntime.class, "dalvik.system.VMRuntime"); 14 | public static RefStaticMethod getRuntime; 15 | @MethodParams({int.class}) 16 | public static RefMethod setTargetSdkVersion; 17 | public static RefMethod is64Bit; 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/java/lang/ThreadGroup.java: -------------------------------------------------------------------------------- 1 | package mirror.java.lang; 2 | 3 | 4 | import java.util.List; 5 | 6 | import mirror.RefClass; 7 | import mirror.RefObject; 8 | 9 | /** 10 | * @author Lody 11 | */ 12 | public class ThreadGroup { 13 | public static Class TYPE = RefClass.load(ThreadGroup.class, java.lang.ThreadGroup.class); 14 | public static RefObject> groups; 15 | public static RefObject parent; 16 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/java/lang/ThreadGroupN.java: -------------------------------------------------------------------------------- 1 | package mirror.java.lang; 2 | 3 | 4 | import mirror.RefClass; 5 | import mirror.RefObject; 6 | 7 | /** 8 | * @author Lody 9 | */ 10 | public class ThreadGroupN { 11 | public static Class Class = RefClass.load(ThreadGroupN.class, java.lang.ThreadGroup.class); 12 | public static RefObject ngroups; 13 | public static RefObject groups; 14 | public static RefObject parent; 15 | } -------------------------------------------------------------------------------- /lib/src/main/java/mirror/libcore/io/ForwardingOs.java: -------------------------------------------------------------------------------- 1 | package mirror.libcore.io; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefObject; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | 10 | public class ForwardingOs { 11 | public static Class TYPE = RefClass.load(ForwardingOs.class, "libcore.io.ForwardingOs"); 12 | public static RefObject os; 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/libcore/io/Libcore.java: -------------------------------------------------------------------------------- 1 | package mirror.libcore.io; 2 | 3 | import mirror.RefClass; 4 | import mirror.RefStaticObject; 5 | 6 | /** 7 | * @author Lody 8 | */ 9 | 10 | public class Libcore { 11 | public static Class TYPE = RefClass.load(Libcore.class, "libcore.io.Libcore"); 12 | 13 | public static RefStaticObject os; 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/mirror/libcore/io/Os.java: -------------------------------------------------------------------------------- 1 | package mirror.libcore.io; 2 | 3 | import mirror.RefClass; 4 | 5 | /** 6 | * @author Lody 7 | */ 8 | 9 | public class Os { 10 | public static Class TYPE = RefClass.load(Os.class, "libcore.io.Os"); 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/main/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | LOCAL_MODULE := va-native 4 | 5 | LOCAL_CFLAGS := -Wno-error=format-security -fpermissive 6 | LOCAL_CFLAGS += -fno-rtti -fno-exceptions 7 | 8 | LOCAL_C_INCLUDES += $(LOCAL_PATH) 9 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/Foundation 10 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/MSHook 11 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/GodinHook 12 | 13 | ARCH_FILES := \ 14 | MSHook/Debug.cpp \ 15 | MSHook/Hooker.cpp \ 16 | MSHook/PosixMemory.cpp 17 | 18 | ifeq "$(TARGET_ARCH_ABI)" "x86" 19 | ARCH_FILES += MSHook/x86.cpp MSHook/x86_64.cpp 20 | else 21 | ARCH_FILES += MSHook/ARM.cpp MSHook/Thumb.cpp 22 | endif 23 | 24 | LOCAL_SRC_FILES := Core.cpp \ 25 | Foundation/IOUniformer.cpp \ 26 | Foundation/VMPatch.cpp \ 27 | $(ARCH_FILES) \ 28 | 29 | 30 | LOCAL_LDLIBS := -llog 31 | 32 | include $(BUILD_SHARED_LIBRARY) 33 | -------------------------------------------------------------------------------- /lib/src/main/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := armeabi armeabi-v7a x86 2 | APP_PLATFORM := android-14 3 | APP_STL := stlport_static 4 | APP_OPTIM := release -------------------------------------------------------------------------------- /lib/src/main/jni/Core.h: -------------------------------------------------------------------------------- 1 | // 2 | // VirtualApp Native Project 3 | // 4 | 5 | #ifndef NDK_CORE_H 6 | #define NDK_CORE_H 7 | 8 | #include 9 | #include 10 | 11 | 12 | #include "Helper.h" 13 | #include "Foundation/VMPatch.h" 14 | #include "Foundation/IOUniformer.h" 15 | 16 | __BEGIN_DECLS 17 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved); 18 | JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved); 19 | __END_DECLS 20 | 21 | 22 | #endif //NDK_CORE_H 23 | -------------------------------------------------------------------------------- /lib/src/main/jni/Foundation/IOUniformer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VirtualApp Native Project 3 | // 4 | 5 | #ifndef NDK_HOOK_H 6 | #define NDK_HOOK_H 7 | 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | //#include 20 | #include "Helper.h" 21 | 22 | 23 | #define HOOK_SYMBOL(handle, func) hook_template(handle, #func, (void*) new_##func, (void**) &orig_##func) 24 | #define HOOK_DEF(ret, func, ...) \ 25 | static ret (*orig_##func)(__VA_ARGS__); \ 26 | static ret new_##func(__VA_ARGS__) 27 | 28 | 29 | namespace IOUniformer { 30 | void startUniformer(int api_level, int preview_api_level); 31 | 32 | void redirect(const char*orig_path, const char*new_path); 33 | 34 | void readOnly(const char*path); 35 | 36 | const char *query(const char *orig_path); 37 | 38 | const char *restore(const char *redirected_path); 39 | } 40 | 41 | #endif //NDK_HOOK_H 42 | -------------------------------------------------------------------------------- /lib/src/main/jni/Foundation/VMPatch.h: -------------------------------------------------------------------------------- 1 | // 2 | // VirtualApp Native Project 3 | // 4 | 5 | #ifndef NDK_HOOK_NATIVE_H 6 | #define NDK_HOOK_NATIVE_H 7 | 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "Helper.h" 16 | 17 | enum METHODS { 18 | OPEN_DEX = 0, CAMERA_SETUP, VIVO_AUDIORECORD_NATIVE_CHECK_PERMISSION 19 | }; 20 | 21 | void patchAndroidVM(JNIEnv *env, jobjectArray javaMethods, jstring packageName, jboolean isArt, jint apiLevel, jint cameraMethodType); 22 | 23 | //void *getVMHandle(); 24 | 25 | 26 | #endif //NDK_HOOK_NATIVE_H 27 | -------------------------------------------------------------------------------- /lib/src/main/jni/Helper.h: -------------------------------------------------------------------------------- 1 | // 2 | // VirtualApp Native Project 3 | // 4 | 5 | #ifndef NDK_LOG_H 6 | #define NDK_LOG_H 7 | 8 | #include 9 | 10 | #define TAG "VA-Native" 11 | 12 | #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) 13 | #define LOGDT(T, ...) __android_log_print(ANDROID_LOG_DEBUG, T, __VA_ARGS__) 14 | #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) 15 | #define LOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__) 16 | #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) 17 | 18 | #define FREE(ptr, org_ptr) { if ((void*) ptr != NULL && (void*) ptr != (void*) org_ptr) { free((void*) ptr); } } 19 | 20 | #define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0]))) 21 | 22 | #define NATIVE_METHOD(func_ptr, func_name, signature) { func_name, signature, reinterpret_cast(func_ptr) } 23 | 24 | #define JAVA_CLASS "com/lody/virtual/client/NativeEngine" 25 | 26 | #define ANDROID_JBMR2 18 27 | #define ANDROID_L 21 28 | #define ANDROID_M 23 29 | #define ANDROID_N 24 30 | 31 | 32 | #endif //NDK_LOG_H 33 | -------------------------------------------------------------------------------- /lib/src/main/jni/MSHook/CydiaSubstrate.h: -------------------------------------------------------------------------------- 1 | #ifndef CYDIASUBSTRATE_H_ 2 | #define CYDIASUBSTRATE_H_ 3 | 4 | #include 5 | #include 6 | 7 | #define _finline \ 8 | inline __attribute__((__always_inline__)) 9 | #define _disused \ 10 | __attribute__((__unused__)) 11 | #define _extern \ 12 | extern "C" __attribute__((__visibility__("default"))) 13 | 14 | #include "SubstrateStruct.h" 15 | #endif /* CYDIASUBSTRATE_H_ */ 16 | -------------------------------------------------------------------------------- /lib/src/main/jni/MSHook/Hooker.h: -------------------------------------------------------------------------------- 1 | #ifndef HOOKER_H_ 2 | #define HOOKER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "Debug.h" 10 | #include "Log.h" 11 | #include "PosixMemory.h" 12 | #include "CydiaSubstrate.h" 13 | 14 | namespace Cydia{ 15 | 16 | // void MSHookFunction(const char *soname, const char *symbol, void *replace_func, void **old_func); 17 | void MSHookFunction(void *symbol, void *replace, void **result); 18 | } 19 | #endif /* HOOKER_H_ */ -------------------------------------------------------------------------------- /lib/src/main/jni/MSHook/PosixMemory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PosixMemory.h 3 | * 4 | * Created on: 2016��2��22�� 5 | * Author: peng 6 | */ 7 | 8 | #ifndef POSIXMEMORY_H_ 9 | #define POSIXMEMORY_H_ 10 | 11 | #include "CydiaSubstrate.h" 12 | 13 | 14 | SubstrateMemoryRef SubstrateMemoryCreate(SubstrateAllocatorRef allocator, SubstrateProcessRef process, void *data, size_t size); 15 | void SubstrateMemoryRelease(SubstrateMemoryRef memory); 16 | extern "C" void __clear_cache(void *beg, void *end); 17 | 18 | struct SubstrateHookMemory { 19 | SubstrateMemoryRef handle_; 20 | 21 | SubstrateHookMemory(SubstrateProcessRef process, void *data, size_t size) : handle_(SubstrateMemoryCreate(NULL, NULL, data, size)) {} 22 | 23 | ~SubstrateHookMemory() { 24 | if (handle_ != NULL) 25 | SubstrateMemoryRelease(handle_); 26 | } 27 | }; 28 | 29 | #endif /* POSIXMEMORY_H_ */ 30 | -------------------------------------------------------------------------------- /lib/src/main/jni/MSHook/SubstrateStruct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NightOfTwelve/VirtualHookEx/bbe50eb549cdb7bb912440a7a7ed4d134ffc615d/lib/src/main/jni/MSHook/SubstrateStruct.h -------------------------------------------------------------------------------- /lib/src/main/res/layout/custom_notification_lite.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /lib/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -1px 4 | 416dp 5 | 6 | 7 | 64dp 8 | 8dp 9 | -1dp 10 | 11 | 256dp 12 | 4dp 13 | 14 | 128dp 15 | 16 | -------------------------------------------------------------------------------- /lib/src/main/res/values/integer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 4 | -------------------------------------------------------------------------------- /lib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | VirtualPackage Installer 4 | Admin 5 | Choose 6 | Chooser is Empty 7 | No find applications 8 | 9 | -------------------------------------------------------------------------------- /lib/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 17 | 19 | 20 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':lib', ':app' 2 | --------------------------------------------------------------------------------