├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ └── feature-request.yml ├── config.yml └── workflows │ ├── pull_request.yml │ └── release.yml ├── .gitignore ├── .releaserc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── assets ├── revanced-headline │ ├── revanced-headline-vertical-dark.svg │ └── revanced-headline-vertical-light.svg └── revanced-logo │ └── revanced-logo-round.svg ├── build.gradle.kts ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── package-lock.json ├── package.json ├── patches.json ├── settings.gradle.kts └── src └── main ├── kotlin └── app │ └── revanced │ ├── generator │ ├── JsonPatchesFileGenerator.kt │ ├── Main.kt │ └── PatchesFileGenerator.kt │ ├── patches │ ├── all │ │ ├── activity │ │ │ └── exportall │ │ │ │ └── ExportAllActivitiesPatch.kt │ │ ├── connectivity │ │ │ └── wifi │ │ │ │ └── spoof │ │ │ │ └── SpoofWifiPatch.kt │ │ ├── interaction │ │ │ └── gestures │ │ │ │ └── PredictiveBackGesturePatch.kt │ │ ├── misc │ │ │ ├── debugging │ │ │ │ └── EnableAndroidDebuggingPatch.kt │ │ │ ├── packagename │ │ │ │ └── ChangePackageNamePatch.kt │ │ │ └── transformation │ │ │ │ ├── BaseTransformInstructionsPatch.kt │ │ │ │ └── MethodCall.kt │ │ ├── screencapture │ │ │ └── removerestriction │ │ │ │ ├── RemoveCaptureRestrictionPatch.kt │ │ │ │ └── RemoveCaptureRestrictionResourcePatch.kt │ │ ├── screenshot │ │ │ └── removerestriction │ │ │ │ └── RemoveScreenshotRestrictionPatch.kt │ │ └── telephony │ │ │ └── sim │ │ │ └── spoof │ │ │ └── SpoofSimCountryPatch.kt │ ├── bilibili │ │ ├── ads │ │ │ └── patch │ │ │ │ └── UpRcmdAdsPatch.kt │ │ ├── layout │ │ │ ├── fingerprints │ │ │ │ └── FullStoryWidgetFingerprint.kt │ │ │ └── patch │ │ │ │ ├── HideFollowButtonPatch.kt │ │ │ │ └── RemoveVipSectionPatch.kt │ │ ├── misc │ │ │ ├── appicon │ │ │ │ └── AppIconPatch.kt │ │ │ ├── config │ │ │ │ ├── fingerprints │ │ │ │ │ ├── ABSourceFingerprint.kt │ │ │ │ │ └── ConfigSourceFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── ConfigPatch.kt │ │ │ ├── copy │ │ │ │ ├── fingerprints │ │ │ │ │ ├── BaseCommentCopyFingerprint.kt │ │ │ │ │ ├── Comment3CopyFingerprint.kt │ │ │ │ │ ├── CommentCopyNewFingerprint.kt │ │ │ │ │ ├── CommentCopyOldFingerprint.kt │ │ │ │ │ ├── ConversationCopyFingerprint.kt │ │ │ │ │ └── DescCopyFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── CopyEnhancePatch.kt │ │ │ ├── darkswitch │ │ │ │ ├── fingerprints │ │ │ │ │ └── SwitchDarkModeFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── DarkSwitchPatch.kt │ │ │ ├── drawer │ │ │ │ ├── fingerprints │ │ │ │ │ ├── DrawerControlFingerprint.kt │ │ │ │ │ ├── DrawerIsOpenFingerprint.kt │ │ │ │ │ └── DrawerLayoutParamsFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── DrawerPatch.kt │ │ │ ├── integrations │ │ │ │ ├── fingerprints │ │ │ │ │ ├── AppCompatActivityFingerprint.kt │ │ │ │ │ ├── BLKVFingerprint.kt │ │ │ │ │ ├── BaseMainFrameFragmentFingerprint.kt │ │ │ │ │ ├── BrotliFingerprint.kt │ │ │ │ │ ├── DanmakuFontSwitchPreferenceFingerprint.kt │ │ │ │ │ └── InitFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ ├── BLKVPatch.kt │ │ │ │ │ ├── BrotliPatch.kt │ │ │ │ │ ├── ConfigPatch.kt │ │ │ │ │ ├── DpiPatch.kt │ │ │ │ │ ├── IntegrationsPatch.kt │ │ │ │ │ ├── LibBiliPatch.kt │ │ │ │ │ ├── MainActivityPatch.kt │ │ │ │ │ ├── ModifyModifierPatch.kt │ │ │ │ │ └── ProtoBufPrintPatch.kt │ │ │ ├── json │ │ │ │ ├── fingerprints │ │ │ │ │ ├── CardClickProcessorFingerprint.kt │ │ │ │ │ ├── CardClickProcessorNewFingerprint.kt │ │ │ │ │ ├── JSONFingerprint.kt │ │ │ │ │ └── PegasusParserFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ ├── JSONPatch.kt │ │ │ │ │ └── PegasusPatch.kt │ │ │ ├── network │ │ │ │ └── OverrideCertificatePinningPatch.kt │ │ │ ├── notification │ │ │ │ ├── fingerprints │ │ │ │ │ ├── HeadsetMediaSessionCallbackFingerprint.kt │ │ │ │ │ ├── LiveNotificationHelperFingerprint.kt │ │ │ │ │ ├── MediaSessionCallbackApi21Fingerprint.kt │ │ │ │ │ └── NotificationStyleAbFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── MusicNotificationPatch.kt │ │ │ ├── okhttp │ │ │ │ ├── fingerprints │ │ │ │ │ ├── BodyWrapperFingerprint.kt │ │ │ │ │ ├── BufferFingerprint.kt │ │ │ │ │ ├── HeadersFingerprint.kt │ │ │ │ │ ├── HttpUrlFingerprint.kt │ │ │ │ │ ├── MediaTypeGetFingerprint.kt │ │ │ │ │ ├── RealCallFingerprint.kt │ │ │ │ │ ├── RequestFingerprint.kt │ │ │ │ │ ├── ResponseBodyFingerprint.kt │ │ │ │ │ └── ResponseFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── OkHttpPatch.kt │ │ │ ├── other │ │ │ │ ├── fingerprints │ │ │ │ │ ├── AppendTrackingInfoFingerprint.kt │ │ │ │ │ ├── AttachChannelInfoFingerprint.kt │ │ │ │ │ ├── BLRouteBuilderFingerprint.kt │ │ │ │ │ ├── FavFolderOnDataSuccessFingerprint.kt │ │ │ │ │ ├── FavFolderOnDataSuccessNewFingerprint.kt │ │ │ │ │ ├── LiveRoomSetFloatWindowFingerprint.kt │ │ │ │ │ ├── LiveRoomTouchDispatchViewModelFingerprint.kt │ │ │ │ │ ├── MainCommonServiceImplFingerprint.kt │ │ │ │ │ ├── MineBindAccountStateFingerprint.kt │ │ │ │ │ ├── OgvSearchResultFingerprint.kt │ │ │ │ │ ├── OnOgvDownloadFingerprint.kt │ │ │ │ │ ├── PublishToFollowingConfigFingerprint.kt │ │ │ │ │ ├── QualityViewHolderFingerprint.kt │ │ │ │ │ ├── RouteRequestFingerprint.kt │ │ │ │ │ ├── SectionFingerprint.kt │ │ │ │ │ ├── ShareToFingerprint.kt │ │ │ │ │ ├── SpaceBindAccountStateFingerprint.kt │ │ │ │ │ └── TeenagersModeFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ ├── AppendExtraSearchTypePatch.kt │ │ │ │ │ ├── AppendSignatureInfoPatch.kt │ │ │ │ │ ├── AutoLikePatch.kt │ │ │ │ │ ├── BLRoutePatch.kt │ │ │ │ │ ├── BlockThaiCommentPatch.kt │ │ │ │ │ ├── CacheRedirectPatch.kt │ │ │ │ │ ├── CrashHandlerPatch.kt │ │ │ │ │ ├── CustomSplashPatch.kt │ │ │ │ │ ├── FavFolderDialogPatch.kt │ │ │ │ │ ├── ForbidLiveRoomAutoFloatPatch.kt │ │ │ │ │ ├── ForbidLiveRoomSlideLeftPatch.kt │ │ │ │ │ ├── ForbidSwitchLiveRoomPatch.kt │ │ │ │ │ ├── InjectDataProviderPatch.kt │ │ │ │ │ ├── LiveRoomPatch.kt │ │ │ │ │ ├── MakeTextSelectablePatch.kt │ │ │ │ │ ├── NoManageSpaceActivityPatch.kt │ │ │ │ │ ├── NumberFormatPatch.kt │ │ │ │ │ ├── PlayManifestCompatibilityPatch.kt │ │ │ │ │ ├── PublishToFollowingPatch.kt │ │ │ │ │ ├── SaveCommentImagePatch.kt │ │ │ │ │ ├── SharePatch.kt │ │ │ │ │ ├── TeenagerModePatch.kt │ │ │ │ │ ├── TextFoldPatch.kt │ │ │ │ │ ├── TrialQualityPatch.kt │ │ │ │ │ └── UpgradePatch.kt │ │ │ ├── protobuf │ │ │ │ ├── fingerprints │ │ │ │ │ ├── MossMiddlewareGaiaFingerprint.kt │ │ │ │ │ └── MossServiceFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ ├── CommentReplyUrlPatch.kt │ │ │ │ │ ├── MossPatch.kt │ │ │ │ │ └── UnlockProtobufPatch.kt │ │ │ ├── settings │ │ │ │ ├── fingerprints │ │ │ │ │ ├── HdOnPreferenceClickFingerprint.kt │ │ │ │ │ └── PreferenceManagerFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ ├── FixPreferenceManagerPatch.kt │ │ │ │ │ ├── HdPreferenceClickFixPatch.kt │ │ │ │ │ ├── HdPreferenceFragmentPatch.kt │ │ │ │ │ └── SettingsResourcePatch.kt │ │ │ ├── splash │ │ │ │ └── SplashPatch.kt │ │ │ ├── theme │ │ │ │ ├── fingerprints │ │ │ │ │ ├── BuiltInThemesFingerprint.kt │ │ │ │ │ ├── SkinListFingerprint.kt │ │ │ │ │ ├── ThemeClickFingerprint.kt │ │ │ │ │ ├── ThemeColorsFingerprint.kt │ │ │ │ │ ├── ThemeHelperFingerprint.kt │ │ │ │ │ ├── ThemeNameFingerprint.kt │ │ │ │ │ ├── ThemeProcessorFingerprint.kt │ │ │ │ │ └── WebActivityBuildUriFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── CustomThemePatch.kt │ │ │ ├── toast │ │ │ │ ├── fingerprints │ │ │ │ │ └── LessonsModeToastFingerprint.kt │ │ │ │ └── patch │ │ │ │ │ └── ToastPatch.kt │ │ │ └── webview │ │ │ │ └── patch │ │ │ │ └── WebViewPatch.kt │ │ ├── patcher │ │ │ ├── fingerprint │ │ │ │ └── MultiMethodFingerprint.kt │ │ │ └── patch │ │ │ │ └── MultiMethodBytecodePatch.kt │ │ ├── utils │ │ │ └── Extenstions.kt │ │ └── video │ │ │ ├── player │ │ │ ├── fingerprints │ │ │ │ ├── BangumiKeyDownHandlerFingerprint.kt │ │ │ │ ├── IjkMediaPlayerOptionsFingerprint.kt │ │ │ │ ├── MenuFuncSegmentFingerprint.kt │ │ │ │ ├── MusicPlayerPanelFingerprint.kt │ │ │ │ ├── NewShareServiceFingerprint.kt │ │ │ │ ├── PlaybackSpeedSettingFingerprint.kt │ │ │ │ ├── PlayerGestureListenerFingerprint.kt │ │ │ │ ├── PlayerGestureRotateFingerprint.kt │ │ │ │ ├── PlayerOnPreparedFingerprint.kt │ │ │ │ ├── PlayerSpeedWidgetFingerprint.kt │ │ │ │ ├── ResetResizeFunctionWidgetFingerprint.kt │ │ │ │ ├── ShowPlayerToastFingerprint.kt │ │ │ │ ├── SpeedFunctionWidgetFingerprint.kt │ │ │ │ ├── StoryMenuFingerprint.kt │ │ │ │ ├── TripleSpeedServiceFingerprint.kt │ │ │ │ └── TripleSpeedServiceUniteFingerprint.kt │ │ │ └── patch │ │ │ │ ├── BangumiKeyDownHandlerPatch.kt │ │ │ │ ├── DefaultPlaybackSpeedPatch.kt │ │ │ │ ├── HwCodecPatch.kt │ │ │ │ ├── LongPressPlaybackSpeedPatch.kt │ │ │ │ ├── OverridePlaybackSpeedPatch.kt │ │ │ │ ├── PlayerGestureDetectorPatch.kt │ │ │ │ └── PlayerToastPatch.kt │ │ │ ├── quality │ │ │ ├── fingerprints │ │ │ │ └── PlayerSettingHelperFingerprint.kt │ │ │ └── patch │ │ │ │ └── VideoQualityPatch.kt │ │ │ └── subtitle │ │ │ ├── fingerprints │ │ │ ├── FunctionWidgetServiceFingerprint.kt │ │ │ ├── FunctionWidgetTokenFingerprint.kt │ │ │ ├── PlayerContainerFingerprint.kt │ │ │ ├── PlayerSubtitleFunctionWidgetFingerprint.kt │ │ │ └── SetDmViewReplyFingerprint.kt │ │ │ └── patch │ │ │ ├── SubtitleImportSaveButtonPatch.kt │ │ │ ├── SubtitleImportSavePatch.kt │ │ │ └── SubtitlePatch.kt │ └── shared │ │ └── misc │ │ ├── integrations │ │ └── BaseIntegrationsPatch.kt │ │ └── mapping │ │ └── ResourceMappingPatch.kt │ └── util │ ├── BytecodeUtils.kt │ ├── ResourceUtils.kt │ └── patch │ └── LiteralValueFingerprint.kt └── resources └── bilibili ├── appicon ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml ├── mipmap-hdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_foreground_round.png │ ├── ic_launcher_monochrome.png │ └── ic_launcher_round.png ├── mipmap-mdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_foreground_round.png │ ├── ic_launcher_monochrome.png │ └── ic_launcher_round.png ├── mipmap-xhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_foreground_round.png │ ├── ic_launcher_monochrome.png │ └── ic_launcher_round.png ├── mipmap-xxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_foreground_round.png │ ├── ic_launcher_monochrome.png │ └── ic_launcher_round.png └── mipmap-xxxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_foreground_round.png │ ├── ic_launcher_monochrome.png │ └── ic_launcher_round.png ├── drawable └── biliroaming_bg_transparent.webp ├── host └── values │ ├── arrays.xml │ ├── strings.xml │ └── strings_raw.xml ├── layout ├── biliroaming_dialog_area_server.xml ├── biliroaming_dialog_argb_color_choose.xml └── biliroaming_dialog_color_choose.xml └── xml ├── biliroaming_setting_about.xml ├── biliroaming_setting_backup.xml ├── biliroaming_setting_block_follow.xml ├── biliroaming_setting_block_module.xml ├── biliroaming_setting_customize_bottom.xml ├── biliroaming_setting_customize_drawer.xml ├── biliroaming_setting_customize_dynamic.xml ├── biliroaming_setting_customize_home.xml ├── biliroaming_setting_customize_live_room.xml ├── biliroaming_setting_customize_mine.xml ├── biliroaming_setting_customize_player.xml ├── biliroaming_setting_customize_search.xml ├── biliroaming_setting_customize_space.xml ├── biliroaming_setting_customize_video_detail.xml ├── biliroaming_setting_display_size.xml ├── biliroaming_setting_external_downloader.xml ├── biliroaming_setting_filter_comment.xml ├── biliroaming_setting_filter_dynamic_by_type.xml ├── biliroaming_setting_filter_home.xml ├── biliroaming_setting_filter_home_by_type.xml ├── biliroaming_setting_filter_popular.xml ├── biliroaming_setting_filter_search_type.xml ├── biliroaming_setting_filter_story.xml ├── biliroaming_setting_full_screen_quality.xml ├── biliroaming_setting_full_screen_quality_mobile.xml ├── biliroaming_setting_half_screen_quality.xml ├── biliroaming_setting_home_tab.xml ├── biliroaming_setting_live_popups.xml ├── biliroaming_setting_misc.xml ├── biliroaming_setting_player_version.xml ├── biliroaming_setting_space.xml ├── biliroaming_setting_subtitle_translate_server.xml ├── biliroaming_setting_unlock_area_limit.xml ├── biliroaming_setting_upos.xml ├── biliroaming_setting_video_detail_filter.xml └── biliroaming_settings.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | # 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | # 4 | # Linux start script should use lf 5 | /gradlew text eol=lf 6 | 7 | # These are Windows script files and should use crlf 8 | *.bat text eol=crlf 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | name: 🐞 Bug report 2 | description: Report a bug or an issue. 3 | title: 'bug: ' 4 | labels: ['Bug report'] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | # ReVanced Patches bug report 10 | 11 | Please check for existing bug reports 12 | [here](https://github.com/ReVanced/revanced-patches/labels/Bug%20report) 13 | before creating a new one. 14 | 15 | - type: textarea 16 | attributes: 17 | label: Bug description 18 | description: | 19 | - Describe your bug in detail 20 | - Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...) 21 | - Add images and videos if possible 22 | - List used patches if applicable 23 | validations: 24 | required: true 25 | - type: textarea 26 | attributes: 27 | label: Error logs 28 | description: Exceptions can be captured by running `logcat | grep AndroidRuntime` in a shell. 29 | render: shell 30 | - type: textarea 31 | attributes: 32 | label: Solution 33 | description: If applicable, add a possible solution to the bug. 34 | - type: textarea 35 | attributes: 36 | label: Additional context 37 | description: Add additional context here. 38 | - type: checkboxes 39 | id: acknowledgements 40 | attributes: 41 | label: Acknowledgements 42 | description: Your issue will be closed if you don't follow the checklist below. 43 | options: 44 | - label: This request is not a duplicate of an existing issue. 45 | required: true 46 | - label: I have chosen an appropriate title. 47 | required: true 48 | - label: All requested information has been provided properly. 49 | required: true 50 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: 🗨 Discussions 4 | url: https://github.com/revanced/revanced-suggestions/discussions 5 | about: Have something unspecific to ReVanced Patches in mind? Search for or start a new discussion! -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | name: ⭐ Feature request 2 | description: Create a detailed request for a new feature. 3 | title: 'feat: ' 4 | labels: ['Feature request'] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | # ReVanced Patches feature request 10 | 11 | Please check for existing feature requests 12 | [here](https://github.com/ReVanced/revanced-patches/labels/Feature%20request) 13 | before creating a new one. 14 | - type: textarea 15 | attributes: 16 | label: Feature description 17 | description: | 18 | - Describe your feature in detail 19 | - Add images, videos, links, examples, references, etc. if possible 20 | - Add the target application name in case you request a new patch 21 | - type: textarea 22 | attributes: 23 | label: Motivation 24 | description: | 25 | A strong motivation is necessary for a feature request to be considered. 26 | 27 | - Why should this feature be implemented? 28 | - What is the explicit use case? 29 | - What are the benefits? 30 | - What makes this feature important? 31 | validations: 32 | required: true 33 | - type: checkboxes 34 | id: acknowledgements 35 | attributes: 36 | label: Acknowledgements 37 | description: Your issue will be closed if you don't follow the checklist below. 38 | options: 39 | - label: This request is not a duplicate of an existing issue. 40 | required: true 41 | - label: I have chosen an appropriate title. 42 | required: true 43 | - label: All requested information has been provided properly. 44 | required: true 45 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | firstPRMergeComment: > 2 | Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role. 3 | -------------------------------------------------------------------------------- /.github/workflows/pull_request.yml: -------------------------------------------------------------------------------- 1 | name: Open a PR to main 2 | 3 | on: 4 | push: 5 | branches: 6 | - dev 7 | workflow_dispatch: 8 | 9 | env: 10 | MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main` 11 | 12 | jobs: 13 | pull-request: 14 | name: Open pull request 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | - name: Open pull request 20 | uses: repo-sync/pull-request@v2 21 | with: 22 | destination_branch: 'main' 23 | pr_title: 'chore: ${{ env.MESSAGE }}' 24 | pr_body: | 25 | This pull request will ${{ env.MESSAGE }}. 26 | 27 | ## Dependencies before merge 28 | 29 | - [ ] https://github.com/revanced/revanced-integrations 30 | pr_draft: true 31 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | - dev 9 | 10 | jobs: 11 | release: 12 | name: Release 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v4 17 | with: 18 | # Make sure the release step uses its own credentials: 19 | # https://github.com/cycjimmy/semantic-release-action#private-packages 20 | persist-credentials: false 21 | fetch-depth: 0 22 | 23 | - name: Cache Gradle 24 | uses: burrunan/gradle-cache-action@v1 25 | 26 | - name: Build 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | run: ./gradlew generateMeta clean 30 | 31 | - name: Setup Node.js 32 | uses: actions/setup-node@v4 33 | with: 34 | node-version: "lts/*" 35 | cache: 'npm' 36 | 37 | - name: Install dependencies 38 | run: npm install 39 | 40 | - name: Import GPG key 41 | uses: crazy-max/ghaction-import-gpg@v6 42 | with: 43 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} 44 | passphrase: ${{ secrets.GPG_PASSPHRASE }} 45 | fingerprint: ${{ env.GPG_FINGERPRINT }} 46 | 47 | - name: Release 48 | env: 49 | GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }} 50 | run: npm exec semantic-release 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Java template 2 | # Compiled class file 3 | *.class 4 | 5 | # Log file 6 | *.log 7 | 8 | # BlueJ files 9 | *.ctxt 10 | 11 | # Mobile Tools for Java (J2ME) 12 | .mtj.tmp/ 13 | 14 | # Package Files # 15 | *.jar 16 | *.war 17 | *.nar 18 | *.ear 19 | *.zip 20 | *.tar.gz 21 | *.rar 22 | 23 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 24 | hs_err_pid* 25 | 26 | ### JetBrains template 27 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 28 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 29 | 30 | # User-specific stuff 31 | .idea/**/workspace.xml 32 | .idea/**/tasks.xml 33 | .idea/**/usage.statistics.xml 34 | .idea/**/dictionaries 35 | .idea/**/shelf 36 | 37 | # Generated files 38 | .idea/**/contentModel.xml 39 | 40 | # Sensitive or high-churn files 41 | .idea/**/dataSources/ 42 | .idea/**/dataSources.ids 43 | .idea/**/dataSources.local.xml 44 | .idea/**/sqlDataSources.xml 45 | .idea/**/dynamic.xml 46 | .idea/**/uiDesigner.xml 47 | .idea/**/dbnavigator.xml 48 | 49 | # Gradle 50 | .idea/**/gradle.xml 51 | .idea/**/libraries 52 | 53 | # Gradle and Maven with auto-import 54 | # When using Gradle or Maven with auto-import, you should exclude module files, 55 | # since they will be recreated, and may cause churn. Uncomment if using 56 | # auto-import. 57 | .idea/artifacts 58 | .idea/compiler.xml 59 | .idea/jarRepositories.xml 60 | .idea/modules.xml 61 | .idea/*.iml 62 | .idea/modules 63 | *.iml 64 | *.ipr 65 | 66 | # CMake 67 | cmake-build-*/ 68 | 69 | # Mongo Explorer plugin 70 | .idea/**/mongoSettings.xml 71 | 72 | # File-based project format 73 | *.iws 74 | 75 | # IntelliJ 76 | out/ 77 | 78 | # mpeltonen/sbt-idea plugin 79 | .idea_modules/ 80 | 81 | # JIRA plugin 82 | atlassian-ide-plugin.xml 83 | 84 | # Cursive Clojure plugin 85 | .idea/replstate.xml 86 | 87 | # Crashlytics plugin (for Android Studio and IntelliJ) 88 | com_crashlytics_export_strings.xml 89 | crashlytics.properties 90 | crashlytics-build.properties 91 | fabric.properties 92 | 93 | # Editor-based Rest Client 94 | .idea/httpRequests 95 | 96 | # Android studio 3.1+ serialized cache file 97 | .idea/caches/build_file_checksums.ser 98 | 99 | ### Gradle template 100 | .gradle 101 | **/build/ 102 | !src/**/build/ 103 | 104 | # Ignore Gradle GUI config 105 | gradle-app.setting 106 | 107 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 108 | !gradle-wrapper.jar 109 | 110 | # Cache of project 111 | .gradletasknamecache 112 | 113 | # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 114 | # gradle/wrapper/gradle-wrapper.properties 115 | 116 | # Potentially copyrighted test APK 117 | *.apk 118 | 119 | # Ignore vscode config 120 | .vscode/ 121 | 122 | # Dependency directories 123 | node_modules/ 124 | 125 | # gradle properties, due to Github token 126 | ./gradle.properties 127 | 128 | .idea 129 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "main", 4 | { 5 | "name": "dev", 6 | "prerelease": true 7 | } 8 | ], 9 | "plugins": [ 10 | [ 11 | "@semantic-release/commit-analyzer", { 12 | "releaseRules": [ 13 | { "type": "build", "scope": "Needs bump", "release": "patch" } 14 | ] 15 | } 16 | ], 17 | "@semantic-release/release-notes-generator", 18 | "@semantic-release/changelog", 19 | "gradle-semantic-release-plugin", 20 | [ 21 | "@semantic-release/git", 22 | { 23 | "assets": [ 24 | "README.md", 25 | "CHANGELOG.md", 26 | "gradle.properties", 27 | "patches.json" 28 | ] 29 | } 30 | ], 31 | [ 32 | "@semantic-release/github", 33 | { 34 | "assets": [ 35 | { 36 | "path": "build/libs/*.jar" 37 | }, 38 | { 39 | "path": "patches.json" 40 | } 41 | ], 42 | successComment: false 43 | } 44 | ], 45 | [ 46 | "@saithodev/semantic-release-backmerge", 47 | { 48 | backmergeBranches: [{"from": "main", "to": "dev"}], 49 | clearWorkspace: true 50 | } 51 | ] 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /assets/revanced-logo/revanced-logo-round.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.parallel=true 2 | org.gradle.caching=true 3 | kotlin.code.style=official 4 | version=1.19.2 5 | -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | revanced-patcher = "19.3.1" 3 | smali = "3.0.3" 4 | gson = "2.10.1" 5 | kotlin = "1.9.23" 6 | 7 | [libraries] 8 | revanced-patcher = { module = "kofua.app.revanced:revanced-patcher", version.ref = "revanced-patcher" } 9 | smali = { module = "com.android.tools.smali:smali", version.ref = "smali" } 10 | gson = { module = "com.google.code.gson:gson", version.ref = "gson" } 11 | 12 | [plugins] 13 | kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjns/BiliRoamingX-patches/1457ed37fd814b08eb263a2f037088f9f034e02a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "@saithodev/semantic-release-backmerge": "^3.1.0", 4 | "@semantic-release/changelog": "^6.0.2", 5 | "@semantic-release/git": "^10.0.1", 6 | "gradle-semantic-release-plugin": "^1.7.6", 7 | "semantic-release": "^20.1.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "BiliRoamingX-patches" 2 | -------------------------------------------------------------------------------- /src/main/kotlin/app/revanced/generator/JsonPatchesFileGenerator.kt: -------------------------------------------------------------------------------- 1 | package app.revanced.generator 2 | 3 | import app.revanced.patcher.PatchSet 4 | import app.revanced.patcher.patch.Patch 5 | import com.google.gson.GsonBuilder 6 | import java.io.File 7 | 8 | internal class JsonPatchesFileGenerator : PatchesFileGenerator { 9 | override fun generate(patches: PatchSet) = patches.map { 10 | JsonPatch( 11 | it.name!!, 12 | it.description, 13 | it.compatiblePackages, 14 | it.use, 15 | it.requiresIntegrations, 16 | it.options.values.map { option -> 17 | JsonPatch.Option( 18 | option.key, 19 | option.default, 20 | option.values, 21 | option.title, 22 | option.description, 23 | option.required, 24 | ) 25 | }, 26 | ) 27 | }.let { 28 | File("patches.json").writeText(GsonBuilder().serializeNulls().create().toJson(it)) 29 | } 30 | 31 | @Suppress("unused") 32 | private class JsonPatch( 33 | val name: String? = null, 34 | val description: String? = null, 35 | val compatiblePackages: Set? = null, 36 | val use: Boolean = true, 37 | val requiresIntegrations: Boolean = false, 38 | val options: List