├── .gitattributes ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ └── android.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-log.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── kotlin │ └── star │ │ └── sky │ │ └── voyager │ │ ├── activity │ │ ├── MainActivity.kt │ │ └── pages │ │ │ ├── apps │ │ │ ├── AiasstVisionPage.kt │ │ │ ├── AndroidPage.kt │ │ │ ├── AppManagerPage.kt │ │ │ ├── BarragePage.kt │ │ │ ├── GalleryPage.kt │ │ │ ├── HomePage.kt │ │ │ ├── MaxMiPadPage.kt │ │ │ ├── MediaEditorPage.kt │ │ │ ├── MiAiPage.kt │ │ │ ├── PackageInstallerPage.kt │ │ │ ├── PersonalAssistantPage.kt │ │ │ ├── PowerKeeperPage.kt │ │ │ ├── ScannerPage.kt │ │ │ ├── ScreenRecorderPage.kt │ │ │ ├── ScreenShotPage.kt │ │ │ ├── SecurityPage.kt │ │ │ ├── SettingsPage.kt │ │ │ ├── SmartHubPage.kt │ │ │ ├── SystemUIPage.kt │ │ │ └── TaplusPage.kt │ │ │ ├── main │ │ │ ├── AboutPage.kt │ │ │ ├── MainPage.kt │ │ │ └── MenuPage.kt │ │ │ └── sub │ │ │ ├── ControlCenterPage.kt │ │ │ ├── DisableFixedOrientationPage.kt │ │ │ ├── FrontCameraAssistantPage.kt │ │ │ ├── GalleryUnlockPage.kt │ │ │ ├── GameTurboPage.kt │ │ │ ├── HideIconPage.kt │ │ │ ├── HomeBlurPage.kt │ │ │ ├── HomeDockPage.kt │ │ │ ├── HomeIconPage.kt │ │ │ ├── HomeModPage.kt │ │ │ ├── HomeRecentPage.kt │ │ │ ├── IconPositionPage.kt │ │ │ ├── LockScreenPage.kt │ │ │ ├── NotificationCenterPage.kt │ │ │ ├── SecurityUnlockPage.kt │ │ │ ├── SettingsModPage.kt │ │ │ ├── SettingsUnlockPage.kt │ │ │ ├── StatusBarBatteryPage.kt │ │ │ ├── StatusBarIconPage.kt │ │ │ ├── StatusBarNetWorkSpeedPage.kt │ │ │ ├── StatusBarPage.kt │ │ │ └── SuperClipboardPage.kt │ │ ├── hook │ │ ├── MainHook.kt │ │ ├── apps │ │ │ ├── AiasstVision.kt │ │ │ ├── Aireco.kt │ │ │ ├── Android.kt │ │ │ ├── Aod.kt │ │ │ ├── Barrage.kt │ │ │ ├── Browser.kt │ │ │ ├── Cast.kt │ │ │ ├── CloudService.kt │ │ │ ├── Creation.kt │ │ │ ├── ExternalStorage.kt │ │ │ ├── FileExplorer.kt │ │ │ ├── Gallery.kt │ │ │ ├── GuardProvider.kt │ │ │ ├── Home.kt │ │ │ ├── Lbe.kt │ │ │ ├── MMS.kt │ │ │ ├── Market.kt │ │ │ ├── MediaEditor.kt │ │ │ ├── MiSettings.kt │ │ │ ├── MiShare.kt │ │ │ ├── Mirror.kt │ │ │ ├── Music.kt │ │ │ ├── Notes.kt │ │ │ ├── PackageInstaller.kt │ │ │ ├── PersonalAssistant.kt │ │ │ ├── Phrase.kt │ │ │ ├── PowerKeeper.kt │ │ │ ├── ProvidersDownloads.kt │ │ │ ├── RearDisplay.kt │ │ │ ├── Scanner.kt │ │ │ ├── ScreenRecorder.kt │ │ │ ├── ScreenShot.kt │ │ │ ├── SecurityCenter.kt │ │ │ ├── Settings.kt │ │ │ ├── SystemUI.kt │ │ │ ├── TaPlus.kt │ │ │ ├── Theme.kt │ │ │ ├── Updater.kt │ │ │ ├── VoiceAssistant.kt │ │ │ ├── WallPaper.kt │ │ │ └── Weather.kt │ │ ├── hooks │ │ │ ├── aiasstvision │ │ │ │ ├── AiSubtitles.kt │ │ │ │ ├── DesktopModeScreenTranslate.kt │ │ │ │ ├── MeetingMode.kt │ │ │ │ ├── OfflineAiSubtitles.kt │ │ │ │ └── SplitScreenTranslate.kt │ │ │ ├── aireco │ │ │ │ └── DeviceModify.kt │ │ │ ├── android │ │ │ │ ├── AllowUntrustedTouches.kt │ │ │ │ ├── DarkModeForAllApps.kt │ │ │ │ ├── DeleteOnPostNotification.kt │ │ │ │ ├── Disable72hVerify.kt │ │ │ │ ├── DisableFlagSecure.kt │ │ │ │ ├── DisableFlagSecureK.kt │ │ │ │ ├── KillDomainVerification.kt │ │ │ │ ├── MaxWallpaperScale.kt │ │ │ │ ├── RemoveSmallWindowRestrictions.kt │ │ │ │ ├── SystemPropertiesHook.kt │ │ │ │ └── XYVelocity.kt │ │ │ ├── aod │ │ │ │ └── UnlockAlwaysOnDisplay.kt │ │ │ ├── barrage │ │ │ │ ├── AnyAppBarrage.kt │ │ │ │ ├── AnyWhereBarrage.kt │ │ │ │ └── ModifyBarrageLength.kt │ │ │ ├── cloudservice │ │ │ │ └── Widevine.kt │ │ │ ├── corepatch │ │ │ │ ├── CorePatchForQ.kt │ │ │ │ ├── CorePatchForR.kt │ │ │ │ ├── CorePatchForS.kt │ │ │ │ ├── CorePatchForT.kt │ │ │ │ ├── CorePatchForU.kt │ │ │ │ ├── CorePatchMainHook.kt │ │ │ │ ├── ReturnConstant.kt │ │ │ │ └── XposedHelper.kt │ │ │ ├── creation │ │ │ │ ├── CreationPhone.kt │ │ │ │ └── ImageSize.kt │ │ │ ├── externalstorage │ │ │ │ └── NoStorageRestrict.kt │ │ │ ├── fileexplorer │ │ │ │ └── SelectName.kt │ │ │ ├── gallery │ │ │ │ ├── AlbumOptimize.kt │ │ │ │ ├── HDREnhance.kt │ │ │ │ ├── IdPhoto.kt │ │ │ │ ├── MagicMatting.kt │ │ │ │ ├── MagicSky.kt │ │ │ │ ├── Ocr.kt │ │ │ │ ├── OcrForm.kt │ │ │ │ ├── OpenVideoSelf.kt │ │ │ │ ├── Pdf.kt │ │ │ │ ├── PhotoMovie.kt │ │ │ │ ├── Remover2.kt │ │ │ │ ├── TextYanHua.kt │ │ │ │ ├── VideoEditor.kt │ │ │ │ └── VideoPost.kt │ │ │ ├── guardprovider │ │ │ │ ├── Anti2.kt │ │ │ │ └── AntiDefraudAppManager.kt │ │ │ ├── home │ │ │ │ ├── AddFreeformShortcut.kt │ │ │ │ ├── AllowMoveAllWidgetToMinus.kt │ │ │ │ ├── AlwaysBlurWallpaper.kt │ │ │ │ ├── AlwaysShowMiuiWidget.kt │ │ │ │ ├── AlwaysShowStatusBarClock.kt │ │ │ │ ├── AnimDurationRatio.kt │ │ │ │ ├── BackGestureAreaHeight.kt │ │ │ │ ├── BlurWhenOpenFolder.kt │ │ │ │ ├── DisableRecentViewWallpaperDarkening.kt │ │ │ │ ├── DoubleTapToSleep.kt │ │ │ │ ├── DownloadAnimation.kt │ │ │ │ ├── EnablePerfectIcons.kt │ │ │ │ ├── FakeNavBar.kt │ │ │ │ ├── FakeNonDefaultIcon.kt │ │ │ │ ├── FoldDeviceDock.kt │ │ │ │ ├── FolderAnim.kt │ │ │ │ ├── FolderColumnsCount.kt │ │ │ │ ├── HideNavBar.kt │ │ │ │ ├── IconBreakAnimation.kt │ │ │ │ ├── IconCellCount.kt │ │ │ │ ├── IconCorner.kt │ │ │ │ ├── MonetColor.kt │ │ │ │ ├── MonoChromeIcon.kt │ │ │ │ ├── OptimizeUnlockAnim.kt │ │ │ │ ├── OverlapMode.kt │ │ │ │ ├── PadGestureLine.kt │ │ │ │ ├── PadHideApp.kt │ │ │ │ ├── PadShowMemory.kt │ │ │ │ ├── RealMemory.kt │ │ │ │ ├── RecentViewRemoveCardAnim.kt │ │ │ │ ├── ResizableWidgets.kt │ │ │ │ ├── RestoreGoogleAppIcon.kt │ │ │ │ ├── RestoreGoogleSearch.kt │ │ │ │ ├── RestoreSwitchMinusScreen.kt │ │ │ │ ├── ScrollIconName.kt │ │ │ │ ├── SearchBarXiaoAiCustom.kt │ │ │ │ ├── SetDeviceLevel.kt │ │ │ │ ├── ShareSystemApp.kt │ │ │ │ ├── ShortCutTitle.kt │ │ │ │ ├── ShortcutItemCount.kt │ │ │ │ ├── ShowAllApp.kt │ │ │ │ ├── TaskViewCardSize.kt │ │ │ │ ├── UnlockHotSeatIcon.kt │ │ │ │ ├── UseCompleteBlur.kt │ │ │ │ └── UseTransitionAnimation.kt │ │ │ ├── market │ │ │ │ ├── AsWhat.kt │ │ │ │ └── RemoveAd.kt │ │ │ ├── maxmipad │ │ │ │ ├── DisableFixedOrientation.kt │ │ │ │ ├── IgnoreStylusKeyGesture.kt │ │ │ │ ├── NoMagicPointer.kt │ │ │ │ ├── RemoveStylusBluetoothRestriction.kt │ │ │ │ ├── RestoreEsc.kt │ │ │ │ └── SetGestureNeedFingerNumTo4.kt │ │ │ ├── mediaeditor │ │ │ │ ├── DeviceShell2.kt │ │ │ │ ├── FilterManager.kt │ │ │ │ ├── MarketName.kt │ │ │ │ └── UnlockUnlimitedCropping.kt │ │ │ ├── misettings │ │ │ │ ├── AllFps.kt │ │ │ │ └── DcFps.kt │ │ │ ├── mishare │ │ │ │ └── NoAutoTurnOff.kt │ │ │ ├── multipackage │ │ │ │ ├── AodAvailable.kt │ │ │ │ ├── AospShareSheet.kt │ │ │ │ ├── BatteryStyle.kt │ │ │ │ ├── CustomRefreshRate.kt │ │ │ │ ├── DC.kt │ │ │ │ ├── ForceSupportSendApp.kt │ │ │ │ ├── MaxFreeForm.kt │ │ │ │ ├── SuperClipboard.kt │ │ │ │ └── TaplusUnlock.kt │ │ │ ├── music │ │ │ │ └── RemoveOpenAd.kt │ │ │ ├── packageinstaller │ │ │ │ ├── AllAsSystemApp.kt │ │ │ │ ├── CustomInstallationSource.kt │ │ │ │ ├── DisableCountCheck.kt │ │ │ │ ├── DisableSafeModelTip.kt │ │ │ │ ├── RemovePackageInstallerAds.kt │ │ │ │ └── ShowMoreApkInfo.kt │ │ │ ├── personalassistant │ │ │ │ ├── BlurPersonalAssistant.kt │ │ │ │ ├── ExposureRefreshForNonMIUIWidget.kt │ │ │ │ └── LocationCN.kt │ │ │ ├── phrase │ │ │ │ └── GboardMi.kt │ │ │ ├── powerkeeper │ │ │ │ ├── DoNotClearApp.kt │ │ │ │ └── PreventRecoveryOfBatteryOptimizationWhitelist.kt │ │ │ ├── providersdownloads │ │ │ │ └── RemoveXlDownload.kt │ │ │ ├── rearddisplay │ │ │ │ └── RearDisplayWeather.kt │ │ │ ├── scanner │ │ │ │ ├── Card.kt │ │ │ │ ├── DocPpt.kt │ │ │ │ ├── Document.kt │ │ │ │ ├── Excel.kt │ │ │ │ ├── Ocr.kt │ │ │ │ ├── Ppt.kt │ │ │ │ └── Translation.kt │ │ │ ├── screenrecorder │ │ │ │ ├── EnablePlaybackCapture.kt │ │ │ │ ├── ModifyScreenRecorderConfig.kt │ │ │ │ └── SaveToMovies.kt │ │ │ ├── screenshot │ │ │ │ ├── DeviceShell.kt │ │ │ │ ├── PrivacyMosaic.kt │ │ │ │ ├── SaveAsPng.kt │ │ │ │ ├── SaveToPictures.kt │ │ │ │ └── Scroll.kt │ │ │ ├── securitycenter │ │ │ │ ├── AppDisable.kt │ │ │ │ ├── BatteryTemperature.kt │ │ │ │ ├── CameraFaceTracker.kt │ │ │ │ ├── DynamicPerformance.kt │ │ │ │ ├── EnhanceContours.kt │ │ │ │ ├── GameBoxVisionEnhance.kt │ │ │ │ ├── GameTurbo.kt │ │ │ │ ├── GetDefaultBubbles.kt │ │ │ │ ├── GunService.kt │ │ │ │ ├── LockOneHundred.kt │ │ │ │ ├── MEMC.kt │ │ │ │ ├── Macro.kt │ │ │ │ ├── OpenByDefaultSetting.kt │ │ │ │ ├── PrivacyCamera.kt │ │ │ │ ├── RemoveOpenAppConfirmationPopup.kt │ │ │ │ ├── Report.kt │ │ │ │ ├── RiskPkg.kt │ │ │ │ ├── ScreenHoldOn.kt │ │ │ │ ├── ScreenTime.kt │ │ │ │ ├── SidebarLineColor.kt │ │ │ │ ├── SkipWaitingTime.kt │ │ │ │ ├── SmartDischarge.kt │ │ │ │ ├── SuperResolution.kt │ │ │ │ └── VcbAbility.kt │ │ │ ├── settings │ │ │ │ ├── AppMode.kt │ │ │ │ ├── GoogleSettings.kt │ │ │ │ ├── HpLocation.kt │ │ │ │ ├── ImeBottom.kt │ │ │ │ ├── MechKeyboard.kt │ │ │ │ ├── MiGboard.kt │ │ │ │ ├── NeverTimeOut.kt │ │ │ │ ├── NewNfcPage.kt │ │ │ │ ├── NfcPageFix.kt │ │ │ │ ├── NoThroughTheList.kt │ │ │ │ ├── NoveltyHaptic.kt │ │ │ │ ├── PadArea.kt │ │ │ │ ├── QuickInstallPermission.kt │ │ │ │ ├── ShowNotificationHistoryAndLog.kt │ │ │ │ ├── ShowNotificationImportance.kt │ │ │ │ ├── SpeedMode.kt │ │ │ │ ├── StarVoyager.kt │ │ │ │ ├── VipService.kt │ │ │ │ └── VoipAssistant.kt │ │ │ ├── systemui │ │ │ │ ├── BatteryPercentage.kt │ │ │ │ ├── CanNotificationSlide.kt │ │ │ │ ├── ControlCenterMod.kt │ │ │ │ ├── ControlCenterStyle.kt │ │ │ │ ├── CustomMobileTypeText.kt │ │ │ │ ├── DisableBluetooth.kt │ │ │ │ ├── DoubleLineNetworkSpeed.kt │ │ │ │ ├── HideBatteryIcon.kt │ │ │ │ ├── HideHDIcon.kt │ │ │ │ ├── HideMobileActivityIcon.kt │ │ │ │ ├── HideMobileTypeIcon.kt │ │ │ │ ├── HideNetworkSpeedSplitter.kt │ │ │ │ ├── HideSimIcon.kt │ │ │ │ ├── HideStatusBarIcon.kt │ │ │ │ ├── HideStatusBarNetworkSpeedSecond.kt │ │ │ │ ├── HideStatusBarWhenScreenShot.kt │ │ │ │ ├── HideWifiActivityIcon.kt │ │ │ │ ├── HyperOSMIUI.kt │ │ │ │ ├── IconPosition.kt │ │ │ │ ├── LockScreenBlurButton.kt │ │ │ │ ├── LockScreenClockDisplaySeconds.kt │ │ │ │ ├── LockScreenCurrent.kt │ │ │ │ ├── LockScreenDoubleTapToSleep.kt │ │ │ │ ├── LockScreenFont.kt │ │ │ │ ├── LockScreenHint.kt │ │ │ │ ├── LockScreenLeftButtonFlashLight.kt │ │ │ │ ├── LockScreenOnlyLeft.kt │ │ │ │ ├── LockScreenRemoveCamera.kt │ │ │ │ ├── LockScreenRemoveLeftSide.kt │ │ │ │ ├── LockScreenUwb.kt │ │ │ │ ├── LockScreenZenMode.kt │ │ │ │ ├── LockscreenChargingInfo.kt │ │ │ │ ├── MaximumNumberOfNotificationIcons.kt │ │ │ │ ├── MeterIconView.kt │ │ │ │ ├── MonetTheme.kt │ │ │ │ ├── NewNotificationWeather.kt │ │ │ │ ├── NoPasswordHook.kt │ │ │ │ ├── NotificationIcon.kt │ │ │ │ ├── NotificationMod.kt │ │ │ │ ├── NotificationSettingsNoWhiteList.kt │ │ │ │ ├── NotificationWeather.kt │ │ │ │ ├── OldNotificationWeather.kt │ │ │ │ ├── OldQSCustom.kt │ │ │ │ ├── RedirectToNotificationChannelSetting.kt │ │ │ │ ├── RestoreNearbyTile.kt │ │ │ │ ├── ShowWifiStandard.kt │ │ │ │ ├── StatusBarBattery.kt │ │ │ │ ├── StatusBarBigMobileTypeIcon.kt │ │ │ │ ├── StatusBarDoubleTapToSleep.kt │ │ │ │ ├── StatusBarLayout.kt │ │ │ │ ├── StatusBarNetworkSpeedRefreshSpeed.kt │ │ │ │ ├── StatusBarTimeCustomization.kt │ │ │ │ ├── SuperVolume.kt │ │ │ │ ├── UseNewHD.kt │ │ │ │ └── WaveCharge.kt │ │ │ ├── taplus │ │ │ │ ├── TaplusBrowser.kt │ │ │ │ ├── TaplusHorizontal.kt │ │ │ │ └── TaplusSearch.kt │ │ │ ├── theme │ │ │ │ └── MiDevice.kt │ │ │ ├── voiceassistant │ │ │ │ └── ChangeBrowserForMiAi.kt │ │ │ ├── wallpaper │ │ │ │ └── UnlockSuperWallpaper.kt │ │ │ └── weather │ │ │ │ ├── HighAnimation.kt │ │ │ │ └── MoreCard.kt │ │ └── views │ │ │ ├── WeatherData.kt │ │ │ └── WeatherView.kt │ │ ├── tiles │ │ ├── AllowScreenshots.kt │ │ ├── CameraSensor.kt │ │ ├── CirculateWorld.kt │ │ ├── DesktopMode.kt │ │ ├── HighBrightnessMode.kt │ │ ├── MiPlay.kt │ │ ├── MicSensor.kt │ │ └── SpeedMode.kt │ │ └── utils │ │ ├── api │ │ ├── DoubleTapController.kt │ │ └── KotlinXposedHelper.kt │ │ ├── init │ │ ├── AppRegister.kt │ │ ├── EasyXposedInit.kt │ │ ├── HookRegister.kt │ │ ├── PackageNameHook.kt │ │ └── ResourcesHookRegister.kt │ │ ├── key │ │ ├── BackupUtils.kt │ │ ├── SystemProperties.kt │ │ └── XSPUtils.kt │ │ ├── voyager │ │ ├── BlurDraw.kt │ │ ├── DexKitS.kt │ │ ├── LazyClass.kt │ │ ├── LineB.kt │ │ ├── PluginClassLoader.kt │ │ ├── Resource.kt │ │ ├── SafeSharedPreferences.kt │ │ ├── SetKeyMap.kt │ │ ├── TabletSeekBar.kt │ │ ├── VoyagerNote.kt │ │ └── WifiState.kt │ │ └── yife │ │ ├── Build.kt │ │ ├── DexKit.kt │ │ ├── LoadPackageParam.kt │ │ ├── SharedPreferences.kt │ │ ├── Terminal.kt │ │ └── XSharedPreferences.kt │ └── res │ ├── drawable │ ├── ic_android.xml │ ├── ic_appvault.xml │ ├── ic_battery_charging_full.xml │ ├── ic_camera.xml │ ├── ic_desktop_mac.xml │ ├── ic_fullscreen.xml │ ├── ic_gallery.xml │ ├── ic_maxmipad.xml │ ├── ic_miai.xml │ ├── ic_mic.xml │ ├── ic_miui_plus.xml │ ├── ic_miuihome.xml │ ├── ic_music_note.xml │ ├── ic_package_installer.xml │ ├── ic_packageinstaller.xml │ ├── ic_packageinstaller_background_dark.xml │ ├── ic_packageinstaller_background_light.xml │ ├── ic_phonelink.xml │ ├── ic_powerkeeper.xml │ ├── ic_securitycenter.xml │ ├── ic_settings.xml │ ├── ic_systemui_13.xml │ ├── ic_wb_sunny.xml │ ├── starvoyager_xml_icon.xml │ ├── voyager.jpg │ ├── voyager_background.jpg │ ├── voyager_icon.jpg │ └── voyager_splash_icon.webp │ ├── resources.properties │ ├── values-ja-rJP │ └── strings.xml │ ├── values-night │ ├── colors.xml │ └── themes.xml │ ├── values-zh-rCN │ └── strings.xml │ └── values │ ├── arrays.xml │ ├── colors.xml │ ├── strings.xml │ └── themes.xml ├── build.gradle.kts ├── gradle.properties ├── gradle ├── sweet-dependency │ └── sweet-dependency-config.yaml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle.kts /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | # github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | # patreon: # Replace with a single Patreon username 5 | # open_collective: # Replace with a single Open Collective username 6 | # ko_fi: # Replace with a single Ko-fi username 7 | # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | # liberapay: # Replace with a single Liberapay username 10 | # issuehunt: # Replace with a single IssueHunt username 11 | # otechie: # Replace with a single Otechie username 12 | # lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | # custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | 15 | custom: https://afdian.net/a/HoshiVoyager 16 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "gradle" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" 12 | 13 | - package-ecosystem: "github-actions" 14 | directory: "/" 15 | schedule: 16 | interval: "daily" 17 | 18 | - package-ecosystem: "gitsubmodule" 19 | directory: "/" 20 | schedule: 21 | interval: "daily" 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle files 2 | .gradle/ 3 | build/ 4 | 5 | # Local configuration file (sdk path, etc) 6 | local.properties 7 | 8 | # Log/OS Files 9 | *.log 10 | 11 | # Android Studio generated files and folders 12 | captures/ 13 | .externalNativeBuild/ 14 | .cxx/ 15 | *.apk 16 | output.json 17 | 18 | # IntelliJ 19 | *.iml 20 | .idea/ 21 | 22 | # Keystore files 23 | *.jks 24 | *.keystore 25 | 26 | # Google Services (e.g. APIs or Firebase) 27 | google-services.json 28 | 29 | # Android Profiling 30 | *.hprof 31 | 32 | .DS_Store 33 | app/src/main/kotlin/star/sky/voyager/hook/hooks/.DS_Store 34 | app/src/main/.DS_Store 35 | app/.DS_Store 36 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "blockmiui"] 2 | path = blockmiui 3 | url = https://github.com/577fkj/blockmiui.git 4 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /release/output-metadata.json 3 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | star.sky.voyager.hook.MainHook -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/activity/pages/apps/ScreenRecorderPage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.activity.pages.apps 2 | 3 | import android.annotation.SuppressLint 4 | import cn.fkj233.ui.activity.annotation.BMPage 5 | import cn.fkj233.ui.activity.data.BasePage 6 | import cn.fkj233.ui.activity.view.SwitchV 7 | import cn.fkj233.ui.activity.view.TextSummaryV 8 | import star.sky.voyager.R 9 | 10 | @SuppressLint("NonConstantResourceId") 11 | @BMPage("screen_recorder", titleId = R.string.scope_screen_recorder, hideMenu = false) 12 | //@BMPage("screen_recorder", "Screen Recorder", hideMenu = false) 13 | class ScreenRecorderPage : BasePage() { 14 | override fun onCreate() { 15 | TitleText(textId = R.string.scope_screen_recorder) 16 | TextSummaryWithSwitch( 17 | TextSummaryV( 18 | textId = R.string.force_enable_native_playback_capture 19 | ), 20 | SwitchV("force_enable_native_playback_capture", false) 21 | ) 22 | TextSummaryWithSwitch( 23 | TextSummaryV( 24 | textId = R.string.change_bitrate_and_frame_rate_range 25 | ), 26 | SwitchV("modify_screen_recorder_config", false) 27 | ) 28 | TextSummaryWithSwitch( 29 | TextSummaryV( 30 | textId = R.string.save_to_movies 31 | ), 32 | SwitchV("save_to_movies", false) 33 | ) 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/activity/pages/apps/SmartHubPage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.activity.pages.apps 2 | 3 | import android.annotation.SuppressLint 4 | import cn.fkj233.ui.activity.annotation.BMPage 5 | import cn.fkj233.ui.activity.data.BasePage 6 | import cn.fkj233.ui.activity.view.SwitchV 7 | import cn.fkj233.ui.activity.view.TextSummaryV 8 | import star.sky.voyager.R 9 | 10 | @SuppressLint("NonConstantResourceId") 11 | @BMPage("scope_mi_smart_hub", titleId = R.string.scope_mi_smart_hub, hideMenu = false) 12 | //@BMPage("scope_mi_smart_hub", "Mi Smart Hub", hideMenu = false) 13 | class SmartHubPage : BasePage() { 14 | override fun onCreate() { 15 | TitleText(textId = R.string.scope_mi_share) 16 | TextSummaryWithSwitch( 17 | TextSummaryV( 18 | textId = R.string.No_Auto_Turn_Off, 19 | tipsId = R.string.No_Auto_Turn_Off_summary 20 | ), SwitchV("No_Auto_Turn_Off") 21 | ) 22 | Line() 23 | TitleText(textId = R.string.scope_cast) 24 | TitleText(textId = R.string.scope_miui_plus) 25 | TextSummaryWithSwitch( 26 | TextSummaryV( 27 | textId = R.string.force_support_send_app, 28 | ), SwitchV("force_support_send_app") 29 | ) 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/activity/pages/sub/IconPositionPage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.activity.pages.sub 2 | 3 | import android.annotation.SuppressLint 4 | import cn.fkj233.ui.activity.annotation.BMPage 5 | import cn.fkj233.ui.activity.data.BasePage 6 | import cn.fkj233.ui.activity.view.SwitchV 7 | import cn.fkj233.ui.activity.view.TextV 8 | import star.sky.voyager.R 9 | 10 | @SuppressLint("NonConstantResourceId") 11 | @BMPage("icon_position", titleId = R.string.icon_position, hideMenu = false) 12 | //@BMPage("icon_position", "Icon Position", hideMenu = false) 13 | class IconPositionPage : BasePage() { 14 | override fun onCreate() { 15 | TitleText(textId = R.string.at_right_status_bar_icon) 16 | TextWithSwitch( 17 | TextV(textId = R.string.at_right_alarm_icon), 18 | SwitchV("at_right_alarm_icon") 19 | ) 20 | TextWithSwitch( 21 | TextV(textId = R.string.at_right_nfc_icon), 22 | SwitchV("at_right_nfc_icon") 23 | ) 24 | TextWithSwitch( 25 | TextV(textId = R.string.at_right_volume_icon), 26 | SwitchV("at_right_volume_icon") 27 | ) 28 | TextWithSwitch( 29 | TextV(textId = R.string.at_right_zen_icon), 30 | SwitchV("at_right_zen_icon") 31 | ) 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/AiasstVision.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.aiasstvision.AiSubtitles 5 | import star.sky.voyager.hook.hooks.aiasstvision.DesktopModeScreenTranslate 6 | import star.sky.voyager.hook.hooks.aiasstvision.MeetingMode 7 | import star.sky.voyager.hook.hooks.aiasstvision.OfflineAiSubtitles 8 | import star.sky.voyager.hook.hooks.aiasstvision.SplitScreenTranslate 9 | import star.sky.voyager.utils.init.AppRegister 10 | 11 | object AiasstVision : AppRegister() { 12 | override val packageName: String = "com.xiaomi.aiasst.vision" 13 | 14 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 15 | autoInitHooks( 16 | lpparam, 17 | MeetingMode, // 解锁会议模式 18 | DesktopModeScreenTranslate, // 允许在工作台模式下使用屏幕翻译 19 | SplitScreenTranslate, // 解锁分屏翻译 20 | AiSubtitles, // 实时字幕 21 | OfflineAiSubtitles, // 离线实时字幕 22 | ) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Aireco.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.aireco.DeviceModify 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Aireco : AppRegister() { 8 | override val packageName: String = "com.xiaomi.aireco" 9 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 10 | autoInitHooks( 11 | lpparam, 12 | DeviceModify, // 移除限制 13 | ) 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Aod.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.aod.UnlockAlwaysOnDisplay 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Aod : AppRegister() { 8 | override val packageName: String = "com.miui.aod" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | // AodAvailable, // 解锁息屏显示 14 | UnlockAlwaysOnDisplay, // 解锁息屏显示时长限制 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Barrage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.barrage.AnyAppBarrage 5 | import star.sky.voyager.hook.hooks.barrage.AnyWhereBarrage 6 | import star.sky.voyager.hook.hooks.barrage.ModifyBarrageLength 7 | import star.sky.voyager.utils.init.AppRegister 8 | 9 | object Barrage : AppRegister() { 10 | override val packageName: String = "com.xiaomi.barrage" 11 | 12 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 13 | autoInitHooks( 14 | lpparam, 15 | AnyAppBarrage, // 弹幕通知-允许所有应用使用弹幕通知 16 | AnyWhereBarrage, // 弹幕通知-允许全局显示弹幕通知 17 | ModifyBarrageLength, // 弹幕长度 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Browser.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.AospShareSheet 5 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 6 | import star.sky.voyager.utils.init.AppRegister 7 | 8 | object Browser : AppRegister() { 9 | override val packageName: String = "com.android.browser" 10 | 11 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 12 | autoInitHooks( 13 | lpparam, 14 | SuperClipboard, // 超级剪切板 15 | AospShareSheet, 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Cast.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.ForceSupportSendApp 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Cast : AppRegister() { 8 | override val packageName: String = "com.milink.service" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | ForceSupportSendApp, // 强制所有应用支持在另一个设备打开 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/CloudService.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.cloudservice.Widevine 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object CloudService : AppRegister() { 8 | override val packageName: String = "com.miui.cloudservice" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | Widevine, // 解锁WidevineL1界面 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Creation.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.creation.CreationPhone 5 | import star.sky.voyager.hook.hooks.creation.ImageSize 6 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 7 | import star.sky.voyager.utils.init.AppRegister 8 | 9 | object Creation : AppRegister() { 10 | override val packageName: String = "com.miui.creation" 11 | 12 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 13 | autoInitHooks( 14 | lpparam, 15 | CreationPhone, // 为手机解锁小米创作 16 | ImageSize, // 解除图片比例限制 17 | SuperClipboard, 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/ExternalStorage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.externalstorage.NoStorageRestrict 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object ExternalStorage : AppRegister() { 8 | override val packageName: String = "com.android.externalstorage" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | NoStorageRestrict, // 取消选择文件夹时的限制 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/FileExplorer.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.fileexplorer.SelectName 5 | import star.sky.voyager.hook.hooks.multipackage.AospShareSheet 6 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 7 | import star.sky.voyager.utils.init.AppRegister 8 | 9 | object FileExplorer : AppRegister() { 10 | override val packageName: String = "com.android.fileexplorer" 11 | 12 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 13 | autoInitHooks( 14 | lpparam, 15 | SelectName, // 文件夹名字可以选择操作 // 文件夹名字以单行显示 16 | SuperClipboard, // 超级剪切板 17 | AospShareSheet, 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/GuardProvider.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.guardprovider.Anti2 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object GuardProvider : AppRegister() { 8 | override val packageName: String = "com.miui.guardprovider" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | // AntiDefraudAppManager().handleLoadPackage(lpparam) // 阻止上传应用列表 12 | autoInitHooks( 13 | lpparam, 14 | Anti2, 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/MMS.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object MMS : AppRegister() { 8 | override val packageName: String = "com.android.mms" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | SuperClipboard, 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Market.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.market.AsWhat 5 | import star.sky.voyager.hook.hooks.market.RemoveAd 6 | import star.sky.voyager.utils.init.AppRegister 7 | 8 | object Market : AppRegister() { 9 | override val packageName: String = "com.xiaomi.market" 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | AsWhat, // 伪装机型为: 14 | RemoveAd, // 移除一些广告 15 | ) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/MediaEditor.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.mediaeditor.DeviceShell2 5 | import star.sky.voyager.hook.hooks.mediaeditor.FilterManager 6 | import star.sky.voyager.hook.hooks.mediaeditor.MarketName 7 | import star.sky.voyager.hook.hooks.mediaeditor.UnlockUnlimitedCropping 8 | import star.sky.voyager.utils.init.AppRegister 9 | 10 | object MediaEditor : AppRegister() { 11 | override val packageName: String = "com.miui.mediaeditor" 12 | 13 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 14 | autoInitHooks( 15 | lpparam, 16 | FilterManager, // 大师滤镜 17 | UnlockUnlimitedCropping, // 移除裁剪图片/屏幕截图的限制 18 | DeviceShell2, 19 | MarketName, 20 | ) 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/MiSettings.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.misettings.AllFps 5 | import star.sky.voyager.hook.hooks.misettings.DcFps 6 | import star.sky.voyager.hook.hooks.multipackage.CustomRefreshRate 7 | import star.sky.voyager.hook.hooks.multipackage.DC 8 | import star.sky.voyager.utils.init.AppRegister 9 | 10 | object MiSettings : AppRegister() { 11 | override val packageName: String = "com.xiaomi.misettings" 12 | 13 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 14 | autoInitHooks( 15 | lpparam, 16 | CustomRefreshRate, // 自定义高刷新率应用 17 | // AodAvailable, // 解锁万象息屏 18 | DcFps, // 高刷DC同开 19 | AllFps, // 显示全部刷新率档位 20 | DC, // DC 21 | ) 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/MiShare.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.mishare.NoAutoTurnOff 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object MiShare : AppRegister() { 8 | override val packageName: String = "com.miui.mishare.connectivity" 9 | 10 | // var versionCode: Int = -1 11 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 12 | // versionCode = lpparam.getAppVersionCode() 13 | autoInitHooks( 14 | lpparam, 15 | NoAutoTurnOff, // 禁止小米互传自动关闭 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Mirror.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.ForceSupportSendApp 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Mirror : AppRegister() { 8 | override val packageName: String = "com.xiaomi.mirror" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | ForceSupportSendApp, 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Music.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.music.RemoveOpenAd 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Music : AppRegister() { 8 | override val packageName: String = "com.miui.player" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | RemoveOpenAd, // 去除开屏广告 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Notes.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Notes : AppRegister() { 8 | override val packageName: String = "com.miui.notes" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | SuperClipboard, 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/PackageInstaller.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.packageinstaller.AllAsSystemApp 5 | import star.sky.voyager.hook.hooks.packageinstaller.CustomInstallationSource 6 | import star.sky.voyager.hook.hooks.packageinstaller.DisableCountCheck 7 | import star.sky.voyager.hook.hooks.packageinstaller.DisableSafeModelTip 8 | import star.sky.voyager.hook.hooks.packageinstaller.RemovePackageInstallerAds 9 | import star.sky.voyager.hook.hooks.packageinstaller.ShowMoreApkInfo 10 | import star.sky.voyager.utils.init.AppRegister 11 | 12 | object PackageInstaller : AppRegister() { 13 | override val packageName: String = "com.miui.packageinstaller" 14 | 15 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 16 | autoInitHooks( 17 | lpparam, 18 | DisableCountCheck, // 禁用频繁安装应用检查 19 | RemovePackageInstallerAds, // 去广告 20 | DisableSafeModelTip, // // 禁用安全守护提示 21 | AllAsSystemApp, // 将所有应用视为系统应用 22 | CustomInstallationSource, // 自定义安装来源 23 | ShowMoreApkInfo, // 显示更多应用信息 24 | ) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/PersonalAssistant.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.personalassistant.BlurPersonalAssistant 5 | import star.sky.voyager.hook.hooks.personalassistant.ExposureRefreshForNonMIUIWidget 6 | import star.sky.voyager.hook.hooks.personalassistant.LocationCN 7 | import star.sky.voyager.utils.init.AppRegister 8 | 9 | object PersonalAssistant : AppRegister() { 10 | override val packageName: String = "com.miui.personalassistant" 11 | 12 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 13 | autoInitHooks( 14 | lpparam, 15 | BlurPersonalAssistant, // 负一屏模糊 16 | ExposureRefreshForNonMIUIWidget, // 为非MIUI小部件提供曝光刷新 17 | LocationCN, 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Phrase.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.phrase.GboardMi 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object Phrase : AppRegister() { 8 | override val packageName: String = "com.miui.phrase" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | GboardMi, 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/PowerKeeper.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.CustomRefreshRate 5 | import star.sky.voyager.hook.hooks.powerkeeper.DoNotClearApp 6 | import star.sky.voyager.hook.hooks.powerkeeper.PreventRecoveryOfBatteryOptimizationWhitelist 7 | import star.sky.voyager.utils.init.AppRegister 8 | 9 | object PowerKeeper : AppRegister() { 10 | override val packageName: String = "com.miui.powerkeeper" 11 | 12 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 13 | autoInitHooks( 14 | lpparam, 15 | CustomRefreshRate, // 自定义高刷新率应用 16 | DoNotClearApp, // 防止杀死后台应用 17 | PreventRecoveryOfBatteryOptimizationWhitelist, // 防止恢复电池优化白名单 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/ProvidersDownloads.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.providersdownloads.RemoveXlDownload 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object ProvidersDownloads : AppRegister() { 8 | override val packageName: String = "com.android.providers.downloads" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | RemoveXlDownload, // 移除在根目录创建的.xldownload文件夹 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/RearDisplay.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.rearddisplay.RearDisplayWeather 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object RearDisplay : AppRegister() { 8 | override val packageName: String = "com.xiaomi.misubscreenui" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | RearDisplayWeather, 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Scanner.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.AospShareSheet 5 | import star.sky.voyager.hook.hooks.scanner.Card 6 | import star.sky.voyager.hook.hooks.scanner.DocPpt 7 | import star.sky.voyager.hook.hooks.scanner.Document 8 | import star.sky.voyager.hook.hooks.scanner.Excel 9 | import star.sky.voyager.hook.hooks.scanner.Ocr 10 | import star.sky.voyager.hook.hooks.scanner.Ppt 11 | import star.sky.voyager.hook.hooks.scanner.Translation 12 | import star.sky.voyager.utils.init.AppRegister 13 | 14 | object Scanner : AppRegister() { 15 | override val packageName: String = "com.xiaomi.scanner" 16 | 17 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 18 | autoInitHooks( 19 | lpparam, 20 | Card, // 解锁扫名片 21 | DocPpt, // 解锁扫文件 22 | Document, // 解锁扫文档 23 | Excel, // 解锁扫提取表格 24 | Ocr, // 解锁识文字 25 | Ppt, // 解锁提取ppt 26 | Translation, // 解锁翻译 27 | AospShareSheet, 28 | ) 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/ScreenRecorder.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.screenrecorder.EnablePlaybackCapture 5 | import star.sky.voyager.hook.hooks.screenrecorder.ModifyScreenRecorderConfig 6 | import star.sky.voyager.hook.hooks.screenrecorder.SaveToMovies 7 | import star.sky.voyager.utils.init.AppRegister 8 | 9 | object ScreenRecorder : AppRegister() { 10 | override val packageName: String = "com.miui.screenrecorder" 11 | 12 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 13 | autoInitHooks( 14 | lpparam, 15 | EnablePlaybackCapture, // 强制启用原生录音支持 16 | ModifyScreenRecorderConfig, // 修改码率与帧率范围 17 | SaveToMovies, // 视频保存到 Movies/ScreenRecorder 18 | ) 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/ScreenShot.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.mediaeditor.UnlockUnlimitedCropping 5 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 6 | import star.sky.voyager.hook.hooks.screenshot.DeviceShell 7 | import star.sky.voyager.hook.hooks.screenshot.PrivacyMosaic 8 | import star.sky.voyager.hook.hooks.screenshot.SaveAsPng 9 | import star.sky.voyager.hook.hooks.screenshot.SaveToPictures 10 | import star.sky.voyager.utils.init.AppRegister 11 | 12 | object ScreenShot : AppRegister() { 13 | override val packageName: String = "com.miui.screenshot" 14 | 15 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 16 | autoInitHooks( 17 | lpparam, 18 | UnlockUnlimitedCropping, // 移除裁剪图片/屏幕截图的限制 19 | SuperClipboard, 20 | SaveToPictures, // 截图保存到 Pictures/Screenshots 21 | SaveAsPng, // 截图格式为 PNG 22 | PrivacyMosaic, // 智能隐私打码 23 | // Scroll, 24 | DeviceShell, 25 | ) 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/TaPlus.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.multipackage.SuperClipboard 5 | import star.sky.voyager.hook.hooks.multipackage.TaplusUnlock 6 | import star.sky.voyager.hook.hooks.taplus.TaplusBrowser 7 | import star.sky.voyager.hook.hooks.taplus.TaplusHorizontal 8 | import star.sky.voyager.utils.init.AppRegister 9 | 10 | object TaPlus : AppRegister() { 11 | override val packageName: String = "com.miui.contentextension" 12 | 13 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 14 | autoInitHooks( 15 | lpparam, 16 | TaplusHorizontal, // 允许在横屏方向下使用传送门 17 | TaplusUnlock, // 为Pad解锁传送门 18 | TaplusBrowser, // 自定义打开的浏览器 19 | SuperClipboard, 20 | ) 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Theme.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.utils.init.AppRegister 5 | 6 | object Theme : AppRegister() { 7 | override val packageName: String = "com.android.thememanager" 8 | 9 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 10 | autoInitHooks( 11 | lpparam, 12 | // MiDevice, 13 | ) 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Updater.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import de.robv.android.xposed.callbacks.XC_LoadPackage 7 | import star.sky.voyager.utils.init.AppRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | import star.sky.voyager.utils.voyager.LazyClass.FeatureParserCls 10 | 11 | object Updater : AppRegister() { 12 | override val packageName: String = "com.android.updater" 13 | 14 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 15 | hasEnable("remove_ota_validate") { 16 | Array(26) { "com.android.updater.common.utils.${'a' + it}" } 17 | .mapNotNull { loadClassOrNull(it) } 18 | .firstOrNull { it.declaredFields.size >= 9 && it.declaredMethods.size > 60 } 19 | ?.methodFinder()?.first { name == "T" && returnType == Boolean::class.java } 20 | ?.createHook { returnConstant(false) } 21 | 22 | FeatureParserCls.methodFinder().first { 23 | name == "hasFeature" && parameterCount == 2 24 | }.createHook { 25 | before { 26 | if (it.args[0] == "support_ota_validate") { 27 | it.result = false 28 | } 29 | } 30 | } 31 | 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/VoiceAssistant.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.voiceassistant.ChangeBrowserForMiAi 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object VoiceAssistant : AppRegister() { 8 | override val packageName: String = "com.miui.voiceassist" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | ChangeBrowserForMiAi, // 修改小爱同学使用的浏览器 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/WallPaper.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.wallpaper.UnlockSuperWallpaper 5 | import star.sky.voyager.utils.init.AppRegister 6 | 7 | object WallPaper : AppRegister() { 8 | override val packageName: String = "com.miui.miwallpaper" 9 | 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | autoInitHooks( 12 | lpparam, 13 | UnlockSuperWallpaper, // 解锁超级壁纸 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/apps/Weather.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.apps 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | import star.sky.voyager.hook.hooks.weather.HighAnimation 5 | import star.sky.voyager.hook.hooks.weather.MoreCard 6 | import star.sky.voyager.utils.init.AppRegister 7 | 8 | object Weather : AppRegister() { 9 | override val packageName: String = "com.miui.weather2" 10 | 11 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 12 | autoInitHooks( 13 | lpparam, 14 | HighAnimation, // 动画等级为高 15 | MoreCard, 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/AiSubtitles.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aiasstvision 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.SupportAiSubtitlesUtils 8 | 9 | object AiSubtitles : HookRegister() { 10 | override fun init() = hasEnable("ai_subtitles") { 11 | SupportAiSubtitlesUtils.methodFinder().filter { 12 | name in setOf( 13 | "isSupportAiSubtitles", 14 | "isSupportJapanKoreaTranslation", 15 | ) 16 | }.toList().createHooks { 17 | returnConstant(true) 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/DesktopModeScreenTranslate.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aiasstvision 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.AiasstVisionSystemUtilsCls 8 | 9 | object DesktopModeScreenTranslate : HookRegister() { 10 | override fun init() = hasEnable("desktop_mode_screen_translate") { 11 | AiasstVisionSystemUtilsCls.methodFinder() 12 | .filterByName("isDesktopModeOpen") 13 | .firstOrNull()?.createHook { 14 | returnConstant(false) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/MeetingMode.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aiasstvision 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.AiasstVisionSystemUtilsCls 8 | 9 | object MeetingMode : HookRegister() { 10 | override fun init() = hasEnable("meeting_mode") { 11 | AiasstVisionSystemUtilsCls.methodFinder().filter { 12 | name in setOf( 13 | "isSupportNewVoip", 14 | "isM81", 15 | "isM82", 16 | ) 17 | }.toList().createHooks { 18 | returnConstant(true) 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/OfflineAiSubtitles.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aiasstvision 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.SupportAiSubtitlesUtils 8 | 9 | object OfflineAiSubtitles : HookRegister() { 10 | override fun init() = hasEnable("offline_ai_subtitles") { 11 | SupportAiSubtitlesUtils.methodFinder() 12 | .filterByName("isSupportOfflineAiSubtitles") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aiasstvision/SplitScreenTranslate.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aiasstvision 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.AiasstVisionSystemUtilsCls 8 | 9 | object SplitScreenTranslate : HookRegister() { 10 | override fun init() = hasEnable("split_screen_translate") { 11 | AiasstVisionSystemUtilsCls.methodFinder() 12 | .filterByName("isSupportSplitScreenTranslateDevice") 13 | .firstOrNull()?.createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aireco/DeviceModify.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aireco 2 | 3 | import android.os.Build 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object DeviceModify : HookRegister() { 12 | override fun init() = hasEnable("device_modify") { 13 | loadClass("com.xiaomi.aireco.utils.DeviceUtils").methodFinder() 14 | .filterByName("getVoiceAssistUserAgent").toList().createHooks { 15 | before { 16 | setStaticObject(Build::class.java, "DEVICE", "nuwa") 17 | setStaticObject(Build::class.java, "MODEL", "2210132C") 18 | setStaticObject(Build::class.java, "MANUFACTURER", "Xiaomi") 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/AllowUntrustedTouches.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import android.content.Context 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object AllowUntrustedTouches : HookRegister() { 11 | override fun init() = hasEnable("allow_untrusted_touches") { 12 | loadClass("android.hardware.input.InputManager").methodFinder() 13 | .filterByName("getBlockUntrustedTouchesMode") 14 | .filterByParamTypes(Context::class.java) 15 | .first().createHook { 16 | returnConstant(0) 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/DeleteOnPostNotification.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object DeleteOnPostNotification : HookRegister() { 10 | override fun init() = hasEnable("delete_on_post_notification") { 11 | loadClass("com.android.server.wm.AlertWindowNotification").methodFinder() 12 | .filterByName("onPostNotification") 13 | .first().createHook { 14 | before { 15 | it.result = null 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/Disable72hVerify.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Disable72hVerify : HookRegister() { 10 | override fun init() = hasEnable("disable_72h_verify") { 11 | loadClass("com.android.server.locksettings.LockSettingsStrongAuth").methodFinder() 12 | .filterByName("rescheduleStrongAuthTimeoutAlarm") 13 | .filterByParamTypes(Long::class.java, Int::class.java) 14 | .first().createHook { 15 | returnConstant(null) 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/KillDomainVerification.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import android.content.Intent 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object KillDomainVerification : HookRegister() { 11 | override fun init() = hasEnable("kill_domain_verification") { 12 | loadClass("com.android.server.pm.verify.domain.DomainVerificationUtils").methodFinder() 13 | .filterByName("isDomainVerificationIntent") 14 | .filterByParamCount(2) 15 | .filterByParamTypes(Intent::class.java, Long::class.java) 16 | .first().createHook { 17 | returnConstant(false) 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/MaxWallpaperScale.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.ObjectUtils.setObject 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.XSPUtils.getFloat 8 | 9 | object MaxWallpaperScale : HookRegister() { 10 | private val value by lazy { 11 | getFloat("max_wallpaper_scale", 1.2f) 12 | } 13 | 14 | override fun init() { 15 | if (value == 1.2f) return 16 | 17 | loadClass("com.android.server.wm.WallpaperController") 18 | .declaredConstructors.createHooks { 19 | after { 20 | setObject(it.thisObject, "mMaxWallpaperScale", value) 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/SystemPropertiesHook.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.XSPUtils.getInt 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.voyager.LazyClass.SystemProperties 9 | 10 | object SystemPropertiesHook : HookRegister() { 11 | private val mediaSteps by lazy { 12 | getInt("media_volume_steps", 15) 13 | } 14 | 15 | override fun init() = hasEnable("media_volume_steps_switch") { 16 | SystemProperties.methodFinder() 17 | .filterByName("getInt") 18 | .filterByReturnType(Int::class.java) 19 | .first().createHook { 20 | before { 21 | when (it.args[0] as String) { 22 | "ro.config.media_vol_steps" -> it.result = mediaSteps 23 | } 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/android/XYVelocity.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.android 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.Log 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | 9 | object XYVelocity : HookRegister() { 10 | override fun init() { 11 | val velocityTracker = loadClass("android.view.VelocityTracker") 12 | velocityTracker.methodFinder() 13 | .filterByName("getXVelocity") 14 | .filterByReturnType(Float::class.java) 15 | .filterByParamCount(0) 16 | .first().createHook { 17 | before { 18 | Log.i("X: ${it.result}") 19 | } 20 | } 21 | velocityTracker.methodFinder() 22 | .filterByName("getXVelocity") 23 | .filterByReturnType(Float::class.java) 24 | .filterByParamCount(0) 25 | .first().createHook { 26 | before { 27 | Log.i("Y: ${it.result}") 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/aod/UnlockAlwaysOnDisplay.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.aod 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object UnlockAlwaysOnDisplay : HookRegister() { 10 | override fun init() = hasEnable("unlock_always_on_display_time") { 11 | loadClass("com.miui.aod.widget.AODSettings").methodFinder() 12 | .filterByName("onlySupportKeycodeGoto") 13 | .first().createHook { 14 | before { param -> 15 | param.result = false 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/barrage/AnyWhereBarrage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.barrage 2 | 3 | import android.content.ContentResolver 4 | import android.provider.Settings 5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object AnyWhereBarrage : HookRegister() { 12 | override fun init() = hasEnable("any_where_barrage") { 13 | loadClass("android.provider.Settings\$Secure").methodFinder() 14 | .filterByName("getInt") 15 | .toList().createHooks { 16 | after { param -> 17 | if ((param.args[1] as String) == "gb_boosting" && param.result != 1) { 18 | Settings.Secure.putInt(param.args[0] as ContentResolver?, "gb_boosting", 1) 19 | param.result = 1 20 | } 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/cloudservice/Widevine.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.cloudservice 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object Widevine : HookRegister() { 11 | private val WideVineL1 by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals("persist.vendor.sys.pay.widevine") 15 | } 16 | }.firstOrNull()?.getMethodInstance(classLoader) 17 | } 18 | 19 | override fun init() = hasEnable("unlock_widevine_l1") { 20 | WideVineL1?.createHook { 21 | returnConstant(true) 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/corepatch/ReturnConstant.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.corepatch 2 | 3 | import de.robv.android.xposed.XC_MethodHook 4 | import de.robv.android.xposed.XSharedPreferences 5 | 6 | 7 | open class ReturnConstant( 8 | private val prefs: XSharedPreferences, 9 | private val prefsKey: String, 10 | private val value: Any? 11 | ) : 12 | XC_MethodHook() { 13 | @Throws(Throwable::class) 14 | override fun beforeHookedMethod(param: MethodHookParam) { 15 | super.beforeHookedMethod(param) 16 | prefs.reload() 17 | if (prefs.getBoolean(prefsKey, false)) { 18 | param.result = value 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/creation/CreationPhone.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.creation 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 4 | import star.sky.voyager.utils.init.HookRegister 5 | import star.sky.voyager.utils.key.hasEnable 6 | import star.sky.voyager.utils.voyager.LazyClass.MiuiBuildCls 7 | 8 | object CreationPhone : HookRegister() { 9 | override fun init() = hasEnable("creation_phone") { 10 | setStaticObject(MiuiBuildCls, "IS_TABLET", true) 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/creation/ImageSize.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.creation 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object ImageSize : HookRegister() { 10 | override fun init() = hasEnable("creation_image_size") { 11 | loadClass("com.miui.creation.editor.filemanager.strategy.SuniaImportStrategy").methodFinder() 12 | .filterByName("setCheckImageSize") 13 | .first().createHook { 14 | before { 15 | it.args[0] = false 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/externalstorage/NoStorageRestrict.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.externalstorage 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object NoStorageRestrict : HookRegister() { 10 | override fun init() = hasEnable("No_Storage_Restrict") { 11 | loadClass("com.android.externalstorage.ExternalStorageProvider").methodFinder() 12 | .filterByName("shouldBlockFromTree") 13 | .filterByParamTypes(String::class.java) 14 | .first().createHook { 15 | returnConstant(false) 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/HDREnhance.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object HDREnhance : HookRegister() { 10 | override fun init() = hasEnable("hdr_enhance") { 11 | loadClass("com.miui.gallery.domain.DeviceFeature").methodFinder().filter { 12 | name in setOf( 13 | "isSupportHDREnhance", 14 | "isSupportDolbyVideo", 15 | "isHighEndDevice", 16 | ) 17 | }.toList().createHooks { 18 | returnConstant(true) 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/IdPhoto.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object IdPhoto : HookRegister() { 10 | override fun init() = hasEnable("id_photo") { 11 | val idPhotoEntranceUtilsClass = 12 | loadClass("com.miui.gallery.domain.IDPhotoEntranceUtils") 13 | 14 | loadClass("com.miui.mediaeditor.api.MediaEditorApiHelper").methodFinder() 15 | .filterByName("isIDPhotoAvailable") 16 | .first().createHook { 17 | after { 18 | it.result = true 19 | } 20 | } 21 | idPhotoEntranceUtilsClass.methodFinder() 22 | .filterByName("isDeviceSupportIDPhoto") 23 | .first().createHook { 24 | before { param -> 25 | param.result = true 26 | } 27 | } 28 | idPhotoEntranceUtilsClass.methodFinder() 29 | .filterByName("getIdType") 30 | .first().createHook { 31 | before { param -> 32 | param.result = 2 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/MagicMatting.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object MagicMatting : HookRegister() { 10 | override fun init() = hasEnable("magic_matting") { 11 | loadClass("com.miui.mediaeditor.api.MediaEditorApiHelper").methodFinder() 12 | .filterByName("isMagicMattingAvailable") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/MagicSky.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object MagicSky : HookRegister() { 10 | override fun init() = hasEnable("magic_sky") { 11 | loadClass("com.miui.gallery.util.FilterSkyEntranceUtils").methodFinder() 12 | .filterByName("showSingleFilterSky") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/Ocr.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Ocr : HookRegister() { 10 | override fun init() = hasEnable("ocr") { 11 | loadClass("com.miui.gallery.ui.photoPage.ocr.OCRHelper").methodFinder().filter { 12 | name in setOf("isSupportLocalOCR", "isSupportOCR") 13 | }.toList().createHooks { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/OcrForm.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object OcrForm : HookRegister() { 10 | override fun init() = hasEnable("ocr_form") { 11 | loadClass("com.miui.gallery.util.RecognizeFormUtil").methodFinder() 12 | .filterByName("isAvailable") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/OpenVideoSelf.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object OpenVideoSelf : HookRegister() { 10 | override fun init() = hasEnable("open_video_self") { 11 | loadClass("com.miui.gallery.util.VideoPlayerCompat").methodFinder() 12 | .filterByName("getMiuiVideoPackageName") 13 | .first().createHook { 14 | returnConstant("com.miui.gallery") 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/Pdf.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Pdf : HookRegister() { 10 | override fun init() = hasEnable("pdf") { 11 | loadClass("com.miui.gallery.request.PicToPdfHelper").methodFinder() 12 | .filterByName("isPicToPdfSupport") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/PhotoMovie.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object PhotoMovie : HookRegister() { 10 | override fun init() = hasEnable("photo_movie") { 11 | loadClass("com.miui.mediaeditor.api.MediaEditorApiHelper").methodFinder() 12 | .filterByName("isPhotoMovieAvailable") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | 19 | loadClass("com.miui.gallery.domain.DeviceFeature").methodFinder() 20 | .filterByName("isDeviceSupportPhotoMovie") 21 | .first().createHook { 22 | before { 23 | it.result = true 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/Remover2.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Remover2 : HookRegister() { 10 | override fun init() = hasEnable("remover2") { 11 | loadClass("com.miui.gallery.editor.photo.app.remover2.sdk.Remover2CheckHelper").methodFinder() 12 | .filterByName("isRemover2Support") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/TextYanHua.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object TextYanHua : HookRegister() { 10 | override fun init() = hasEnable("text_yan_hua") { 11 | loadClass("com.miui.gallery.domain.SkyCheckHelper").methodFinder() 12 | .filterByName("isSupportTextYanhua") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/VideoEditor.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object VideoEditor : HookRegister() { 10 | override fun init() = hasEnable("video_editor") { 11 | loadClass("com.miui.mediaeditor.api.MediaEditorApiHelper").methodFinder().filter { 12 | name in setOf("isVideoEditorAvailable", "isVlogAvailable") 13 | }.toList().createHooks { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/gallery/VideoPost.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.gallery 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object VideoPost : HookRegister() { 10 | override fun init() = hasEnable("video_post") { 11 | loadClass("com.miui.mediaeditor.api.MediaEditorApiHelper").methodFinder() 12 | .filterByName("isVideoPostAvailable") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/guardprovider/Anti2.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.guardprovider 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object Anti2 : HookRegister() { 11 | private val region by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals("ro.miui.customized.region") 15 | } 16 | }.firstOrNull()?.getMethodInstance(classLoader) 17 | } 18 | 19 | private val detect by lazy { 20 | dexKitBridge.findMethod { 21 | matcher { 22 | addUsingStringsEquals("https://flash.sec.miui.com/detect/app") 23 | } 24 | }.firstOrNull()?.getMethodInstance(classLoader) 25 | } 26 | 27 | override fun init() = hasEnable("Anti_Defraud_App_Manager") { 28 | region?.createHook { 29 | returnConstant(false) 30 | } 31 | 32 | detect?.createHook { 33 | returnConstant(null) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/AlwaysBlurWallpaper.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.XSPUtils.getInt 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object AlwaysBlurWallpaper : HookRegister() { 11 | private val value by lazy { 12 | getInt("home_blur_radius", 100) 13 | } 14 | 15 | override fun init() = hasEnable("home_blur_wallpaper") { 16 | loadClass("com.miui.home.launcher.common.BlurUtils").methodFinder() 17 | .filterByName("fastBlur") 18 | .filterByParamCount(4) 19 | .first().createHook { 20 | before { 21 | it.args[0] = value.toFloat() / 100 22 | it.args[2] = true 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/AlwaysShowStatusBarClock.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object AlwaysShowStatusBarClock : HookRegister() { 10 | override fun init() = hasEnable("home_time") { 11 | val workspaceClass = loadClass("com.miui.home.launcher.Workspace") 12 | val methodNames = 13 | listOf("isScreenHasClockGadget", "isScreenHasClockWidget", "isClockWidget") 14 | 15 | methodNames.forEach { methodName -> 16 | val result = runCatching { 17 | workspaceClass.methodFinder() 18 | .filterByName(methodName) 19 | .first() 20 | .createHook { 21 | before { 22 | it.result = false 23 | } 24 | } 25 | } 26 | if (result.isSuccess) return@forEach 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/AnimDurationRatio.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.XSPUtils.getInt 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object AnimDurationRatio : HookRegister() { 11 | private val value1 by lazy { 12 | getInt("home_anim_ratio", 100).toFloat() / 100f 13 | } 14 | 15 | private val value2 by lazy { 16 | getInt("home_anim_ratio_recent", 100).toFloat() / 100f 17 | } 18 | 19 | override fun init() = hasEnable("home_anim_ratio_binding") { 20 | loadClass("com.miui.home.recents.util.RectFSpringAnim").methodFinder() 21 | .filterByName("getModifyResponse") 22 | .first().createHook { 23 | before { 24 | it.result = it.args[0] as Float * value1 25 | } 26 | } 27 | 28 | loadClass("com.miui.home.launcher.common.DeviceLevelUtils").methodFinder() 29 | .filterByName("getDeviceLevelTransitionAnimRatio") 30 | .first().createHook { 31 | before { 32 | it.result = value2 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/BackGestureAreaHeight.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import android.view.WindowManager 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.XSPUtils.getInt 9 | import star.sky.voyager.utils.key.hasEnable 10 | import kotlin.math.roundToInt 11 | 12 | 13 | object BackGestureAreaHeight : HookRegister() { 14 | private val wmlpHeight by lazy { 15 | getInt("wmlp_height", 60) 16 | } 17 | 18 | override fun init() = hasEnable("back_gesture_area_height") { 19 | loadClass("com.miui.home.recents.GestureStubView").methodFinder() 20 | .filterByName("getGestureStubWindowParam") 21 | .first().createHook { 22 | after { param -> 23 | val wmlp = param.result as WindowManager.LayoutParams 24 | wmlp.height = (wmlp.height / 60.0F * wmlpHeight).roundToInt() 25 | param.result = wmlp 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/DisableRecentViewWallpaperDarkening.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.api.setObjectField 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object DisableRecentViewWallpaperDarkening : HookRegister() { 11 | override fun init() = hasEnable("home_recent_view_wallpaper_darkening") { 12 | loadClass("com.miui.home.recents.DimLayer").methodFinder() 13 | .filterByName("dim") 14 | .filterByParamCount(3) 15 | .first().createHook { 16 | before { 17 | it.args[0] = 0.0f 18 | it.thisObject.setObjectField("mCurrentAlpha", 0.0f) 19 | // it.thisObject.objectHelper().setObject("mCurrentAlpha", 0.0f) 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/FakeNavBar.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object FakeNavBar : HookRegister() { 10 | override fun init() = hasEnable("fake_nav_bar") { 11 | loadClass("com.miui.home.recents.views.RecentsContainer").methodFinder() 12 | .filterByName("hideFakeNavBarForHidingGestureLine") 13 | .first().createHook { 14 | before { 15 | it.args[0] = true 16 | } 17 | } 18 | } 19 | } 20 | 21 | // loadClass("com.miui.home.recents.views.RecentsContainer").methodFinder() 22 | // .filterByName("showLandscapeOverviewGestureView") 23 | // .filterByParamTypes(Boolean::class.java) 24 | // .first().createHook { 25 | // returnConstant(null) 26 | // } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/FakeNonDefaultIcon.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object FakeNonDefaultIcon : HookRegister() { 10 | override fun init() = hasEnable("fake_non_default_icon") { 11 | loadClass("com.miui.home.launcher.DeviceConfig").methodFinder() 12 | .filterByName("isDefaultIcon") 13 | .first().createHook { 14 | returnConstant(false) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/MonetColor.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.res.Resources.getSystem 5 | import android.graphics.Color.parseColor 6 | import star.sky.voyager.utils.init.ResourcesHookRegister 7 | import star.sky.voyager.utils.key.XSPUtils.getString 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object MonetColor : ResourcesHookRegister() { 11 | @SuppressLint("DiscouragedApi") 12 | override fun init() = hasEnable("monet_color") { 13 | val monet = "system_accent1_100" 14 | val monoColorId = getSystem().getIdentifier(monet, "color", "android") 15 | var monoColor = getSystem().getColor(monoColorId) 16 | hasEnable("use_edit_color") { 17 | monoColor = parseColor(getString("your_color", "#0d84ff")) 18 | } 19 | getInitPackageResourcesParam().res.setReplacement( 20 | "com.miui.home", 21 | "color", 22 | "monochrome_default", 23 | monoColor 24 | ) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/MonoChromeIcon.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object MonoChromeIcon : HookRegister() { 10 | override fun init() = hasEnable("mono_chrome_icon") { 11 | loadClass("com.miui.home.launcher.graphics.MonochromeUtils").methodFinder() 12 | .filterByName("isSupportMonochrome") 13 | .first().createHook { 14 | after { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/OptimizeUnlockAnim.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.yife.Build.IS_TABLET 9 | 10 | object OptimizeUnlockAnim : HookRegister() { 11 | override fun init() = hasEnable("optimize_unlock_anim") { 12 | loadClass( 13 | when { 14 | IS_TABLET -> "com.miui.home.launcher.compat.UserPresentAnimationCompatV12Spring" 15 | else -> "com.miui.home.launcher.compat.UserPresentAnimationCompatV12Phone" 16 | } 17 | ).methodFinder() 18 | .filterByName("getSpringAnimator") 19 | .filterByParamCount(6) 20 | .first() 21 | .createHook { 22 | before { 23 | it.args[4] = 0.5f 24 | it.args[5] = 0.5f 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/OverlapMode.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object OverlapMode : HookRegister() { 10 | override fun init() = hasEnable("Overlap_Mode") { 11 | loadClass("com.miui.home.launcher.overlay.assistant.AssistantDeviceAdapter").methodFinder() 12 | .filterByName("inOverlapMode") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/PadGestureLine.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object PadGestureLine : HookRegister() { 10 | override fun init() = hasEnable("pad_gesture_line") { 11 | val navigationBarTypePreferenceFragmentCls = 12 | loadClass("com.miui.home.recents.settings.NavigationBarTypePreferenceFragment") 13 | val baseRecentsImplCls = 14 | loadClass("com.miui.home.recents.BaseRecentsImpl") 15 | 16 | baseRecentsImplCls.methodFinder() 17 | .filterByName("initHideGestureLine") 18 | .first().createHook { 19 | returnConstant(null) 20 | } 21 | 22 | navigationBarTypePreferenceFragmentCls.methodFinder() 23 | .filterByName("updatePreferenceVisibility") 24 | .first().createHook { 25 | returnConstant(true) 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/PadShowMemory.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object PadShowMemory : HookRegister() { 10 | override fun init() = hasEnable("pad_show_memory") { 11 | loadClass("com.miui.home.recents.views.RecentsDecorations") 12 | .methodFinder().filter { 13 | name in setOf("canTxtMemInfoShow", "canTxtMemInfoShowIgnoreSmallWindow") 14 | }.toList().createHooks { 15 | returnConstant(true) 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/RestoreGoogleAppIcon.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import android.content.ComponentName 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.ObjectUtils.getObjectOrNullAs 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object RestoreGoogleAppIcon : HookRegister() { 11 | override fun init() = hasEnable("restore_google_app_icon") { 12 | loadClass("com.miui.home.launcher.AppFilter").declaredConstructors.createHooks { 13 | after { param -> 14 | getObjectOrNullAs>( 15 | param.thisObject, 16 | "mSkippedItems" 17 | )!!.removeIf { 18 | it.packageName in setOf( 19 | "com.google.android.googlequicksearchbox", 20 | "com.google.android.gms" 21 | ) 22 | } 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/ShareSystemApp.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import de.robv.android.xposed.XC_MethodHook.Unhook 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object ShareSystemApp : HookRegister() { 11 | private var hook1: Unhook? = null 12 | override fun init() = hasEnable("share_system_app") { 13 | val zCls = 14 | loadClass("com.miui.home.launcher.shortcuts.SystemShortcutMenuItem\$ShareAppShortcutMenuItem") 15 | val utilsCls = 16 | loadClass("com.miui.home.launcher.common.Utilities") 17 | val isSystemPackage = 18 | utilsCls.methodFinder().filterByName("isSystemPackage").first() 19 | 20 | zCls.methodFinder().filterByName("isValid") 21 | .first().createHook { 22 | before { 23 | hook1 = isSystemPackage.createHook { 24 | returnConstant(false) 25 | } 26 | } 27 | 28 | after { 29 | hook1?.unhook() 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/ShortCutTitle.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import star.sky.voyager.utils.init.ResourcesHookRegister 4 | import star.sky.voyager.utils.key.XSPUtils.getString 5 | import star.sky.voyager.utils.key.hasEnable 6 | 7 | object ShortCutTitle : ResourcesHookRegister() { 8 | override fun init() = hasEnable("shortcut_title_custom") { 9 | replaceHomeString( 10 | "system_shortcuts_more_operation", 11 | getString("app_info", "App Info")!! 12 | ) 13 | replaceHomeString( 14 | "share", 15 | getString("share", "Share")!! 16 | ) 17 | replaceHomeString( 18 | "system_shortcuts_remove", 19 | getString("remove", "Remove")!! 20 | ) 21 | replaceHomeString( 22 | "edit_mode_uninstall", 23 | getString("uninstall", "Uninstall")!! 24 | ) 25 | } 26 | 27 | private fun replaceHomeString(key: String, replacement: String) { 28 | getInitPackageResourcesParam().res.setReplacement( 29 | "com.miui.home", 30 | "string", 31 | key, 32 | replacement 33 | ) 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/ShortcutItemCount.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.api.callMethod 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object ShortcutItemCount : HookRegister() { 12 | override fun init() = hasEnable("shortcut_remove_restrictions") { 13 | val appShortcutMenuClass = 14 | loadClass("com.miui.home.launcher.shortcuts.AppShortcutMenu") 15 | appShortcutMenuClass.methodFinder().filter { 16 | name in setOf("getMaxCountInCurrentOrientation", "getMaxShortcutItemCount") 17 | }.toList().createHooks { 18 | after { 19 | it.result = 20 20 | } 21 | } 22 | 23 | appShortcutMenuClass.methodFinder() 24 | .filterByName("getMaxVisualHeight") 25 | .first().createHook { 26 | after { 27 | it.result = it.thisObject.callMethod("getItemHeight") 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/UnlockHotSeatIcon.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object UnlockHotSeatIcon : HookRegister() { 10 | override fun init() = hasEnable("unlock_hot_seat") { 11 | loadClass("com.miui.home.launcher.DeviceConfig").methodFinder() 12 | .filterByName("getHotseatMaxCount") 13 | .first().createHook { 14 | before { 15 | it.result = 99 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/home/UseTransitionAnimation.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.home 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object UseTransitionAnimation : HookRegister() { 10 | override fun init() = hasEnable("Use_Transition_Animation") { 11 | setOf( 12 | loadClass("com.miui.home.launcher.LauncherWidgetView"), 13 | loadClass("com.miui.home.launcher.maml.MaMlWidgetView") 14 | ).forEach { clazz -> 15 | clazz.methodFinder() 16 | .filterByName("isUseTransitionAnimation") 17 | .first().createHook { 18 | returnConstant(true) 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/maxmipad/DisableFixedOrientation.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.maxmipad 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.yife.XSharedPreferences.getStringSet 9 | 10 | object DisableFixedOrientation : HookRegister() { 11 | override fun init() = hasEnable("disable_fixed_orientation") { 12 | val shouldDisableFixedOrientationList = 13 | getStringSet("should_disable_fixed_orientation_list", mutableSetOf()) 14 | loadClass("com.android.server.wm.MiuiFixedOrientationController").methodFinder() 15 | .filterByName("shouldDisableFixedOrientation") 16 | .first().createHook { 17 | before { 18 | if (it.args[0] in shouldDisableFixedOrientationList) { 19 | it.result = true 20 | } 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/maxmipad/IgnoreStylusKeyGesture.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.maxmipad 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadFirstClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object IgnoreStylusKeyGesture : HookRegister() { 10 | override fun init() = hasEnable("ignore_stylus_key_gesture") { 11 | val clazzMiuiStylusPageKeyListener = loadFirstClass( 12 | "com.miui.server.input.stylus.MiuiStylusPageKeyListener", 13 | "com.miui.server.stylus.MiuiStylusPageKeyListener" 14 | ) 15 | val methodNames = 16 | setOf("isPageKeyEnable", "needInterceptBeforeDispatching", "shouldInterceptKey") 17 | clazzMiuiStylusPageKeyListener.methodFinder().filter { 18 | name in methodNames 19 | }.toList().createHooks { 20 | returnConstant(false) 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/maxmipad/NoMagicPointer.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.maxmipad 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object NoMagicPointer : HookRegister() { 11 | override fun init() = hasEnable("no_magic_pointer") { 12 | loadClassOrNull("android.magicpointer.util.MiuiMagicPointerUtils")?.methodFinder() 13 | ?.filterByName("isEnable") 14 | ?.first()?.createHook { 15 | returnConstant(false) 16 | } 17 | loadClass("com.android.server.SystemServerImpl").methodFinder() 18 | .filterByName("addMagicPointerManagerService").first().createHook { 19 | returnConstant(null) 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/maxmipad/RestoreEsc.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.maxmipad 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object RestoreEsc : HookRegister() { 10 | override fun init() = hasEnable("restore_esc") { 11 | loadClass("com.android.server.input.config.InputCommonConfig").methodFinder() 12 | .filterByName("setPadMode") 13 | .first().createHook { 14 | before { 15 | it.args[0] = false 16 | } 17 | } 18 | loadClass("com.android.server.input.InputManagerServiceStubImpl").methodFinder() 19 | .filterByName("switchPadMode") 20 | .first().createHook { 21 | before { 22 | it.args[0] = false 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/mediaeditor/MarketName.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.mediaeditor 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.XSPUtils.getString 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.voyager.LazyClass.SystemProperties 9 | 10 | object MarketName : HookRegister() { 11 | private val ProductMarketName by lazy { 12 | getString("product_market_name", "Xiaomi 13 Ultra") 13 | } 14 | 15 | override fun init() = hasEnable("market_name") { 16 | SystemProperties.methodFinder() 17 | // .filterByName("get") 18 | .filterByParamCount(2) 19 | .filterByParamTypes(String::class.java, String::class.java) 20 | .toList().createHooks { 21 | before { 22 | if (it.args[0] == "ro.product.marketname") { 23 | it.args[1] = ProductMarketName 24 | } 25 | } 26 | } 27 | 28 | SystemProperties.methodFinder() 29 | .filterByName("get") 30 | .filterByParamTypes(String::class.java) 31 | .toList().createHooks { 32 | before { 33 | if (it.args[0] == "ro.product.marketname") { 34 | it.result = ProductMarketName 35 | } 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/misettings/AllFps.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.misettings 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.FeatureParserCls 8 | 9 | object AllFps : HookRegister() { 10 | override fun init() = hasEnable("show_all_fps") { 11 | FeatureParserCls.methodFinder() 12 | .filterByName("getIntArray") 13 | .toList().createHooks { 14 | before { 15 | if (it.args[0] == "fpsList") { 16 | it.result = intArrayOf(144, 120, 90, 60, 30) 17 | } 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/misettings/DcFps.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.misettings 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.FeatureParserCls 8 | 9 | object DcFps : HookRegister() { 10 | override fun init() = hasEnable("dc_fps") { 11 | FeatureParserCls.methodFinder() 12 | .filterByName("getBoolean") 13 | .toList().createHooks { 14 | before { 15 | if (it.args[0] == "dc_backlight_fps_incompatible") { 16 | it.result = false 17 | } 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/multipackage/AospShareSheet.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.multipackage 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object AospShareSheet : HookRegister() { 10 | override fun init() = hasEnable("aosp_share_sheet") { 11 | setOf( 12 | loadClass("com.android.internal.app.ResolverActivityStubImpl"), 13 | loadClass("com.android.internal.app.ResolverActivityStub") 14 | ).forEach { clazz -> 15 | clazz.methodFinder() 16 | .filterByName("useAospShareSheet") 17 | .first().createHook { 18 | returnConstant(true) 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/music/RemoveOpenAd.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.music 2 | 3 | import android.os.Bundle 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object RemoveOpenAd : HookRegister() { 12 | override fun init() = hasEnable("remove_open_ad") { 13 | loadClass("com.tencent.qqmusiclite.activity.SplashAdActivity").methodFinder() 14 | .filterByName("onCreate") 15 | .filterByParamTypes(Bundle::class.java) 16 | .toList().createHooks { 17 | after { param -> 18 | loadClassOrNull("android.app.Activity") 19 | ?.getMethod("finish") 20 | ?.invoke(param.thisObject) 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/packageinstaller/AllAsSystemApp.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.packageinstaller 2 | 3 | import android.content.pm.ApplicationInfo 4 | import com.github.kyuubiran.ezxhelper.EzXHelper.safeClassLoader 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | 11 | object AllAsSystemApp : HookRegister() { 12 | private val systemMethod by lazy { 13 | dexKitBridge.findMethod { 14 | matcher { 15 | paramTypes = listOf("android.content.pm.ApplicationInfo") 16 | returnType = "boolean" 17 | } 18 | }.map { it.getMethodInstance(safeClassLoader) } 19 | } 20 | 21 | override fun init() = hasEnable("all_as_system_app") { 22 | // Log.i("看看行不行,被叫方法:" + param.method.declaringClass + "." + param.method.name) 23 | 24 | systemMethod.createHooks { 25 | before { param -> 26 | (param.args[0] as ApplicationInfo).flags = 27 | (param.args[0] as ApplicationInfo).flags.or(ApplicationInfo.FLAG_SYSTEM) 28 | // Log.i("看看行不行,被叫方法:" + param.method.declaringClass + "." + param.method.name) 29 | } 30 | // returnConstant(true) 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/packageinstaller/CustomInstallationSource.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.packageinstaller 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.XSPUtils.getString 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object CustomInstallationSource : HookRegister() { 11 | private val yourSource by lazy { 12 | getString("your_source", "com.android.fileexplorer") 13 | } 14 | 15 | override fun init() = hasEnable("custom_installation_source") { 16 | loadClass("com.miui.packageInstaller.InstallStart").methodFinder() 17 | .filterByName("getCallingPackage") 18 | .first().createHook { 19 | returnConstant(yourSource) 20 | // Log.i("Source: $yourSource") 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/packageinstaller/DisableCountCheck.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.packageinstaller 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object DisableCountCheck : HookRegister() { 10 | override fun init() = hasEnable("package_installer_remove_check") { 11 | val riskControlRules = 12 | loadClassOrNull("com.miui.packageInstaller.model.RiskControlRules")!! 13 | riskControlRules.methodFinder() 14 | .filterByName("getCurrentLevel") 15 | .first().createHook { 16 | returnConstant(0) 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/personalassistant/LocationCN.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.personalassistant 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import java.util.Locale 8 | 9 | object LocationCN : HookRegister() { 10 | override fun init() = hasEnable("assistant_location_cn") { 11 | loadClass("java.util.Locale") 12 | .getDeclaredMethod("getDefault") 13 | .createHook { 14 | after { 15 | // val locale = param.result as Locale 16 | // val builder = Locale.Builder().setLanguage("zh").setRegion("CN") 17 | // builder.setLanguage("zh") 18 | // builder.setRegion("CN") 19 | // Locale.setDefault(builder.build()) 20 | val locale = it.result as Locale 21 | Locale.setDefault(Locale("zh", "CN")) 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/powerkeeper/DoNotClearApp.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.powerkeeper 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object DoNotClearApp : HookRegister() { 10 | override fun init() = hasEnable("do_not_clear_app") { 11 | loadClass("miui.process.ProcessManager").methodFinder() 12 | .filterByName("kill") 13 | .first().createHook { 14 | before { 15 | it.result = false 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/powerkeeper/PreventRecoveryOfBatteryOptimizationWhitelist.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.powerkeeper 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object PreventRecoveryOfBatteryOptimizationWhitelist : HookRegister() { 10 | override fun init() = hasEnable("prevent_recovery_of_battery_optimization_white_list") { 11 | loadClass("com.miui.powerkeeper.statemachine.ForceDozeController").methodFinder() 12 | .filterByName("restoreWhiteListAppsIfQuitForceIdle") 13 | .first().createHook { 14 | returnConstant(null) 15 | } 16 | 17 | loadClass("com.miui.powerkeeper.utils.CommonAdapter").methodFinder() 18 | .filterByName("addPowerSaveWhitelistApps") 19 | .first().createHook { 20 | returnConstant(null) 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/providersdownloads/RemoveXlDownload.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.providersdownloads 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object RemoveXlDownload : HookRegister() { 10 | override fun init() = hasEnable("remove_xl_download") { 11 | // val targetPath = File(Environment.getExternalStorageDirectory(), ".xlDownload").absoluteFile 12 | // File::class.java.methodFinder().filterByName("mkdirs").first().createHook { 13 | // before { 14 | // if ((it.thisObject as File).absoluteFile.equals(targetPath)) { 15 | // it.throwable = FileNotFoundException("blocked") 16 | // } 17 | // } 18 | // } 19 | val clazzXLConfig = 20 | loadClass("com.android.providers.downloads.config.XLConfig") 21 | 22 | clazzXLConfig.methodFinder().filter { 23 | name in setOf("setDebug", "setSoDebug") 24 | }.toList().createHooks { 25 | returnConstant(null) 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/Card.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Card : HookRegister() { 10 | override fun init() = hasEnable("card") { 11 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder().filter { 12 | name in setOf("isAddBusinessCard", "isBusinessCardModuleAvailable") 13 | }.toList().createHooks { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/DocPpt.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object DocPpt : HookRegister() { 10 | override fun init() = hasEnable("doc_ppt") { 11 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder() 12 | .filterByName("isPPTModuleAvailable") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/Document.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Document : HookRegister() { 10 | override fun init() = hasEnable("document") { 11 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder() 12 | .filterByName("isAddDocumentModule") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/Excel.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object Excel : HookRegister() { 11 | override fun init() = hasEnable("excel") { 12 | loadClass("com.xiaomi.scanner.util.SPUtils").methodFinder() 13 | .filterByName("getFormModule") 14 | .first().createHook { 15 | before { 16 | it.result = true 17 | } 18 | } 19 | 20 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder().filter { 21 | name in setOf("isSupportForm", "isAddFormRecognitionFunction") 22 | }.toList().createHooks { 23 | before { 24 | it.result = true 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/Ocr.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Ocr : HookRegister() { 10 | override fun init() = hasEnable("ocr2") { 11 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder() 12 | .filterByName("isAddTextExtractionFunction") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/Ppt.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Ppt : HookRegister() { 10 | override fun init() = hasEnable("ocr2") { 11 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder() 12 | .filterByName("isAddTextExtractionFunction") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/scanner/Translation.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.scanner 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object Translation : HookRegister() { 10 | override fun init() = hasEnable("translation") { 11 | loadClass("com.xiaomi.scanner.settings.FeatureManager").methodFinder().filter { 12 | name in setOf("isAddTranslation", "isTranslationModuleAvailable") 13 | }.toList().createHooks { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/screenrecorder/EnablePlaybackCapture.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.screenrecorder 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.SystemProperties 8 | 9 | object EnablePlaybackCapture : HookRegister() { 10 | override fun init() = hasEnable("force_enable_native_playback_capture") { 11 | SystemProperties.methodFinder() 12 | .filterByName("getBoolean") 13 | .filterByParamCount(2) 14 | .filterByParamTypes(String::class.java, Boolean::class.java) 15 | .first().createHook { 16 | before { param -> 17 | if (param.args[0] == "ro.vendor.audio.playbackcapture.screen") { 18 | param.result = true 19 | } 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/screenrecorder/SaveToMovies.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.screenrecorder 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object SaveToMovies : HookRegister() { 11 | override fun init() = hasEnable("save_to_movies") { 12 | setStaticObject(loadClass("android.os.Environment"), "DIRECTORY_DCIM", "Movies") 13 | loadClass("android.content.ContentValues").methodFinder() 14 | .filterByName("put") 15 | .filterByParamTypes(String::class.java, String::class.java) 16 | .toList().createHooks { 17 | before { param -> 18 | if (param.args[0] == "relative_path") { 19 | param.args[1] = (param.args[1] as String).replace("DCIM", "Movies") 20 | } 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/DeviceShell.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.screenshot 2 | 3 | import android.os.Build 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.XSPUtils.getString 9 | import star.sky.voyager.utils.key.hasEnable 10 | import star.sky.voyager.utils.voyager.LazyClass.AndroidBuildCls 11 | import star.sky.voyager.utils.voyager.LazyClass.ShellResourceFetcher 12 | 13 | object DeviceShell : HookRegister() { 14 | private lateinit var device: String 15 | private val deviceS by lazy { 16 | getString("device_shell_s", "ishtar") 17 | } 18 | 19 | override fun init() = hasEnable("device_shell") { 20 | ShellResourceFetcher.methodFinder() 21 | .filterByName("getResId") 22 | .first().createHook { 23 | before { 24 | if (!this@DeviceShell::device.isInitialized) { 25 | device = Build.DEVICE 26 | } 27 | setStaticObject(AndroidBuildCls, "DEVICE", deviceS) 28 | } 29 | 30 | after { 31 | setStaticObject(AndroidBuildCls, "DEVICE", device) 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/PrivacyMosaic.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.screenshot 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object PrivacyMosaic : HookRegister() { 10 | override fun init() = hasEnable("privacy_mosaic") { 11 | loadClass("com.miui.gallery.editor.photo.screen.mosaic.ScreenMosaicView") 12 | .methodFinder().filterByName("isSupportPrivacyMarking") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/SaveToPictures.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.screenshot 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | 8 | object SaveToPictures : HookRegister() { 9 | override fun init() = hasEnable("save_to_pictures") { 10 | setStaticObject(loadClass("android.os.Environment"), "DIRECTORY_DCIM", "Pictures") 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/screenshot/Scroll.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.screenshot 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | 8 | object Scroll : HookRegister() { 9 | override fun init() { 10 | val scrollAnnotationDisplayCls = 11 | loadClass("com.miui.annotation.app.ScrollAnnotationDisplay") 12 | val scrollAnnotationViewCls = 13 | loadClass("com.miui.annotation.app.ScrollAnnotationView") 14 | 15 | scrollAnnotationDisplayCls.methodFinder() 16 | .filterByReturnType(Boolean::class.java) 17 | .toList().createHooks { 18 | returnConstant(true) 19 | } 20 | 21 | scrollAnnotationViewCls.methodFinder() 22 | .filterByReturnType(Boolean::class.java) 23 | .toList().createHooks { 24 | returnConstant(true) 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/CameraFaceTracker.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object CameraFaceTracker : HookRegister() { 11 | private val tracker by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals("persist.vendor.camera.facetracker.support") 15 | } 16 | }.firstOrNull()?.getMethodInstance(classLoader) 17 | } 18 | 19 | override fun init() = hasEnable("camera_face_tracker") { 20 | tracker?.createHook { 21 | returnConstant(true) 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/DynamicPerformance.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object DynamicPerformance : HookRegister() { 11 | private val d by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals( 15 | "persist.sys.smartop.support_dynamic_performance" 16 | ) 17 | } 18 | }.firstOrNull()?.getMethodInstance(classLoader) 19 | } 20 | 21 | private val c by lazy { 22 | d?.let { 23 | dexKitBridge.findMethod { 24 | matcher { 25 | addUsingStringsEquals( 26 | "persist.sys.smartop.support_dynamic_performance" 27 | ) 28 | declaredClass = d!!.declaringClass.name 29 | returnType = d!!.returnType.name 30 | } 31 | }.firstOrNull()?.getMethodInstance(classLoader) 32 | } 33 | } 34 | 35 | override fun init() = hasEnable("dynamic_performance") { 36 | setOf(c, d).forEach { 37 | it?.createHook { 38 | returnConstant(true) 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/GunService.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 8 | 9 | object GunService : HookRegister() { 10 | override fun init() = hasEnable("gun_service") { 11 | dexKitBridge.findClass { 12 | matcher { 13 | usingStrings = listOf("gb_game_collimator_status") 14 | } 15 | }.map { 16 | val qaq = it.getInstance(classLoader) 17 | dexKitBridge.findMethod { 18 | matcher { 19 | declaredClass = qaq.name 20 | returnType = "boolean" 21 | paramTypes = listOf("java.lang.String") 22 | } 23 | }.single().getMethodInstance(classLoader).createHook { 24 | returnConstant(true) 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/LockOneHundred.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import android.view.View 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import org.luckypray.dexkit.query.enums.StringMatchType 9 | import star.sky.voyager.utils.init.HookRegister 10 | import star.sky.voyager.utils.key.hasEnable 11 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 12 | 13 | object LockOneHundred : HookRegister() { 14 | private val score by lazy { 15 | dexKitBridge.findMethod { 16 | matcher { 17 | addUsingString("getMinusPredictScore", StringMatchType.Contains) 18 | } 19 | }.firstOrNull()?.getMethodInstance(classLoader) 20 | } 21 | 22 | override fun init() = hasEnable("lock_one_hundred") { 23 | loadClass("com.miui.securityscan.ui.main.MainContentFrame").methodFinder() 24 | .filterByName("onClick") 25 | .filterByParamTypes(View::class.java) 26 | .first().createHook { 27 | before { 28 | it.result = null 29 | } 30 | } 31 | 32 | score?.createHook { 33 | returnConstant(0) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/MEMC.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 8 | 9 | object MEMC : HookRegister() { 10 | override fun init() = hasEnable("MEMC") { 11 | dexKitBridge.findClass { 12 | matcher { 13 | usingStrings = listOf("ro.vendor.media.video.frc.support") 14 | } 15 | }.map { 16 | val qaq = it.getInstance(classLoader) 17 | var counter = 0 18 | dexKitBridge.findMethod { 19 | matcher { 20 | declaredClass = qaq.name 21 | returnType = "boolean" 22 | paramTypes = listOf("java.lang.String") 23 | } 24 | }.forEach { methods -> 25 | counter++ 26 | if (counter == 5) { 27 | methods.getMethodInstance(classLoader).createHook { 28 | returnConstant(true) 29 | } 30 | } 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/Report.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassLoaderProvider.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object Report : HookRegister() { 11 | private val report by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals("android.intent.action.VIEW", "com.xiaomi.market") 15 | } 16 | }.map { it.getMethodInstance(classLoader) }.toList() 17 | } 18 | 19 | override fun init() = hasEnable("remove_report") { 20 | report.createHooks { 21 | returnConstant(false) 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/RiskPkg.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object RiskPkg : HookRegister() { 11 | private val pkg by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals( 15 | "riskPkgList", "key_virus_pkg_list", "show_virus_notification" 16 | ) 17 | } 18 | }.map { it.getMethodInstance(classLoader) }.toList() 19 | } 20 | 21 | override fun init() = hasEnable("remove_risk_pkg") { 22 | pkg.createHooks { 23 | before { param -> 24 | param.result = null 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/ScreenHoldOn.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 8 | 9 | object ScreenHoldOn : HookRegister() { 10 | private val screen by lazy { 11 | dexKitBridge.findMethod { 12 | matcher { 13 | usingStrings = listOf("remove_screen_off_hold_on") 14 | returnType = "boolean" 15 | } 16 | }.firstOrNull()?.getMethodInstance(classLoader) 17 | } 18 | 19 | override fun init() = hasEnable("screen_hold_on") { 20 | screen?.createHook { 21 | before { 22 | it.result = false 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/SmartDischarge.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object SmartDischarge : HookRegister() { 11 | private val smartChg by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals("persist.vendor.smartchg") 15 | } 16 | }.map { it.getMethodInstance(classLoader) }.toList() 17 | } 18 | 19 | override fun init() = hasEnable("smart_discharge") { 20 | smartChg.createHooks { 21 | returnConstant(true) 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/securitycenter/VcbAbility.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.securitycenter 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object VcbAbility : HookRegister() { 11 | private val vcb by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals( 15 | "persist.vendor.vcb.ability" 16 | ) 17 | } 18 | }.firstOrNull()?.getMethodInstance(classLoader) 19 | } 20 | 21 | override fun init() = hasEnable("vcb_ability") { 22 | vcb?.createHook { 23 | returnConstant(true) 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/AppMode.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.voyager.LazyClass.SettingsFeaturesCls 7 | import star.sky.voyager.utils.yife.Build.IS_TABLET 8 | 9 | object AppMode : HookRegister() { 10 | override fun init() { 11 | if (IS_TABLET) return 12 | SettingsFeaturesCls.methodFinder() 13 | .filterByName("isShowApplicationMode") 14 | .first().createHook { 15 | returnConstant(true) 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/GoogleSettings.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.ObjectUtils.invokeMethodBestMatch 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.voyager.LazyClass.MiuiSettingsCls 9 | import star.sky.voyager.utils.yife.Build.IS_GLOBAL_BUILD 10 | 11 | object GoogleSettings : HookRegister() { 12 | override fun init() = hasEnable("google_settings") { 13 | MiuiSettingsCls.methodFinder() 14 | .filterByName("updateHeaderList") 15 | .first().createHook { 16 | after { 17 | if (!IS_GLOBAL_BUILD) invokeMethodBestMatch( 18 | it.thisObject, 19 | "AddGoogleSettingsHeaders", 20 | null, 21 | it.args[0] 22 | ) 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/HpLocation.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.EzXHelper.classLoader 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.DexKitS.addUsingStringsEquals 8 | import star.sky.voyager.utils.yife.DexKit.dexKitBridge 9 | 10 | object HpLocation : HookRegister() { 11 | private val hp by lazy { 12 | dexKitBridge.findMethod { 13 | matcher { 14 | addUsingStringsEquals("persist.vendor.gnss.hpLocSetUI") 15 | } 16 | }.map { it.getMethodInstance(classLoader) }.toList() 17 | } 18 | 19 | private val Zh by lazy { 20 | dexKitBridge.findMethod { 21 | matcher { 22 | addUsingStringsEquals("zh_CN") 23 | } 24 | }.map { it.getMethodInstance(classLoader) }.toList() 25 | } 26 | 27 | override fun init() = hasEnable("hp_location") { 28 | setOf(hp, Zh).forEach { 29 | it.createHooks { 30 | returnConstant(true) 31 | } 32 | } 33 | } 34 | } 35 | 36 | // loadClass("com.android.settings.location.XiaomiHpLocationController") 37 | // .methodFinder().filter { 38 | // name in setOf("hasXiaomiHpFeature", "isZh") 39 | // }.toList().createHooks { 40 | // returnConstant(true) 41 | // } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/ImeBottom.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object ImeBottom : HookRegister() { 10 | override fun init() = hasEnable("ime_bottom") { 11 | loadClass("com.android.settings.inputmethod.InputMethodFunctionSelectUtils") 12 | .methodFinder() 13 | .filterByName("isMiuiImeBottomSupport") 14 | .first().createHook { 15 | returnConstant(true) 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/MechKeyboard.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object MechKeyboard : HookRegister() { 10 | override fun init() = hasEnable("mech_keyboard") { 11 | loadClass("com.android.settings.inputmethod.InputMethodFunctionSelectUtils").methodFinder() 12 | .filter { 13 | name in setOf("isMechKeyboardUsable", "isSupportMechKeyboard") 14 | }.toList().createHooks { 15 | returnConstant(true) 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/NeverTimeOut.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.ObjectUtils.getObjectOrNullAs 6 | import com.github.kyuubiran.ezxhelper.ObjectUtils.setObject 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object NeverTimeOut : HookRegister() { 12 | private var Oled: Boolean = false 13 | override fun init() = hasEnable("oled_never_time_out") { 14 | loadClass("com.android.settings.KeyguardTimeoutListPreference").methodFinder() 15 | .filterByName("disableUnusableTimeouts") 16 | .first().createHook { 17 | before { param -> 18 | Oled = 19 | getObjectOrNullAs(param.thisObject, "mIsOled")!! 20 | setObject(param.thisObject, "mIsOled", false) 21 | } 22 | 23 | after { param -> 24 | setObject(param.thisObject, "mIsOled", Oled) 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/NewNfcPage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.SettingsFeaturesCls 8 | 9 | object NewNfcPage : HookRegister() { 10 | override fun init() = hasEnable("new_nfc_page") { 11 | SettingsFeaturesCls.methodFinder() 12 | .filterByName("isNeedShowMiuiNFC") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/NfcPageFix.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.Log 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | 9 | object NfcPageFix : HookRegister() { 10 | override fun init() { 11 | loadClass("com.android.settings.nfc.MiuiNfcDetail").methodFinder() 12 | .filterByName("createPreferenceControllers") 13 | .first().createHook { 14 | after { param -> 15 | val mController = param.result as ArrayList 16 | // val clsInstance = 17 | // XposedHelpers.newInstance(loadClass("com.android.settings.nfc.NfcPaymentPreferenceController")) 18 | // mController.add(1, clsInstance) 19 | val mContent = param.args[0] 20 | Log.i("Controller: $mController") 21 | Log.i("Content: $mContent") 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/NoveltyHaptic.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 4 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.voyager.LazyClass.SettingsFeaturesCls 8 | import star.sky.voyager.utils.yife.Build.IS_INTERNATIONAL_BUILD 9 | 10 | object NoveltyHaptic : HookRegister() { 11 | override fun init() = hasEnable("novelty_haptic") { 12 | when (IS_INTERNATIONAL_BUILD) { 13 | true -> return@hasEnable 14 | false -> { 15 | SettingsFeaturesCls.methodFinder() 16 | .filterByName("isNoveltyHaptic") 17 | .first().createHook { 18 | returnConstant(true) 19 | } 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/PadArea.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 4 | import star.sky.voyager.utils.init.HookRegister 5 | import star.sky.voyager.utils.key.hasEnable 6 | import star.sky.voyager.utils.voyager.LazyClass.SettingsFeaturesCls 7 | 8 | object PadArea : HookRegister() { 9 | override fun init() = hasEnable("pad_area") { 10 | setStaticObject( 11 | SettingsFeaturesCls, 12 | "IS_SUPPORT_TABLET_SCREEN_SETTINGS", 13 | true 14 | ) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/SpeedMode.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object SpeedMode : HookRegister() { 10 | override fun init() = hasEnable("speed_mode") { 11 | loadClass("com.android.settings.development.SpeedModeToolsPreferenceController").methodFinder() 12 | .filterByName("getAvailabilityStatus") 13 | .first().createHook { 14 | after { 15 | it.result = 0 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/VipService.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import android.content.Context 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.voyager.LazyClass.SettingsFeaturesCls 9 | import star.sky.voyager.utils.yife.Build.IS_TABLET 10 | 11 | object VipService : HookRegister() { 12 | override fun init() = hasEnable("show_vip_service") { 13 | if (IS_TABLET) return@hasEnable 14 | SettingsFeaturesCls.methodFinder() 15 | .filterByName("isVipServiceNeeded") 16 | .filterByParamTypes(Context::class.java) 17 | .first().createHook { 18 | returnConstant(true) 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/settings/VoipAssistant.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.settings 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object VoipAssistant : HookRegister() { 10 | override fun init() = hasEnable("voip_assistant") { 11 | loadClass("com.android.settings.lab.MiuiVoipAssistantController").methodFinder() 12 | .filterByName("isNotSupported") 13 | .first().createHook { 14 | returnConstant(false) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/BatteryPercentage.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import android.util.TypedValue 4 | import android.widget.TextView 5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.api.getObjectFieldAs 9 | import star.sky.voyager.utils.init.HookRegister 10 | import star.sky.voyager.utils.key.XSPUtils.getFloat 11 | 12 | object BatteryPercentage : HookRegister() { 13 | private val size by lazy { 14 | getFloat("battery_percentage_font_size", 0f) 15 | } 16 | 17 | override fun init() { 18 | if (size == 0f) return 19 | loadClass("com.android.systemui.statusbar.views.MiuiBatteryMeterView").methodFinder() 20 | .filterByName("updateResources") 21 | .first().createHook { 22 | after { 23 | (it.thisObject.getObjectFieldAs("mBatteryPercentView")).setTextSize( 24 | TypedValue.COMPLEX_UNIT_DIP, size 25 | ) 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/CanNotificationSlide.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object CanNotificationSlide : HookRegister() { 10 | override fun init() = hasEnable("can_notification_slide") { 11 | loadClass("com.android.systemui.statusbar.notification.NotificationSettingsManager").methodFinder() 12 | .filterByName("canSlide") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/ControlCenterStyle.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.ObjectUtils.setObject 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object ControlCenterStyle : HookRegister() { 12 | override fun init() = hasEnable("control_center_style") { 13 | loadClass("com.android.systemui.controlcenter.policy.ControlCenterControllerImpl").declaredConstructors.createHooks { 14 | after { 15 | setObject(it.thisObject, "forceUseControlCenterPanel", false) 16 | } 17 | } 18 | loadClass("com.miui.systemui.SettingsObserver").methodFinder() 19 | .filterByName("setValue\$default").first() 20 | .createHook { 21 | before { 22 | if (it.args[1] == "force_use_control_panel") { 23 | it.args[2] = 0 24 | } 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/CustomMobileTypeText.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.XSPUtils.getString 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object CustomMobileTypeText : HookRegister() { 11 | override fun init() = hasEnable("custom_mobile_type_text_switch") { 12 | loadClass("com.android.systemui.statusbar.connectivity.MobileSignalController").methodFinder() 13 | .filterByName("getMobileTypeName") 14 | .filterByParamTypes(Int::class.java) 15 | .first().createHook { 16 | after { 17 | it.result = getString("custom_mobile_type_text", "5G") 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/DisableBluetooth.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import android.content.Context 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object DisableBluetooth : HookRegister() { 11 | override fun init() = hasEnable("Disable_Bluetooth") { 12 | loadClass("com.android.settingslib.bluetooth.LocalBluetoothAdapter").methodFinder() 13 | .filterByName("isSupportBluetoothRestrict") 14 | .filterByParamTypes(Context::class.java) 15 | .first().createHook { 16 | before { 17 | it.result = false 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/HideNetworkSpeedSplitter.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import android.widget.TextView 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object HideNetworkSpeedSplitter : HookRegister() { 11 | override fun init() = hasEnable("hide_network_speed_splitter") { 12 | loadClass("com.android.systemui.statusbar.views.NetworkSpeedSplitter").methodFinder() 13 | .filterByName("init") 14 | .first().createHook { 15 | after { 16 | val textView = it.thisObject as TextView 17 | textView.text = " " 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/HideSimIcon.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object HideSimIcon : HookRegister() { 10 | override fun init() { 11 | loadClass("com.android.systemui.statusbar.phone.StatusBarSignalPolicy").methodFinder() 12 | .filterByName("hasCorrectSubs") 13 | .filterByParamTypes(MutableList::class.java) 14 | .first().createHook { 15 | before { 16 | val list = it.args[0] as MutableList<*> 17 | val size = list.size 18 | hasEnable("hide_sim_two_icon", extraCondition = { size == 2 }) { 19 | list.removeAt(1) 20 | } 21 | hasEnable("hide_sim_one_icon", extraCondition = { size >= 1 }) { 22 | list.removeAt(0) 23 | } 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/HideStatusBarNetworkSpeedSecond.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object HideStatusBarNetworkSpeedSecond : HookRegister() { 10 | override fun init() = hasEnable("hide_status_bar_network_speed_second") { 11 | loadClass("com.android.systemui.statusbar.views.NetworkSpeedView").methodFinder() 12 | .filterByName("setNetworkSpeed") 13 | .filterByParamCount(1) 14 | .first().createHook { 15 | before { 16 | if (it.args[0] != null) { 17 | val mText = (it.args[0] as String) 18 | .replace("/", "") 19 | .replace("s", "") 20 | .replace("\'", "") 21 | .replace("วิ", "") 22 | .replace("秒", "") 23 | .replace("B", "") 24 | it.args[0] = mText 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/HyperOSMIUI.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import star.sky.voyager.utils.api.findClass 4 | import star.sky.voyager.utils.init.HookRegister 5 | import star.sky.voyager.utils.key.hasEnable 6 | import star.sky.voyager.utils.voyager.PluginClassLoader 7 | 8 | object HyperOSMIUI : HookRegister() { 9 | override fun init() = hasEnable("hyperos_miui") { 10 | PluginClassLoader.hookPluginClassLoader { _, classLoader -> 11 | "miui.systemui.util.CommonUtils".findClass(classLoader) 12 | .getDeclaredField("IS_BELOW_MIUI_15") 13 | .apply { 14 | isAccessible = true 15 | setBoolean(null, false) 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenHint.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object LockScreenHint : HookRegister() { 10 | override fun init() = hasEnable("lock_screen_hint") { 11 | loadClass("com.android.systemui.keyguard.KeyguardIndicationRotateTextViewController").methodFinder() 12 | .filterByName("hasIndicationsExceptResting") 13 | .first().createHook { 14 | returnConstant(true) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenOnlyLeft.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object LockScreenOnlyLeft : HookRegister() { 11 | override fun init() = hasEnable("lock_screen_only_left") { 12 | val leftController = 13 | loadClass("com.android.keyguard.KeyguardMoveLeftController") 14 | val moveHelper = 15 | loadClass("com.android.keyguard.KeyguardMoveHelper") 16 | 17 | leftController.methodFinder().filter { 18 | name in setOf("isLeftViewLaunchActivity", "onTouchMove") 19 | }.toList().createHooks { 20 | returnConstant(false) 21 | } 22 | 23 | leftController.methodFinder().filterByName("reset") 24 | .first().createHook { 25 | returnConstant(null) 26 | } 27 | 28 | moveHelper.methodFinder().filter { 29 | name in setOf("isMovingLeftView") 30 | }.toList().createHooks { 31 | returnConstant(false) 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenRemoveLeftSide.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object LockScreenRemoveLeftSide : HookRegister() { 10 | override fun init() = hasEnable("remove_the_left_side_of_the_lock_screen") { 11 | // loadClass("com.android.keyguard.negative.MiuiKeyguardMoveLeftViewContainer").methodFinder() 12 | // .filterByName("inflateLeftView") 13 | // .first().createHook { 14 | // before { 15 | // it.result = null 16 | // } 17 | // } 18 | loadClass("com.android.keyguard.negative.MiuiKeyguardMoveLeftViewContainer") 19 | .methodFinder().filterByName("isSupportRightMove") 20 | .first().createHook { 21 | returnConstant(false) 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/LockScreenZenMode.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object LockScreenZenMode : HookRegister() { 10 | override fun init() = hasEnable("lock_screen_zen_mode") { 11 | loadClass("com.android.systemui.statusbar.notification.zen.ZenModeViewController").methodFinder() 12 | .filterByName("shouldBeVisible") 13 | .first().createHook { 14 | returnConstant(false) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/NoPasswordHook.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object NoPasswordHook : HookRegister() { 10 | override fun init() = hasEnable("no_need_to_enter_password_when_power_on") { 11 | loadClass("com.android.internal.widget.LockPatternUtils\$StrongAuthTracker").methodFinder() 12 | .filterByName("isBiometricAllowedForUser") 13 | .first().createHook { 14 | before { 15 | it.result = true 16 | } 17 | } 18 | loadClass("com.android.internal.widget.LockPatternUtils").methodFinder() 19 | .filterByName("isBiometricAllowedForUser") 20 | .first().createHook { 21 | before { 22 | it.result = true 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/NotificationIcon.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import android.view.View 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 6 | import com.github.kyuubiran.ezxhelper.ObjectUtils.getObjectOrNullAs 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | 12 | object NotificationIcon : HookRegister() { 13 | override fun init() = hasEnable("notification_icon") { 14 | val notificationClass = 15 | loadClass("com.android.systemui.qs.MiuiNotificationHeaderView") 16 | val qsNotificationCls = 17 | loadClass("com.android.systemui.qs.MiuiQSHeaderView") 18 | 19 | setOf(notificationClass, qsNotificationCls).forEach { 20 | it.methodFinder() 21 | .filterByName("updateShortCutVisibility") 22 | .toList().createHooks { 23 | before { param -> 24 | val mShortCut = 25 | getObjectOrNullAs(param.thisObject, "mShortCut")!! 26 | mShortCut.visibility = View.GONE 27 | param.result = null 28 | } 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/NotificationSettingsNoWhiteList.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 5 | import star.sky.voyager.utils.init.HookRegister 6 | import star.sky.voyager.utils.key.hasEnable 7 | import star.sky.voyager.utils.yife.Build.IS_INTERNATIONAL_BUILD 8 | 9 | object NotificationSettingsNoWhiteList : HookRegister() { 10 | override fun init() = hasEnable("notification_settings_no_white_list") { 11 | if (IS_INTERNATIONAL_BUILD) return@hasEnable 12 | setStaticObject( 13 | loadClass("com.android.systemui.statusbar.notification.NotificationSettingsManager"), 14 | "USE_WHITE_LISTS", 15 | false 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/StatusBarNetworkSpeedRefreshSpeed.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object StatusBarNetworkSpeedRefreshSpeed : HookRegister() { 10 | override fun init() = hasEnable("status_bar_network_speed_refresh_speed") { 11 | loadClass("com.android.systemui.statusbar.policy.NetworkSpeedController").methodFinder() 12 | .filterByName("postUpdateNetworkSpeedDelay") 13 | .filterByParamTypes(Long::class.java) 14 | .first().createHook { 15 | before { 16 | it.args[0] = 1000L 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/SuperVolume.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHooks 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.voyager.PluginClassLoader.hookPluginClassLoader 9 | 10 | object SuperVolume : HookRegister() { 11 | override fun init() = hasEnable("super_volume") { 12 | hookPluginClassLoader { _, classLoader -> 13 | loadClass( 14 | "miui.systemui.util.CommonUtils", 15 | classLoader 16 | ).methodFinder().filter { 17 | name in setOf( 18 | "supportSuperVolume", 19 | "voiceSupportSuperVolume", 20 | ) 21 | }.toList().createHooks { 22 | returnConstant(true) 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/UseNewHD.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | import star.sky.voyager.utils.voyager.SetKeyMap.whenV 9 | import star.sky.voyager.utils.voyager.WifiState.isWifiConnected 10 | 11 | object UseNewHD : HookRegister() { 12 | override fun init() = hasEnable("system_ui_use_new_hd") { 13 | loadClass("com.android.systemui.statusbar.policy.HDController").methodFinder() 14 | .filterByName("isVisible") 15 | .first().createHook { 16 | whenV("no_show_on_wifi_connect") { 17 | true then { 18 | replace { 19 | !isWifiConnected() 20 | } 21 | } 22 | 23 | false then { 24 | returnConstant(true) 25 | } 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/systemui/WaveCharge.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.systemui 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper 6 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 7 | import star.sky.voyager.utils.init.HookRegister 8 | import star.sky.voyager.utils.key.hasEnable 9 | 10 | object WaveCharge : HookRegister() { 11 | override fun init() = hasEnable("enable_wave_charge_animation") { 12 | loadClass("com.android.keyguard.charge.ChargeUtils").methodFinder() 13 | .filterByName("supportWaveChargeAnimation") 14 | .first().createHook { 15 | after { param -> 16 | val clazzTrue = setOf( 17 | "com.android.keyguard.charge.ChargeUtils", 18 | "com.android.keyguard.charge.container.MiuiChargeContainerView" 19 | ) 20 | param.result = Throwable().stackTrace.any { it.className in clazzTrue } 21 | } 22 | } 23 | loadClass("com.android.keyguard.charge.wave.WaveView").methodFinder() 24 | .filterByName("updateWaveHeight").first() 25 | .createHook { 26 | after { 27 | it.thisObject.objectHelper().setObject("mWaveXOffset", 0) 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/taplus/TaplusBrowser.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.taplus 2 | 3 | import android.content.Intent 4 | import android.net.Uri 5 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.XSPUtils.getString 10 | import star.sky.voyager.utils.key.hasEnable 11 | 12 | object TaplusBrowser : HookRegister() { 13 | private val browserPkg by lazy { 14 | getString("taplus_browser_pkg", "com.android.browser")!! 15 | } 16 | 17 | override fun init() = hasEnable("taplus_browser") { 18 | loadClass("com.miui.contentextension.utils.AppsUtils").methodFinder() 19 | .filterByName("getIntentWithBrowser") 20 | .first().createHook { 21 | before { param -> 22 | val url = param.args[0] as String 23 | val newIntent = createCustomBrowserIntent(url, browserPkg) 24 | param.result = newIntent 25 | } 26 | } 27 | } 28 | 29 | private fun createCustomBrowserIntent(url: String, packageName: String): Intent { 30 | val intent = Intent("android.intent.action.VIEW") 31 | intent.data = Uri.parse(url) 32 | intent.setPackage(packageName) 33 | intent.putExtra("activity_resizeable", true) 34 | return intent 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/taplus/TaplusHorizontal.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.taplus 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object TaplusHorizontal : HookRegister() { 10 | override fun init() = hasEnable("horizontal_content_extension") { 11 | loadClass("com.miui.contentextension.services.TextContentExtensionService").methodFinder() 12 | .filterByName("isScreenPortrait") 13 | .first().createHook { 14 | after { 15 | it.result = true 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/wallpaper/UnlockSuperWallpaper.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.wallpaper 2 | 3 | import android.content.Context 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject 6 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 7 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 8 | import star.sky.voyager.utils.init.HookRegister 9 | import star.sky.voyager.utils.key.hasEnable 10 | 11 | object UnlockSuperWallpaper : HookRegister() { 12 | override fun init() = hasEnable("unlock_super_wallpaper") { 13 | val superWallpaperUtilsClass = 14 | loadClass("com.miui.superwallpaper.SuperWallpaperUtils") 15 | 16 | superWallpaperUtilsClass.methodFinder() 17 | .filterByName("initEnableSuperWallpaper") 18 | .filterByParamTypes(Context::class.java) 19 | .first().createHook { 20 | before { param -> 21 | param.result = true 22 | } 23 | } 24 | setStaticObject( 25 | superWallpaperUtilsClass, 26 | "sEnableSuperWallpaper", 27 | true 28 | ) 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/hook/hooks/weather/HighAnimation.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.hook.hooks.weather 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook 5 | import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder 6 | import star.sky.voyager.utils.init.HookRegister 7 | import star.sky.voyager.utils.key.hasEnable 8 | 9 | object HighAnimation : HookRegister() { 10 | override fun init() = hasEnable("high_animation") { 11 | loadClass("miuix.animation.utils.DeviceUtils").methodFinder() 12 | .filterByName("transDeviceLevel") 13 | .first().createHook { 14 | returnConstant(2) 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/tiles/AllowScreenshots.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.tiles 2 | 3 | import android.service.quicksettings.Tile.STATE_ACTIVE 4 | import android.service.quicksettings.Tile.STATE_INACTIVE 5 | import android.service.quicksettings.TileService 6 | import star.sky.voyager.utils.yife.XSharedPreferences.prefFileName 7 | 8 | class AllowScreenshots : TileService() { 9 | private val key = "disable_flag_secure" 10 | 11 | override fun onClick() { 12 | super.onClick() 13 | runCatching { 14 | val pref = getSharedPreferences(prefFileName, MODE_WORLD_READABLE) 15 | val prefEditor = pref.edit() 16 | if (pref.getBoolean(key, false)) { 17 | prefEditor.putBoolean(key, false) 18 | qsTile.state = STATE_INACTIVE 19 | } else { 20 | prefEditor.putBoolean(key, true) 21 | qsTile.state = STATE_ACTIVE 22 | } 23 | prefEditor.apply() 24 | qsTile.updateTile() 25 | } 26 | } 27 | 28 | override fun onStartListening() { 29 | super.onStartListening() 30 | runCatching { 31 | val pref = getSharedPreferences(prefFileName, MODE_WORLD_READABLE) 32 | if (pref.getBoolean(key, false)) { 33 | qsTile.state = STATE_ACTIVE 34 | } else { 35 | qsTile.state = STATE_INACTIVE 36 | } 37 | qsTile.updateTile() 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/tiles/CameraSensor.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.tiles 2 | 3 | import android.service.quicksettings.Tile.STATE_ACTIVE 4 | import android.service.quicksettings.Tile.STATE_INACTIVE 5 | import android.service.quicksettings.TileService 6 | import star.sky.voyager.utils.yife.Terminal.exec 7 | 8 | class CameraSensor : TileService() { 9 | private var isActive = true 10 | 11 | override fun onStartListening() { 12 | super.onStartListening() 13 | qsTile.also { 14 | it.state = if (isActive) STATE_ACTIVE else STATE_INACTIVE 15 | it.updateTile() 16 | } 17 | } 18 | 19 | override fun onClick() { 20 | super.onClick() 21 | isActive = !isActive 22 | qsTile.also { 23 | it.state = if (isActive) { 24 | exec("service call sensor_privacy 10 i32 0 i32 3 i32 2 i32 0") 25 | STATE_ACTIVE 26 | } else { 27 | exec("service call sensor_privacy 10 i32 0 i32 3 i32 2 i32 1") 28 | STATE_INACTIVE 29 | } 30 | it.updateTile() 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/tiles/CirculateWorld.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.tiles 2 | 3 | import android.content.ComponentName 4 | import android.content.Intent 5 | import android.os.Build 6 | import android.service.quicksettings.Tile.STATE_ACTIVE 7 | import android.service.quicksettings.TileService 8 | import androidx.annotation.RequiresApi 9 | 10 | 11 | class CirculateWorld : TileService() { 12 | private var isActive = true 13 | 14 | override fun onStartListening() { 15 | super.onStartListening() 16 | qsTile.state = STATE_ACTIVE 17 | qsTile.updateTile() 18 | } 19 | 20 | @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 21 | override fun onClick() { 22 | super.onClick() 23 | val intent = Intent() 24 | val comp = ComponentName( 25 | "com.milink.service", 26 | "com.miui.circulate.world.CirculateWorldActivity" 27 | ) 28 | intent.component = comp 29 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 30 | startActivityAndCollapse(intent) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/tiles/MiPlay.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.tiles 2 | 3 | import android.content.ComponentName 4 | import android.content.Intent 5 | import android.os.Build 6 | import android.service.quicksettings.Tile 7 | import android.service.quicksettings.TileService 8 | import androidx.annotation.RequiresApi 9 | 10 | class MiPlay : TileService() { 11 | private var isActive = true 12 | 13 | override fun onStartListening() { 14 | super.onStartListening() 15 | qsTile.state = Tile.STATE_ACTIVE 16 | qsTile.updateTile() 17 | } 18 | 19 | @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) 20 | override fun onClick() { 21 | super.onClick() 22 | val intent = Intent() 23 | val comp = ComponentName( 24 | "miui.systemui.plugin", 25 | "miui.systemui.miplay.MiPlayDetailActivity" 26 | ) 27 | intent.component = comp 28 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 29 | startActivityAndCollapse(intent) 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/tiles/MicSensor.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.tiles 2 | 3 | import android.service.quicksettings.Tile.STATE_ACTIVE 4 | import android.service.quicksettings.Tile.STATE_INACTIVE 5 | import android.service.quicksettings.TileService 6 | import star.sky.voyager.utils.yife.Terminal.exec 7 | 8 | class MicSensor : TileService() { 9 | private var isActive = true 10 | 11 | override fun onStartListening() { 12 | super.onStartListening() 13 | qsTile.also { 14 | it.state = if (isActive) STATE_ACTIVE else STATE_INACTIVE 15 | it.updateTile() 16 | } 17 | } 18 | 19 | override fun onClick() { 20 | super.onClick() 21 | isActive = !isActive 22 | qsTile.also { 23 | it.state = if (isActive) { 24 | exec("service call sensor_privacy 10 i32 0 i32 3 i32 1 i32 0") 25 | STATE_ACTIVE 26 | } else { 27 | exec("service call sensor_privacy 10 i32 0 i32 3 i32 1 i32 1") 28 | STATE_INACTIVE 29 | } 30 | it.updateTile() 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/tiles/SpeedMode.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.tiles 2 | 3 | import android.service.quicksettings.Tile.STATE_ACTIVE 4 | import android.service.quicksettings.Tile.STATE_INACTIVE 5 | import android.service.quicksettings.TileService 6 | import star.sky.voyager.utils.yife.Terminal.exec 7 | 8 | class SpeedMode : TileService() { 9 | private var isActive = false 10 | 11 | override fun onStartListening() { 12 | super.onStartListening() 13 | qsTile.also { 14 | it.state = if (isActive) STATE_ACTIVE else STATE_INACTIVE 15 | it.updateTile() 16 | } 17 | } 18 | 19 | override fun onClick() { 20 | super.onClick() 21 | isActive = !isActive 22 | qsTile.also { 23 | it.state = if (isActive) { 24 | exec("settings put system speed_mode 1") 25 | STATE_ACTIVE 26 | } else { 27 | exec("settings put system speed_mode 0") 28 | STATE_INACTIVE 29 | } 30 | it.updateTile() 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/init/HookRegister.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.init 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage 4 | 5 | abstract class HookRegister { 6 | private lateinit var lpparam: XC_LoadPackage.LoadPackageParam 7 | var isInit: Boolean = false 8 | abstract fun init() 9 | 10 | fun setLoadPackageParam(loadPackageParam: XC_LoadPackage.LoadPackageParam) { 11 | lpparam = loadPackageParam 12 | } 13 | 14 | protected fun getLoadPackageParam(): XC_LoadPackage.LoadPackageParam { 15 | if (!this::lpparam.isInitialized) { 16 | throw RuntimeException("lpparam should be initialized") 17 | } 18 | return lpparam 19 | } 20 | 21 | protected fun getDefaultClassLoader(): ClassLoader { 22 | return getLoadPackageParam().classLoader 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/init/ResourcesHookRegister.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.init 2 | 3 | import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam 4 | 5 | abstract class ResourcesHookRegister { 6 | private lateinit var resparam: InitPackageResourcesParam 7 | var isInit: Boolean = false 8 | abstract fun init() 9 | 10 | fun setInitPackageResourcesParam(initPackageResourcesParam: InitPackageResourcesParam) { 11 | resparam = initPackageResourcesParam 12 | } 13 | 14 | protected fun getInitPackageResourcesParam(): InitPackageResourcesParam { 15 | if (!this::resparam.isInitialized) { 16 | throw RuntimeException("resparam should be initialized") 17 | } 18 | return resparam 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/key/SystemProperties.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.key 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.Context 5 | 6 | object SystemProperties { 7 | @SuppressLint("PrivateApi") 8 | operator fun get(context: Context, key: String?): String { 9 | var ret: String 10 | try { 11 | val cl = context.classLoader 12 | val systemProperties = cl.loadClass("android.os.SystemProperties") 13 | //参数类型 14 | val paramTypes: Array?> = arrayOfNulls(1) 15 | paramTypes[0] = String::class.java 16 | val get = systemProperties.getMethod("get", *paramTypes) 17 | //参数 18 | val params = arrayOfNulls(1) 19 | params[0] = key 20 | ret = get.invoke(systemProperties, *params) as String 21 | } catch (iAE: IllegalArgumentException) { 22 | throw iAE 23 | } catch (e: Exception) { 24 | ret = "" 25 | } 26 | return ret 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/DexKitS.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import org.luckypray.dexkit.query.enums.StringMatchType 4 | import org.luckypray.dexkit.query.matchers.ClassMatcher 5 | import org.luckypray.dexkit.query.matchers.MethodMatcher 6 | 7 | object DexKitS { 8 | fun MethodMatcher.addUsingStringsEquals(vararg strings: String) { 9 | for (string in strings) { 10 | addUsingString(string, StringMatchType.Equals) 11 | } 12 | } 13 | 14 | fun ClassMatcher.addUsingStringsEquals(vararg strings: String) { 15 | for (string in strings) { 16 | addUsingString(string, StringMatchType.Equals) 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/LazyClass.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 4 | 5 | object LazyClass { 6 | val FeatureParserCls by lazy { 7 | loadClass("miui.util.FeatureParser") 8 | } 9 | 10 | val SystemProperties by lazy { 11 | loadClass("android.os.SystemProperties") 12 | } 13 | 14 | val AndroidBuildCls by lazy { 15 | loadClass("android.os.Build") 16 | } 17 | 18 | val MiuiBuildCls by lazy { 19 | loadClass("miui.os.Build") 20 | } 21 | 22 | val SettingsFeaturesCls by lazy { 23 | loadClass("com.android.settings.utils.SettingsFeatures") 24 | } 25 | 26 | val AiasstVisionSystemUtilsCls by lazy { 27 | loadClass("com.xiaomi.aiasst.vision.utils.SystemUtils") 28 | } 29 | 30 | val SupportAiSubtitlesUtils by lazy { 31 | loadClass("com.xiaomi.aiasst.vision.utils.SupportAiSubtitlesUtils") 32 | } 33 | 34 | val MiuiSettingsCls by lazy { 35 | loadClass("com.android.settings.MiuiSettings") 36 | } 37 | 38 | val ShellResourceFetcher by lazy { 39 | loadClass("com.miui.gallery.editor.photo.screen.shell.res.ShellResourceFetcher") 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/LineB.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import cn.fkj233.ui.activity.data.DataBinding 4 | import cn.fkj233.ui.activity.view.LineV 5 | 6 | object LineB { 7 | fun cn.fkj233.ui.activity.data.BasePage.lineB(dataBindingRecv: DataBinding.Binding.Recv?): LineV { 8 | val lineV = LineV(dataBindingRecv) 9 | itemList.add(lineV) 10 | return lineV 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/Resource.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import android.annotation.SuppressLint 4 | import cn.fkj233.ui.activity.MIUIActivity.Companion.context 5 | 6 | object Resource { 7 | @SuppressLint("DiscouragedApi") 8 | fun getResourceId( 9 | name: String, 10 | defResId: Int 11 | ): Int { 12 | val id = context.resources.getIdentifier( 13 | name, 14 | "string", 15 | context.packageName 16 | ) 17 | return if (id != 0) id else defResId 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/SafeSharedPreferences.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import cn.fkj233.ui.activity.MIUIActivity.Companion.context 4 | import star.sky.voyager.utils.voyager.Resource.getResourceId 5 | 6 | object SafeSharedPreferences { 7 | fun cn.fkj233.ui.activity.data.SafeSharedPreferences.getResourceString( 8 | key: String, 9 | defResId: Int 10 | ): String { 11 | return if (mSP == null) { 12 | context.getString(defResId) 13 | } else { 14 | val storedName = mSP!!.getString(key, null) 15 | if (storedName != null) { 16 | val id = getResourceId(storedName, defResId) 17 | context.getString(id) 18 | } else { 19 | context.getString(defResId) 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/SetKeyMap.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import star.sky.voyager.utils.key.XSPUtils.getBoolean 4 | 5 | object SetKeyMap { 6 | fun setKeyMap(properties: Map Unit>) { 7 | properties.forEach { (key, action) -> 8 | if (getBoolean(key, false)) { 9 | action() 10 | } 11 | } 12 | } 13 | 14 | fun setKeyMapNot(properties: Map Unit>) { 15 | properties.forEach { (key, action) -> 16 | if (getBoolean(key, true).not()) { 17 | action() 18 | } 19 | } 20 | } 21 | 22 | inline fun whenV(key: String, block: WhenVContext.() -> Unit) { 23 | val context = WhenVContext(key) 24 | context.block() 25 | } 26 | 27 | class WhenVContext(private val key: String) { 28 | infix fun Boolean.then(block: () -> Unit) { 29 | if (getBoolean(key, false) == this) { 30 | block() 31 | } 32 | } 33 | } 34 | 35 | inline fun whenT(vararg keys: String, block: () -> Unit) { 36 | if (keys.any { getBoolean(it, false) }) { 37 | block() 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/TabletSeekBar.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import cn.fkj233.ui.activity.data.DataBinding 4 | import cn.fkj233.ui.activity.view.SeekBarWithTextV 5 | import cn.fkj233.ui.activity.view.TextV 6 | import star.sky.voyager.R 7 | 8 | object TabletSeekBar { 9 | fun cn.fkj233.ui.activity.data.BasePage.createTextWithSeekBar( 10 | isTablet: Boolean, 11 | key: String, 12 | tabletRange: Triple, 13 | otherRange: Triple, 14 | dataBinding: DataBinding.Binding 15 | ) { 16 | val sizeData = if (isTablet) tabletRange else otherRange 17 | 18 | val textV = TextV(textId = R.string.font_size) 19 | val seekBarWithTextV = 20 | SeekBarWithTextV(key, sizeData.first, sizeData.second, sizeData.third) 21 | val dataBindingRecv = dataBinding.getRecv(1) 22 | 23 | TextWithSeekBar(textV, seekBarWithTextV, dataBindingRecv) 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/voyager/WifiState.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.voyager 2 | 3 | import android.content.Context 4 | import android.net.ConnectivityManager 5 | import android.net.NetworkCapabilities 6 | import android.net.wifi.WifiManager 7 | import com.github.kyuubiran.ezxhelper.EzXHelper.appContext 8 | 9 | object WifiState { 10 | /** 11 | * 获取并返回Wifi的开启状态 12 | * @return Wifi的开启状态 13 | * @author Voyager 14 | */ 15 | fun isWifiEnabled(): Boolean { 16 | val wifiManager = 17 | appContext.applicationContext.getSystemService(Context.WIFI_SERVICE) as? WifiManager 18 | return wifiManager?.isWifiEnabled ?: false 19 | } 20 | 21 | /** 22 | * 获取并返回Wifi的链接状态 23 | * @return Wifi的链接状态 24 | * @author Voyager 25 | */ 26 | fun isWifiConnected(): Boolean { 27 | val connectivityManager = 28 | appContext.getSystemService(Context.CONNECTIVITY_SERVICE) as? ConnectivityManager 29 | val network = connectivityManager?.activeNetwork 30 | val networkCapabilities = connectivityManager?.getNetworkCapabilities(network) 31 | return networkCapabilities?.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) ?: false 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/yife/Build.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.yife 2 | 3 | import com.github.kyuubiran.ezxhelper.ClassUtils.getStaticObjectOrNullAs 4 | import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass 5 | 6 | /** 7 | * 获取系统信息 8 | */ 9 | object Build { 10 | private val clazzMiuiBuild by lazy { 11 | loadClass("miui.os.Build") 12 | } 13 | 14 | /** 15 | * 设备是否为平板 16 | */ 17 | val IS_TABLET by lazy { 18 | getStaticObjectOrNullAs(clazzMiuiBuild, "IS_TABLET") ?: false 19 | } 20 | 21 | /** 22 | * 是否为国际版系统 23 | */ 24 | val IS_INTERNATIONAL_BUILD by lazy { 25 | getStaticObjectOrNullAs(clazzMiuiBuild, "IS_INTERNATIONAL_BUILD") ?: false 26 | } 27 | 28 | val IS_GLOBAL_BUILD by lazy { 29 | getStaticObjectOrNullAs(clazzMiuiBuild, "IS_GLOBAL_BUILD") ?: false 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/yife/DexKit.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.yife 2 | 3 | import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam 4 | import org.luckypray.dexkit.DexKitBridge 5 | 6 | /** 7 | * DexKit 工具 8 | */ 9 | object DexKit { 10 | private lateinit var hostDir: String 11 | private var isInitialized = false 12 | val dexKitBridge: DexKitBridge by lazy { 13 | System.loadLibrary("dexkit") 14 | DexKitBridge.create(hostDir)!!.also { 15 | isInitialized = true 16 | } 17 | } 18 | 19 | /** 20 | * 初始化 DexKit 的 apk 完整路径 21 | */ 22 | fun initDexKit(loadPackageParam: LoadPackageParam) { 23 | hostDir = loadPackageParam.appInfo.sourceDir 24 | } 25 | 26 | /** 27 | * 关闭 DexKit bridge 28 | */ 29 | fun closeDexKit() { 30 | if (isInitialized) dexKitBridge.close() 31 | } 32 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/star/sky/voyager/utils/yife/SharedPreferences.kt: -------------------------------------------------------------------------------- 1 | package star.sky.voyager.utils.yife 2 | 3 | /** 4 | * SharedPreferences 工具 5 | */ 6 | object SharedPreferences { 7 | /** 8 | * 向当前 SharedPreferences 中放入一个 StringSet 属性 9 | * @param key 属性名称 10 | * @param value 属性值 11 | */ 12 | fun android.content.SharedPreferences.putStringSet( 13 | key: String, 14 | value: Set 15 | ) { 16 | val editor = edit() 17 | editor.putStringSet(key, value) 18 | editor.apply() 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_appvault.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 13 | 17 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_charging_full.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_camera.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_desktop_mac.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_fullscreen.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_gallery.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_mic.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_miui_plus.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 13 | 17 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_music_note.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_packageinstaller.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_packageinstaller_background_dark.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_packageinstaller_background_light.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_phonelink.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_powerkeeper.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_systemui_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | 23 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_wb_sunny.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/starvoyager_xml_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/voyager.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosizoraru/StarVoyager/53d65ddab2129f617078a9d056c9e1f68bba535b/app/src/main/res/drawable/voyager.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/voyager_background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosizoraru/StarVoyager/53d65ddab2129f617078a9d056c9e1f68bba535b/app/src/main/res/drawable/voyager_background.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/voyager_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosizoraru/StarVoyager/53d65ddab2129f617078a9d056c9e1f68bba535b/app/src/main/res/drawable/voyager_icon.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/voyager_splash_icon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosizoraru/StarVoyager/53d65ddab2129f617078a9d056c9e1f68bba535b/app/src/main/res/drawable/voyager_splash_icon.webp -------------------------------------------------------------------------------- /app/src/main/res/resources.properties: -------------------------------------------------------------------------------- 1 | unqualifiedResLocale=en-US -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed 3 | plugins { 4 | autowire("android-application") apply false 5 | // alias(libs.plugins.androidLibrary) apply false 6 | autowire("kotlin-android") apply false 7 | } 8 | true // Needed to make the Suppress annotation work for the plugins block 9 | 10 | task("clean") { 11 | delete(rootProject.buildDir) 12 | } -------------------------------------------------------------------------------- /gradle/sweet-dependency/sweet-dependency-config.yaml: -------------------------------------------------------------------------------- 1 | preferences: 2 | autowire-on-sync-mode: UPDATE_OPTIONAL_DEPENDENCIES 3 | repositories-mode: FAIL_ON_PROJECT_REPOS 4 | 5 | repositories: 6 | gradle-plugin-portal: 7 | scope: PLUGINS 8 | google: 9 | maven-central: 10 | maven-central-branch: 11 | url: "https://api.xposed.info/" 12 | 13 | plugins: 14 | com.android.application: 15 | alias: android-application 16 | version: 8.5.1 17 | auto-update: true 18 | org.jetbrains.kotlin.android: 19 | alias: kotlin-android 20 | version: 1.9.22 21 | auto-update: true 22 | org.jetbrains.kotlin.plugin.serialization: 23 | alias: kotlin-serialization 24 | version-ref: kotlin-android 25 | auto-update: true 26 | com.highcapable.flexilocale: 27 | alias: flexi-locale 28 | version: 1.0.1 29 | auto-update: true 30 | 31 | libraries: 32 | androidx.core: 33 | core-ktx: 34 | version: 1.12.0 35 | auto-update: true 36 | androidx.constraintlayout: 37 | constraintlayout: 38 | version: 2.2.0-alpha13 39 | auto-update: true 40 | org.luckypray: 41 | dexkit: 42 | version: 2.0.1 43 | auto-update: true 44 | com.github.kyuubiran: 45 | EzXHelper: 46 | version: 2.1.2 47 | auto-update: true 48 | io.github.ranlee1: 49 | jpinyin: 50 | version: 1.0.1 51 | auto-update: true 52 | org.lsposed.hiddenapibypass: 53 | hiddenapibypass: 54 | version: 4.3 55 | auto-update: true 56 | de.robv.android.xposed: 57 | api: 58 | version: 82 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosizoraru/StarVoyager/53d65ddab2129f617078a9d056c9e1f68bba535b/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 25 22:42:11 CST 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnstableApiUsage") 2 | 3 | pluginManagement { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | gradlePluginPortal() 8 | } 9 | } 10 | plugins { 11 | id("com.highcapable.sweetdependency") version "1.0.4" 12 | } 13 | 14 | rootProject.name = "StarSkyVoyager" 15 | include(":app") 16 | include(":blockmiui") 17 | --------------------------------------------------------------------------------