├── .editorconfig
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_request.yml
├── config.yml
├── dependabot.yml
└── workflows
│ ├── build_pull_request.yml
│ ├── open_pull_request.yml
│ └── release.yml
├── .gitignore
├── .releaserc
├── CHANGELOG.md
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle.kts
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── app
│ └── revanced
│ └── integrations
│ ├── all
│ ├── connectivity
│ │ └── wifi
│ │ │ └── spoof
│ │ │ └── SpoofWifiPatch.java
│ ├── screencapture
│ │ └── removerestriction
│ │ │ └── RemoveScreencaptureRestrictionPatch.java
│ └── screenshot
│ │ └── removerestriction
│ │ └── RemoveScreenshotRestrictionPatch.java
│ ├── boostforreddit
│ └── FixSLinksPatch.java
│ ├── reddit
│ └── patches
│ │ └── FilterPromotedLinksPatch.java
│ ├── shared
│ ├── GmsCoreSupport.java
│ ├── Logger.java
│ ├── StringRef.java
│ ├── Utils.java
│ ├── checks
│ │ ├── Check.java
│ │ ├── CheckEnvironmentPatch.java
│ │ └── PatchInfo.java
│ ├── fixes
│ │ └── slink
│ │ │ ├── BaseFixSLinksPatch.java
│ │ │ └── ResolveResult.java
│ └── settings
│ │ ├── BaseSettings.java
│ │ ├── BooleanSetting.java
│ │ ├── EnumSetting.java
│ │ ├── FloatSetting.java
│ │ ├── IntegerSetting.java
│ │ ├── LongSetting.java
│ │ ├── Setting.java
│ │ ├── StringSetting.java
│ │ └── preference
│ │ ├── AbstractPreferenceFragment.java
│ │ ├── ImportExportPreference.java
│ │ ├── ReVancedAboutPreference.java
│ │ ├── ResettableEditTextPreference.java
│ │ └── SharedPrefCategory.java
│ ├── syncforreddit
│ ├── FixRedditVideoDownloadPatch.java
│ └── FixSLinksPatch.java
│ ├── tiktok
│ ├── Utils.java
│ ├── cleardisplay
│ │ └── RememberClearDisplayPatch.java
│ ├── download
│ │ └── DownloadsPatch.java
│ ├── feedfilter
│ │ ├── AdsFilter.java
│ │ ├── FeedItemsFilter.java
│ │ ├── IFilter.java
│ │ ├── ImageVideoFilter.java
│ │ ├── LikeCountFilter.java
│ │ ├── LiveFilter.java
│ │ ├── StoryFilter.java
│ │ └── ViewCountFilter.java
│ ├── settings
│ │ ├── AdPersonalizationActivityHook.java
│ │ ├── Settings.java
│ │ ├── SettingsStatus.java
│ │ └── preference
│ │ │ ├── DownloadPathPreference.java
│ │ │ ├── InputTextPreference.java
│ │ │ ├── RangeValuePreference.java
│ │ │ ├── ReVancedPreferenceFragment.java
│ │ │ ├── TogglePreference.java
│ │ │ └── categories
│ │ │ ├── ConditionalPreferenceCategory.java
│ │ │ ├── DownloadsPreferenceCategory.java
│ │ │ ├── FeedFilterPreferenceCategory.java
│ │ │ ├── IntegrationsPreferenceCategory.java
│ │ │ └── SimSpoofPreferenceCategory.java
│ ├── speed
│ │ └── PlaybackSpeedPatch.java
│ └── spoof
│ │ └── sim
│ │ └── SpoofSimPatch.java
│ ├── tudortmund
│ └── lockscreen
│ │ └── ShowOnLockscreenPatch.java
│ ├── tumblr
│ └── patches
│ │ └── TimelineFilterPatch.java
│ ├── twitch
│ ├── Utils.java
│ ├── adblock
│ │ ├── IAdblockService.java
│ │ ├── LuminousService.java
│ │ └── PurpleAdblockService.java
│ ├── api
│ │ ├── PurpleAdblockApi.java
│ │ ├── RequestInterceptor.java
│ │ └── RetrofitClient.java
│ ├── patches
│ │ ├── AudioAdsPatch.java
│ │ ├── AutoClaimChannelPointsPatch.java
│ │ ├── DebugModePatch.java
│ │ ├── EmbeddedAdsPatch.java
│ │ ├── ShowDeletedMessagesPatch.java
│ │ └── VideoAdsPatch.java
│ └── settings
│ │ ├── AppCompatActivityHook.java
│ │ ├── Settings.java
│ │ └── preference
│ │ ├── CustomPreferenceCategory.java
│ │ └── ReVancedPreferenceFragment.java
│ ├── twitter
│ ├── patches
│ │ ├── hook
│ │ │ ├── json
│ │ │ │ ├── BaseJsonHook.kt
│ │ │ │ ├── JsonHook.kt
│ │ │ │ └── JsonHookPatch.kt
│ │ │ ├── patch
│ │ │ │ ├── Hook.kt
│ │ │ │ ├── ads
│ │ │ │ │ └── AdsHook.kt
│ │ │ │ ├── dummy
│ │ │ │ │ └── DummyHook.kt
│ │ │ │ └── recommendation
│ │ │ │ │ └── RecommendedUsersHook.kt
│ │ │ └── twifucker
│ │ │ │ ├── TwiFucker.kt
│ │ │ │ └── TwiFuckerUtils.kt
│ │ └── links
│ │ │ ├── ChangeLinkSharingDomainPatch.java
│ │ │ └── OpenLinksWithAppChooserPatch.java
│ └── utils
│ │ ├── json
│ │ └── JsonUtils.kt
│ │ └── stream
│ │ └── StreamUtils.kt
│ └── youtube
│ ├── ByteTrieSearch.java
│ ├── Event.kt
│ ├── StringTrieSearch.java
│ ├── ThemeHelper.java
│ ├── TrieSearch.java
│ ├── patches
│ ├── AlternativeThumbnailsPatch.java
│ ├── AutoRepeatPatch.java
│ ├── BackgroundPlaybackPatch.java
│ ├── BypassImageRegionRestrictionsPatch.java
│ ├── BypassURLRedirectsPatch.java
│ ├── ChangeStartPagePatch.java
│ ├── CheckWatchHistoryDomainNameResolutionPatch.java
│ ├── CopyVideoUrlPatch.java
│ ├── CustomPlayerOverlayOpacityPatch.java
│ ├── DisableAutoCaptionsPatch.java
│ ├── DisableFullscreenAmbientModePatch.java
│ ├── DisablePlayerPopupPanelsPatch.java
│ ├── DisablePreciseSeekingGesturePatch.java
│ ├── DisableResumingStartupShortsPlayerPatch.java
│ ├── DisableRollingNumberAnimationsPatch.java
│ ├── DisableSuggestedVideoEndScreenPatch.java
│ ├── DownloadsPatch.java
│ ├── FixBackToExitGesturePatch.java
│ ├── FullscreenPanelsRemoverPatch.java
│ ├── HDRAutoBrightnessPatch.java
│ ├── HideAlbumCardsPatch.java
│ ├── HideAutoplayButtonPatch.java
│ ├── HideCaptionsButtonPatch.java
│ ├── HideCastButtonPatch.java
│ ├── HideCrowdfundingBoxPatch.java
│ ├── HideEmailAddressPatch.java
│ ├── HideEndscreenCardsPatch.java
│ ├── HideFilterBarPatch.java
│ ├── HideFloatingMicrophoneButtonPatch.java
│ ├── HideGetPremiumPatch.java
│ ├── HideInfoCardsPatch.java
│ ├── HidePlayerButtonsPatch.java
│ ├── HideSeekbarPatch.java
│ ├── HideTimestampPatch.java
│ ├── MiniplayerPatch.java
│ ├── NavigationButtonsPatch.java
│ ├── OpenLinksExternallyPatch.java
│ ├── PlayerControlsPatch.java
│ ├── PlayerOverlaysHookPatch.java
│ ├── PlayerTypeHookPatch.java
│ ├── RemoveTrackingQueryParameterPatch.java
│ ├── RemoveViewerDiscretionDialogPatch.java
│ ├── RestoreOldSeekbarThumbnailsPatch.java
│ ├── ReturnYouTubeDislikePatch.java
│ ├── SeekbarTappingPatch.java
│ ├── SlideToSeekPatch.java
│ ├── TabletLayoutPatch.java
│ ├── VersionCheckPatch.java
│ ├── VideoAdsPatch.java
│ ├── VideoInformation.java
│ ├── WideSearchbarPatch.java
│ ├── ZoomHapticsPatch.java
│ ├── announcements
│ │ ├── AnnouncementsPatch.java
│ │ └── requests
│ │ │ └── AnnouncementsRoutes.java
│ ├── components
│ │ ├── AdsFilter.java
│ │ ├── ButtonsFilter.java
│ │ ├── CommentsFilter.java
│ │ ├── CustomFilter.java
│ │ ├── DescriptionComponentsFilter.java
│ │ ├── Filter.java
│ │ ├── FilterGroup.java
│ │ ├── FilterGroupList.java
│ │ ├── HideInfoCardsFilterPatch.java
│ │ ├── KeywordContentFilter.java
│ │ ├── LayoutComponentsFilter.java
│ │ ├── LithoFilterPatch.java
│ │ ├── PlaybackSpeedMenuFilterPatch.java
│ │ ├── PlayerFlyoutMenuItemsFilter.java
│ │ ├── ReturnYouTubeDislikeFilterPatch.java
│ │ ├── ShortsFilter.java
│ │ └── VideoQualityMenuFilterPatch.java
│ ├── playback
│ │ ├── quality
│ │ │ ├── RememberVideoQualityPatch.java
│ │ │ └── RestoreOldVideoQualityMenuPatch.java
│ │ └── speed
│ │ │ ├── CustomPlaybackSpeedPatch.java
│ │ │ └── RememberPlaybackSpeedPatch.java
│ ├── spoof
│ │ ├── ClientType.java
│ │ ├── DeviceHardwareSupport.java
│ │ ├── SpoofAppVersionPatch.java
│ │ ├── SpoofDeviceDimensionsPatch.java
│ │ ├── SpoofVideoStreamsPatch.java
│ │ └── requests
│ │ │ ├── PlayerRoutes.java
│ │ │ └── StreamingDataRequest.java
│ └── theme
│ │ ├── ProgressBarDrawable.java
│ │ ├── SeekbarColorPatch.java
│ │ └── ThemePatch.java
│ ├── requests
│ ├── Requester.java
│ └── Route.java
│ ├── returnyoutubedislike
│ ├── ReturnYouTubeDislike.java
│ └── requests
│ │ ├── RYDVoteData.java
│ │ ├── ReturnYouTubeDislikeApi.java
│ │ └── ReturnYouTubeDislikeRoutes.java
│ ├── settings
│ ├── LicenseActivityHook.java
│ ├── Settings.java
│ └── preference
│ │ ├── AlternativeThumbnailsAboutDeArrowPreference.java
│ │ ├── ForceAVCSpoofingPreference.java
│ │ ├── HtmlPreference.java
│ │ ├── ReVancedPreferenceFragment.java
│ │ ├── ReVancedYouTubeAboutPreference.java
│ │ ├── ReturnYouTubeDislikePreferenceFragment.java
│ │ └── SponsorBlockPreferenceFragment.java
│ ├── shared
│ ├── NavigationBar.java
│ ├── PlayerControlsVisibilityObserver.kt
│ ├── PlayerOverlays.kt
│ ├── PlayerType.kt
│ └── VideoState.kt
│ ├── sponsorblock
│ ├── SegmentPlaybackController.java
│ ├── SponsorBlockSettings.java
│ ├── SponsorBlockUtils.java
│ ├── objects
│ │ ├── CategoryBehaviour.java
│ │ ├── SegmentCategory.java
│ │ ├── SegmentCategoryListPreference.java
│ │ ├── SponsorSegment.java
│ │ └── UserStats.java
│ ├── requests
│ │ ├── SBRequester.java
│ │ └── SBRoutes.java
│ └── ui
│ │ ├── CreateSegmentButtonController.java
│ │ ├── NewSegmentLayout.java
│ │ ├── SkipSponsorButton.java
│ │ ├── SponsorBlockViewController.java
│ │ └── VotingButtonController.java
│ ├── swipecontrols
│ ├── SwipeControlsConfigurationProvider.kt
│ ├── SwipeControlsHostActivity.kt
│ ├── controller
│ │ ├── AudioVolumeController.kt
│ │ ├── ScreenBrightnessController.kt
│ │ ├── SwipeZonesController.kt
│ │ ├── VolumeKeysController.kt
│ │ └── gesture
│ │ │ ├── ClassicSwipeController.kt
│ │ │ ├── PressToSwipeController.kt
│ │ │ └── core
│ │ │ ├── BaseGestureController.kt
│ │ │ ├── GestureController.kt
│ │ │ ├── SwipeDetector.kt
│ │ │ └── VolumeAndBrightnessScroller.kt
│ ├── misc
│ │ ├── Point.kt
│ │ ├── Rectangle.kt
│ │ ├── ScrollDistanceHelper.kt
│ │ ├── SwipeControlsOverlay.kt
│ │ └── SwipeControlsUtils.kt
│ └── views
│ │ └── SwipeControlsOverlayLayout.kt
│ └── videoplayer
│ ├── CopyVideoUrlButton.java
│ ├── CopyVideoUrlTimestampButton.java
│ ├── ExternalDownloadButton.java
│ ├── PlaybackSpeedDialogButton.java
│ └── PlayerControlButton.java
├── assets
├── revanced-headline
│ ├── revanced-headline-vertical-dark.svg
│ └── revanced-headline-vertical-light.svg
└── revanced-logo
│ └── revanced-logo.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
├── settings.gradle.kts
└── stub
├── .gitignore
├── build.gradle.kts
├── proguard-rules.pro
└── src
└── main
├── AndroidManifest.xml
└── java
├── android
└── support
│ ├── constraint
│ └── ConstraintLayout.java
│ └── v7
│ └── widget
│ └── RecyclerView.java
├── com
├── bytedance
│ └── ies
│ │ └── ugc
│ │ └── aweme
│ │ └── commercialize
│ │ └── compliance
│ │ └── personalization
│ │ └── AdPersonalizationActivity.java
├── google
│ ├── android
│ │ ├── apps
│ │ │ └── youtube
│ │ │ │ └── app
│ │ │ │ └── ui
│ │ │ │ └── SlimMetadataScrollableButtonContainerLayout.java
│ │ └── libraries
│ │ │ └── youtube
│ │ │ └── rendering
│ │ │ └── ui
│ │ │ └── pivotbar
│ │ │ └── PivotBar.java
│ └── protos
│ │ └── youtube
│ │ └── api
│ │ └── innertube
│ │ └── InnertubeContext$ClientInfo.java
├── laurencedawson
│ └── reddit_sync
│ │ └── ui
│ │ └── activities
│ │ └── WebViewActivity.java
├── reddit
│ └── domain
│ │ └── model
│ │ └── ILink.java
├── rubenmayayo
│ └── reddit
│ │ └── ui
│ │ └── activities
│ │ └── WebViewActivity.java
├── ss
│ └── android
│ │ └── ugc
│ │ └── aweme
│ │ └── feed
│ │ └── model
│ │ ├── Aweme.java
│ │ ├── AwemeStatistics.java
│ │ └── FeedItemList.java
└── tumblr
│ └── rumblr
│ └── model
│ ├── TimelineObject.java
│ ├── TimelineObjectType.java
│ └── Timelineable.java
├── org
└── chromium
│ └── net
│ ├── UrlRequest.java
│ ├── UrlResponseInfo.java
│ └── impl
│ └── CronetUrlRequest.java
└── tv
└── twitch
└── android
├── feature
└── settings
│ └── menu
│ └── SettingsMenuGroup.java
├── settings
└── SettingsActivity.java
└── shared
└── chat
└── util
└── ClickableUsernameSpan.java
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{kt,kts}]
2 | ktlint_code_style = intellij_idea
3 | ktlint_standard_no-wildcard-imports = disabled
--------------------------------------------------------------------------------
/.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/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: 📃 Documentation
4 | url: https://github.com/revanced/revanced-documentation/
5 | about: Don't know how or where to start? Check out our documentation!
6 | - name: 🗨 Discussions
7 | url: https://github.com/revanced/revanced-suggestions/discussions
8 | about: Got something you think should change or be added? Search for or start a new discussion!
9 |
--------------------------------------------------------------------------------
/.github/config.yml:
--------------------------------------------------------------------------------
1 | firstPRMergeComment: >
2 | Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) to receive a role for your contribution.
3 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: github-actions
4 | labels: []
5 | directory: /
6 | target-branch: dev
7 | schedule:
8 | interval: monthly
9 |
10 | - package-ecosystem: npm
11 | labels: []
12 | directory: /
13 | target-branch: dev
14 | schedule:
15 | interval: monthly
16 |
17 | - package-ecosystem: gradle
18 | labels: []
19 | directory: /
20 | target-branch: dev
21 | schedule:
22 | interval: monthly
23 |
--------------------------------------------------------------------------------
/.github/workflows/build_pull_request.yml:
--------------------------------------------------------------------------------
1 | name: Build pull request
2 |
3 | on:
4 | workflow_dispatch:
5 | pull_request:
6 | branches:
7 | - dev
8 |
9 | jobs:
10 | release:
11 | name: Build
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout
15 | uses: actions/checkout@v4
16 | with:
17 | fetch-depth: 0
18 |
19 | - name: Cache Gradle
20 | uses: burrunan/gradle-cache-action@v1
21 |
22 | - name: Setup Java
23 | run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
24 |
25 | - name: Build
26 | env:
27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 | run: ./gradlew build --no-daemon
29 |
--------------------------------------------------------------------------------
/.github/workflows/open_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 |
20 | - name: Open pull request
21 | uses: repo-sync/pull-request@v2
22 | with:
23 | destination_branch: 'main'
24 | pr_title: 'chore: ${{ env.MESSAGE }}'
25 | pr_body: |
26 | This pull request will ${{ env.MESSAGE }}.
27 |
28 | ## Before merging this PR
29 |
30 | - [ ] Remember about https://github.com/revanced/revanced-patches
31 | pr_draft: true
32 |
--------------------------------------------------------------------------------
/.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 | permissions:
14 | contents: write
15 | runs-on: ubuntu-latest
16 | steps:
17 | - name: Checkout
18 | uses: actions/checkout@v4
19 | with:
20 | # Make sure the release step uses its own credentials:
21 | # https://github.com/cycjimmy/semantic-release-action#private-packages
22 | persist-credentials: false
23 | fetch-depth: 0
24 |
25 | - name: Cache Gradle
26 | uses: burrunan/gradle-cache-action@v1
27 |
28 | - name: Setup Java
29 | run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
30 |
31 | - name: Build
32 | env:
33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 | run: ./gradlew build clean
35 |
36 | - name: Setup Node.js
37 | uses: actions/setup-node@v4
38 | with:
39 | node-version: "lts/*"
40 | cache: 'npm'
41 |
42 | - name: Install dependencies
43 | run: npm install
44 |
45 | - name: Import GPG key
46 | uses: crazy-max/ghaction-import-gpg@v6
47 | with:
48 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
49 | passphrase: ${{ secrets.GPG_PASSPHRASE }}
50 | fingerprint: ${{ vars.GPG_FINGERPRINT }}
51 |
52 | - name: Release
53 | env:
54 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 | run: npm exec semantic-release
56 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | /.vscode
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 | .cxx
11 | local.properties
12 | node_modules
13 |
--------------------------------------------------------------------------------
/.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 | "CHANGELOG.md",
25 | "gradle.properties"
26 | ],
27 | "message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
28 | }
29 | ],
30 | [
31 | "@semantic-release/github",
32 | {
33 | "assets": [
34 | {
35 | "path": "app/build/outputs/apk/release/revanced-integrations*"
36 | }
37 | ],
38 | successComment: false
39 | }
40 | ],
41 | [
42 | "@saithodev/semantic-release-backmerge",
43 | {
44 | backmergeBranches: [{"from": "main", "to": "dev"}],
45 | clearWorkspace: true
46 | }
47 | ]
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 🔩 ReVanced Integrations
2 |
3 | The official ReVanced Integrations containing classes to be merged by ReVanced Patcher.
4 |
5 | ## ❓ How to use debugging:
6 |
7 | - Usage on Windows: ```adb logcat | findstr "revanced" > log.txt```
8 | - Usage on Linux: ```adb logcat | grep --line-buffered "revanced" > log.txt```
9 |
10 | This will write the log to a file called log.txt which you can view then.
11 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.android.application)
3 | alias(libs.plugins.kotlin)
4 | publishing
5 | signing
6 | }
7 |
8 | android {
9 | namespace = "app.revanced.integrations"
10 | compileSdk = 33
11 |
12 | applicationVariants.all {
13 | outputs.all {
14 | this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
15 |
16 | outputFileName = "${rootProject.name}-$versionName.apk"
17 | }
18 | }
19 |
20 | defaultConfig {
21 | applicationId = "app.revanced.integrations"
22 | minSdk = 23
23 | targetSdk = 33
24 | multiDexEnabled = false
25 | versionName = version as String
26 | }
27 |
28 | buildTypes {
29 | release {
30 | isMinifyEnabled = true
31 | proguardFiles(
32 | getDefaultProguardFile("proguard-android-optimize.txt"),
33 | "proguard-rules.pro",
34 | )
35 | }
36 | }
37 |
38 | compileOptions {
39 | sourceCompatibility = JavaVersion.VERSION_11
40 | targetCompatibility = JavaVersion.VERSION_11
41 | }
42 |
43 | kotlinOptions {
44 | jvmTarget = JavaVersion.VERSION_11.toString()
45 | }
46 | }
47 |
48 | dependencies {
49 | compileOnly(libs.appcompat)
50 | compileOnly(libs.annotation)
51 | compileOnly(libs.okhttp)
52 | compileOnly(libs.retrofit)
53 |
54 | compileOnly(project(":stub"))
55 | }
56 |
57 |
58 | tasks {
59 | val assembleReleaseSignApk by registering {
60 | dependsOn("assembleRelease")
61 |
62 | val apk = layout.buildDirectory.file("outputs/apk/release/${rootProject.name}-$version.apk")
63 |
64 | inputs.file(apk).withPropertyName("input")
65 | outputs.file(apk.map { it.asFile.resolveSibling("${it.asFile.name}.asc") })
66 |
67 | doLast {
68 | signing {
69 | useGpgCmd()
70 | sign(*inputs.files.files.toTypedArray())
71 | }
72 | }
73 | }
74 |
75 | // Needed by gradle-semantic-release-plugin.
76 | // Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435.
77 | publish {
78 | dependsOn(assembleReleaseSignApk)
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -dontobfuscate
2 | -dontoptimize
3 | -keepattributes *
4 | -keep class app.revanced.** {
5 | *;
6 | }
7 | -keep class com.google.** {
8 | *;
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/app/revanced/integrations/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch.java:
--------------------------------------------------------------------------------
1 | package app.revanced.integrations.all.screencapture.removerestriction;
2 |
3 | import android.media.AudioAttributes;
4 | import android.os.Build;
5 |
6 | import androidx.annotation.RequiresApi;
7 |
8 | public final class RemoveScreencaptureRestrictionPatch {
9 | // Member of AudioAttributes.Builder
10 | @RequiresApi(api = Build.VERSION_CODES.Q)
11 | public static AudioAttributes.Builder setAllowedCapturePolicy(final AudioAttributes.Builder builder, final int capturePolicy) {
12 | builder.setAllowedCapturePolicy(AudioAttributes.ALLOW_CAPTURE_BY_ALL);
13 |
14 | return builder;
15 | }
16 |
17 | // Member of AudioManager static class
18 | public static void setAllowedCapturePolicy(final int capturePolicy) {
19 | // Ignore request
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/app/revanced/integrations/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch.java:
--------------------------------------------------------------------------------
1 | package app.revanced.integrations.all.screenshot.removerestriction;
2 |
3 | import android.view.Window;
4 | import android.view.WindowManager;
5 |
6 | public class RemoveScreenshotRestrictionPatch {
7 |
8 | public static void addFlags(Window window, int flags) {
9 | window.addFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE);
10 | }
11 |
12 | public static void setFlags(Window window, int flags, int mask) {
13 | window.setFlags(flags & ~WindowManager.LayoutParams.FLAG_SECURE, mask & ~WindowManager.LayoutParams.FLAG_SECURE);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/app/revanced/integrations/boostforreddit/FixSLinksPatch.java:
--------------------------------------------------------------------------------
1 | package app.revanced.integrations.boostforreddit;
2 |
3 | import com.rubenmayayo.reddit.ui.activities.WebViewActivity;
4 |
5 | import app.revanced.integrations.shared.fixes.slink.BaseFixSLinksPatch;
6 |
7 | /** @noinspection unused*/
8 | public class FixSLinksPatch extends BaseFixSLinksPatch {
9 | static {
10 | INSTANCE = new FixSLinksPatch();
11 | }
12 |
13 | private FixSLinksPatch() {
14 | webViewActivityClass = WebViewActivity.class;
15 | }
16 |
17 | public static boolean patchResolveSLink(String link) {
18 | return INSTANCE.resolveSLink(link);
19 | }
20 |
21 | public static void patchSetAccessToken(String accessToken) {
22 | INSTANCE.setAccessToken(accessToken);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/app/revanced/integrations/reddit/patches/FilterPromotedLinksPatch.java:
--------------------------------------------------------------------------------
1 | package app.revanced.integrations.reddit.patches;
2 |
3 | import com.reddit.domain.model.ILink;
4 |
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | public final class FilterPromotedLinksPatch {
9 | /**
10 | * Filters list from promoted links.
11 | **/
12 | public static List> filterChildren(final Iterable> links) {
13 | final List