├── .gitignore
├── .idea
├── codeStyleSettings.xml
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── dictionaries
│ └── CodeHz.xml
├── gradle.xml
├── misc.xml
├── modules.xml
└── runConfigurations.xml
├── LICENSE.txt
├── README.md
├── X.patch
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── one
│ │ └── codehz
│ │ └── container
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_installer-web.png
│ ├── ic_launcher-web.png
│ ├── java
│ │ └── one
│ │ │ └── codehz
│ │ │ └── container
│ │ │ ├── App.kt
│ │ │ ├── DetailActivity.kt
│ │ │ ├── InstallService.kt
│ │ │ ├── InstallerActivity.kt
│ │ │ ├── LoadingActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── ManageContainerApplicationStorageActivity.kt
│ │ │ ├── SettingsActivity.kt
│ │ │ ├── ShortcutActivity.kt
│ │ │ ├── SpaceManagerActivity.kt
│ │ │ ├── UserManagerActivity.kt
│ │ │ ├── UserSelectorActivity.kt
│ │ │ ├── VLoadingActivity.kt
│ │ │ ├── adapters
│ │ │ ├── AppListAdapter.kt
│ │ │ ├── ComponentListAdapter.kt
│ │ │ ├── LogListAdapter.kt
│ │ │ ├── PropertyListAdapter.kt
│ │ │ ├── RunningListAdapter.kt
│ │ │ ├── SpaceManagerAdapter.kt
│ │ │ └── UserListAdapter.kt
│ │ │ ├── annotation
│ │ │ └── PropertyListAnnotation.kt
│ │ │ ├── base
│ │ │ ├── BaseActivity.kt
│ │ │ ├── BaseAdapter.kt
│ │ │ ├── BaseViewHolder.kt
│ │ │ └── SameAsAble.kt
│ │ │ ├── behavior
│ │ │ ├── BottomNavigationBehavior.kt
│ │ │ └── ScrollAwareFABBehavior.kt
│ │ │ ├── db
│ │ │ └── MainDb.kt
│ │ │ ├── delegate
│ │ │ ├── MyAppRequestListener.kt
│ │ │ ├── MyComponentDelegate.kt
│ │ │ ├── MyForegroundNotificationDelegate.kt
│ │ │ ├── MyIORedirectDelegate.kt
│ │ │ ├── MyPhoneInfoDelegate.kt
│ │ │ ├── MyTaskDescriptionDelegate.kt
│ │ │ └── MyUncheckedExceptionDelegate.kt
│ │ │ ├── ext
│ │ │ ├── CollectionExt.kt
│ │ │ ├── StreamUtils.kt
│ │ │ └── Utils.kt
│ │ │ ├── fragment
│ │ │ ├── BasicDetailFragment.kt
│ │ │ ├── ComponentDetailFragment.kt
│ │ │ ├── InstalledFragment.kt
│ │ │ ├── RunningFragment.kt
│ │ │ └── SettingFragment.kt
│ │ │ ├── interfaces
│ │ │ └── IFloatingActionTarget.kt
│ │ │ ├── models
│ │ │ ├── AppModel.kt
│ │ │ ├── AppPropertyModel.kt
│ │ │ ├── ComponentInfoModel.kt
│ │ │ ├── LogModel.kt
│ │ │ ├── PropertyListItemModel.kt
│ │ │ ├── PropertyListModel.kt
│ │ │ ├── RunningAppBaseModel.kt
│ │ │ ├── RunningAppHeaderModel.kt
│ │ │ ├── RunningAppModel.kt
│ │ │ ├── SpaceManagerModel.kt
│ │ │ └── UserModel.kt
│ │ │ ├── provider
│ │ │ ├── MainProvider.kt
│ │ │ └── SystemApplicationProvider.kt
│ │ │ └── widget
│ │ │ ├── BaseBottomSheetDialog.kt
│ │ │ ├── MyBottomSheetDialog.kt
│ │ │ ├── OptimizingDialog.kt
│ │ │ └── RecycleViewWithEmptySupport.kt
│ └── res
│ │ ├── drawable-hdpi-v11
│ │ └── ic_install_request.png
│ │ ├── drawable-hdpi-v9
│ │ └── ic_install_request.png
│ │ ├── drawable-hdpi
│ │ ├── ic_add.png
│ │ ├── ic_alert.png
│ │ ├── ic_back_dark.png
│ │ ├── ic_back_light.png
│ │ ├── ic_clear_all.png
│ │ ├── ic_close_all.png
│ │ ├── ic_delete.png
│ │ ├── ic_device_information.png
│ │ ├── ic_empty.9.png
│ │ ├── ic_install_request.png
│ │ ├── ic_installed.png
│ │ ├── ic_installer.png
│ │ ├── ic_run.png
│ │ ├── ic_services.png
│ │ ├── ic_settings.png
│ │ ├── ic_shortcut_clear_all.png
│ │ ├── ic_smartphone.png
│ │ └── ic_stat_foreground.png
│ │ ├── drawable-mdpi-v11
│ │ └── ic_install_request.png
│ │ ├── drawable-mdpi-v9
│ │ └── ic_install_request.png
│ │ ├── drawable-mdpi
│ │ ├── ic_add.png
│ │ ├── ic_alert.png
│ │ ├── ic_back_dark.png
│ │ ├── ic_back_light.png
│ │ ├── ic_clear_all.png
│ │ ├── ic_close_all.png
│ │ ├── ic_delete.png
│ │ ├── ic_device_information.png
│ │ ├── ic_empty.9.png
│ │ ├── ic_install_request.png
│ │ ├── ic_installed.png
│ │ ├── ic_installer.png
│ │ ├── ic_run.png
│ │ ├── ic_services.png
│ │ ├── ic_settings.png
│ │ ├── ic_shortcut_clear_all.png
│ │ ├── ic_smartphone.png
│ │ └── ic_stat_foreground.png
│ │ ├── drawable-xhdpi-v11
│ │ └── ic_install_request.png
│ │ ├── drawable-xhdpi-v9
│ │ └── ic_install_request.png
│ │ ├── drawable-xhdpi
│ │ ├── ic_add.png
│ │ ├── ic_alert.png
│ │ ├── ic_back_dark.png
│ │ ├── ic_back_light.png
│ │ ├── ic_clear_all.png
│ │ ├── ic_close_all.png
│ │ ├── ic_delete.png
│ │ ├── ic_device_information.png
│ │ ├── ic_empty.9.png
│ │ ├── ic_install_request.png
│ │ ├── ic_installed.png
│ │ ├── ic_installer.png
│ │ ├── ic_run.png
│ │ ├── ic_services.png
│ │ ├── ic_settings.png
│ │ ├── ic_shortcut_clear_all.png
│ │ ├── ic_smartphone.png
│ │ └── ic_stat_foreground.png
│ │ ├── drawable-xxhdpi-v11
│ │ └── ic_install_request.png
│ │ ├── drawable-xxhdpi-v9
│ │ └── ic_install_request.png
│ │ ├── drawable-xxhdpi
│ │ ├── ic_add.png
│ │ ├── ic_alert.png
│ │ ├── ic_back_dark.png
│ │ ├── ic_back_light.png
│ │ ├── ic_clear_all.png
│ │ ├── ic_close_all.png
│ │ ├── ic_delete.png
│ │ ├── ic_device_information.png
│ │ ├── ic_empty.9.png
│ │ ├── ic_install_request.png
│ │ ├── ic_installed.png
│ │ ├── ic_installer.png
│ │ ├── ic_run.png
│ │ ├── ic_services.png
│ │ ├── ic_settings.png
│ │ ├── ic_shortcut_clear_all.png
│ │ ├── ic_smartphone.png
│ │ └── ic_stat_foreground.png
│ │ ├── drawable-xxxhdpi
│ │ ├── ic_add.png
│ │ ├── ic_clear_all.png
│ │ ├── ic_delete.png
│ │ ├── ic_device_information.png
│ │ ├── ic_installed.png
│ │ ├── ic_run.png
│ │ ├── ic_services.png
│ │ ├── ic_settings.png
│ │ ├── ic_shortcut_clear_all.png
│ │ ├── ic_smartphone.png
│ │ └── ic_stat_foreground.png
│ │ ├── drawable
│ │ ├── ic_close_all_inset.xml
│ │ └── ic_search_black_24dp.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── app_item.xml
│ │ ├── application_basic_detail.xml
│ │ ├── application_detail.xml
│ │ ├── bottom_dialog.xml
│ │ ├── component_detail.xml
│ │ ├── component_info_item.xml
│ │ ├── container_app_data_manager.xml
│ │ ├── content_main.xml
│ │ ├── dialog_input.xml
│ │ ├── input_layout.xml
│ │ ├── loading_page.xml
│ │ ├── log_line.xml
│ │ ├── opt_dialog.xml
│ │ ├── property_item.xml
│ │ ├── running_app_header.xml
│ │ ├── space_manager.xml
│ │ ├── space_manager_item.xml
│ │ ├── user_list_item.xml
│ │ └── user_manager_activity.xml
│ │ ├── menu
│ │ ├── detail_menu.xml
│ │ ├── menu_main.xml
│ │ ├── nav_menu.xml
│ │ └── space_manager.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
│ │ ├── transition
│ │ ├── custom.xml
│ │ └── custom_out.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ ├── values-zh
│ │ └── strings.xml
│ │ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ ├── xml-v25
│ │ └── shortcuts.xml
│ │ └── xml
│ │ ├── preferences.xml
│ │ └── privacy_model.xml
│ └── test
│ └── java
│ └── one
│ └── codehz
│ └── container
│ └── ExampleUnitTest.java
├── build.gradle
├── 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
│ │ │ │ ├── IPackageDeleteObserver2.aidl
│ │ │ │ ├── IPackageInstallObserver.aidl
│ │ │ │ ├── IPackageInstallObserver2.aidl
│ │ │ │ ├── IPackageInstallerCallback.aidl
│ │ │ │ └── IPackageInstallerSession.aidl
│ │ └── net
│ │ │ └── wifi
│ │ │ └── IWifiScanner.aidl
│ └── com
│ │ └── lody
│ │ └── virtual
│ │ ├── client
│ │ └── IVClient.aidl
│ │ ├── helper
│ │ └── proto
│ │ │ ├── AppSetting.aidl
│ │ │ ├── AppTaskInfo.aidl
│ │ │ ├── InstallResult.aidl
│ │ │ ├── PendingIntentData.aidl
│ │ │ ├── PendingResultData.aidl
│ │ │ ├── Problem.aidl
│ │ │ ├── ReceiverInfo.aidl
│ │ │ └── VParceledListSlice.aidl
│ │ ├── os
│ │ └── VUserInfo.aidl
│ │ └── server
│ │ ├── IAccountManager.aidl
│ │ ├── IActivityManager.aidl
│ │ ├── IAppManager.aidl
│ │ ├── IBinderDelegateService.aidl
│ │ ├── IJobScheduler.aidl
│ │ ├── INotificationManager.aidl
│ │ ├── IPackageInstaller.aidl
│ │ ├── IPackageInstallerSession.aidl
│ │ ├── IPackageManager.aidl
│ │ ├── IUserManager.aidl
│ │ ├── interfaces
│ │ ├── IAppObserver.aidl
│ │ ├── IAppRequestListener.aidl
│ │ ├── IIntentFilterObserver.aidl
│ │ ├── IProcessObserver.aidl
│ │ ├── IServiceFetcher.aidl
│ │ └── IUiObserver.aidl
│ │ └── pm
│ │ └── installer
│ │ ├── SessionInfo.aidl
│ │ └── SessionParams.aidl
│ ├── java
│ ├── android
│ │ └── content
│ │ │ └── pm
│ │ │ └── PackageParser.java
│ ├── com
│ │ └── lody
│ │ │ └── virtual
│ │ │ ├── IOHook.java
│ │ │ ├── client
│ │ │ ├── VClientImpl.java
│ │ │ ├── core
│ │ │ │ ├── InstallStrategy.java
│ │ │ │ ├── PatchManager.java
│ │ │ │ └── VirtualCore.java
│ │ │ ├── env
│ │ │ │ ├── Constants.java
│ │ │ │ ├── DeadServerException.java
│ │ │ │ ├── SpecialComponentList.java
│ │ │ │ └── VirtualRuntime.java
│ │ │ ├── fixer
│ │ │ │ ├── ActivityFixer.java
│ │ │ │ ├── ComponentFixer.java
│ │ │ │ └── ContextFixer.java
│ │ │ ├── hook
│ │ │ │ ├── base
│ │ │ │ │ ├── ApiLimit.java
│ │ │ │ │ ├── Hook.java
│ │ │ │ │ ├── HookBinderDelegate.java
│ │ │ │ │ ├── HookDelegate.java
│ │ │ │ │ ├── Patch.java
│ │ │ │ │ ├── PatchBinderDelegate.java
│ │ │ │ │ ├── PatchDelegate.java
│ │ │ │ │ ├── ReplaceCallingPkgHook.java
│ │ │ │ │ ├── ReplaceLastPkgHook.java
│ │ │ │ │ ├── ReplaceLastUidHook.java
│ │ │ │ │ ├── ReplaceSequencePkgHook.java
│ │ │ │ │ ├── ReplaceSpecPkgHook.java
│ │ │ │ │ ├── ReplaceUidHook.java
│ │ │ │ │ ├── ResultStaticHook.java
│ │ │ │ │ └── StaticHook.java
│ │ │ │ ├── delegate
│ │ │ │ │ ├── AppInstrumentation.java
│ │ │ │ │ ├── ComponentDelegate.java
│ │ │ │ │ ├── ForegroundNotificationDelegate.java
│ │ │ │ │ ├── IORedirectDelegate.java
│ │ │ │ │ ├── InstrumentationDelegate.java
│ │ │ │ │ ├── PhoneInfoDelegate.java
│ │ │ │ │ ├── TaskDescriptionDelegate.java
│ │ │ │ │ └── UncheckedExceptionDelegate.java
│ │ │ │ ├── patchs
│ │ │ │ │ ├── account
│ │ │ │ │ │ └── AccountManagerPatch.java
│ │ │ │ │ ├── alarm
│ │ │ │ │ │ └── AlarmManagerPatch.java
│ │ │ │ │ ├── am
│ │ │ │ │ │ ├── ActivityManagerPatch.java
│ │ │ │ │ │ ├── AddPackageDependency.java
│ │ │ │ │ │ ├── BindService.java
│ │ │ │ │ │ ├── BroadcastIntent.java
│ │ │ │ │ │ ├── CheckGrantUriPermission.java
│ │ │ │ │ │ ├── CheckPermission.java
│ │ │ │ │ │ ├── CrashApplication.java
│ │ │ │ │ │ ├── FinishActivity.java
│ │ │ │ │ │ ├── ForceStopPackage.java
│ │ │ │ │ │ ├── GetActivityClassForToken.java
│ │ │ │ │ │ ├── GetCallingActivity.java
│ │ │ │ │ │ ├── GetCallingPackage.java
│ │ │ │ │ │ ├── GetContentProvider.java
│ │ │ │ │ │ ├── GetContentProviderExternal.java
│ │ │ │ │ │ ├── GetCurrentUser.java
│ │ │ │ │ │ ├── GetIntentForIntentSender.java
│ │ │ │ │ │ ├── GetIntentSender.java
│ │ │ │ │ │ ├── GetPackageAskScreenCompat.java
│ │ │ │ │ │ ├── GetPackageForIntentSender.java
│ │ │ │ │ │ ├── GetPackageForToken.java
│ │ │ │ │ │ ├── GetPersistedUriPermissions.java
│ │ │ │ │ │ ├── GetRunningAppProcesses.java
│ │ │ │ │ │ ├── GetServices.java
│ │ │ │ │ │ ├── GetTasks.java
│ │ │ │ │ │ ├── GrantUriPermissionFromOwner.java
│ │ │ │ │ │ ├── HCallbackHook.java
│ │ │ │ │ │ ├── HandleIncomingUser.java
│ │ │ │ │ │ ├── KillApplicationProcess.java
│ │ │ │ │ │ ├── PeekService.java
│ │ │ │ │ │ ├── PublishContentProviders.java
│ │ │ │ │ │ ├── PublishService.java
│ │ │ │ │ │ ├── RegisterReceiver.java
│ │ │ │ │ │ ├── ServiceDoneExecuting.java
│ │ │ │ │ │ ├── SetPackageAskScreenCompat.java
│ │ │ │ │ │ ├── SetServiceForeground.java
│ │ │ │ │ │ ├── SetTaskDescription.java
│ │ │ │ │ │ ├── StartActivity.java
│ │ │ │ │ │ ├── StartActivityAndWait.java
│ │ │ │ │ │ ├── StartActivityAsCaller.java
│ │ │ │ │ │ ├── StartActivityAsUser.java
│ │ │ │ │ │ ├── StartActivityIntentSender.java
│ │ │ │ │ │ ├── StartActivityWithConfig.java
│ │ │ │ │ │ ├── StartNextMatchingActivity.java
│ │ │ │ │ │ ├── StartService.java
│ │ │ │ │ │ ├── StartVoiceActivity.java
│ │ │ │ │ │ ├── StopService.java
│ │ │ │ │ │ ├── StopServiceToken.java
│ │ │ │ │ │ ├── UnbindFinished.java
│ │ │ │ │ │ ├── UnbindService.java
│ │ │ │ │ │ ├── UnstableProviderDied.java
│ │ │ │ │ │ └── UpdateDeviceOwner.java
│ │ │ │ │ ├── appops
│ │ │ │ │ │ └── AppOpsManagerPatch.java
│ │ │ │ │ ├── appwidget
│ │ │ │ │ │ └── AppWidgetManagerPatch.java
│ │ │ │ │ ├── audio
│ │ │ │ │ │ └── AudioManagerPatch.java
│ │ │ │ │ ├── backup
│ │ │ │ │ │ └── BackupManagerPatch.java
│ │ │ │ │ ├── bluetooth
│ │ │ │ │ │ ├── BluetoothPatch.java
│ │ │ │ │ │ └── GetAddress.java
│ │ │ │ │ ├── clipboard
│ │ │ │ │ │ └── ClipBoardPatch.java
│ │ │ │ │ ├── connectivity
│ │ │ │ │ │ ├── ConnectivityPatch.java
│ │ │ │ │ │ └── Hook_GetActiveNetworkInfo.java
│ │ │ │ │ ├── content
│ │ │ │ │ │ └── ContentServicePatch.java
│ │ │ │ │ ├── display
│ │ │ │ │ │ ├── CreateVirtualDisplay.java
│ │ │ │ │ │ └── DisplayPatch.java
│ │ │ │ │ ├── dropbox
│ │ │ │ │ │ └── DropBoxManagerPatch.java
│ │ │ │ │ ├── graphics
│ │ │ │ │ │ └── GraphicsStatsPatch.java
│ │ │ │ │ ├── imms
│ │ │ │ │ │ └── MmsPatch.java
│ │ │ │ │ ├── input
│ │ │ │ │ │ ├── InputMethodManagerPatch.java
│ │ │ │ │ │ ├── StartInput.java
│ │ │ │ │ │ └── WindowGainedFocus.java
│ │ │ │ │ ├── isms
│ │ │ │ │ │ └── ISmsPatch.java
│ │ │ │ │ ├── isub
│ │ │ │ │ │ └── ISubPatch.java
│ │ │ │ │ ├── job
│ │ │ │ │ │ └── JobPatch.java
│ │ │ │ │ ├── libcore
│ │ │ │ │ │ ├── GetUid.java
│ │ │ │ │ │ ├── Getpwnam.java
│ │ │ │ │ │ ├── GetsockoptUcred.java
│ │ │ │ │ │ ├── LibCorePatch.java
│ │ │ │ │ │ ├── Lstat.java
│ │ │ │ │ │ └── Stat.java
│ │ │ │ │ ├── location
│ │ │ │ │ │ └── LocationManagerPatch.java
│ │ │ │ │ ├── media
│ │ │ │ │ │ ├── router
│ │ │ │ │ │ │ ├── MediaRouterServicePatch.java
│ │ │ │ │ │ │ └── RegisterClientAsUser.java
│ │ │ │ │ │ └── session
│ │ │ │ │ │ │ ├── CreateSession.java
│ │ │ │ │ │ │ └── SessionManagerPatch.java
│ │ │ │ │ ├── mount
│ │ │ │ │ │ ├── GetVolumeList.java
│ │ │ │ │ │ ├── Mkdirs.java
│ │ │ │ │ │ └── MountServicePatch.java
│ │ │ │ │ ├── network
│ │ │ │ │ │ └── NetworkManagementPatch.java
│ │ │ │ │ ├── notification
│ │ │ │ │ │ ├── AreNotificationsEnabledForPackage.java
│ │ │ │ │ │ ├── CancelAllNotifications.java
│ │ │ │ │ │ ├── CancelNotificationWithTag.java
│ │ │ │ │ │ ├── EnqueueNotification.java
│ │ │ │ │ │ ├── EnqueueNotificationWithTag.java
│ │ │ │ │ │ ├── EnqueueNotificationWithTagPriority.java
│ │ │ │ │ │ ├── NotificationManagerPatch.java
│ │ │ │ │ │ ├── SetNotificationsEnabledForPackage.java
│ │ │ │ │ │ └── compat
│ │ │ │ │ │ │ ├── NotificationHandler.java
│ │ │ │ │ │ │ ├── NotificationUtils.java
│ │ │ │ │ │ │ ├── PendIntentCompat.java
│ │ │ │ │ │ │ ├── RemoteViewsCompat.java
│ │ │ │ │ │ │ ├── RemoteViewsUtils.java
│ │ │ │ │ │ │ └── WidthCompat.java
│ │ │ │ │ ├── persistent_data_block
│ │ │ │ │ │ └── PersistentDataBlockServicePatch.java
│ │ │ │ │ ├── phonesubinfo
│ │ │ │ │ │ ├── GetDeviceId.java
│ │ │ │ │ │ ├── GetDeviceIdForSubscriber.java
│ │ │ │ │ │ └── PhoneSubInfoPatch.java
│ │ │ │ │ ├── pm
│ │ │ │ │ │ ├── ActivitySupportsIntent.java
│ │ │ │ │ │ ├── AddOnPermissionsChangeListener.java
│ │ │ │ │ │ ├── AddPackageToPreferred.java
│ │ │ │ │ │ ├── CheckPermission.java
│ │ │ │ │ │ ├── CheckSignatures.java
│ │ │ │ │ │ ├── ClearPackagePersistentPreferredActivities.java
│ │ │ │ │ │ ├── ClearPackagePreferredActivities.java
│ │ │ │ │ │ ├── DeleteApplicationCacheFiles.java
│ │ │ │ │ │ ├── DeletePackage.java
│ │ │ │ │ │ ├── GetActivityInfo.java
│ │ │ │ │ │ ├── GetApplicationBlockedSettingAsUser.java
│ │ │ │ │ │ ├── GetApplicationEnabledSetting.java
│ │ │ │ │ │ ├── GetApplicationInfo.java
│ │ │ │ │ │ ├── GetComponentEnabledSetting.java
│ │ │ │ │ │ ├── GetInstalledApplications.java
│ │ │ │ │ │ ├── GetInstalledPackages.java
│ │ │ │ │ │ ├── GetInstallerPackageName.java
│ │ │ │ │ │ ├── GetPackageGids.java
│ │ │ │ │ │ ├── GetPackageGidsEtc.java
│ │ │ │ │ │ ├── GetPackageInfo.java
│ │ │ │ │ │ ├── GetPackageInstaller.java
│ │ │ │ │ │ ├── GetPackageUid.java
│ │ │ │ │ │ ├── GetPackageUidEtc.java
│ │ │ │ │ │ ├── GetPackagesForUid.java
│ │ │ │ │ │ ├── GetPermissionFlags.java
│ │ │ │ │ │ ├── GetPermissionGroupInfo.java
│ │ │ │ │ │ ├── GetPermissions.java
│ │ │ │ │ │ ├── GetPreferredActivities.java
│ │ │ │ │ │ ├── GetProviderInfo.java
│ │ │ │ │ │ ├── GetReceiverInfo.java
│ │ │ │ │ │ ├── GetServiceInfo.java
│ │ │ │ │ │ ├── IsPackageAvailable.java
│ │ │ │ │ │ ├── IsPackageForzen.java
│ │ │ │ │ │ ├── PackageManagerPatch.java
│ │ │ │ │ │ ├── QueryContentProviders.java
│ │ │ │ │ │ ├── QueryIntentActivities.java
│ │ │ │ │ │ ├── QueryIntentContentProviders.java
│ │ │ │ │ │ ├── QueryIntentReceivers.java
│ │ │ │ │ │ ├── QueryIntentServices.java
│ │ │ │ │ │ ├── RemoveOnPermissionsChangeListener.java
│ │ │ │ │ │ ├── RemovePackageFromPreferred.java
│ │ │ │ │ │ ├── ResolveContentProvider.java
│ │ │ │ │ │ ├── ResolveIntent.java
│ │ │ │ │ │ ├── ResolveService.java
│ │ │ │ │ │ ├── RevokeRuntimePermission.java
│ │ │ │ │ │ ├── SetApplicationBlockedSettingAsUser.java
│ │ │ │ │ │ ├── SetApplicationEnabledSetting.java
│ │ │ │ │ │ ├── SetComponentEnabledSetting.java
│ │ │ │ │ │ └── SetPackageStoppedState.java
│ │ │ │ │ ├── power
│ │ │ │ │ │ └── PowerManagerPatch.java
│ │ │ │ │ ├── restriction
│ │ │ │ │ │ └── RestrictionPatch.java
│ │ │ │ │ ├── search
│ │ │ │ │ │ ├── GetSearchableInfo.java
│ │ │ │ │ │ └── SearchManagerPatch.java
│ │ │ │ │ ├── telephony
│ │ │ │ │ │ ├── GetDeviceId.java
│ │ │ │ │ │ ├── GetLine1NumberForDisplay.java
│ │ │ │ │ │ ├── TelephonyPatch.java
│ │ │ │ │ │ └── TelephonyRegistryPatch.java
│ │ │ │ │ ├── user
│ │ │ │ │ │ └── UserManagerPatch.java
│ │ │ │ │ ├── vibrator
│ │ │ │ │ │ └── VibratorPatch.java
│ │ │ │ │ ├── wifi
│ │ │ │ │ │ ├── GetBatchedScanResults.java
│ │ │ │ │ │ ├── GetScanResults.java
│ │ │ │ │ │ ├── SetWifiEnabled.java
│ │ │ │ │ │ └── WifiManagerPatch.java
│ │ │ │ │ ├── wifi_scanner
│ │ │ │ │ │ ├── GhostWifiScannerImpl.java
│ │ │ │ │ │ └── WifiScannerPatch.java
│ │ │ │ │ └── window
│ │ │ │ │ │ ├── BasePatchSession.java
│ │ │ │ │ │ ├── OpenSession.java
│ │ │ │ │ │ ├── OverridePendingAppTransition.java
│ │ │ │ │ │ ├── OverridePendingAppTransitionInPlace.java
│ │ │ │ │ │ ├── SetAppStartingWindow.java
│ │ │ │ │ │ ├── WindowManagerPatch.java
│ │ │ │ │ │ └── session
│ │ │ │ │ │ ├── Add.java
│ │ │ │ │ │ ├── AddToDisplay.java
│ │ │ │ │ │ ├── AddToDisplayWithoutInputChannel.java
│ │ │ │ │ │ ├── AddWithoutInputChannel.java
│ │ │ │ │ │ ├── BaseReplacePkgName.java
│ │ │ │ │ │ ├── Relayout.java
│ │ │ │ │ │ └── WindowSessionPatch.java
│ │ │ │ ├── providers
│ │ │ │ │ ├── DownloadProviderHook.java
│ │ │ │ │ ├── ExternalProviderHook.java
│ │ │ │ │ ├── InternalProviderHook.java
│ │ │ │ │ ├── ProviderHook.java
│ │ │ │ │ └── SettingsProviderHook.java
│ │ │ │ ├── secondary
│ │ │ │ │ ├── ProxyServiceFactory.java
│ │ │ │ │ ├── ServiceConnectionDelegate.java
│ │ │ │ │ └── StubBinder.java
│ │ │ │ └── utils
│ │ │ │ │ └── HookUtils.java
│ │ │ ├── interfaces
│ │ │ │ ├── IEventHandler.java
│ │ │ │ └── Injectable.java
│ │ │ ├── ipc
│ │ │ │ ├── ActivityClientRecord.java
│ │ │ │ ├── LocalProxyUtils.java
│ │ │ │ ├── ProviderCall.java
│ │ │ │ ├── ServiceManagerNative.java
│ │ │ │ ├── VAccountManager.java
│ │ │ │ ├── VActivityManager.java
│ │ │ │ ├── VJobScheduler.java
│ │ │ │ ├── VNotificationManager.java
│ │ │ │ └── VPackageManager.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
│ │ │ ├── compat
│ │ │ │ ├── AccountManagerCompat.java
│ │ │ │ ├── ActivityManagerCompat.java
│ │ │ │ ├── BundleCompat.java
│ │ │ │ ├── IApplicationThreadCompat.java
│ │ │ │ ├── NativeLibraryHelperCompat.java
│ │ │ │ ├── ObjectsCompat.java
│ │ │ │ ├── PackageParserCompat.java
│ │ │ │ ├── ParceledListSliceCompat.java
│ │ │ │ └── SystemPropertiesCompat.java
│ │ │ ├── component
│ │ │ │ ├── BaseContentProvider.java
│ │ │ │ └── BaseService.java
│ │ │ ├── proto
│ │ │ │ ├── AppSetting.java
│ │ │ │ ├── AppTaskInfo.java
│ │ │ │ ├── InstallResult.java
│ │ │ │ ├── PendingIntentData.java
│ │ │ │ ├── PendingResultData.java
│ │ │ │ ├── Problem.java
│ │ │ │ ├── ReceiverInfo.java
│ │ │ │ ├── StubActivityRecord.java
│ │ │ │ └── VParceledListSlice.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
│ │ │ │ ├── ResourcesUtils.java
│ │ │ │ ├── Singleton.java
│ │ │ │ ├── VLog.java
│ │ │ │ └── collection
│ │ │ │ ├── ArrayMap.java
│ │ │ │ ├── ArraySet.java
│ │ │ │ ├── ContainerHelpers.java
│ │ │ │ ├── MapCollections.java
│ │ │ │ ├── SimpleArrayMap.java
│ │ │ │ └── SparseArray.java
│ │ │ ├── os
│ │ │ ├── VBinder.java
│ │ │ ├── VEnvironment.java
│ │ │ ├── VUserHandle.java
│ │ │ ├── VUserInfo.java
│ │ │ └── VUserManager.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
│ │ │ ├── UiEngine.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
│ │ │ ├── PackageCache.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
│ │ │ └── secondary
│ │ │ ├── BinderDelegateService.java
│ │ │ └── FakeIdentityBinder.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
│ │ │ ├── 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
│ │ │ ├── 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
│ │ │ ├── ContentProviderClient.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
│ │ │ │ ├── PackageInstaller.java
│ │ │ │ ├── PackageParser.java
│ │ │ │ ├── PackageParserJellyBean.java
│ │ │ │ ├── PackageParserJellyBean17.java
│ │ │ │ ├── PackageParserLollipop.java
│ │ │ │ ├── PackageParserLollipop22.java
│ │ │ │ ├── PackageParserMarshmallow.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
│ │ │ ├── ILocationListener.java
│ │ │ ├── ILocationManager.java
│ │ │ └── LocationRequestL.java
│ │ ├── media
│ │ │ ├── AudioManager.java
│ │ │ ├── IAudioService.java
│ │ │ ├── IMediaRouterService.java
│ │ │ ├── MediaRouter.java
│ │ │ └── session
│ │ │ │ └── ISessionManager.java
│ │ ├── net
│ │ │ ├── IConnectivityManager.java
│ │ │ └── wifi
│ │ │ │ ├── IWifiManager.java
│ │ │ │ └── WifiScanner.java
│ │ ├── os
│ │ │ ├── Build.java
│ │ │ ├── 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
│ │ │ └── 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
│ ├── Helper.h
│ └── InlineHook
│ │ ├── ARM.cpp
│ │ ├── ARM.h
│ │ ├── CydiaSubstrate.h
│ │ ├── Debug.cpp
│ │ ├── Debug.h
│ │ ├── Hooker.cpp
│ │ ├── Hooker.h
│ │ ├── Log.h
│ │ ├── MSHook.cpp
│ │ ├── MSHook.h
│ │ ├── PosixMemory.cpp
│ │ ├── PosixMemory.h
│ │ ├── SubstrateStruct.h
│ │ ├── Thumb.cpp
│ │ ├── Thumb.h
│ │ ├── hde64.h
│ │ ├── util.cpp
│ │ ├── util.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 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 | *.apk
11 | .idea/vcs.xml
12 | app/libs/
13 | app/src/main/res/values-v21/
14 | .idea/
15 | .idea/inspectionProfiles/
16 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/dictionaries/CodeHz.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | github
5 | lody
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/src/main/ic_installer-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/ic_installer-web.png
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/InstallerActivity.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container
2 |
3 | import android.app.Activity
4 | import android.content.Intent
5 | import android.os.Bundle
6 |
7 | class InstallerActivity : Activity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 |
11 | if (intent.action == null || intent.data == null) return finish()
12 |
13 | startService(Intent(this, InstallService::class.java).apply {
14 | this.action = InstallService.REQUEST_INSTALL
15 | this.data = intent.data
16 | })
17 | finish()
18 | }
19 |
20 |
21 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/ManageContainerApplicationStorageActivity.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container
2 |
3 | import android.os.Bundle
4 | import one.codehz.container.base.BaseActivity
5 |
6 | class ManageContainerApplicationStorageActivity : BaseActivity(R.layout.container_app_data_manager) {
7 | override fun onCreate(savedInstanceState: Bundle?) {
8 | super.onCreate(savedInstanceState)
9 | }
10 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/annotation/PropertyListAnnotation.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.annotation
2 |
3 | @Target(AnnotationTarget.PROPERTY_GETTER)
4 | @Retention(AnnotationRetention.RUNTIME)
5 | annotation class propertyField(val nameRes: Int, val order: Int = 0)
6 |
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/base/BaseActivity.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.base
2 |
3 | import android.os.Bundle
4 | import android.support.v7.app.AppCompatActivity
5 | import android.support.v7.widget.Toolbar
6 | import one.codehz.container.R
7 | import one.codehz.container.ext.get
8 |
9 | abstract class BaseActivity(private val layoutId: Int) : AppCompatActivity() {
10 | val toolbar by lazy { this[R.id.toolbar] }
11 | override fun onCreate(savedInstanceState: Bundle?) {
12 | super.onCreate(savedInstanceState)
13 |
14 | setContentView(layoutId)
15 | setSupportActionBar(toolbar)
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/base/BaseViewHolder.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.base
2 |
3 | import android.support.v7.widget.RecyclerView
4 | import android.view.View
5 |
6 | abstract class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) {
7 | abstract infix fun updateData(data: T)
8 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/base/SameAsAble.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.base
2 |
3 | interface SameAsAble> {
4 | infix fun sameAs(other: T): Boolean = this == other
5 | infix fun getPayloads(other: T): Any? = null
6 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/delegate/MyTaskDescriptionDelegate.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.delegate
2 |
3 | import android.app.ActivityManager
4 | import com.lody.virtual.client.hook.delegate.TaskDescriptionDelegate
5 | import one.codehz.container.ext.vUserManager
6 |
7 | class MyTaskDescriptionDelegate : TaskDescriptionDelegate {
8 | override fun getTaskDescription(oldTaskDescription: ActivityManager.TaskDescription): ActivityManager.TaskDescription {
9 | val prefix = vUserManager.userName + " - "
10 | return when {
11 | oldTaskDescription.label.startsWith(prefix) -> oldTaskDescription
12 | else -> ActivityManager.TaskDescription(prefix + oldTaskDescription.label, oldTaskDescription.icon, oldTaskDescription.primaryColor)
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/ext/CollectionExt.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.ext
2 |
3 | infix fun Collection.differenceTo(others: Collection): Boolean {
4 | if (this.size != others.size)
5 | return true
6 | else {
7 | for ((a, b) in zip(others)) {
8 | if (a != b) return true
9 | else continue
10 | }
11 | return false
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/ext/StreamUtils.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.ext
2 |
3 | import java.io.InputStream
4 | import java.io.OutputStream
5 |
6 | fun streamTransfer(pair: Pair, bufferSize: Int, progressFn: ((Long) -> Unit)? = null): Long {
7 | val (input, output) = pair
8 | var bytesCopied: Long = 0
9 | val buffer = ByteArray(bufferSize)
10 | var bytes = input.read(buffer)
11 | while (bytes >= 0) {
12 | output.write(buffer, 0, bytes)
13 | bytesCopied += bytes
14 | progressFn?.invoke(bytesCopied)
15 | bytes = input.read(buffer)
16 | }
17 | return bytesCopied
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/interfaces/IFloatingActionTarget.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.interfaces
2 |
3 | interface IFloatingActionTarget {
4 | val canBeFloatingActionTarget: Boolean
5 |
6 | fun onFloatingAction()
7 |
8 | fun getFloatingDrawable(): Int
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/AppPropertyModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | import one.codehz.container.R
4 | import one.codehz.container.annotation.propertyField
5 | import one.codehz.container.base.SameAsAble
6 | import one.codehz.container.ext.virtualCore
7 |
8 | class AppPropertyModel(
9 | val model: AppModel
10 | ) : PropertyListModel(), SameAsAble {
11 | @get:propertyField(R.string.package_name, 0)
12 | val packageName: String = model.packageName
13 | val setting = virtualCore.findApp(packageName)!!
14 | @get:propertyField(R.string.apk_path, 1)
15 | val apkPath = setting.apkPath!!
16 | @get:propertyField(R.string.native_library_path, 2)
17 | val libPath = setting.libPath!!
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/LogModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | import one.codehz.container.base.SameAsAble
4 |
5 | class LogModel(val time: String, val data: String) : SameAsAble {
6 | override fun equals(other: Any?): Boolean {
7 | if (this === other) return true
8 | if (other?.javaClass != javaClass) return false
9 |
10 | other as LogModel
11 |
12 | if (time != other.time) return false
13 | if (data != other.data) return false
14 |
15 | return true
16 | }
17 |
18 | override fun hashCode(): Int {
19 | var result = time.hashCode()
20 | result = 31 * result + data.hashCode()
21 | return result
22 | }
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/PropertyListItemModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | import one.codehz.container.base.SameAsAble
4 |
5 | data class PropertyListItemModel(val key: Int, val value: String) : SameAsAble
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/PropertyListModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | import one.codehz.container.annotation.propertyField
4 |
5 | open class PropertyListModel {
6 | fun getItems() = this.javaClass.declaredMethods
7 | .map { it.getAnnotation(propertyField::class.java) to it }
8 | .filter { it.first != null }
9 | .sortedBy { it.first.order }
10 | .map { PropertyListItemModel(it.first.nameRes, it.second.invoke(this).toString()) }
11 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/RunningAppBaseModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | import one.codehz.container.base.SameAsAble
4 |
5 | abstract class RunningAppBaseModel(val isHeader: Boolean = true) : SameAsAble
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/RunningAppHeaderModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | class RunningAppHeaderModel(val uid: Int, val name: String) : RunningAppBaseModel(true) {
4 | override fun equals(other: Any?): Boolean {
5 | if (this === other) return true
6 | if (other?.javaClass != javaClass) return false
7 |
8 | other as RunningAppHeaderModel
9 |
10 | if (uid != other.uid) return false
11 |
12 | return true
13 | }
14 |
15 | override fun hashCode(): Int {
16 | return uid
17 | }
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/RunningAppModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | class RunningAppModel(val appModel: AppModel, val userId: Int) : RunningAppBaseModel(false) {
4 | override fun equals(other: Any?): Boolean {
5 | if (this === other) return true
6 | if (other?.javaClass != javaClass) return false
7 |
8 | other as RunningAppModel
9 |
10 | if (appModel != other.appModel) return false
11 | if (userId != other.userId) return false
12 |
13 | return true
14 | }
15 |
16 | override fun hashCode(): Int {
17 | var result = appModel.hashCode()
18 | result = 31 * result + userId
19 | return result
20 | }
21 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/models/UserModel.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.models
2 |
3 | import com.lody.virtual.os.VUserInfo
4 | import one.codehz.container.base.SameAsAble
5 |
6 | class UserModel(from: VUserInfo) : SameAsAble {
7 | val id = from.id
8 | val name = from.name!!
9 |
10 | override fun equals(other: Any?): Boolean {
11 | if (this === other) return true
12 | if (other?.javaClass != javaClass) return false
13 |
14 | other as UserModel
15 |
16 | if (id != other.id) return false
17 | if (name != other.name) return false
18 |
19 | return true
20 | }
21 |
22 | override fun hashCode(): Int {
23 | var result = id
24 | result = 31 * result + name.hashCode()
25 | return result
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/one/codehz/container/widget/BaseBottomSheetDialog.kt:
--------------------------------------------------------------------------------
1 | package one.codehz.container.widget
2 |
3 | import android.content.Context
4 | import android.graphics.Rect
5 | import android.support.design.widget.BottomSheetDialog
6 | import android.view.WindowManager
7 | import one.codehz.container.R
8 |
9 |
10 | open class BaseBottomSheetDialog(context: Context, layoutResId: Int = 0) : BottomSheetDialog(context, R.style.MyBottomSheetDialog) {
11 | init {
12 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
13 | if (layoutResId != 0) super.setContentView(layoutResId)
14 | }
15 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v11/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi-v11/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi-v9/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi-v9/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_alert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_back_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_back_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_back_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_back_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_close_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_close_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_device_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_device_information.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_empty.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_empty.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_installed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_installer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_installer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_run.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_services.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_settings.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_shortcut_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_shortcut_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smartphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_smartphone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_stat_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-hdpi/ic_stat_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v11/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi-v11/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi-v9/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi-v9/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_alert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_back_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_back_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_back_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_back_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_close_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_close_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_device_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_device_information.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_empty.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_empty.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_installed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_installer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_installer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_run.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_services.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_settings.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_shortcut_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_shortcut_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smartphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_smartphone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_stat_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-mdpi/ic_stat_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v11/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi-v11/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi-v9/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi-v9/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_alert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_back_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_back_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_back_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_back_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_close_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_close_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_device_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_device_information.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_empty.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_empty.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_installed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_installer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_installer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_run.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_services.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_settings.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_shortcut_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_shortcut_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smartphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_smartphone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_stat_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xhdpi/ic_stat_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v11/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi-v11/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi-v9/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi-v9/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_alert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_back_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_back_dark.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_back_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_back_light.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_close_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_close_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_device_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_device_information.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_empty.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_empty.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_install_request.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_install_request.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_installed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_installer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_installer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_run.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_services.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shortcut_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_shortcut_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smartphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_smartphone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_stat_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxhdpi/ic_stat_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_device_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_device_information.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_installed.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_run.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_services.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_shortcut_clear_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_shortcut_clear_all.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_smartphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_smartphone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_stat_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/drawable-xxxhdpi/ic_stat_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_close_all_inset.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_input.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/input_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/nav_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/space_manager.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/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/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 | 220dp
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/xml-v25/shortcuts.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/test/java/one/codehz/container/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package one.codehz.container;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.0.6'
5 | repositories {
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:2.2.3'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | jcenter()
20 | mavenCentral()
21 | maven { url "https://jitpack.io" }
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/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 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codehz/container/a348ace3ec591dac4468dec5249e6d6b1b033fce/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
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-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/lib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .externalNativeBuild/
3 | obj/
4 |
--------------------------------------------------------------------------------
/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/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/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/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.helper.proto.PendingResultData;
9 |
10 | interface IVClient {
11 | void scheduleReceiver(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/helper/proto/AppSetting.aidl:
--------------------------------------------------------------------------------
1 | // AppSetting.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable AppSetting;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/AppTaskInfo.aidl:
--------------------------------------------------------------------------------
1 | // AppTaskInfo.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable AppTaskInfo;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/InstallResult.aidl:
--------------------------------------------------------------------------------
1 | // InstallResult.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable InstallResult;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/PendingIntentData.aidl:
--------------------------------------------------------------------------------
1 | // PendingIntentData.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable PendingIntentData;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/PendingResultData.aidl:
--------------------------------------------------------------------------------
1 | // PendingResultData.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable PendingResultData;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/Problem.aidl:
--------------------------------------------------------------------------------
1 | // Problem.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable Problem;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/ReceiverInfo.aidl:
--------------------------------------------------------------------------------
1 | // ReceiverInfo.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable ReceiverInfo;
--------------------------------------------------------------------------------
/lib/src/main/aidl/com/lody/virtual/helper/proto/VParceledListSlice.aidl:
--------------------------------------------------------------------------------
1 | // VParceledListSlice.aidl
2 | package com.lody.virtual.helper.proto;
3 |
4 | parcelable VParceledListSlice;
--------------------------------------------------------------------------------
/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/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 vuserId);
9 | String dealNotificationTag(int id, String packageName, String tag, int vuserId);
10 | boolean areNotificationsEnabledForPackage(String packageName, int vuserId);
11 | void setNotificationsEnabledForPackage(String packageName, boolean enable, int vuserId);
12 | void addNotification(int id, String tag, String packageName, int vuserId);
13 | void cancelAllNotification(String packageName, int vuserId);
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/interfaces/IAppObserver.aidl:
--------------------------------------------------------------------------------
1 | // IAppObserver.aidl
2 | package com.lody.virtual.server.interfaces;
3 |
4 | interface IAppObserver {
5 | void onNewApp(String pkg);
6 | void onRemoveApp(String pkg);
7 | }
8 |
--------------------------------------------------------------------------------
/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/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/IUiObserver.aidl:
--------------------------------------------------------------------------------
1 | // IUiObserver.aidl
2 | package com.lody.virtual.server.interfaces;
3 |
4 | interface IUiObserver {
5 | void enterAppUI(int userId, in String packageName);
6 | void exitAppUI(int userId, in String packageName);
7 | }
8 |
--------------------------------------------------------------------------------
/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/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 | }
15 |
--------------------------------------------------------------------------------
/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/hook/base/ApiLimit.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 ApiLimit {
15 | int start() default -1;
16 | int end() default -1;
17 | }
18 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/base/Patch.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 Patch {
15 | Class>[] value();
16 | }
17 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceCallingPkgHook.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.HookUtils;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | public class ReplaceCallingPkgHook extends StaticHook {
12 |
13 | public ReplaceCallingPkgHook(String name) {
14 | super(name);
15 | }
16 |
17 | @Override
18 | public boolean beforeCall(Object who, Method method, Object... args) {
19 | HookUtils.replaceFirstAppPkg(args);
20 | return super.beforeCall(who, method, args);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceLastPkgHook.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.HookUtils;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | public class ReplaceLastPkgHook extends StaticHook {
12 |
13 | public ReplaceLastPkgHook(String name) {
14 | super(name);
15 | }
16 |
17 | @Override
18 | public boolean beforeCall(Object who, Method method, Object... args) {
19 | HookUtils.replaceLastAppPkg(args);
20 | return super.beforeCall(who, method, args);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceSequencePkgHook.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.HookUtils;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | public class ReplaceSequencePkgHook extends StaticHook {
12 |
13 | private int sequence;
14 |
15 | public ReplaceSequencePkgHook(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 | HookUtils.replaceSequenceAppPkg(args, sequence);
23 | return super.beforeCall(who, method, args);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/base/ReplaceSpecPkgHook.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 ReplaceSpecPkgHook extends StaticHook {
10 |
11 | private int index;
12 |
13 | public ReplaceSpecPkgHook(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/ReplaceUidHook.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.base;
2 |
3 | import android.os.Process;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | public class ReplaceUidHook extends StaticHook {
8 |
9 | private final int index;
10 | public ReplaceUidHook(String name, int index) {
11 | super(name);
12 | this.index = index;
13 | }
14 |
15 | @Override
16 | public boolean beforeCall(Object who, Method method, Object... args) {
17 | int uid = (int) args[index];
18 | if (uid == Process.myUid()) {
19 | args[index] = getRealUid();
20 | }
21 | return super.beforeCall(who, method, args);
22 | }
23 | }
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/base/ResultStaticHook.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 ResultStaticHook extends StaticHook {
10 |
11 | Object mResult;
12 |
13 | public ResultStaticHook(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/StaticHook.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.base;
2 |
3 | /**
4 | * @author Lody
5 | */
6 |
7 | public class StaticHook extends Hook {
8 |
9 | private String mName;
10 |
11 | public StaticHook(String name) {
12 | this.mName = name;
13 | }
14 |
15 | @Override
16 | public String getName() {
17 | return mName;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/delegate/ForegroundNotificationDelegate.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.delegate;
2 |
3 | import android.app.Notification;
4 |
5 | public interface ForegroundNotificationDelegate {
6 |
7 | Notification getNotification();
8 |
9 | boolean isEnabled();
10 |
11 | boolean isTryToHide();
12 |
13 | String getGroup(String orig);
14 | }
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/delegate/IORedirectDelegate.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.delegate;
2 |
3 | import java.util.Map;
4 |
5 | public interface IORedirectDelegate {
6 | Map getIORedirect();
7 |
8 | Map getIOReversedRedirect();
9 |
10 | Map getContentReversedRedirect();
11 | }
12 |
--------------------------------------------------------------------------------
/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 | String getDeviceId(String oldDeviceId);
6 |
7 | String getBluetoothAddress(String oldAddress);
8 |
9 | String getMacAddress(String oldAddress);
10 |
11 | String getLine1Number(String oldNumber);
12 | }
13 |
--------------------------------------------------------------------------------
/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/delegate/UncheckedExceptionDelegate.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.delegate;
2 |
3 | public interface UncheckedExceptionDelegate {
4 | void onThreadGroupUncaughtException(Thread t, Throwable e);
5 | void onShutdown(Throwable e);
6 | }
7 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/CrashApplication.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | *
11 | * @see android.app.IActivityManager#crashApplication(int, int, String, String)
12 | */
13 | /* package */ class CrashApplication extends Hook {
14 |
15 | @Override
16 | public String getName() {
17 | return "crashApplication";
18 | }
19 |
20 | @Override
21 | public Object call(Object who, Method method, Object... args) throws Throwable {
22 | return method.invoke(who, args);
23 | }
24 |
25 | @Override
26 | public boolean isEnable() {
27 | return isAppProcess();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/GetCurrentUser.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 | import com.lody.virtual.os.VUserInfo;
5 |
6 | import java.lang.reflect.Method;
7 |
8 | import mirror.android.content.pm.UserInfo;
9 |
10 | /**
11 | * @author Lody
12 | */
13 |
14 | /*package*/ class GetCurrentUser extends Hook {
15 |
16 | @Override
17 | public String getName() {
18 | return "getCurrentUser";
19 | }
20 |
21 | @Override
22 | public Object call(Object who, Method method, Object... args) throws Throwable {
23 | try {
24 | return UserInfo.ctor.newInstance(0, "user", VUserInfo.FLAG_PRIMARY);
25 | } catch (Throwable e) {
26 | e.printStackTrace();
27 | }
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/GetIntentForIntentSender.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | public class GetIntentForIntentSender extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "getIntentForIntentSender";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | return super.call(who, method, args);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/HandleIncomingUser.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class HandleIncomingUser extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "handleIncomingUser";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | int lastIndex = args.length - 1;
21 | if (args[lastIndex] instanceof String) {
22 | args[lastIndex] = getHostPkg();
23 | }
24 | return method.invoke(who, args);
25 | }
26 |
27 | @Override
28 | public boolean isEnable() {
29 | return isAppProcess();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/PublishContentProviders.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | @SuppressWarnings("unchecked")
12 | /* package */ class PublishContentProviders extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "publishContentProviders";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | return method.invoke(who, args);
22 | }
23 |
24 | @Override
25 | public boolean isEnable() {
26 | return isAppProcess();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartActivityAndWait.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | /*package*/ class StartActivityAndWait extends StartActivity {
6 | @Override
7 | public String getName() {
8 | return "startActivityAndWait";
9 | }
10 |
11 | @Override
12 | public Object call(Object who, Method method, Object... args) throws Throwable {
13 | return super.call(who, method, args);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartActivityAsCaller.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | /**
4 | * @author Lody
5 | */
6 | /* package */ class StartActivityAsCaller extends StartActivity {
7 |
8 | @Override
9 | public String getName() {
10 | return "startActivityAsCaller";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartActivityAsUser.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | /**
6 | * @author Lody
7 | */
8 | /* package */ class StartActivityAsUser extends StartActivity {
9 |
10 | @Override
11 | public String getName() {
12 | return "startActivityAsUser";
13 | }
14 |
15 | @Override
16 | public Object call(Object who, Method method, Object... args) throws Throwable {
17 | return super.call(who, method, args);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartActivityIntentSender.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | */
9 | public class StartActivityIntentSender extends Hook {
10 | @Override
11 | public String getName() {
12 | return "startActivityIntentSender";
13 | }
14 |
15 | @Override
16 | public Object call(Object who, Method method, Object... args) throws Throwable {
17 |
18 | return super.call(who, method, args);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartActivityWithConfig.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | /*package*/ class StartActivityWithConfig extends StartActivity {
6 | @Override
7 | public String getName() {
8 | return "startActivityWithConfig";
9 | }
10 |
11 | @Override
12 | public Object call(Object who, Method method, Object... args) throws Throwable {
13 | return super.call(who, method, args);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartNextMatchingActivity.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | class StartNextMatchingActivity extends StartActivity {
6 | @Override
7 | public String getName() {
8 | return "startNextMatchingActivity";
9 | }
10 |
11 | @Override
12 | public Object call(Object who, Method method, Object... args) throws Throwable {
13 | return false;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/StartVoiceActivity.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 |
6 | class StartVoiceActivity extends StartActivity {
7 | @Override
8 | public String getName() {
9 | return "startVoiceActivity";
10 | }
11 |
12 | @Override
13 | public Object call(Object who, Method method, Object... args) throws Throwable {
14 | return super.call(who, method, args);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/UnstableProviderDied.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | /*package*/ class UnstableProviderDied extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "unstableProviderDied";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | if (args[0] == null) {
21 | return 0;
22 | }
23 | return method.invoke(who, args);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/am/UpdateDeviceOwner.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.am;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class UpdateDeviceOwner extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "updateDeviceOwner";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 |
25 | @Override
26 | public boolean isEnable() {
27 | return isAppProcess();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/connectivity/ConnectivityPatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.connectivity;
2 |
3 | import android.content.Context;
4 |
5 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
6 |
7 | import mirror.android.net.IConnectivityManager;
8 |
9 | /**
10 | * @author legency
11 | */
12 | public class ConnectivityPatch extends PatchBinderDelegate {
13 |
14 | public ConnectivityPatch() {
15 | super(IConnectivityManager.Stub.TYPE, Context.CONNECTIVITY_SERVICE);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/connectivity/Hook_GetActiveNetworkInfo.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.connectivity;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 | import com.lody.virtual.client.hook.utils.HookUtils;
5 |
6 | import java.lang.reflect.Method;
7 |
8 | /**
9 | * Created by legency on 2016/8/19.
10 | */
11 | public class Hook_GetActiveNetworkInfo extends Hook {
12 | @Override
13 | public Object call(Object who, Method method, Object... args) throws Throwable {
14 | HookUtils.replaceLastAppPkg(args);
15 | return method.invoke(who, args);
16 | }
17 |
18 | @Override
19 | public String getName() {
20 | return "getActiveNetworkInfo";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/content/ContentServicePatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.content;
2 |
3 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
4 |
5 | import mirror.android.content.IContentService;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | * @see IContentService
11 | */
12 |
13 | public class ContentServicePatch extends PatchBinderDelegate {
14 |
15 | public ContentServicePatch() {
16 | super(IContentService.Stub.TYPE, "content");
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/display/CreateVirtualDisplay.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.display;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 | import com.lody.virtual.client.hook.utils.HookUtils;
5 |
6 | import java.lang.reflect.Method;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | *
12 | */
13 | /* package */ class CreateVirtualDisplay extends Hook {
14 |
15 | @Override
16 | public boolean beforeCall(Object who, Method method, Object... args) {
17 | HookUtils.replaceFirstAppPkg(args);
18 | return super.beforeCall(who, method, args);
19 | }
20 |
21 | @Override
22 | public String getName() {
23 | return "createVirtualDisplay";
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/dropbox/DropBoxManagerPatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.dropbox;
2 |
3 | import android.content.Context;
4 |
5 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
6 | import com.lody.virtual.client.hook.base.ResultStaticHook;
7 |
8 | import mirror.com.android.internal.os.IDropBoxManagerService;
9 |
10 | /**
11 | * @author Lody
12 | */
13 | public class DropBoxManagerPatch extends PatchBinderDelegate {
14 | public DropBoxManagerPatch() {
15 | super(IDropBoxManagerService.Stub.TYPE, Context.DROPBOX_SERVICE);
16 | }
17 |
18 | @Override
19 | protected void onBindHooks() {
20 | super.onBindHooks();
21 | addHook(new ResultStaticHook("getNextEntry", null));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/graphics/GraphicsStatsPatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.graphics;
2 |
3 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
4 | import com.lody.virtual.client.hook.base.ReplaceCallingPkgHook;
5 |
6 | import mirror.android.view.IGraphicsStats;
7 |
8 |
9 | /**
10 | * @author Lody
11 | */
12 | public class GraphicsStatsPatch extends PatchBinderDelegate {
13 |
14 | public GraphicsStatsPatch() {
15 | super(IGraphicsStats.Stub.TYPE, "graphicsstats");
16 | }
17 |
18 | @Override
19 | protected void onBindHooks() {
20 | super.onBindHooks();
21 | addHook(new ReplaceCallingPkgHook("requestBufferForProcess"));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/libcore/GetUid.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.libcore;
2 |
3 | import com.lody.virtual.IOHook;
4 | import com.lody.virtual.client.hook.base.Hook;
5 |
6 | import java.lang.reflect.Method;
7 |
8 | /**
9 | * @author Lody
10 | */
11 | public class GetUid extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "getuid";
16 | }
17 |
18 | @Override
19 | public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable {
20 | int uid = (int) result;
21 | return IOHook.onGetUid(uid);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/libcore/Lstat.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.libcore;
2 |
3 | /**
4 | * @author Lody
5 | */
6 | public class Lstat extends Stat {
7 |
8 | @Override
9 | public String getName() {
10 | return "lstat";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/media/router/RegisterClientAsUser.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.media.router;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 | import com.lody.virtual.client.hook.utils.HookUtils;
5 |
6 | import java.lang.reflect.Method;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class RegisterClientAsUser extends Hook {
13 |
14 |
15 | @Override
16 | public String getName() {
17 | return "registerClientAsUser";
18 | }
19 |
20 | @Override
21 | public Object call(Object who, Method method, Object... args) throws Throwable {
22 | HookUtils.replaceFirstAppPkg(args);
23 | return method.invoke(who, args);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/media/session/CreateSession.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.media.session;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class CreateSession extends Hook {
12 |
13 |
14 | @Override
15 | public String getName() {
16 | return "createSession";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | if (args[0] instanceof String) {
22 | args[0] = getHostPkg();
23 | }
24 | return method.invoke(who, args);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/media/session/SessionManagerPatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.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.Patch;
8 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
9 |
10 | import mirror.android.media.session.ISessionManager;
11 |
12 | /**
13 | * @author Lody
14 | */
15 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
16 | @Patch({CreateSession.class})
17 | public class SessionManagerPatch extends PatchBinderDelegate {
18 |
19 | public SessionManagerPatch() {
20 | super(ISessionManager.Stub.TYPE, Context.MEDIA_SESSION_SERVICE);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/mount/MountServicePatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.mount;
2 |
3 | import com.lody.virtual.client.hook.base.Patch;
4 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
5 |
6 | import mirror.android.os.mount.IMountService;
7 |
8 | /**
9 | * @author Lody
10 | */
11 | @Patch({GetVolumeList.class, Mkdirs.class,})
12 | public class MountServicePatch extends PatchBinderDelegate {
13 |
14 | public MountServicePatch() {
15 | super(IMountService.Stub.TYPE, "mount");
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/notification/AreNotificationsEnabledForPackage.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.notification;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 | import com.lody.virtual.client.ipc.VNotificationManager;
5 |
6 | import java.lang.reflect.Method;
7 |
8 | class AreNotificationsEnabledForPackage extends Hook {
9 | @Override
10 | public String getName() {
11 | return "areNotificationsEnabledForPackage";
12 | }
13 |
14 | @Override
15 | public Object call(Object who, Method method, Object... args) throws Throwable {
16 | String pkg = (String) args[0];
17 | return VNotificationManager.get().areNotificationsEnabledForPackage(pkg, getVUserId());
18 | // return super.call(who, method, args);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/notification/EnqueueNotificationWithTagPriority.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.notification;
2 |
3 | /**
4 | * @author 247321453
5 | *
6 | */
7 | /* package */ class EnqueueNotificationWithTagPriority extends EnqueueNotificationWithTag {
8 |
9 | @Override
10 | public String getName() {
11 | return "enqueueNotificationWithTagPriority";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/AddOnPermissionsChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | public class AddOnPermissionsChangeListener extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "addOnPermissionsChangeListener";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | return 0;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/AddPackageToPreferred.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | * @see android.content.pm.IPackageManager#addPackageToPreferred(String)
11 | *
12 | *
13 | */
14 | /* package */ class AddPackageToPreferred extends Hook {
15 |
16 | @Override
17 | public String getName() {
18 | return "addPackageToPreferred";
19 | }
20 |
21 | @Override
22 | public Object call(Object who, Method method, Object... args) throws Throwable {
23 | return 0;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/ClearPackagePersistentPreferredActivities.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class ClearPackagePersistentPreferredActivities extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "clearPackagePersistentPreferredActivities";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/ClearPackagePreferredActivities.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class ClearPackagePreferredActivities extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "clearPackagePreferredActivities";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/DeleteApplicationCacheFiles.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class DeleteApplicationCacheFiles extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "deleteApplicationCacheFiles";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | // TODO
21 | return method.invoke(who, args);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetApplicationBlockedSettingAsUser.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class GetApplicationBlockedSettingAsUser extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "getApplicationBlockedSettingAsUser";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetApplicationEnabledSetting.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class GetApplicationEnabledSetting extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "getApplicationEnabledSetting";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetInstallerPackageName.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class GetInstallerPackageName extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "getInstallerPackageName";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | return "com.android.vending";
21 | }
22 |
23 | @Override
24 | public boolean isEnable() {
25 | return isAppProcess();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetPackageGids.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class GetPackageGids extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "getPackageGids";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 |
25 | @Override
26 | public boolean isEnable() {
27 | return isAppProcess();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetPackageGidsEtc.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class GetPackageGidsEtc extends GetPackageGids {
8 |
9 | @Override
10 | public String getName() {
11 | return super.getName() + "Etc";
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetPackageUidEtc.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | /**
4 | * @author Lody
5 | */
6 | public class GetPackageUidEtc extends GetPackageUid {
7 | @Override
8 | public String getName() {
9 | return super.getName() + "Etc";
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetPermissionFlags.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | import android.annotation.TargetApi;
8 | import android.os.Build;
9 |
10 | /**
11 | * @author Lody
12 | *
13 | */
14 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
15 | /* package */ class GetPermissionFlags extends Hook {
16 |
17 | @Override
18 | public String getName() {
19 | return "getPermissionFlags";
20 | }
21 |
22 | @Override
23 | public Object call(Object who, Method method, Object... args) throws Throwable {
24 | // TODO
25 | return method.invoke(who, args);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/GetPermissions.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | *
11 | *
12 | */
13 | /* package */ class GetPermissions extends Hook {
14 |
15 | @Override
16 | public String getName() {
17 | return "getPermissions";
18 | }
19 |
20 | @Override
21 | public Object call(Object who, Method method, Object... args) throws Throwable {
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/IsPackageAvailable.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class IsPackageAvailable extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "isPackageAvailable";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | String pkgName = (String) args[0];
21 | if (isAppPkg(pkgName)) {
22 | return true;
23 | }
24 | return method.invoke(who, args);
25 | }
26 |
27 | @Override
28 | public boolean isEnable() {
29 | return isAppProcess();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/IsPackageForzen.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class IsPackageForzen extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "sPackageForzen";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | // String pkgName = (String) args[0];
21 | return false;
22 | }
23 |
24 | @Override
25 | public boolean isEnable() {
26 | return isAppProcess();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/RemoveOnPermissionsChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 |
7 | /**
8 | * @author Lody
9 | */
10 |
11 | public class RemoveOnPermissionsChangeListener extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "removeOnPermissionsChangeListener";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | return 0;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/RemovePackageFromPreferred.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class RemovePackageFromPreferred extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "removePackageFromPreferred";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/RevokeRuntimePermission.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | *
12 | */
13 | /* package */ class RevokeRuntimePermission extends Hook {
14 |
15 | @Override
16 | public String getName() {
17 | return "revokeRuntimePermission";
18 | }
19 |
20 | @Override
21 | public Object call(Object who, Method method, Object... args) throws Throwable {
22 | HookUtils.replaceFirstAppPkg(args);
23 | return method.invoke(who, args);
24 | }
25 |
26 | @Override
27 | public boolean isEnable() {
28 | return isAppProcess();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/SetApplicationEnabledSetting.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class SetApplicationEnabledSetting extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "setApplicationEnabledSetting";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 |
25 | @Override
26 | public boolean isEnable() {
27 | return isAppProcess();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/pm/SetPackageStoppedState.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.pm;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class SetPackageStoppedState extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "setPackageStoppedState";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 |
25 | @Override
26 | public boolean isEnable() {
27 | return isAppProcess();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/wifi/GetBatchedScanResults.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.wifi;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class GetBatchedScanResults extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "getBatchedScanResults";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/wifi/GetScanResults.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.wifi;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | */
12 | /* package */ class GetScanResults extends Hook {
13 |
14 | @Override
15 | public String getName() {
16 | return "getScanResults";
17 | }
18 |
19 | @Override
20 | public Object call(Object who, Method method, Object... args) throws Throwable {
21 | HookUtils.replaceFirstAppPkg(args);
22 | return method.invoke(who, args);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/wifi/SetWifiEnabled.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.wifi;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | import com.lody.virtual.client.hook.base.Hook;
6 | import com.lody.virtual.client.hook.utils.HookUtils;
7 |
8 | /**
9 | * @author Lody
10 | *
11 | *
12 | * @see android.net.wifi.IWifiManager#setWifiEnabled(boolean)
13 | */
14 | /* package */ class SetWifiEnabled extends Hook {
15 |
16 | @Override
17 | public String getName() {
18 | return "setWifiEnabled";
19 | }
20 |
21 | @Override
22 | public Object call(Object who, Method method, Object... args) throws Throwable {
23 | // 部分设备有callingPkg参数,部分设备没有
24 | HookUtils.replaceFirstAppPkg(args);
25 | return method.invoke(who, args);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/wifi_scanner/WifiScannerPatch.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.wifi_scanner;
2 |
3 | import com.lody.virtual.client.hook.base.PatchBinderDelegate;
4 |
5 | /**
6 | * @author Lody
7 | */
8 |
9 | public class WifiScannerPatch extends PatchBinderDelegate {
10 |
11 | public WifiScannerPatch() {
12 | super(new GhostWifiScannerImpl(), "wifiscanner");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/OpenSession.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class OpenSession extends BasePatchSession {
8 |
9 | @Override
10 | public String getName() {
11 | return "openSession";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/OverridePendingAppTransition.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window;
2 |
3 | import java.lang.reflect.Method;
4 |
5 | /**
6 | * @author Lody
7 | *
8 | */
9 | /* package */ class OverridePendingAppTransition extends BasePatchSession {
10 |
11 | @Override
12 | public String getName() {
13 | return "overridePendingAppTransition";
14 | }
15 |
16 | @Override
17 | public Object call(Object who, Method method, Object... args) throws Throwable {
18 | if (args[0] instanceof String) {
19 | args[0] = getHostPkg();
20 | }
21 | return super.call(who, method, args);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/OverridePendingAppTransitionInPlace.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window;
2 |
3 | import com.lody.virtual.client.hook.base.Hook;
4 |
5 | import java.lang.reflect.Method;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | */
11 | /* package */ class OverridePendingAppTransitionInPlace extends Hook {
12 |
13 | @Override
14 | public String getName() {
15 | return "overridePendingAppTransitionInPlace";
16 | }
17 |
18 | @Override
19 | public Object call(Object who, Method method, Object... args) throws Throwable {
20 | if (args[0] instanceof String) {
21 | args[0] = getHostPkg();
22 | }
23 | return method.invoke(who, args);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/SetAppStartingWindow.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class SetAppStartingWindow extends BasePatchSession {
8 |
9 | @Override
10 | public String getName() {
11 | return "setAppStartingWindow";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/session/Add.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window.session;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class Add extends BaseReplacePkgName {
8 |
9 | @Override
10 | public String getName() {
11 | return "add";
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/session/AddToDisplay.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window.session;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class AddToDisplay extends BaseReplacePkgName {
8 |
9 | @Override
10 | public String getName() {
11 | return "addToDisplay";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/session/AddToDisplayWithoutInputChannel.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window.session;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class AddToDisplayWithoutInputChannel extends BaseReplacePkgName {
8 |
9 | @Override
10 | public String getName() {
11 | return "addToDisplayWithoutInputChannel";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/session/AddWithoutInputChannel.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window.session;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class AddWithoutInputChannel extends BaseReplacePkgName {
8 |
9 | @Override
10 | public String getName() {
11 | return "addWithoutInputChannel";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/hook/patchs/window/session/Relayout.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.hook.patchs.window.session;
2 |
3 | /**
4 | * @author Lody
5 | *
6 | */
7 | /* package */ class Relayout extends BaseReplacePkgName {
8 |
9 | @Override
10 | public String getName() {
11 | return "relayout";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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 | public class DownloadProviderHook extends ExternalProviderHook {
13 |
14 | public DownloadProviderHook(Object base) {
15 | super(base);
16 | }
17 |
18 | @Override
19 | public Uri insert(Method method, Object[] args) throws InvocationTargetException, IllegalAccessException {
20 | return super.insert(method, args);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/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/interfaces/IEventHandler.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.interfaces;
2 |
3 | /**
4 | * @author Lody
5 | */
6 |
7 | public interface IEventHandler {
8 |
9 | void reportError(String error);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/lib/src/main/java/com/lody/virtual/client/interfaces/Injectable.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 Injectable {
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/StubPendingService.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.client.stub;
2 |
3 | import android.content.Intent;
4 | import android.os.IBinder;
5 |
6 | import com.lody.virtual.helper.component.BaseService;
7 |
8 | /**
9 | * @author Lody
10 | */
11 |
12 | public class StubPendingService extends BaseService {
13 | @Override
14 | public IBinder onBind(Intent intent) {
15 | return null;
16 | }
17 |
18 | @Override
19 | public int onStartCommand(Intent intent, int flags, int startId) {
20 | startService(intent);
21 | stopSelf();
22 | return START_NOT_STICKY;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/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/component/BaseService.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.helper.component;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.os.IBinder;
6 |
7 | /**
8 | * @author Lody
9 | *
10 | *
11 | */
12 | public abstract class BaseService extends Service {
13 | @Override
14 | public IBinder onBind(Intent intent) {
15 | return null;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/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/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/ResourcesUtils.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.helper.utils;
2 |
3 | import java.io.File;
4 |
5 | public class ResourcesUtils {
6 |
7 | public static void chmod(File dir) {
8 | try {
9 | Runtime.getRuntime().exec("chmod -R 755 " + dir.getAbsolutePath()).waitFor();
10 | } catch (Exception e) {
11 | e.printStackTrace();
12 | }
13 | }
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/server/ServiceCache.java:
--------------------------------------------------------------------------------
1 | package com.lody.virtual.server;
2 |
3 | import android.os.IBinder;
4 |
5 | import com.lody.virtual.helper.utils.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/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/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