mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 09:53:55 +01:00
Compare commits
30 Commits
v3.2.0-dev
...
v4.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2debdc1056 | ||
|
|
ad1ea4661f | ||
|
|
eac46ca216 | ||
|
|
14e2c07329 | ||
|
|
9175e50f5d | ||
|
|
2318c0811f | ||
|
|
bc44eb710d | ||
|
|
4bb86f9ec6 | ||
|
|
387ceef6cd | ||
|
|
5ba59261f2 | ||
|
|
a89ab13949 | ||
|
|
ef3932c8e6 | ||
|
|
9d3dd4d50a | ||
|
|
1ecb6b2a6c | ||
|
|
21136d76cd | ||
|
|
c4b3d0fde0 | ||
|
|
9148bdfd1c | ||
|
|
e2b2b7424b | ||
|
|
b12a14c4d0 | ||
|
|
44082095ba | ||
|
|
987e4e7e91 | ||
|
|
4fd77b130a | ||
|
|
47aa56a06e | ||
|
|
47f2de4bc8 | ||
|
|
36b929c3b3 | ||
|
|
7109d8e088 | ||
|
|
c91df0f29c | ||
|
|
2c83b86297 | ||
|
|
5ceda29fce | ||
|
|
fcacd0f30d |
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -1,16 +1,22 @@
|
|||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
|
labels: []
|
||||||
directory: /
|
directory: /
|
||||||
|
target-branch: dev
|
||||||
schedule:
|
schedule:
|
||||||
interval: monthly
|
interval: monthly
|
||||||
|
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
|
labels: []
|
||||||
directory: /
|
directory: /
|
||||||
|
target-branch: dev
|
||||||
schedule:
|
schedule:
|
||||||
interval: monthly
|
interval: monthly
|
||||||
|
|
||||||
- package-ecosystem: gradle
|
- package-ecosystem: gradle
|
||||||
|
labels: []
|
||||||
directory: /
|
directory: /
|
||||||
|
target-branch: dev
|
||||||
schedule:
|
schedule:
|
||||||
interval: monthly
|
interval: monthly
|
||||||
|
|||||||
100
CHANGELOG.md
100
CHANGELOG.md
@@ -1,3 +1,103 @@
|
|||||||
|
# [4.0.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.3.0-dev.2...v4.0.0-dev.1) (2024-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Code Refactoring
|
||||||
|
|
||||||
|
* Fix package and code structure ([#2541](https://github.com/ReVanced/revanced-patches/issues/2541)) ([a08457e](https://github.com/ReVanced/revanced-patches/commit/a08457e406f4b2e37458a4835c11d370a02d2ce6))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* Various public APIs have changed names and packages or were removed entirely
|
||||||
|
|
||||||
|
# [3.3.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.3.0-dev.1...v3.3.0-dev.2) (2024-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Improve patch descriptions ([#2519](https://github.com/ReVanced/revanced-patches/issues/2519)) ([e8d1389](https://github.com/ReVanced/revanced-patches/commit/e8d1389d3367b2fb688f0b85c136c512981b4fdc))
|
||||||
|
|
||||||
|
# [3.3.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v3.2.0...v3.3.0-dev.1) (2023-12-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **ID Austria:** Remove constraint on any version ([#2526](https://github.com/ReVanced/revanced-patches/issues/2526)) ([de2cb88](https://github.com/ReVanced/revanced-patches/commit/de2cb886169b3963b9ed70154bde0b7c6baaae40))
|
||||||
|
|
||||||
|
# [3.2.0](https://github.com/ReVanced/revanced-patches/compare/v3.1.0...v3.2.0) (2023-12-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spoof SIM country:** Validate patch option value correctly ([8105463](https://github.com/ReVanced/revanced-patches/commit/81054637915a5399d15f546b2290b5d939e15732))
|
||||||
|
* **Tiktok - Remember clear display:** Use correct name ([d7e44cb](https://github.com/ReVanced/revanced-patches/commit/d7e44cb887396bba27ee81c70c006f0cc247c56d))
|
||||||
|
* **YouTube - Alternative thumbnails:** Clarify DeArrow support is for thumbnails ([#2531](https://github.com/ReVanced/revanced-patches/issues/2531)) ([828abb0](https://github.com/ReVanced/revanced-patches/commit/828abb0558926cd6557c79abcf1a04bfe2c719e6))
|
||||||
|
* **YouTube - SponsorBlock:** Export local statistics with saved settings ([f8365b4](https://github.com/ReVanced/revanced-patches/commit/f8365b4e3585328506887022ac6168045ac110b9))
|
||||||
|
* **YouTube:** Fix grammer mistakes in patch descriptions ([#2543](https://github.com/ReVanced/revanced-patches/issues/2543)) ([ebf5993](https://github.com/ReVanced/revanced-patches/commit/ebf599349c508067a28526267d82030b679df045))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Public API:** Deprecate `HideEmailAddressPatch` ([866bceb](https://github.com/ReVanced/revanced-patches/commit/866bcebdd990b964d3dfd5aea792e7fffaedbf44))
|
||||||
|
* **Public API:** Make `BottomControlsResource#addControls` public ([#2514](https://github.com/ReVanced/revanced-patches/issues/2514)) ([f4e2257](https://github.com/ReVanced/revanced-patches/commit/f4e2257072ca02003f7c272d6c0c8ef1aa6032ae))
|
||||||
|
* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([048bf59](https://github.com/ReVanced/revanced-patches/commit/048bf592ef93ee5138aa1886be1644501f88964a))
|
||||||
|
* **YouTube - Hide ads:** Hide fullscreen ads ([bdc9a12](https://github.com/ReVanced/revanced-patches/commit/bdc9a129eff3a5051b8b37665b3243a8b61cbbac))
|
||||||
|
* **YouTube - Hide layout components:** Hide search result recommendations ([55cc7f1](https://github.com/ReVanced/revanced-patches/commit/55cc7f1c7722f56af6d33ea2bd09a1b99d635209))
|
||||||
|
* **YouTube - Theme:** Add classic dark color to presets ([#2542](https://github.com/ReVanced/revanced-patches/issues/2542)) ([4e1dc00](https://github.com/ReVanced/revanced-patches/commit/4e1dc0041d6693fba08e78514787407f933a6e41))
|
||||||
|
* **YouTube:** Add `Remove viewer discretion dialog` patch ([a07f83f](https://github.com/ReVanced/revanced-patches/commit/a07f83fe89ce577fc8bd904eacad5383a639b09b))
|
||||||
|
* **YouTube:** Remove `Hide email address` patch ([3b84305](https://github.com/ReVanced/revanced-patches/commit/3b84305a6b97800cb147f86c642f19689548aca5))
|
||||||
|
|
||||||
|
# [3.2.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.8...v3.2.0-dev.9) (2023-12-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Theme:** Add classic dark color to presets ([#2542](https://github.com/ReVanced/revanced-patches/issues/2542)) ([4e1dc00](https://github.com/ReVanced/revanced-patches/commit/4e1dc0041d6693fba08e78514787407f933a6e41))
|
||||||
|
* **YouTube:** Add `Remove viewer discretion dialog` patch ([a07f83f](https://github.com/ReVanced/revanced-patches/commit/a07f83fe89ce577fc8bd904eacad5383a639b09b))
|
||||||
|
|
||||||
|
# [3.2.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.7...v3.2.0-dev.8) (2023-12-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube:** Fix grammer mistakes in patch descriptions ([#2543](https://github.com/ReVanced/revanced-patches/issues/2543)) ([ebf5993](https://github.com/ReVanced/revanced-patches/commit/ebf599349c508067a28526267d82030b679df045))
|
||||||
|
|
||||||
|
# [3.2.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.6...v3.2.0-dev.7) (2023-12-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Hide ads:** Hide fullscreen ads ([bdc9a12](https://github.com/ReVanced/revanced-patches/commit/bdc9a129eff3a5051b8b37665b3243a8b61cbbac))
|
||||||
|
* **YouTube - Hide layout components:** Hide search result recommendations ([55cc7f1](https://github.com/ReVanced/revanced-patches/commit/55cc7f1c7722f56af6d33ea2bd09a1b99d635209))
|
||||||
|
|
||||||
|
# [3.2.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.5...v3.2.0-dev.6) (2023-12-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spoof SIM country:** Validate patch option value correctly ([8105463](https://github.com/ReVanced/revanced-patches/commit/81054637915a5399d15f546b2290b5d939e15732))
|
||||||
|
|
||||||
|
# [3.2.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.4...v3.2.0-dev.5) (2023-12-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Alternative thumbnails:** Clarify DeArrow support is for thumbnails ([#2531](https://github.com/ReVanced/revanced-patches/issues/2531)) ([828abb0](https://github.com/ReVanced/revanced-patches/commit/828abb0558926cd6557c79abcf1a04bfe2c719e6))
|
||||||
|
|
||||||
|
# [3.2.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.3...v3.2.0-dev.4) (2023-12-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Tiktok - Remember clear display:** Use correct name ([d7e44cb](https://github.com/ReVanced/revanced-patches/commit/d7e44cb887396bba27ee81c70c006f0cc247c56d))
|
||||||
|
|
||||||
|
# [3.2.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.2...v3.2.0-dev.3) (2023-12-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Tiktok:** Add `Remember clear mode` patch ([#2509](https://github.com/ReVanced/revanced-patches/issues/2509)) ([048bf59](https://github.com/ReVanced/revanced-patches/commit/048bf592ef93ee5138aa1886be1644501f88964a))
|
||||||
|
|
||||||
# [3.2.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.1...v3.2.0-dev.2) (2023-12-19)
|
# [3.2.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.2.0-dev.1...v3.2.0-dev.2) (2023-12-19)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -525,6 +525,7 @@ public final class app/revanced/patches/shared/fingerprints/HomeActivityFingerpr
|
|||||||
|
|
||||||
public abstract class app/revanced/patches/shared/integrations/AbstractIntegrationsPatch : app/revanced/patcher/patch/BytecodePatch {
|
public abstract class app/revanced/patches/shared/integrations/AbstractIntegrationsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public fun <init> (Ljava/lang/String;Ljava/util/Set;)V
|
public fun <init> (Ljava/lang/String;Ljava/util/Set;)V
|
||||||
|
public fun <init> (Ljava/util/Set;)V
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
}
|
}
|
||||||
@@ -616,13 +617,6 @@ public abstract class app/revanced/patches/shared/settings/preference/BaseResour
|
|||||||
public static synthetic fun serialize$default (Lapp/revanced/patches/shared/settings/preference/BaseResource;Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/w3c/dom/Element;
|
public static synthetic fun serialize$default (Lapp/revanced/patches/shared/settings/preference/BaseResource;Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class app/revanced/patches/shared/settings/preference/DefaultBasePreference : app/revanced/patches/shared/settings/preference/BasePreference {
|
|
||||||
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;Ljava/lang/Object;)V
|
|
||||||
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
||||||
public final fun getDefault ()Ljava/lang/Object;
|
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/settings/preference/SummaryType : java/lang/Enum {
|
public final class app/revanced/patches/shared/settings/preference/SummaryType : java/lang/Enum {
|
||||||
public static final field DEFAULT Lapp/revanced/patches/shared/settings/preference/SummaryType;
|
public static final field DEFAULT Lapp/revanced/patches/shared/settings/preference/SummaryType;
|
||||||
public static final field OFF Lapp/revanced/patches/shared/settings/preference/SummaryType;
|
public static final field OFF Lapp/revanced/patches/shared/settings/preference/SummaryType;
|
||||||
@@ -650,11 +644,9 @@ public final class app/revanced/patches/shared/settings/preference/impl/InputTyp
|
|||||||
public static fun values ()[Lapp/revanced/patches/shared/settings/preference/impl/InputType;
|
public static fun values ()[Lapp/revanced/patches/shared/settings/preference/impl/InputType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/settings/preference/impl/ListPreference : app/revanced/patches/shared/settings/preference/DefaultBasePreference {
|
public final class app/revanced/patches/shared/settings/preference/impl/ListPreference : app/revanced/patches/shared/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;)V
|
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getEntries ()Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;
|
|
||||||
public final fun getEntryValues ()Lapp/revanced/patches/shared/settings/preference/impl/ArrayResource;
|
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,18 +692,18 @@ public final class app/revanced/patches/shared/settings/preference/impl/StringRe
|
|||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/settings/preference/impl/SwitchPreference : app/revanced/patches/shared/settings/preference/DefaultBasePreference {
|
public final class app/revanced/patches/shared/settings/preference/impl/SwitchPreference : app/revanced/patches/shared/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Z)V
|
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getSummaryOff ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
|
public final fun getSummaryOff ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
|
||||||
public final fun getSummaryOn ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
|
public final fun getSummaryOn ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
|
||||||
public final fun getUserDialogMessage ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
|
public final fun getUserDialogMessage ()Lapp/revanced/patches/shared/settings/preference/impl/StringResource;
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/settings/preference/impl/TextPreference : app/revanced/patches/shared/settings/preference/DefaultBasePreference {
|
public final class app/revanced/patches/shared/settings/preference/impl/TextPreference : app/revanced/patches/shared/settings/preference/BasePreference {
|
||||||
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;Ljava/lang/String;)V
|
public fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/StringResource;Lapp/revanced/patches/shared/settings/preference/impl/InputType;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getInputType ()Lapp/revanced/patches/shared/settings/preference/impl/InputType;
|
public final fun getInputType ()Lapp/revanced/patches/shared/settings/preference/impl/InputType;
|
||||||
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
public fun serialize (Lorg/w3c/dom/Document;Lkotlin/jvm/functions/Function1;)Lorg/w3c/dom/Element;
|
||||||
}
|
}
|
||||||
@@ -818,6 +810,12 @@ public final class app/revanced/patches/tiktok/feedfilter/FeedFilterPatch : app/
|
|||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch;
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/downloads/DownloadsPatch;
|
public static final field INSTANCE Lapp/revanced/patches/tiktok/interaction/downloads/DownloadsPatch;
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
@@ -1082,6 +1080,12 @@ public final class app/revanced/patches/youtube/interaction/copyvideourl/CopyVid
|
|||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch;
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch;
|
public static final field INSTANCE Lapp/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch;
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import org.gradle.kotlin.dsl.support.listFilesOrdered
|
import org.gradle.kotlin.dsl.support.listFilesOrdered
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.21"
|
kotlin("jvm") version "1.9.22"
|
||||||
alias(libs.plugins.binary.compatibility.validator)
|
alias(libs.plugins.binary.compatibility.validator)
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 3.2.0-dev.2
|
version = 4.0.0-dev.1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[versions]
|
[versions]
|
||||||
revanced-patcher = "19.1.0"
|
revanced-patcher = "19.1.0"
|
||||||
smali = "3.0.3"
|
smali = "3.0.3"
|
||||||
guava = "32.1.3-jre"
|
guava = "33.0.0-jre"
|
||||||
gson = "2.10.1"
|
gson = "2.10.1"
|
||||||
binary-compatibility-validator = "0.13.2"
|
binary-compatibility-validator = "0.13.2"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -18,7 +18,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/integrations/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
override fun filterMap(
|
override fun filterMap(
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
object RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
"Lapp/revanced/integrations/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
enum class MethodCall(
|
enum class MethodCall(
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
"Lapp/revanced/integrations/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package app.revanced.patches.all.telephony.sim.spoof
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.patch.options.PatchOption
|
|
||||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||||
@@ -25,26 +24,29 @@ import java.util.*
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofSimCountryPatch : AbstractTransformInstructionsPatch<Pair<Int, String>>() {
|
object SpoofSimCountryPatch : AbstractTransformInstructionsPatch<Pair<Int, String>>() {
|
||||||
private val isoValidator: PatchOption<String>.(String?) -> Boolean =
|
private val countries = Locale.getISOCountries().associateBy { Locale("", it).displayCountry }
|
||||||
{ it: String? -> it?.uppercase() in Locale.getISOCountries() || it == null }
|
|
||||||
|
|
||||||
private val networkCountryIso by stringPatchOption(
|
private val networkCountryIso by isoCountryPatchOption(
|
||||||
"networkCountryIso",
|
"networkCountryIso",
|
||||||
null,
|
|
||||||
null,
|
|
||||||
"Network ISO Country Code",
|
"Network ISO Country Code",
|
||||||
"ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) " +
|
|
||||||
"of the current registered operator or the cell nearby.",
|
|
||||||
validator = isoValidator
|
|
||||||
)
|
)
|
||||||
|
|
||||||
private val simCountryIso by stringPatchOption(
|
private val simCountryIso by isoCountryPatchOption(
|
||||||
"simCountryIso",
|
"simCountryIso",
|
||||||
null,
|
|
||||||
null,
|
|
||||||
"Sim ISO Country Code",
|
"Sim ISO Country Code",
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun isoCountryPatchOption(
|
||||||
|
key: String,
|
||||||
|
title: String,
|
||||||
|
) = stringPatchOption(
|
||||||
|
key,
|
||||||
|
null,
|
||||||
|
countries,
|
||||||
|
title,
|
||||||
"ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code.",
|
"ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code.",
|
||||||
validator = isoValidator
|
false,
|
||||||
|
validator = { it: String? -> it == null || it.uppercase() in countries.values }
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun filterMap(
|
override fun filterMap(
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import app.revanced.util.returnEarly
|
|||||||
@Patch(
|
@Patch(
|
||||||
name = "Remove root detection",
|
name = "Remove root detection",
|
||||||
description = "Removes the check for root permissions and unlocked bootloader.",
|
description = "Removes the check for root permissions and unlocked bootloader.",
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
|
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RootDetectionPatch : BytecodePatch(
|
object RootDetectionPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSign
|
|||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof signature",
|
name = "Spoof signature",
|
||||||
description = "Spoofs the signature of the app.",
|
description = "Spoofs the signature of the app.",
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
|
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofSignaturePatch : BytecodePatch(
|
object SpoofSignaturePatch : BytecodePatch(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HideAdsPatch : BytecodePatch(setOf(AdPostFingerprint, NewAdPostFingerprint)) {
|
object HideAdsPatch : BytecodePatch(setOf(AdPostFingerprint, NewAdPostFingerprint)) {
|
||||||
private const val FILTER_METHOD_DESCRIPTOR =
|
private const val FILTER_METHOD_DESCRIPTOR =
|
||||||
"Lapp/revanced/reddit/patches/FilterPromotedLinksPatch;" +
|
"Lapp/revanced/integrations/reddit/patches/FilterPromotedLinksPatch;" +
|
||||||
"->filterChildren(Ljava/lang/Iterable;)Ljava/util/List;"
|
"->filterChildren(Ljava/lang/Iterable;)Ljava/util/List;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|||||||
@@ -11,9 +11,27 @@ import com.android.tools.smali.dexlib2.iface.ClassDef
|
|||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
|
||||||
abstract class AbstractIntegrationsPatch(
|
abstract class AbstractIntegrationsPatch(
|
||||||
private val integrationsDescriptor: String,
|
|
||||||
private val hooks: Set<IntegrationsFingerprint>
|
private val hooks: Set<IntegrationsFingerprint>
|
||||||
) : BytecodePatch(hooks) {
|
) : BytecodePatch(hooks) {
|
||||||
|
|
||||||
|
@Deprecated(
|
||||||
|
"Use the constructor without the integrationsDescriptor parameter",
|
||||||
|
ReplaceWith("AbstractIntegrationsPatch(hooks)")
|
||||||
|
)
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
|
constructor(
|
||||||
|
integrationsDescriptor: String,
|
||||||
|
hooks: Set<IntegrationsFingerprint>
|
||||||
|
) : this(hooks)
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
if (context.findClass(INTEGRATIONS_CLASS_DESCRIPTOR) == null) throw PatchException(
|
||||||
|
"Integrations have not been merged yet. This patch can not succeed without merging the integrations."
|
||||||
|
)
|
||||||
|
|
||||||
|
for (hook in hooks) hook.invoke(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [MethodFingerprint] for integrations.
|
* [MethodFingerprint] for integrations.
|
||||||
*
|
*
|
||||||
@@ -53,11 +71,7 @@ abstract class AbstractIntegrationsPatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
private companion object {
|
||||||
if (context.findClass(integrationsDescriptor) == null) throw PatchException(
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/shared/Utils;"
|
||||||
"Integrations have not been merged yet. This patch can not succeed without merging the integrations."
|
|
||||||
)
|
|
||||||
|
|
||||||
for (hook in hooks) hook.invoke(integrationsDescriptor)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ import com.android.tools.smali.dexlib2.immutable.reference.ImmutableStringRefere
|
|||||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A patch that allows Google apps to run without root and under a different package name
|
* A patch that allows patched Google apps to run without root and under a different package name
|
||||||
* by using GmsCore instead of Google Play Services.
|
* by using GmsCore instead of Google Play Services.
|
||||||
*
|
*
|
||||||
* @param fromPackageName The package name of the original app.
|
* @param fromPackageName The package name of the original app.
|
||||||
@@ -47,7 +47,7 @@ abstract class AbstractGmsCoreSupportPatch(
|
|||||||
fingerprints: Set<MethodFingerprint> = emptySet(),
|
fingerprints: Set<MethodFingerprint> = emptySet(),
|
||||||
) : BytecodePatch(
|
) : BytecodePatch(
|
||||||
name = "GmsCore support",
|
name = "GmsCore support",
|
||||||
description = "Allows Google apps to run without root and under a different package name " +
|
description = "Allows patched Google apps to run without root and under a different package name " +
|
||||||
"by using GmsCore instead of Google Play Services.",
|
"by using GmsCore instead of Google Play Services.",
|
||||||
dependencies = setOf(ChangePackageNamePatch::class, abstractGmsCoreSupportResourcePatch::class) + dependencies,
|
dependencies = setOf(ChangePackageNamePatch::class, abstractGmsCoreSupportResourcePatch::class) + dependencies,
|
||||||
compatiblePackages = compatiblePackages,
|
compatiblePackages = compatiblePackages,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import app.revanced.patches.shared.settings.preference.impl.ArrayResource
|
|||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
import app.revanced.util.ResourceGroup
|
import app.revanced.util.ResourceGroup
|
||||||
import app.revanced.util.copyResources
|
import app.revanced.util.copyResources
|
||||||
|
import app.revanced.util.mergeStrings
|
||||||
import org.w3c.dom.Node
|
import org.w3c.dom.Node
|
||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
|
|
||||||
@@ -37,6 +38,8 @@ abstract class AbstractSettingsResourcePatch(
|
|||||||
stringsEditor = context.xmlEditor["res/values/strings.xml"]
|
stringsEditor = context.xmlEditor["res/values/strings.xml"]
|
||||||
arraysEditor = context.xmlEditor["res/values/arrays.xml"]
|
arraysEditor = context.xmlEditor["res/values/arrays.xml"]
|
||||||
revancedPreferencesEditor = context.xmlEditor["res/xml/$preferenceFileName.xml"]
|
revancedPreferencesEditor = context.xmlEditor["res/xml/$preferenceFileName.xml"]
|
||||||
|
|
||||||
|
context.mergeStrings("settings/host/values/strings.xml")
|
||||||
}
|
}
|
||||||
|
|
||||||
internal companion object {
|
internal companion object {
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
package app.revanced.patches.shared.settings.preference
|
|
||||||
|
|
||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
|
||||||
import org.w3c.dom.Document
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Base preference class that also has a default value.
|
|
||||||
*
|
|
||||||
* @param key The key of the preference.
|
|
||||||
* @param title The title of the preference.
|
|
||||||
* @param tag The tag of the preference.
|
|
||||||
* @param summary The summary of the preference.
|
|
||||||
* @param default The default value of the preference.
|
|
||||||
*/
|
|
||||||
abstract class DefaultBasePreference<T>(
|
|
||||||
key: String?,
|
|
||||||
title: StringResource,
|
|
||||||
summary: StringResource? = null,
|
|
||||||
tag: String,
|
|
||||||
val default: T? = null,
|
|
||||||
) : BasePreference(key, title, summary, tag) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serialize preference element to XML.
|
|
||||||
* Overriding methods should invoke super and operate on its return value.
|
|
||||||
* @param ownerDocument Target document to create elements from.
|
|
||||||
* @param resourceCallback Called when a resource has been processed.
|
|
||||||
* @return The serialized element.
|
|
||||||
*/
|
|
||||||
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
|
|
||||||
super.serialize(ownerDocument, resourceCallback).apply { addDefault(default) }
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.shared.settings.preference.impl
|
package app.revanced.patches.shared.settings.preference.impl
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.settings.preference.BasePreference
|
||||||
import app.revanced.patches.shared.settings.preference.BaseResource
|
import app.revanced.patches.shared.settings.preference.BaseResource
|
||||||
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
|
|
||||||
import app.revanced.patches.shared.settings.preference.addSummary
|
import app.revanced.patches.shared.settings.preference.addSummary
|
||||||
import org.w3c.dom.Document
|
import org.w3c.dom.Document
|
||||||
|
|
||||||
@@ -13,16 +13,14 @@ import org.w3c.dom.Document
|
|||||||
* @param entries The human-readable entries of the list preference.
|
* @param entries The human-readable entries of the list preference.
|
||||||
* @param entryValues The entry values of the list preference.
|
* @param entryValues The entry values of the list preference.
|
||||||
* @param summary The summary of the list preference.
|
* @param summary The summary of the list preference.
|
||||||
* @param default The default entry value of the list preference.
|
|
||||||
*/
|
*/
|
||||||
class ListPreference(
|
class ListPreference(
|
||||||
key: String,
|
key: String,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
val entries: ArrayResource,
|
private val entries: ArrayResource,
|
||||||
val entryValues: ArrayResource,
|
private val entryValues: ArrayResource,
|
||||||
summary: StringResource? = null,
|
summary: StringResource? = null
|
||||||
default: String? = null,
|
) : BasePreference(key, title, summary, "ListPreference") {
|
||||||
) : DefaultBasePreference<String>(key, title, summary, "ListPreference", default) {
|
|
||||||
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
|
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
|
||||||
super.serialize(ownerDocument, resourceCallback).apply {
|
super.serialize(ownerDocument, resourceCallback).apply {
|
||||||
setAttribute("android:entries", "@array/${entries.also { resourceCallback.invoke(it) }.name}")
|
setAttribute("android:entries", "@array/${entries.also { resourceCallback.invoke(it) }.name}")
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package app.revanced.patches.shared.settings.preference.impl
|
package app.revanced.patches.shared.settings.preference.impl
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.settings.AbstractSettingsResourcePatch.Companion.include
|
||||||
|
import app.revanced.patches.shared.settings.preference.BasePreference
|
||||||
import app.revanced.patches.shared.settings.preference.BaseResource
|
import app.revanced.patches.shared.settings.preference.BaseResource
|
||||||
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
|
|
||||||
import app.revanced.patches.shared.settings.preference.SummaryType
|
import app.revanced.patches.shared.settings.preference.SummaryType
|
||||||
import app.revanced.patches.shared.settings.preference.addSummary
|
import app.revanced.patches.shared.settings.preference.addSummary
|
||||||
import app.revanced.patches.shared.settings.AbstractSettingsResourcePatch.Companion.include
|
|
||||||
import org.w3c.dom.Document
|
import org.w3c.dom.Document
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
@@ -16,15 +16,13 @@ import org.w3c.dom.Element
|
|||||||
* @param summaryOn The summary to show when the preference is enabled.
|
* @param summaryOn The summary to show when the preference is enabled.
|
||||||
* @param summaryOff The summary to show when the preference is disabled.
|
* @param summaryOff The summary to show when the preference is disabled.
|
||||||
* @param userDialogMessage The message to show in a dialog when the user toggles the preference.
|
* @param userDialogMessage The message to show in a dialog when the user toggles the preference.
|
||||||
* @param default The default value of the switch.
|
|
||||||
*/
|
*/
|
||||||
class SwitchPreference(
|
class SwitchPreference(
|
||||||
key: String, title: StringResource,
|
key: String, title: StringResource,
|
||||||
val summaryOn: StringResource,
|
val summaryOn: StringResource,
|
||||||
val summaryOff: StringResource,
|
val summaryOff: StringResource,
|
||||||
val userDialogMessage: StringResource? = null,
|
val userDialogMessage: StringResource? = null,
|
||||||
default: Boolean = false,
|
) : BasePreference(key, title, null, "SwitchPreference") {
|
||||||
) : DefaultBasePreference<Boolean>( key, title, null, "SwitchPreference", default) {
|
|
||||||
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit): Element {
|
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit): Element {
|
||||||
userDialogMessage?.include()
|
userDialogMessage?.include()
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.shared.settings.preference.impl
|
package app.revanced.patches.shared.settings.preference.impl
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.settings.preference.BasePreference
|
||||||
import app.revanced.patches.shared.settings.preference.BaseResource
|
import app.revanced.patches.shared.settings.preference.BaseResource
|
||||||
import app.revanced.patches.shared.settings.preference.DefaultBasePreference
|
|
||||||
import org.w3c.dom.Document
|
import org.w3c.dom.Document
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,16 +11,14 @@ import org.w3c.dom.Document
|
|||||||
* @param title The title of the text preference.
|
* @param title The title of the text preference.
|
||||||
* @param inputType The input type of the text preference.
|
* @param inputType The input type of the text preference.
|
||||||
* @param summary The summary of the text preference.
|
* @param summary The summary of the text preference.
|
||||||
* @param default The default value of the text preference.
|
|
||||||
*/
|
*/
|
||||||
class TextPreference(
|
class TextPreference(
|
||||||
key: String?,
|
key: String?,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
summary: StringResource?,
|
summary: StringResource?,
|
||||||
val inputType: InputType = InputType.TEXT,
|
val inputType: InputType = InputType.TEXT,
|
||||||
default: String? = null,
|
tag: String = "app.revanced.integrations.shared.settings.preference.ResettableEditTextPreference"
|
||||||
tag: String = "app.revanced.integrations.settingsmenu.ResettableEditTextPreference"
|
) : BasePreference(key, title, summary, tag) {
|
||||||
) : DefaultBasePreference<String>(key, title, summary, tag, default) {
|
|
||||||
|
|
||||||
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
|
override fun serialize(ownerDocument: Document, resourceCallback: (BaseResource) -> Unit) =
|
||||||
super.serialize(ownerDocument, resourceCallback).apply {
|
super.serialize(ownerDocument, resourceCallback).apply {
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ object FeedFilterPatch : BytecodePatch(
|
|||||||
addInstruction(
|
addInstruction(
|
||||||
returnFeedItemInstruction.location.index,
|
returnFeedItemInstruction.location.index,
|
||||||
"invoke-static { v$feedItemsRegister }, " +
|
"invoke-static { v$feedItemsRegister }, " +
|
||||||
"Lapp/revanced/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V"
|
"Lapp/revanced/integrations/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V"
|
||||||
)
|
)
|
||||||
} ?: throw FeedApiServiceLIZFingerprint.exception
|
} ?: throw FeedApiServiceLIZFingerprint.exception
|
||||||
|
|
||||||
SettingsStatusLoadFingerprint.result?.mutableMethod?.addInstruction(
|
SettingsStatusLoadFingerprint.result?.mutableMethod?.addInstruction(
|
||||||
0,
|
0,
|
||||||
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableFeedFilter()V"
|
"invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableFeedFilter()V"
|
||||||
) ?: throw SettingsStatusLoadFingerprint.exception
|
) ?: throw SettingsStatusLoadFingerprint.exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.cleardisplay
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
|
import app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints.OnClearDisplayEventFingerprint
|
||||||
|
import app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints.OnRenderFirstFrameFingerprint
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.util.indexOfFirstInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remember clear display",
|
||||||
|
description = "Remembers the clear display configurations in between videos.",
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]),
|
||||||
|
CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RememberClearDisplayPatch : BytecodePatch(
|
||||||
|
setOf(
|
||||||
|
OnClearDisplayEventFingerprint,
|
||||||
|
OnRenderFirstFrameFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
OnClearDisplayEventFingerprint.result?.mutableMethod?.let {
|
||||||
|
// region Hook the "Clear display" configuration save event to remember the state of clear display.
|
||||||
|
|
||||||
|
val isEnabledIndex = it.indexOfFirstInstruction { opcode == Opcode.IGET_BOOLEAN } + 1
|
||||||
|
val isEnabledRegister = it.getInstruction<Instruction22c>(isEnabledIndex - 1).registerA
|
||||||
|
|
||||||
|
it.addInstructions(
|
||||||
|
isEnabledIndex,
|
||||||
|
"invoke-static { v$isEnabledRegister }, " +
|
||||||
|
"Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->rememberClearDisplayState(Z)V"
|
||||||
|
)
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
|
||||||
|
// region Override the "Clear display" configuration load event to load the state of clear display.
|
||||||
|
|
||||||
|
val clearDisplayEventClass = it.parameters[0].type
|
||||||
|
OnRenderFirstFrameFingerprint.result?.mutableMethod?.apply {
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
# Create a new clearDisplayEvent and post it to the EventBus (https://github.com/greenrobot/EventBus)
|
||||||
|
|
||||||
|
# The state of clear display.
|
||||||
|
invoke-static { }, Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->getClearDisplayState()Z
|
||||||
|
move-result v3
|
||||||
|
if-eqz v3, :clear_display_disabled
|
||||||
|
|
||||||
|
# Clear display type such as 0 = LONG_PRESS, 1 = SCREEN_RECORD etc.
|
||||||
|
const/4 v1, 0x0
|
||||||
|
|
||||||
|
# Name of the clear display type which is equivalent to the clear display type.
|
||||||
|
const-string v2, "long_press"
|
||||||
|
|
||||||
|
new-instance v0, $clearDisplayEventClass
|
||||||
|
invoke-direct { v0, v1, v2, v3 }, $clearDisplayEventClass-><init>(ILjava/lang/String;Z)V
|
||||||
|
invoke-virtual { v0 }, $clearDisplayEventClass->post()Lcom/ss/android/ugc/governance/eventbus/IEvent;
|
||||||
|
""",
|
||||||
|
ExternalLabel("clear_display_disabled", getInstruction(0))
|
||||||
|
)
|
||||||
|
} ?: throw OnRenderFirstFrameFingerprint.exception
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
} ?: throw OnClearDisplayEventFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object OnClearDisplayEventFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
// Internally the feature is called "Clear mode".
|
||||||
|
methodDef.definingClass.endsWith("/ClearModePanelComponent;") && methodDef.name == "onClearModeEvent"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object OnRenderFirstFrameFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onRenderFirstFrame"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -69,7 +69,7 @@ object DownloadsPatch : BytecodePatch(
|
|||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/tiktok/download/DownloadsPatch;->shouldRemoveWatermark()Z
|
invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->shouldRemoveWatermark()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :noremovewatermark
|
if-eqz v0, :noremovewatermark
|
||||||
const/4 v0, 0x1
|
const/4 v0, 0x1
|
||||||
@@ -99,7 +99,7 @@ object DownloadsPatch : BytecodePatch(
|
|||||||
downloadUriMethod.addInstructions(
|
downloadUriMethod.addInstructions(
|
||||||
secondIndex,
|
secondIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
|
invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
|
||||||
move-result-object v0
|
move-result-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -107,7 +107,7 @@ object DownloadsPatch : BytecodePatch(
|
|||||||
downloadUriMethod.addInstructions(
|
downloadUriMethod.addInstructions(
|
||||||
firstIndex,
|
firstIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
|
invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String;
|
||||||
move-result-object v0
|
move-result-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -115,7 +115,7 @@ object DownloadsPatch : BytecodePatch(
|
|||||||
SettingsStatusLoadFingerprint to {
|
SettingsStatusLoadFingerprint to {
|
||||||
addInstruction(
|
addInstruction(
|
||||||
0,
|
0,
|
||||||
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableDownload()V"
|
"invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableDownload()V"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
).forEach { (fingerprint, patch) ->
|
).forEach { (fingerprint, patch) ->
|
||||||
|
|||||||
@@ -6,6 +6,5 @@ import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprin
|
|||||||
|
|
||||||
@Patch(requiresIntegrations = true)
|
@Patch(requiresIntegrations = true)
|
||||||
object IntegrationsPatch : AbstractIntegrationsPatch(
|
object IntegrationsPatch : AbstractIntegrationsPatch(
|
||||||
"Lapp/revanced/tiktok/utils/ReVancedUtils;",
|
|
||||||
setOf(InitFingerprint)
|
setOf(InitFingerprint)
|
||||||
)
|
)
|
||||||
@@ -37,10 +37,10 @@ object SettingsPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/tiktok/settingsmenu/SettingsMenu;"
|
"Lapp/revanced/integrations/tiktok/settings/AdPersonalizationActivityHook;"
|
||||||
|
|
||||||
private const val INITIALIZE_SETTINGS_METHOD_DESCRIPTOR =
|
private const val INITIALIZE_SETTINGS_METHOD_DESCRIPTOR =
|
||||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->initializeSettings(" +
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->initialize(" +
|
||||||
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;" +
|
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;" +
|
||||||
")Z"
|
")Z"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
|
|
||||||
internal object SettingsStatusLoadFingerprint : MethodFingerprint(
|
internal object SettingsStatusLoadFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
|
methodDef.definingClass.endsWith("Lapp/revanced/integrations/tiktok/settings/SettingsStatus;") &&
|
||||||
methodDef.name == "load"
|
methodDef.name == "load"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -85,7 +85,7 @@ object SpoofSimPatch : BytecodePatch() {
|
|||||||
with(SettingsStatusLoadFingerprint.result!!.mutableMethod) {
|
with(SettingsStatusLoadFingerprint.result!!.mutableMethod) {
|
||||||
addInstruction(
|
addInstruction(
|
||||||
0,
|
0,
|
||||||
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableSimSpoof()V"
|
"invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableSimSpoof()V"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ object SpoofSimPatch : BytecodePatch() {
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
index + 2,
|
index + 2,
|
||||||
"""
|
"""
|
||||||
invoke-static {v$resultReg}, Lapp/revanced/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
|
invoke-static {v$resultReg}, Lapp/revanced/integrations/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
|
||||||
move-result-object v$resultReg
|
move-result-object v$resultReg
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
object ShowOnLockscreenPatch : BytecodePatch(
|
object ShowOnLockscreenPatch : BytecodePatch(
|
||||||
setOf(BrightnessFingerprint)
|
setOf(BrightnessFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/tudortmund/lockscreen/ShowOnLockscreenPatch;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/tudortmund/lockscreen/ShowOnLockscreenPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
BrightnessFingerprint.result?.mutableMethod?.apply {
|
BrightnessFingerprint.result?.mutableMethod?.apply {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ object TimelineFilterPatch : BytecodePatch(
|
|||||||
fingerprint.result?.mutableMethod?.addInstructions(
|
fingerprint.result?.mutableMethod?.addInstructions(
|
||||||
0,
|
0,
|
||||||
"invoke-static {p$timelineObjectsRegister}, " +
|
"invoke-static {p$timelineObjectsRegister}, " +
|
||||||
"Lapp/revanced/tumblr/patches/TimelineFilterPatch;->" +
|
"Lapp/revanced/integrations/tumblr/patches/TimelineFilterPatch;->" +
|
||||||
"filterTimeline(Ljava/util/List;)V"
|
"filterTimeline(Ljava/util/List;)V"
|
||||||
) ?: throw fingerprint.exception
|
) ?: throw fingerprint.exception
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ object AudioAdsPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructionsWithLabels(
|
mutableMethod.addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/twitch/patches/AudioAdsPatch;->shouldBlockAudioAds()Z
|
invoke-static { }, Lapp/revanced/integrations/twitch/patches/AudioAdsPatch;->shouldBlockAudioAds()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :show_audio_ads
|
if-eqz v0, :show_audio_ads
|
||||||
return-void
|
return-void
|
||||||
@@ -52,8 +52,7 @@ object AudioAdsPatch : BytecodePatch(
|
|||||||
StringResource(
|
StringResource(
|
||||||
"revanced_block_audio_ads_off",
|
"revanced_block_audio_ads_off",
|
||||||
"Audio ads are unblocked"
|
"Audio ads are unblocked"
|
||||||
),
|
)
|
||||||
default = true,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ object EmbeddedAdsPatch : BytecodePatch(
|
|||||||
result.mutableMethod.addInstructions(
|
result.mutableMethod.addInstructions(
|
||||||
3,
|
3,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/twitch/patches/EmbeddedAdsPatch;->createRequestInterceptor()Lapp/revanced/twitch/api/RequestInterceptor;
|
invoke-static {}, Lapp/revanced/integrations/twitch/patches/EmbeddedAdsPatch;->createRequestInterceptor()Lapp/revanced/integrations/twitch/api/RequestInterceptor;
|
||||||
move-result-object v2
|
move-result-object v2
|
||||||
invoke-virtual {v0, v2}, Lokhttp3/OkHttpClient${"$"}Builder;->addInterceptor(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient${"$"}Builder;
|
invoke-virtual {v0, v2}, Lokhttp3/OkHttpClient${"$"}Builder;->addInterceptor(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient${"$"}Builder;
|
||||||
"""
|
"""
|
||||||
@@ -59,8 +59,7 @@ object EmbeddedAdsPatch : BytecodePatch(
|
|||||||
StringResource("key_revanced_proxy_luminous", "luminous"),
|
StringResource("key_revanced_proxy_luminous", "luminous"),
|
||||||
StringResource("key_revanced_proxy_purpleadblock", "purpleadblock")
|
StringResource("key_revanced_proxy_purpleadblock", "purpleadblock")
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
default = "luminous"
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import app.revanced.patches.twitch.misc.settings.SettingsPatch
|
|||||||
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
|
compatiblePackages = [CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])]
|
||||||
)
|
)
|
||||||
object VideoAdsPatch : AbstractAdPatch(
|
object VideoAdsPatch : AbstractAdPatch(
|
||||||
"Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",
|
"Lapp/revanced/integrations/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",
|
||||||
"show_video_ads",
|
"show_video_ads",
|
||||||
setOf(
|
setOf(
|
||||||
ContentConfigShowAdsFingerprint,
|
ContentConfigShowAdsFingerprint,
|
||||||
@@ -135,8 +135,7 @@ object VideoAdsPatch : AbstractAdPatch(
|
|||||||
StringResource(
|
StringResource(
|
||||||
"revanced_block_video_ads_off",
|
"revanced_block_video_ads_off",
|
||||||
"Video ads are unblocked"
|
"Video ads are unblocked"
|
||||||
),
|
)
|
||||||
default = true
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ object ShowDeletedMessagesPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private fun createSpoilerConditionInstructions(register: String = "v0") = """
|
private fun createSpoilerConditionInstructions(register: String = "v0") = """
|
||||||
invoke-static {}, Lapp/revanced/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
|
invoke-static {}, Lapp/revanced/integrations/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
|
||||||
move-result $register
|
move-result $register
|
||||||
if-eqz $register, :no_spoiler
|
if-eqz $register, :no_spoiler
|
||||||
"""
|
"""
|
||||||
@@ -61,7 +61,7 @@ object ShowDeletedMessagesPatch : BytecodePatch(
|
|||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {p2}, Lapp/revanced/twitch/patches/ShowDeletedMessagesPatch;->reformatDeletedMessage(Landroid/text/Spanned;)Landroid/text/Spanned;
|
invoke-static {p2}, Lapp/revanced/integrations/twitch/patches/ShowDeletedMessagesPatch;->reformatDeletedMessage(Landroid/text/Spanned;)Landroid/text/Spanned;
|
||||||
move-result-object v0
|
move-result-object v0
|
||||||
if-eqz v0, :no_reformat
|
if-eqz v0, :no_reformat
|
||||||
return-object v0
|
return-object v0
|
||||||
@@ -92,8 +92,7 @@ object ShowDeletedMessagesPatch : BytecodePatch(
|
|||||||
StringResource("key_revanced_deleted_messages_spoiler", "spoiler"),
|
StringResource("key_revanced_deleted_messages_spoiler", "spoiler"),
|
||||||
StringResource("key_revanced_deleted_messages_cross_out", "cross-out")
|
StringResource("key_revanced_deleted_messages_cross_out", "cross-out")
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
default = "cross-out"
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ object AutoClaimChannelPointPatch : BytecodePatch(
|
|||||||
StringResource(
|
StringResource(
|
||||||
"revanced_auto_claim_channel_points_off",
|
"revanced_auto_claim_channel_points_off",
|
||||||
"Channel Points are not claimed automatically"
|
"Channel Points are not claimed automatically"
|
||||||
),
|
)
|
||||||
default = true
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -48,7 +47,7 @@ object AutoClaimChannelPointPatch : BytecodePatch(
|
|||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
lastIndex, // place in front of return-void
|
lastIndex, // place in front of return-void
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/twitch/patches/AutoClaimChannelPointsPatch;->shouldAutoClaim()Z
|
invoke-static {}, Lapp/revanced/integrations/twitch/patches/AutoClaimChannelPointsPatch;->shouldAutoClaim()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :auto_claim
|
if-eqz v0, :auto_claim
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ object DebugModePatch : BytecodePatch(
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
|
invoke-static {}, Lapp/revanced/integrations/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
@@ -49,20 +49,19 @@ object DebugModePatch : BytecodePatch(
|
|||||||
|
|
||||||
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
|
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_debug_mode",
|
"revanced_twitch_debug_mode",
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_debug_mode_enable",
|
"revanced_twitch_debug_mode_title",
|
||||||
"Enable debug mode"
|
"Enable Twitch debug mode"
|
||||||
),
|
),
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_debug_mode_on",
|
"revanced_twitch_debug_mode_summary_on",
|
||||||
"Debug mode is enabled (not recommended)"
|
"Twitch debug mode is enabled (not recommended)"
|
||||||
),
|
),
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_debug_mode_off",
|
"revanced_twitch_debug_mode_summary_off",
|
||||||
"Debug mode is disabled"
|
"Twitch debug mode is disabled"
|
||||||
),
|
)
|
||||||
default = false,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,5 @@ import app.revanced.patches.twitch.misc.integrations.fingerprints.InitFingerprin
|
|||||||
|
|
||||||
@Patch(requiresIntegrations = true)
|
@Patch(requiresIntegrations = true)
|
||||||
object IntegrationsPatch : AbstractIntegrationsPatch(
|
object IntegrationsPatch : AbstractIntegrationsPatch(
|
||||||
"Lapp/revanced/twitch/utils/ReVancedUtils;",
|
|
||||||
setOf(InitFingerprint)
|
setOf(InitFingerprint)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.patches.twitch.misc.settings
|
package app.revanced.patches.twitch.misc.settings
|
||||||
|
|
||||||
import app.revanced.util.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
@@ -14,12 +13,14 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMut
|
|||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
|
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
|
||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
|
import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
|
||||||
import app.revanced.patches.twitch.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.twitch.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsOnClickFingerprint
|
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsOnClickFingerprint
|
||||||
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsUpdatedFingerprint
|
import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsUpdatedFingerprint
|
||||||
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsActivityOnCreateFingerprint
|
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsActivityOnCreateFingerprint
|
||||||
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsMenuItemEnumFingerprint
|
import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsMenuItemEnumFingerprint
|
||||||
|
import app.revanced.util.exception
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.immutable.ImmutableField
|
import com.android.tools.smali.dexlib2.immutable.ImmutableField
|
||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
@@ -46,12 +47,12 @@ object SettingsPatch : BytecodePatch(
|
|||||||
private const val REVANCED_SETTINGS_MENU_ITEM_TITLE_RES = "revanced_settings"
|
private const val REVANCED_SETTINGS_MENU_ITEM_TITLE_RES = "revanced_settings"
|
||||||
private const val REVANCED_SETTINGS_MENU_ITEM_ICON_RES = "ic_settings"
|
private const val REVANCED_SETTINGS_MENU_ITEM_ICON_RES = "ic_settings"
|
||||||
|
|
||||||
private const val MENU_ITEM_ENUM_CLASS = "Ltv/twitch/android/feature/settings/menu/SettingsMenuItem;"
|
private const val MENU_ITEM_ENUM_CLASS_DESCRIPTOR = "Ltv/twitch/android/feature/settings/menu/SettingsMenuItem;"
|
||||||
private const val MENU_DISMISS_EVENT_CLASS = "Ltv/twitch/android/feature/settings/menu/SettingsMenuViewDelegate\$Event\$OnDismissClicked;"
|
private const val MENU_DISMISS_EVENT_CLASS_DESCRIPTOR = "Ltv/twitch/android/feature/settings/menu/SettingsMenuViewDelegate\$Event\$OnDismissClicked;"
|
||||||
|
|
||||||
private const val INTEGRATIONS_PACKAGE = "app/revanced/twitch"
|
private const val INTEGRATIONS_PACKAGE = "app/revanced/integrations/twitch"
|
||||||
private const val SETTINGS_HOOKS_CLASS = "L$INTEGRATIONS_PACKAGE/settingsmenu/SettingsHooks;"
|
private const val ACTIVITY_HOOKS_CLASS_DESCRIPTOR = "L$INTEGRATIONS_PACKAGE/settings/AppCompatActivityHook;"
|
||||||
private const val REVANCED_UTILS_CLASS = "L$INTEGRATIONS_PACKAGE/utils/ReVancedUtils;"
|
private const val UTILS_CLASS_DESCRIPTOR = "L$INTEGRATIONS_PACKAGE/Utils;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// Hook onCreate to handle fragment creation
|
// Hook onCreate to handle fragment creation
|
||||||
@@ -60,7 +61,7 @@ object SettingsPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructionsWithLabels(
|
mutableMethod.addInstructionsWithLabels(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {p0}, $SETTINGS_HOOKS_CLASS->handleSettingsCreation(Landroidx/appcompat/app/AppCompatActivity;)Z
|
invoke-static {p0}, $ACTIVITY_HOOKS_CLASS_DESCRIPTOR->handleSettingsCreation(Landroidx/appcompat/app/AppCompatActivity;)Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :no_rv_settings_init
|
if-eqz v0, :no_rv_settings_init
|
||||||
return-void
|
return-void
|
||||||
@@ -84,8 +85,8 @@ object SettingsPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
sget-object v0, $MENU_ITEM_ENUM_CLASS->$REVANCED_SETTINGS_MENU_ITEM_NAME:$MENU_ITEM_ENUM_CLASS
|
sget-object v0, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR->$REVANCED_SETTINGS_MENU_ITEM_NAME:$MENU_ITEM_ENUM_CLASS_DESCRIPTOR
|
||||||
invoke-static {p1, v0}, $SETTINGS_HOOKS_CLASS->handleSettingMenuCreation(Ljava/util/List;Ljava/lang/Object;)Ljava/util/List;
|
invoke-static {p1, v0}, $ACTIVITY_HOOKS_CLASS_DESCRIPTOR->handleSettingMenuCreation(Ljava/util/List;Ljava/lang/Object;)Ljava/util/List;
|
||||||
move-result-object p1
|
move-result-object p1
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -97,10 +98,10 @@ object SettingsPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructionsWithLabels(
|
mutableMethod.addInstructionsWithLabels(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {p1}, $SETTINGS_HOOKS_CLASS->handleSettingMenuOnClick(Ljava/lang/Enum;)Z
|
invoke-static {p1}, $ACTIVITY_HOOKS_CLASS_DESCRIPTOR->handleSettingMenuOnClick(Ljava/lang/Enum;)Z
|
||||||
move-result p2
|
move-result p2
|
||||||
if-eqz p2, :no_rv_settings_onclick
|
if-eqz p2, :no_rv_settings_onclick
|
||||||
sget-object p1, $MENU_DISMISS_EVENT_CLASS->INSTANCE:$MENU_DISMISS_EVENT_CLASS
|
sget-object p1, $MENU_DISMISS_EVENT_CLASS_DESCRIPTOR->INSTANCE:$MENU_DISMISS_EVENT_CLASS_DESCRIPTOR
|
||||||
invoke-virtual {p0, p1}, Ltv/twitch/android/core/mvp/viewdelegate/RxViewDelegate;->pushEvent(Ltv/twitch/android/core/mvp/viewdelegate/ViewDelegateEvent;)V
|
invoke-virtual {p0, p1}, Ltv/twitch/android/core/mvp/viewdelegate/RxViewDelegate;->pushEvent(Ltv/twitch/android/core/mvp/viewdelegate/ViewDelegateEvent;)V
|
||||||
return-void
|
return-void
|
||||||
""",
|
""",
|
||||||
@@ -109,8 +110,15 @@ object SettingsPatch : BytecodePatch(
|
|||||||
} ?: throw MenuGroupsOnClickFingerprint.exception
|
} ?: throw MenuGroupsOnClickFingerprint.exception
|
||||||
|
|
||||||
addString("revanced_settings", "ReVanced Settings", false)
|
addString("revanced_settings", "ReVanced Settings", false)
|
||||||
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
|
|
||||||
addString("revanced_reboot", "Restart", false)
|
PreferenceScreen.MISC.OTHER.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_debug",
|
||||||
|
StringResource("revanced_debug_title", "Debug logging"),
|
||||||
|
StringResource("revanced_debug_summary_on", "Debug logs are enabled"),
|
||||||
|
StringResource("revanced_debug_summary_off", "Debug logs are disabled")
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addString(identifier: String, value: String, formatted: Boolean = true) =
|
fun addString(identifier: String, value: String, formatted: Boolean = true) =
|
||||||
@@ -130,7 +138,7 @@ object SettingsPatch : BytecodePatch(
|
|||||||
ImmutableField(
|
ImmutableField(
|
||||||
mutableMethod.definingClass,
|
mutableMethod.definingClass,
|
||||||
name,
|
name,
|
||||||
MENU_ITEM_ENUM_CLASS,
|
MENU_ITEM_ENUM_CLASS_DESCRIPTOR,
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL or AccessFlags.ENUM or AccessFlags.STATIC,
|
AccessFlags.PUBLIC or AccessFlags.FINAL or AccessFlags.ENUM or AccessFlags.STATIC,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
@@ -142,17 +150,17 @@ object SettingsPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
mutableMethod.implementation!!.instructions.size - 4,
|
mutableMethod.implementation!!.instructions.size - 4,
|
||||||
"""
|
"""
|
||||||
new-instance v0, $MENU_ITEM_ENUM_CLASS
|
new-instance v0, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR
|
||||||
const-string v1, "$titleResourceName"
|
const-string v1, "$titleResourceName"
|
||||||
invoke-static {v1}, $REVANCED_UTILS_CLASS->getStringId(Ljava/lang/String;)I
|
invoke-static {v1}, $UTILS_CLASS_DESCRIPTOR->getStringId(Ljava/lang/String;)I
|
||||||
move-result v1
|
move-result v1
|
||||||
const-string v3, "$iconResourceName"
|
const-string v3, "$iconResourceName"
|
||||||
invoke-static {v3}, $REVANCED_UTILS_CLASS->getDrawableId(Ljava/lang/String;)I
|
invoke-static {v3}, $UTILS_CLASS_DESCRIPTOR->getDrawableId(Ljava/lang/String;)I
|
||||||
move-result v3
|
move-result v3
|
||||||
const-string v4, "$name"
|
const-string v4, "$name"
|
||||||
const/4 v5, $value
|
const/4 v5, $value
|
||||||
invoke-direct {v0, v4, v5, v1, v3}, $MENU_ITEM_ENUM_CLASS-><init>(Ljava/lang/String;III)V
|
invoke-direct {v0, v4, v5, v1, v3}, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR-><init>(Ljava/lang/String;III)V
|
||||||
sput-object v0, $MENU_ITEM_ENUM_CLASS->$name:$MENU_ITEM_ENUM_CLASS
|
sput-object v0, $MENU_ITEM_ENUM_CLASS_DESCRIPTOR->$name:$MENU_ITEM_ENUM_CLASS_DESCRIPTOR
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -179,7 +187,7 @@ object SettingsPatch : BytecodePatch(
|
|||||||
key,
|
key,
|
||||||
StringResource("${key}_title", title),
|
StringResource("${key}_title", title),
|
||||||
preferences.sortedBy { it.title.value },
|
preferences.sortedBy { it.title.value },
|
||||||
"app.revanced.twitch.settingsmenu.preference.CustomPreferenceCategory"
|
"app.revanced.integrations.twitch.settings.preference.CustomPreferenceCategory"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.io.InvalidClassException
|
|||||||
object JsonHookPatch : BytecodePatch(
|
object JsonHookPatch : BytecodePatch(
|
||||||
setOf(LoganSquareFingerprint)
|
setOf(LoganSquareFingerprint)
|
||||||
), Closeable {
|
), Closeable {
|
||||||
private const val JSON_HOOK_CLASS_NAMESPACE = "app/revanced/twitter/patches/hook/json"
|
private const val JSON_HOOK_CLASS_NAMESPACE = "app/revanced/integrations/twitter/patches/hook/json"
|
||||||
private const val JSON_HOOK_PATCH_CLASS_DESCRIPTOR = "L$JSON_HOOK_CLASS_NAMESPACE/JsonHookPatch;"
|
private const val JSON_HOOK_PATCH_CLASS_DESCRIPTOR = "L$JSON_HOOK_CLASS_NAMESPACE/JsonHookPatch;"
|
||||||
private const val BASE_PATCH_CLASS_NAME = "BaseJsonHook"
|
private const val BASE_PATCH_CLASS_NAME = "BaseJsonHook"
|
||||||
private const val JSON_HOOK_CLASS_DESCRIPTOR = "L$JSON_HOOK_CLASS_NAMESPACE/$BASE_PATCH_CLASS_NAME;"
|
private const val JSON_HOOK_CLASS_DESCRIPTOR = "L$JSON_HOOK_CLASS_NAMESPACE/$BASE_PATCH_CLASS_NAME;"
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ import app.revanced.patches.twitter.misc.hook.patch.BaseHookPatchPatch
|
|||||||
compatiblePackages = [CompatiblePackage("com.twitter.android")]
|
compatiblePackages = [CompatiblePackage("com.twitter.android")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HideAdsPatch : BaseHookPatchPatch("Lapp/revanced/twitter/patches/hook/patch/ads/AdsHook;")
|
object HideAdsPatch : BaseHookPatchPatch("Lapp/revanced/integrations/twitter/patches/hook/patch/ads/AdsHook;")
|
||||||
@@ -12,5 +12,5 @@ import app.revanced.patches.twitter.misc.hook.patch.BaseHookPatchPatch
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HideRecommendedUsersPatch : BaseHookPatchPatch(
|
object HideRecommendedUsersPatch : BaseHookPatchPatch(
|
||||||
"Lapp/revanced/twitter/patches/hook/patch/recommendation/RecommendedUsersHook;"
|
"Lapp/revanced/integrations/twitter/patches/hook/patch/recommendation/RecommendedUsersHook;"
|
||||||
)
|
)
|
||||||
@@ -15,7 +15,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide ads",
|
name = "Hide ads",
|
||||||
description = "Removes general ads.",
|
description = "Adds options to remove general ads.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
HideGetPremiumPatch::class,
|
HideGetPremiumPatch::class,
|
||||||
HideAdsResourcePatch::class,
|
HideAdsResourcePatch::class,
|
||||||
@@ -65,7 +65,7 @@ object HideAdsPatch : BytecodePatch() {
|
|||||||
.injectHideViewCall(
|
.injectHideViewCall(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
viewRegister,
|
viewRegister,
|
||||||
"Lapp/revanced/integrations/patches/components/AdsFilter;",
|
"Lapp/revanced/integrations/youtube/patches/components/AdsFilter;",
|
||||||
"hideAdAttributionView"
|
"hideAdAttributionView"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
|
|||||||
)
|
)
|
||||||
object HideAdsResourcePatch : ResourcePatch() {
|
object HideAdsResourcePatch : ResourcePatch() {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/AdsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/AdsFilter;"
|
||||||
|
|
||||||
internal var adAttributionId: Long = -1
|
internal var adAttributionId: Long = -1
|
||||||
|
|
||||||
@@ -31,6 +31,12 @@ object HideAdsResourcePatch : ResourcePatch() {
|
|||||||
StringResource("revanced_hide_general_ads_summary_on", "General ads are hidden"),
|
StringResource("revanced_hide_general_ads_summary_on", "General ads are hidden"),
|
||||||
StringResource("revanced_hide_general_ads_summary_off", "General ads are shown")
|
StringResource("revanced_hide_general_ads_summary_off", "General ads are shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_fullscreen_ads",
|
||||||
|
StringResource("revanced_hide_fullscreen_ads_title", "Hide fullscreen ads"),
|
||||||
|
StringResource("revanced_hide_fullscreen_ads_summary_on", "Fullscreen ads are hidden"),
|
||||||
|
StringResource("revanced_hide_fullscreen_ads_summary_off", "Fullscreen ads are shown")
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_buttoned_ads",
|
"revanced_hide_buttoned_ads",
|
||||||
StringResource("revanced_hide_buttoned_ads_title", "Hide buttoned ad"),
|
StringResource("revanced_hide_buttoned_ads_title", "Hide buttoned ad"),
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
)
|
)
|
||||||
object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
|
object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/HideGetPremiumPatch;"
|
"Lapp/revanced/integrations/youtube/patches/HideGetPremiumPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.ADS.addPreferences(
|
SettingsPatch.PreferenceScreen.ADS.addPreferences(
|
||||||
@@ -45,11 +45,11 @@ object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) {
|
|||||||
),
|
),
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_hide_get_premium_summary_on",
|
"revanced_hide_get_premium_summary_on",
|
||||||
"YouTube Premium promotions under video player is hidden"
|
"YouTube Premium promotions under video player are hidden"
|
||||||
),
|
),
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_hide_get_premium_summary_off",
|
"revanced_hide_get_premium_summary_off",
|
||||||
"YouTube Premium promotions under video player is shown"
|
"YouTube Premium promotions under video player are shown"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Video ads",
|
name = "Video ads",
|
||||||
description = "Removes ads in the video player.",
|
description = "Adds an option to remove ads in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
@@ -53,7 +53,7 @@ object VideoAdsPatch : BytecodePatch(
|
|||||||
|
|
||||||
loadVideoAdsFingerprintMethod.addInstructionsWithLabels(
|
loadVideoAdsFingerprintMethod.addInstructionsWithLabels(
|
||||||
0, """
|
0, """
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z
|
invoke-static { }, Lapp/revanced/integrations/youtube/patches/VideoAdsPatch;->shouldShowAds()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-nez v0, :show_video_ads
|
if-nez v0, :show_video_ads
|
||||||
return-void
|
return-void
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import app.revanced.patches.youtube.misc.playercontrols.PlayerControlsBytecodePa
|
|||||||
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Copy video url",
|
name = "Copy video URL",
|
||||||
description = "Adds buttons in player to copy video links.",
|
description = "Adds options to display buttons in the video player to copy video URLs.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
CopyVideoUrlResourcePatch::class,
|
CopyVideoUrlResourcePatch::class,
|
||||||
PlayerControlsBytecodePatch::class,
|
PlayerControlsBytecodePatch::class,
|
||||||
@@ -32,7 +32,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object CopyVideoUrlBytecodePatch : BytecodePatch() {
|
object CopyVideoUrlBytecodePatch : BytecodePatch() {
|
||||||
private const val INTEGRATIONS_PLAYER_PACKAGE = "Lapp/revanced/integrations/videoplayer"
|
private const val INTEGRATIONS_PLAYER_PACKAGE = "Lapp/revanced/integrations/youtube/videoplayer"
|
||||||
private val BUTTONS_DESCRIPTORS = listOf(
|
private val BUTTONS_DESCRIPTORS = listOf(
|
||||||
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlButton;",
|
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlButton;",
|
||||||
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlTimestampButton;"
|
"$INTEGRATIONS_PLAYER_PACKAGE/CopyVideoUrlTimestampButton;"
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.dialog
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
|
import app.revanced.patches.youtube.interaction.dialog.fingerprints.CreateDialogFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove viewer discretion dialog",
|
||||||
|
description = "Adds an option to remove the dialog that appears when opening a video that has been age-restricted " +
|
||||||
|
"by accepting it automatically. This does not bypass the age restriction.",
|
||||||
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RemoveViewerDiscretionDialogPatch : BytecodePatch(
|
||||||
|
setOf(CreateDialogFingerprint)
|
||||||
|
) {
|
||||||
|
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
||||||
|
"Lapp/revanced/integrations/youtube/patches/RemoveViewerDiscretionDialogPatch;->" +
|
||||||
|
"confirmDialog(Landroid/app/AlertDialog;)V"
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_remove_viewer_discretion_dialog",
|
||||||
|
StringResource(
|
||||||
|
"revanced_remove_viewer_discretion_dialog_title",
|
||||||
|
"Remove viewer discretion dialog"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_remove_viewer_discretion_dialog_summary_on",
|
||||||
|
"Dialog will be removed"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_remove_viewer_discretion_dialog_summary_off",
|
||||||
|
"Dialog will be shown"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_remove_viewer_discretion_dialog_user_dialog_message",
|
||||||
|
"This does not bypass the age restriction. It just accepts it automatically."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
CreateDialogFingerprint.result?.mutableMethod?.apply {
|
||||||
|
val showDialogIndex = implementation!!.instructions.lastIndex - 2
|
||||||
|
val dialogRegister = getInstruction<FiveRegisterInstruction>(showDialogIndex).registerC
|
||||||
|
|
||||||
|
replaceInstructions(
|
||||||
|
showDialogIndex,
|
||||||
|
"invoke-static { v$dialogRegister }, $INTEGRATIONS_METHOD_DESCRIPTOR",
|
||||||
|
)
|
||||||
|
} ?: throw CreateDialogFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.dialog.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
internal object CreateDialogFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PROTECTED.value,
|
||||||
|
listOf("L", "L", "Ljava/lang/String;"),
|
||||||
|
listOf(
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL // dialog.show()
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -9,7 +9,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "External downloads",
|
name = "External downloads",
|
||||||
description = "Adds support to download and save YouTube videos using an external app.",
|
description = "Adds support to download and save YouTube videos using an external downloader app.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
ExternalDownloadsResourcePatch::class,
|
ExternalDownloadsResourcePatch::class,
|
||||||
PlayerControlsBytecodePatch::class,
|
PlayerControlsBytecodePatch::class,
|
||||||
@@ -32,7 +32,7 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object ExternalDownloadsBytecodePatch : BytecodePatch() {
|
object ExternalDownloadsBytecodePatch : BytecodePatch() {
|
||||||
private const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;"
|
private const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/youtube/videoplayer/ExternalDownloadButton;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable precise seeking gesture",
|
name = "Disable precise seeking gesture",
|
||||||
description = "Disables the gesture that is used to seek precisely when swiping up on the seekbar.",
|
description = "Adds an option to disable precise seeking when swiping up on the seekbar.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -38,7 +38,7 @@ object DisablePreciseSeekingGesturePatch : BytecodePatch(
|
|||||||
setOf(IsSwipingUpFingerprint)
|
setOf(IsSwipingUpFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/DisablePreciseSeekingGesturePatch;->" +
|
"Lapp/revanced/integrations/youtube/patches/DisablePreciseSeekingGesturePatch;->" +
|
||||||
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
|
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Seekbar tapping",
|
name = "Seekbar tapping",
|
||||||
description = "Enables tap-to-seek on the seekbar of the video player.",
|
description = "Adds an option to enable tap-to-seek on the seekbar of the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class, SettingsPatch::class],
|
IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
@@ -85,7 +85,7 @@ object EnableSeekbarTappingPatch : BytecodePatch(
|
|||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/SeekbarTappingPatch;->seekbarTappingEnabled()Z
|
invoke-static { }, Lapp/revanced/integrations/youtube/patches/SeekbarTappingPatch;->seekbarTappingEnabled()Z
|
||||||
move-result v$freeRegister
|
move-result v$freeRegister
|
||||||
if-eqz v$freeRegister, :disabled
|
if-eqz v$freeRegister, :disabled
|
||||||
${oMethod.toInvokeInstructionString()}
|
${oMethod.toInvokeInstructionString()}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Enable slide to seek",
|
name = "Enable slide to seek",
|
||||||
description = "Enable slide to seek instead of playing at 2x speed when pressing and holding in the video player.",
|
description = "Adds an option to enable slide to seek instead of playing at 2x speed when pressing and holding in the video player.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -38,7 +38,7 @@ object EnableSlideToSeekPatch : BytecodePatch(
|
|||||||
DoubleSpeedSeekNoticeFingerprint
|
DoubleSpeedSeekNoticeFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/SlideToSeekPatch;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/SlideToSeekPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Swipe controls",
|
name = "Swipe controls",
|
||||||
description = "Adds volume and brightness swipe controls.",
|
description = "Adds options to enable and configure volume and brightness swipe controls.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
PlayerTypeHookPatch::class,
|
PlayerTypeHookPatch::class,
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ internal object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
|||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
parameters = listOf(),
|
parameters = listOf(),
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;"
|
methodDef.definingClass == "Lapp/revanced/integrations/youtube/swipecontrols/SwipeControlsHostActivity;"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable auto captions",
|
name = "Disable auto captions",
|
||||||
description = "Disable forced captions from being automatically enabled.",
|
description = "Adds an option to disable captions from being automatically enabled.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -57,7 +57,7 @@ object AutoCaptionsPatch : BytecodePatch(
|
|||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const/4 v0, 0x$enabled
|
const/4 v0, 0x$enabled
|
||||||
sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
sput-boolean v0, Lapp/revanced/integrations/youtube/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
||||||
"""
|
"""
|
||||||
) ?: throw fingerprint.exception
|
) ?: throw fingerprint.exception
|
||||||
}
|
}
|
||||||
@@ -65,10 +65,10 @@ object AutoCaptionsPatch : BytecodePatch(
|
|||||||
SubtitleTrackFingerprint.result?.mutableMethod?.addInstructionsWithLabels(
|
SubtitleTrackFingerprint.result?.mutableMethod?.addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
|
invoke-static {}, Lapp/revanced/integrations/youtube/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :auto_captions_enabled
|
if-eqz v0, :auto_captions_enabled
|
||||||
sget-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
sget-boolean v0, Lapp/revanced/integrations/youtube/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z
|
||||||
if-nez v0, :auto_captions_enabled
|
if-nez v0, :auto_captions_enabled
|
||||||
const/4 v0, 0x1
|
const/4 v0, 0x1
|
||||||
return v0
|
return v0
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.nio.file.Files
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Custom branding",
|
name = "Custom branding",
|
||||||
description = "Changes the app name and icon to your choice (defaults to \"YouTube ReVanced\" and the ReVanced logo).",
|
description = "Applies a custom app name and icon. Defaults to \"YouTube ReVanced\" and the ReVanced logo.",
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.google.android.youtube")
|
CompatiblePackage("com.google.android.youtube")
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import kotlin.io.path.copyTo
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Premium heading",
|
name = "Premium heading",
|
||||||
description = "Show or hide the premium heading.",
|
description = "Adds or removes the YouTube Premium logo at the top of feeds.",
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.google.android.youtube")
|
CompatiblePackage("com.google.android.youtube")
|
||||||
]
|
]
|
||||||
@@ -24,7 +24,7 @@ object PremiumHeadingPatch : ResourcePatch() {
|
|||||||
key = "usePremiumHeading",
|
key = "usePremiumHeading",
|
||||||
default = true,
|
default = true,
|
||||||
title = "Use premium heading",
|
title = "Use premium heading",
|
||||||
description = "Whether to use the premium heading.",
|
description = "Whether to use the YouTube Premium logo.",
|
||||||
required = true,
|
required = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide video action buttons",
|
name = "Hide video action buttons",
|
||||||
description = "Adds options to hide action buttons under a video.",
|
description = "Adds options to hide action buttons (such as the Download button) under videos.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
ResourceMappingPatch::class,
|
ResourceMappingPatch::class,
|
||||||
LithoFilterPatch::class
|
LithoFilterPatch::class
|
||||||
@@ -36,7 +36,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HideButtonsPatch : ResourcePatch() {
|
object HideButtonsPatch : ResourcePatch() {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/ButtonsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/ButtonsFilter;"
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide autoplay button",
|
name = "Hide autoplay button",
|
||||||
description = "Hides the autoplay button in the video player.",
|
description = "Adds an option to hide the autoplay button in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
@@ -78,7 +78,7 @@ object HideAutoplayButtonPatch : BytecodePatch(
|
|||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/HideAutoplayButtonPatch;->isButtonShown()Z
|
invoke-static {}, Lapp/revanced/integrations/youtube/patches/HideAutoplayButtonPatch;->isButtonShown()Z
|
||||||
move-result v$clobberRegister
|
move-result v$clobberRegister
|
||||||
if-eqz v$clobberRegister, :hidden
|
if-eqz v$clobberRegister, :hidden
|
||||||
""",
|
""",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide captions button",
|
name = "Hide captions button",
|
||||||
description = "Hides the captions button in the video player.",
|
description = "Adds an option to hide the captions button in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
@@ -58,7 +58,7 @@ object HideCaptionsButtonPatch : BytecodePatch(
|
|||||||
subtitleButtonControllerMethod.addInstruction(
|
subtitleButtonControllerMethod.addInstruction(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {v0}, Lapp/revanced/integrations/patches/HideCaptionsButtonPatch;->hideCaptionsButton(Landroid/widget/ImageView;)V
|
invoke-static {v0}, Lapp/revanced/integrations/youtube/patches/HideCaptionsButtonPatch;->hideCaptionsButton(Landroid/widget/ImageView;)V
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide cast button",
|
name = "Hide cast button",
|
||||||
description = "Hides the cast button in the video player.",
|
description = "Adds an option to hide the cast button in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
@@ -40,7 +40,7 @@ object HideCastButtonPatch : BytecodePatch() {
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {p1}, Lapp/revanced/integrations/patches/HideCastButtonPatch;->getCastButtonOverrideV2(I)I
|
invoke-static {p1}, Lapp/revanced/integrations/youtube/patches/HideCastButtonPatch;->getCastButtonOverrideV2(I)I
|
||||||
move-result p1
|
move-result p1
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Navigation buttons",
|
name = "Navigation buttons",
|
||||||
description = "Adds options to hide or change navigation buttons.",
|
description = "Adds options to hide and change navigation buttons (such as the Shorts button).",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
@@ -45,7 +45,7 @@ object NavigationButtonsPatch : BytecodePatch(
|
|||||||
setOf(AddCreateButtonViewFingerprint)
|
setOf(AddCreateButtonViewFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/NavigationButtonsPatch;"
|
"Lapp/revanced/integrations/youtube/patches/NavigationButtonsPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide player buttons",
|
name = "Hide player buttons",
|
||||||
description = "Hides previous and next buttons in the video player.",
|
description = "Adds an option to hide the previous and next buttons in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
@@ -72,10 +72,10 @@ object HidePlayerButtonsPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
callIndex,
|
callIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static { v$hasNextParameterRegister }, Lapp/revanced/integrations/patches/HidePlayerButtonsPatch;->previousOrNextButtonIsVisible(Z)Z
|
invoke-static { v$hasNextParameterRegister }, Lapp/revanced/integrations/youtube/patches/HidePlayerButtonsPatch;->previousOrNextButtonIsVisible(Z)Z
|
||||||
move-result v$hasNextParameterRegister
|
move-result v$hasNextParameterRegister
|
||||||
|
|
||||||
invoke-static { v$hasPreviousParameterRegister }, Lapp/revanced/integrations/patches/HidePlayerButtonsPatch;->previousOrNextButtonIsVisible(Z)Z
|
invoke-static { v$hasPreviousParameterRegister }, Lapp/revanced/integrations/youtube/patches/HidePlayerButtonsPatch;->previousOrNextButtonIsVisible(Z)Z
|
||||||
move-result v$hasPreviousParameterRegister
|
move-result v$hasPreviousParameterRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide album cards",
|
name = "Hide album cards",
|
||||||
description = "Hides the album cards below the artist description.",
|
description = "Adds an option to hide album cards below artist descriptions.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
AlbumCardsResourcePatch::class
|
AlbumCardsResourcePatch::class
|
||||||
@@ -48,7 +48,7 @@ object AlbumCardsPatch : BytecodePatch(
|
|||||||
addInstruction(
|
addInstruction(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"invoke-static {v$albumCardViewRegister}, " +
|
"invoke-static {v$albumCardViewRegister}, " +
|
||||||
"Lapp/revanced/integrations/patches/HideAlbumCardsPatch;" +
|
"Lapp/revanced/integrations/youtube/patches/HideAlbumCardsPatch;" +
|
||||||
"->" +
|
"->" +
|
||||||
"hideAlbumCard(Landroid/view/View;)V"
|
"hideAlbumCard(Landroid/view/View;)V"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide breaking news shelf",
|
name = "Hide breaking news shelf",
|
||||||
description = "Hides the breaking news shelf on the homepage tab.",
|
description = "Adds an option to hide the breaking news shelf on the homepage tab.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
BreakingNewsResourcePatch::class
|
BreakingNewsResourcePatch::class
|
||||||
@@ -50,7 +50,7 @@ object BreakingNewsPatch : BytecodePatch(
|
|||||||
insertIndex,
|
insertIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {v$breakingNewsViewRegister},
|
invoke-static {v$breakingNewsViewRegister},
|
||||||
Lapp/revanced/integrations/patches/HideBreakingNewsPatch;
|
Lapp/revanced/integrations/youtube/patches/HideBreakingNewsPatch;
|
||||||
->
|
->
|
||||||
hideBreakingNews(Landroid/view/View;)V
|
hideBreakingNews(Landroid/view/View;)V
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Comments",
|
name = "Comments",
|
||||||
description = "Hides components related to comments.",
|
description = "Adds options to hide components related to comments.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
LithoFilterPatch::class
|
LithoFilterPatch::class
|
||||||
@@ -35,7 +35,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object CommentsPatch : ResourcePatch() {
|
object CommentsPatch : ResourcePatch() {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/CommentsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/CommentsFilter;"
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide crowdfunding box",
|
name = "Hide crowdfunding box",
|
||||||
description = "Hides the crowdfunding box between the player and video description.",
|
description = "Adds an option to hide the crowdfunding box between the player and video description.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
CrowdfundingBoxResourcePatch::class
|
CrowdfundingBoxResourcePatch::class
|
||||||
@@ -38,7 +38,7 @@ object CrowdfundingBoxPatch : BytecodePatch(
|
|||||||
setOf(CrowdfundingBoxFingerprint)
|
setOf(CrowdfundingBoxFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/HideCrowdfundingBoxPatch;->hideCrowdfundingBox(Landroid/view/View;)V"
|
"Lapp/revanced/integrations/youtube/patches/HideCrowdfundingBoxPatch;->hideCrowdfundingBox(Landroid/view/View;)V"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
CrowdfundingBoxFingerprint.result?.let {
|
CrowdfundingBoxFingerprint.result?.let {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide endscreen cards",
|
name = "Hide endscreen cards",
|
||||||
description = "Hides the suggested video cards at the end of videos.",
|
description = "Adds an option to hide suggested video cards at the end of videos.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
HideEndscreenCardsResourcePatch::class
|
HideEndscreenCardsResourcePatch::class
|
||||||
@@ -53,7 +53,7 @@ object HideEndscreenCardsPatch : BytecodePatch(
|
|||||||
|
|
||||||
addInstruction(
|
addInstruction(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"invoke-static { v$viewRegister }, Lapp/revanced/integrations/patches/HideEndscreenCardsPatch;->hideEndscreen(Landroid/view/View;)V"
|
"invoke-static { v$viewRegister }, Lapp/revanced/integrations/youtube/patches/HideEndscreenCardsPatch;->hideEndscreen(Landroid/view/View;)V"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide filter bar",
|
name = "Hide filter bar",
|
||||||
description = "Hides the filter bar in video feeds.",
|
description = "Adds options to hide the category bar at the top of video feeds.",
|
||||||
dependencies = [HideFilterBarResourcePatch::class],
|
dependencies = [HideFilterBarResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -42,7 +42,7 @@ object HideFilterBarPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/HideFilterBarPatch;"
|
"Lapp/revanced/integrations/youtube/patches/HideFilterBarPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
FilterBarHeightFingerprint.patch<TwoRegisterInstruction> { register ->
|
FilterBarHeightFingerprint.patch<TwoRegisterInstruction> { register ->
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide floating microphone button",
|
name = "Hide floating microphone button",
|
||||||
description = "Hides the floating microphone button which appears in search.",
|
description = "Adds an option to hide the floating microphone button when searching.",
|
||||||
dependencies = [HideFloatingMicrophoneButtonResourcePatch::class],
|
dependencies = [HideFloatingMicrophoneButtonResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -34,7 +34,7 @@ object HideFloatingMicrophoneButtonPatch : BytecodePatch(
|
|||||||
setOf(ShowFloatingMicrophoneButtonFingerprint)
|
setOf(ShowFloatingMicrophoneButtonFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/HideFloatingMicrophoneButtonPatch;"
|
"Lapp/revanced/integrations/youtube/patches/HideFloatingMicrophoneButtonPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
ShowFloatingMicrophoneButtonFingerprint.result?.let { result ->
|
ShowFloatingMicrophoneButtonFingerprint.result?.let { result ->
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable fullscreen ambient mode",
|
name = "Disable fullscreen ambient mode",
|
||||||
description = "Disables the ambient mode when in fullscreen.",
|
description = "Adds an option to disable the ambient mode when in fullscreen.",
|
||||||
dependencies = [SettingsPatch::class, IntegrationsPatch::class],
|
dependencies = [SettingsPatch::class, IntegrationsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -34,7 +34,7 @@ object DisableFullscreenAmbientModePatch : BytecodePatch(
|
|||||||
setOf(InitializeAmbientModeFingerprint)
|
setOf(InitializeAmbientModeFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/DisableFullscreenAmbientModePatch;"
|
"Lapp/revanced/integrations/youtube/patches/DisableFullscreenAmbientModePatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.patches.youtube.layout.hide.general
|
package app.revanced.patches.youtube.layout.hide.general
|
||||||
|
|
||||||
import app.revanced.util.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
@@ -18,13 +17,14 @@ import app.revanced.patches.youtube.layout.hide.general.fingerprints.ShowWaterma
|
|||||||
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
|
||||||
|
import app.revanced.util.exception
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide layout components",
|
name = "Hide layout components",
|
||||||
description = "Hides general layout components.",
|
description = "Adds options to hide general layout components.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
@@ -48,9 +48,9 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
setOf(ParseElementFromBufferFingerprint, PlayerOverlayFingerprint)
|
setOf(ParseElementFromBufferFingerprint, PlayerOverlayFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR =
|
private const val LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/LayoutComponentsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/LayoutComponentsFilter;"
|
||||||
private const val DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME =
|
private const val DESCRIPTION_COMPONENTS_FILTER_CLASS_NAME =
|
||||||
"Lapp/revanced/integrations/patches/components/DescriptionComponentsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/DescriptionComponentsFilter;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
PreferenceScreen.LAYOUT.addPreferences(
|
PreferenceScreen.LAYOUT.addPreferences(
|
||||||
@@ -93,6 +93,21 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
StringResource("revanced_hide_timed_reactions_summary_on", "Timed reactions are hidden"),
|
StringResource("revanced_hide_timed_reactions_summary_on", "Timed reactions are hidden"),
|
||||||
StringResource("revanced_hide_timed_reactions_summary_off", "Timed reactions are shown")
|
StringResource("revanced_hide_timed_reactions_summary_off", "Timed reactions are shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_search_result_recommendations",
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_search_result_recommendations_title",
|
||||||
|
"Hide search result recommendations (e.g People also watched)"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_search_result_recommendations_summary_on",
|
||||||
|
"Recommendations are hidden"
|
||||||
|
),
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_search_result_recommendations_summary_off",
|
||||||
|
"Recommendations are shown"
|
||||||
|
)
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_search_result_shelf_header",
|
"revanced_hide_search_result_shelf_header",
|
||||||
StringResource(
|
StringResource(
|
||||||
@@ -285,8 +300,8 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_artist_cards",
|
"revanced_hide_artist_cards",
|
||||||
StringResource("revanced_hide_artist_cards_title", "Hide artist cards"),
|
StringResource("revanced_hide_artist_cards_title", "Hide artist cards"),
|
||||||
StringResource("revanced_hide_artist_cards_on", "Artist cards is hidden"),
|
StringResource("revanced_hide_artist_cards_on", "Artist cards are hidden"),
|
||||||
StringResource("revanced_hide_artist_cards_off", "Artist cards is shown")
|
StringResource("revanced_hide_artist_cards_off", "Artist cards are shown")
|
||||||
),
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_chips_shelf",
|
"revanced_hide_chips_shelf",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide info cards",
|
name = "Hide info cards",
|
||||||
description = "Hides info cards in videos.",
|
description = "Adds an option to hide info cards that creators add in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
@@ -48,7 +48,7 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/HideInfoCardsFilterPatch;"
|
"Lapp/revanced/integrations/youtube/patches/components/HideInfoCardsFilterPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
InfocardsIncognitoFingerprint.also {
|
InfocardsIncognitoFingerprint.also {
|
||||||
@@ -62,7 +62,7 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
addInstruction(
|
addInstruction(
|
||||||
invokeInstructionIndex,
|
invokeInstructionIndex,
|
||||||
"invoke-static {v${getInstruction<FiveRegisterInstruction>(invokeInstructionIndex).registerC}}," +
|
"invoke-static {v${getInstruction<FiveRegisterInstruction>(invokeInstructionIndex).registerC}}," +
|
||||||
" Lapp/revanced/integrations/patches/HideInfoCardsPatch;->hideInfoCardsIncognito(Landroid/view/View;)V"
|
" Lapp/revanced/integrations/youtube/patches/HideInfoCardsPatch;->hideInfoCardsIncognito(Landroid/view/View;)V"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
hideInfoCardsCallMethod.addInstructionsWithLabels(
|
hideInfoCardsCallMethod.addInstructionsWithLabels(
|
||||||
invokeInterfaceIndex,
|
invokeInterfaceIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/HideInfoCardsPatch;->hideInfoCardsMethodCall()Z
|
invoke-static {}, Lapp/revanced/integrations/youtube/patches/HideInfoCardsPatch;->hideInfoCardsMethodCall()Z
|
||||||
move-result v$toggleRegister
|
move-result v$toggleRegister
|
||||||
if-nez v$toggleRegister, :hide_info_cards
|
if-nez v$toggleRegister, :hide_info_cards
|
||||||
""",
|
""",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide \'Load more\' button",
|
name = "Hide \'Load more\' button",
|
||||||
description = "Hides the button under videos that loads similar videos.",
|
description = "Adds an option to hide the button under videos that loads similar videos.",
|
||||||
dependencies = [HideLoadMoreButtonResourcePatch::class],
|
dependencies = [HideLoadMoreButtonResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -34,7 +34,7 @@ object HideLoadMoreButtonPatch : BytecodePatch(
|
|||||||
setOf(HideLoadMoreButtonFingerprint)
|
setOf(HideLoadMoreButtonFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/HideLoadMoreButtonPatch;"
|
"Lapp/revanced/integrations/youtube/patches/HideLoadMoreButtonPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
HideLoadMoreButtonFingerprint.result?.let {
|
HideLoadMoreButtonFingerprint.result?.let {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ object HideEmailAddressPatch : BytecodePatch(
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
setVisibilityConstIndex,
|
setVisibilityConstIndex,
|
||||||
"""
|
"""
|
||||||
invoke-static {v$setVisibilityConstRegister}, Lapp/revanced/integrations/patches/HideEmailAddressPatch;->hideEmailAddress(I)I
|
invoke-static {v$setVisibilityConstRegister}, Lapp/revanced/integrations/youtube/patches/HideEmailAddressPatch;->hideEmailAddress(I)I
|
||||||
move-result v$setVisibilityConstRegister
|
move-result v$setVisibilityConstRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Player flyout menu",
|
name = "Player flyout menu",
|
||||||
description = "Hides player flyout menu items.",
|
description = "Adds options to hide menu items that appear when pressing the gear icon in the video player.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
PlayerTypeHookPatch::class,
|
PlayerTypeHookPatch::class,
|
||||||
@@ -36,7 +36,7 @@ object HidePlayerFlyoutMenuPatch : ResourcePatch() {
|
|||||||
private const val KEY = "revanced_hide_player_flyout"
|
private const val KEY = "revanced_hide_player_flyout"
|
||||||
|
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/PlayerFlyoutMenuItemsFilter;"
|
"Lapp/revanced/integrations/youtube/patches/components/PlayerFlyoutMenuItemsFilter;"
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable rolling number animations",
|
name = "Disable rolling number animations",
|
||||||
description = "Disables rolling number animations of video view count, user likes, and upload time.",
|
description = "Adds an option to disable rolling number animations of video view count, user likes, and upload time.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -38,7 +38,7 @@ object DisableRollingNumberAnimationPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/DisableRollingNumberAnimationsPatch;"
|
"Lapp/revanced/integrations/youtube/patches/DisableRollingNumberAnimationsPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide seekbar",
|
name = "Hide seekbar",
|
||||||
description = "Hides the seekbar.",
|
description = "Adds an option to hide the seekbar.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
@@ -63,7 +63,7 @@ object HideSeekbarPatch : BytecodePatch(
|
|||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const/4 v0, 0x0
|
const/4 v0, 0x0
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/HideSeekbarPatch;->hideSeekbar()Z
|
invoke-static { }, Lapp/revanced/integrations/youtube/patches/HideSeekbarPatch;->hideSeekbar()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :hide_seekbar
|
if-eqz v0, :hide_seekbar
|
||||||
return-void
|
return-void
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide Shorts components",
|
name = "Hide Shorts components",
|
||||||
description = "Hides components from YouTube Shorts.",
|
description = "Adds options to hide components related to YouTube Shorts.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
@@ -51,7 +51,7 @@ object HideShortsComponentsPatch : BytecodePatch(
|
|||||||
SetPivotBarVisibilityParentFingerprint
|
SetPivotBarVisibilityParentFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/components/ShortsFilter;"
|
private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/components/ShortsFilter;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// region Hide the Shorts shelf.
|
// region Hide the Shorts shelf.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable suggested video end screen",
|
name = "Disable suggested video end screen",
|
||||||
description = "Disables the suggested video end screen at the end of a video.",
|
description = "Adds an option to disable the suggested video end screen at the end of videos.",
|
||||||
dependencies = [IntegrationsPatch::class, DisableSuggestedVideoEndScreenResourcePatch::class],
|
dependencies = [IntegrationsPatch::class, DisableSuggestedVideoEndScreenResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -33,7 +33,7 @@ object DisableSuggestedVideoEndScreenPatch : BytecodePatch(
|
|||||||
setOf(CreateEndScreenViewFingerprint)
|
setOf(CreateEndScreenViewFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/DisableSuggestedVideoEndScreenPatch;"
|
"Lapp/revanced/integrations/youtube/patches/DisableSuggestedVideoEndScreenPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
CreateEndScreenViewFingerprint.result?.let {
|
CreateEndScreenViewFingerprint.result?.let {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide timestamp",
|
name = "Hide timestamp",
|
||||||
description = "Hides timestamp in video player.",
|
description = "Adds an option to hide the timestamp in the bottom left of the video player.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -48,7 +48,7 @@ object HideTimestampPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructionsWithLabels(
|
mutableMethod.addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/HideTimestampPatch;->hideTimestamp()Z
|
invoke-static { }, Lapp/revanced/integrations/youtube/patches/HideTimestampPatch;->hideTimestamp()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :hide_time
|
if-eqz v0, :hide_time
|
||||||
return-void
|
return-void
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable player popup panels",
|
name = "Disable player popup panels",
|
||||||
description = "Disables panels (such as live chat) from opening automatically.",
|
description = "Adds an option to disable panels (such as live chat) from opening automatically.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -50,7 +50,7 @@ object PlayerPopupPanelsPatch : BytecodePatch(
|
|||||||
engagementPanelControllerMethod.addInstructionsWithLabels(
|
engagementPanelControllerMethod.addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/DisablePlayerPopupPanelsPatch;->disablePlayerPopupPanels()Z
|
invoke-static { }, Lapp/revanced/integrations/youtube/patches/DisablePlayerPopupPanelsPatch;->disablePlayerPopupPanels()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :player_popup_panels
|
if-eqz v0, :player_popup_panels
|
||||||
if-eqz p4, :player_popup_panels
|
if-eqz p4, :player_popup_panels
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.w3c.dom.Element
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Remove player controls background",
|
name = "Remove player controls background",
|
||||||
description = "Removes the background from the video player controls.",
|
description = "Removes the dark background surrounding the video player controls.",
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
"com.google.android.youtube", [
|
"com.google.android.youtube", [
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Custom player overlay opacity",
|
name = "Custom player overlay opacity",
|
||||||
description = "Change the opacity of the player background when player controls are visible.",
|
description = "Adds an option to change the opacity of the video player background when player controls are visible.",
|
||||||
dependencies = [CustomPlayerOverlayOpacityResourcePatch::class],
|
dependencies = [CustomPlayerOverlayOpacityResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("com.google.android.youtube")
|
CompatiblePackage("com.google.android.youtube")
|
||||||
@@ -21,7 +21,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object CustomPlayerOverlayOpacityPatch : BytecodePatch(setOf(CreatePlayerOverviewFingerprint)) {
|
object CustomPlayerOverlayOpacityPatch : BytecodePatch(setOf(CreatePlayerOverviewFingerprint)) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/CustomPlayerOverlayOpacityPatch;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/CustomPlayerOverlayOpacityPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
CreatePlayerOverviewFingerprint.result?.let { result ->
|
CreatePlayerOverviewFingerprint.result?.let { result ->
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Return YouTube Dislike",
|
name = "Return YouTube Dislike",
|
||||||
description = "Shows the dislike count of videos using the Return YouTube Dislike API.",
|
description = "Adds an option to show the dislike count of videos using the Return YouTube Dislike API.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
LithoFilterPatch::class,
|
LithoFilterPatch::class,
|
||||||
@@ -62,10 +62,10 @@ object ReturnYouTubeDislikePatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;"
|
"Lapp/revanced/integrations/youtube/patches/ReturnYouTubeDislikePatch;"
|
||||||
|
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/ReturnYouTubeDislikeFilterPatch;"
|
"Lapp/revanced/integrations/youtube/patches/components/ReturnYouTubeDislikeFilterPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
// region Inject newVideoLoaded event handler to update dislikes when a new video is loaded.
|
// region Inject newVideoLoaded event handler to update dislikes when a new video is loaded.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Wide searchbar",
|
name = "Wide searchbar",
|
||||||
description = "Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.",
|
description = "Adds an option to replace the search icon with a wide search bar. This will hide the YouTube logo when active.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -80,7 +80,7 @@ object WideSearchbarPatch : BytecodePatch(
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
implementation!!.instructions.size - 1,
|
implementation!!.instructions.size - 1,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/WideSearchbarPatch;->enableWideSearchbar()Z
|
invoke-static {}, Lapp/revanced/integrations/youtube/patches/WideSearchbarPatch;->enableWideSearchbar()Z
|
||||||
move-result p0
|
move-result p0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,11 +11,10 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource
|
|||||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.youtube.layout.seekbar.fingerprints.FullscreenSeekbarThumbnailsFingerprint
|
import app.revanced.patches.youtube.layout.seekbar.fingerprints.FullscreenSeekbarThumbnailsFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Restore old seekbar thumbnails",
|
name = "Restore old seekbar thumbnails",
|
||||||
description = "Restores the old seekbar thumbnails that appear above the seekbar instead of fullscreen thumbnails.",
|
description = "Adds an option to restore the old seekbar thumbnails that appear above the seekbar while seeking instead of fullscreen thumbnails.",
|
||||||
dependencies = [IntegrationsPatch::class, SeekbarPreferencesPatch::class],
|
dependencies = [IntegrationsPatch::class, SeekbarPreferencesPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -35,7 +34,7 @@ object RestoreOldSeekbarThumbnailsPatch : BytecodePatch(
|
|||||||
setOf(FullscreenSeekbarThumbnailsFingerprint)
|
setOf(FullscreenSeekbarThumbnailsFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/RestoreOldSeekbarThumbnailsPatch;"
|
"Lapp/revanced/integrations/youtube/patches/RestoreOldSeekbarThumbnailsPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SeekbarPreferencesPatch.addPreferences(
|
SeekbarPreferencesPatch.addPreferences(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
internal object SeekbarColorBytecodePatch : BytecodePatch(
|
internal object SeekbarColorBytecodePatch : BytecodePatch(
|
||||||
setOf(PlayerSeekbarColorFingerprint, ShortsSeekbarColorFingerprint, SetSeekbarClickedColorFingerprint)
|
setOf(PlayerSeekbarColorFingerprint, ShortsSeekbarColorFingerprint, SetSeekbarClickedColorFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/theme/SeekbarColorPatch;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/theme/SeekbarColorPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
fun MutableMethod.addColorChangeInstructions(resourceId: Long) {
|
fun MutableMethod.addColorChangeInstructions(resourceId: Long) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ internal object SeekbarColorResourcePatch : ResourcePatch(){
|
|||||||
val scaleNode = progressNode.getElementsByTagName("scale").item(0) as Element
|
val scaleNode = progressNode.getElementsByTagName("scale").item(0) as Element
|
||||||
val shapeNode = scaleNode.getElementsByTagName("shape").item(0) as Element
|
val shapeNode = scaleNode.getElementsByTagName("shape").item(0) as Element
|
||||||
val replacementNode = editor.file.createElement(
|
val replacementNode = editor.file.createElement(
|
||||||
"app.revanced.integrations.patches.theme.ProgressBarDrawable")
|
"app.revanced.integrations.youtube.patches.theme.ProgressBarDrawable")
|
||||||
scaleNode.replaceChild(replacementNode, shapeNode)
|
scaleNode.replaceChild(replacementNode, shapeNode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "SponsorBlock",
|
name = "SponsorBlock",
|
||||||
description = "Integrates SponsorBlock, which can skip undesired video segments such as sponsored content.",
|
description = "Adds options to enable and configure SponsorBlock, which can skip undesired video segments such as sponsored content.",
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
"com.google.android.youtube", [
|
"com.google.android.youtube", [
|
||||||
@@ -69,13 +69,13 @@ object SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/sponsorblock/SegmentPlaybackController;"
|
"Lapp/revanced/integrations/youtube/sponsorblock/SegmentPlaybackController;"
|
||||||
private const val INTEGRATIONS_CREATE_SEGMENT_BUTTON_CONTROLLER_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CREATE_SEGMENT_BUTTON_CONTROLLER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/sponsorblock/ui/CreateSegmentButtonController;"
|
"Lapp/revanced/integrations/youtube/sponsorblock/ui/CreateSegmentButtonController;"
|
||||||
private const val INTEGRATIONS_VOTING_BUTTON_CONTROLLER_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_VOTING_BUTTON_CONTROLLER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/sponsorblock/ui/VotingButtonController;"
|
"Lapp/revanced/integrations/youtube/sponsorblock/ui/VotingButtonController;"
|
||||||
private const val INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/sponsorblock/ui/SponsorBlockViewController;"
|
"Lapp/revanced/integrations/youtube/sponsorblock/ui/SponsorBlockViewController;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
LayoutConstructorFingerprint.result?.let {
|
LayoutConstructorFingerprint.result?.let {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof app version",
|
name = "Spoof app version",
|
||||||
description = "Tricks YouTube into thinking you are running an older version of the app. " +
|
description = "Adds an option to trick YouTube into thinking you are running an older version of the app. " +
|
||||||
"This can be used to restore old UI elements and features.",
|
"This can be used to restore old UI elements and features.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
@@ -38,7 +38,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
object SpoofAppVersionPatch : BytecodePatch(
|
object SpoofAppVersionPatch : BytecodePatch(
|
||||||
setOf(SpoofAppVersionFingerprint)
|
setOf(SpoofAppVersionFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/spoof/SpoofAppVersionPatch;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/youtube/patches/spoof/SpoofAppVersionPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import app.revanced.util.exception
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Change start page",
|
name = "Change start page",
|
||||||
description = "Changes the start page of the app.",
|
description = "Adds an option to set which page the app opens in instead of the homepage.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -29,7 +29,7 @@ object ChangeStartPagePatch : BytecodePatch(
|
|||||||
setOf(HomeActivityFingerprint)
|
setOf(HomeActivityFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/ChangeStartPagePatch;"
|
"Lapp/revanced/integrations/youtube/patches/ChangeStartPagePatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
@@ -60,8 +60,7 @@ object ChangeStartPagePatch : BytecodePatch(
|
|||||||
StringResource("revanced_start_page_explore_value_4", "open.explore"),
|
StringResource("revanced_start_page_explore_value_4", "open.explore"),
|
||||||
StringResource("revanced_start_page_shorts_value_5", "open.shorts"),
|
StringResource("revanced_start_page_shorts_value_5", "open.shorts"),
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
default = ""
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable resuming Shorts on startup",
|
name = "Disable resuming Shorts on startup",
|
||||||
description = "Disables resuming the Shorts player on app startup if a Short was last opened.",
|
description = "Adds an option to disable the Shorts player from resuming on app startup when Shorts were last being watched.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -36,7 +36,7 @@ object DisableResumingShortsOnStartupPatch : BytecodePatch(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/DisableResumingStartupShortsPlayerPatch;"
|
"Lapp/revanced/integrations/youtube/patches/DisableResumingStartupShortsPlayerPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Enable tablet layout",
|
name = "Enable tablet layout",
|
||||||
description = "Spoofs the device form factor to a tablet which enables the tablet layout.",
|
description = "Adds an option to spoof the device form factor to a tablet which enables the tablet layout.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.youtube")]
|
compatiblePackages = [CompatiblePackage("com.google.android.youtube")]
|
||||||
)
|
)
|
||||||
@@ -44,7 +44,7 @@ object EnableTabletLayoutPatch : BytecodePatch(
|
|||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/integrations/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z
|
invoke-static { }, Lapp/revanced/integrations/youtube/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z
|
||||||
move-result v0 # Free register
|
move-result v0 # Free register
|
||||||
if-nez v0, :is_large_form_factor
|
if-nez v0, :is_large_form_factor
|
||||||
""",
|
""",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Tablet mini player",
|
name = "Tablet mini player",
|
||||||
description = "Enables the tablet mini player layout.",
|
description = "Adds an option to enable the tablet mini player layout.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -120,7 +120,7 @@ object TabletMiniPlayerPatch : BytecodePatch(
|
|||||||
this.addInstructions(
|
this.addInstructions(
|
||||||
index,
|
index,
|
||||||
"""
|
"""
|
||||||
invoke-static {v$overrideRegister}, Lapp/revanced/integrations/patches/TabletMiniPlayerOverridePatch;->getTabletMiniPlayerOverride(Z)Z
|
invoke-static {v$overrideRegister}, Lapp/revanced/integrations/youtube/patches/TabletMiniPlayerOverridePatch;->getTabletMiniPlayerOverride(Z)Z
|
||||||
move-result v$overrideRegister
|
move-result v$overrideRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Theme",
|
name = "Theme",
|
||||||
description = "Applies a custom theme.",
|
description = "Adds options for theming and applies a custom background theme (dark background theme defaults to amoled black).",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
LithoColorHookPatch::class,
|
LithoColorHookPatch::class,
|
||||||
SeekbarColorBytecodePatch::class,
|
SeekbarColorBytecodePatch::class,
|
||||||
@@ -46,7 +46,7 @@ object ThemeBytecodePatch : BytecodePatch(
|
|||||||
setOf(UseGradientLoadingScreenFingerprint)
|
setOf(UseGradientLoadingScreenFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/theme/ThemePatch;"
|
"Lapp/revanced/integrations/youtube/patches/theme/ThemePatch;"
|
||||||
|
|
||||||
internal const val GRADIENT_LOADING_SCREEN_AB_CONSTANT = 45412406L
|
internal const val GRADIENT_LOADING_SCREEN_AB_CONSTANT = 45412406L
|
||||||
|
|
||||||
@@ -59,6 +59,7 @@ object ThemeBytecodePatch : BytecodePatch(
|
|||||||
values = mapOf(
|
values = mapOf(
|
||||||
"Amoled black" to AMOLED_BLACK_COLOR,
|
"Amoled black" to AMOLED_BLACK_COLOR,
|
||||||
"Material You" to "@android:color/system_neutral1_900",
|
"Material You" to "@android:color/system_neutral1_900",
|
||||||
|
"Classic (old YouTube)" to "#FF212121",
|
||||||
"Catppuccin (Mocha)" to "#FF181825",
|
"Catppuccin (Mocha)" to "#FF181825",
|
||||||
"Dark pink" to "#FF290025",
|
"Dark pink" to "#FF290025",
|
||||||
"Dark blue" to "#FF001029",
|
"Dark blue" to "#FF001029",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Alternative thumbnails",
|
name = "Alternative thumbnails",
|
||||||
description = "Adds options to replace video thumbnails with still image captures of the video.",
|
description = "Adds options to replace video thumbnails using the DeArrow API or image captures from the video.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class, AlternativeThumbnailsResourcePatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class, AlternativeThumbnailsResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@@ -55,7 +55,7 @@ object AlternativeThumbnailsPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/AlternativeThumbnailsPatch;"
|
"Lapp/revanced/integrations/youtube/patches/AlternativeThumbnailsPatch;"
|
||||||
|
|
||||||
private lateinit var loadImageUrlMethod: MutableMethod
|
private lateinit var loadImageUrlMethod: MutableMethod
|
||||||
private var loadImageUrlIndex = 0
|
private var loadImageUrlIndex = 0
|
||||||
@@ -115,13 +115,13 @@ object AlternativeThumbnailsPatch : BytecodePatch(
|
|||||||
NonInteractivePreference(
|
NonInteractivePreference(
|
||||||
StringResource("revanced_alt_thumbnail_about_title", "Thumbnails in use"),
|
StringResource("revanced_alt_thumbnail_about_title", "Thumbnails in use"),
|
||||||
null, // Summary is dynamically updated based on the current settings.
|
null, // Summary is dynamically updated based on the current settings.
|
||||||
tag = "app.revanced.integrations.settingsmenu.AlternativeThumbnailsStatusPreference"
|
tag = "app.revanced.integrations.youtube.settings.preference.AlternativeThumbnailsStatusPreference"
|
||||||
),
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_alt_thumbnail_dearrow",
|
"revanced_alt_thumbnail_dearrow",
|
||||||
StringResource("revanced_alt_thumbnail_dearrow_title", "Enable DeArrow"),
|
StringResource("revanced_alt_thumbnail_dearrow_title", "Enable DeArrow thumbnails"),
|
||||||
StringResource("revanced_alt_thumbnail_dearrow_summary_on", "Using DeArrow"),
|
StringResource("revanced_alt_thumbnail_dearrow_summary_on", "Using DeArrow thumbnails"),
|
||||||
StringResource("revanced_alt_thumbnail_dearrow_summary_off", "Not using DeArrow")
|
StringResource("revanced_alt_thumbnail_dearrow_summary_off", "Not using DeArrow thumbnails")
|
||||||
),
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_alt_thumbnail_dearrow_connection_toast",
|
"revanced_alt_thumbnail_dearrow_connection_toast",
|
||||||
@@ -150,11 +150,11 @@ object AlternativeThumbnailsPatch : BytecodePatch(
|
|||||||
"revanced_alt_thumbnail_dearrow_about_summary",
|
"revanced_alt_thumbnail_dearrow_about_summary",
|
||||||
"DeArrow provides crowd-sourced thumbnails for YouTube videos. " +
|
"DeArrow provides crowd-sourced thumbnails for YouTube videos. " +
|
||||||
"These thumbnails are often more relevant than those provided by YouTube. " +
|
"These thumbnails are often more relevant than those provided by YouTube. " +
|
||||||
"If enabled, video URLs will be sent to the API server and no other data is sent."
|
"If enabled, video URLs will be sent to the API server and no other data is sent"
|
||||||
+ "\\n\\nTap here to learn more about DeArrow"
|
+ "\\n\\nTap here to learn more about DeArrow"
|
||||||
),
|
),
|
||||||
// Custom about preference with link to the DeArrow website.
|
// Custom about preference with link to the DeArrow website.
|
||||||
tag = "app.revanced.integrations.settingsmenu.AlternativeThumbnailsAboutDeArrowPreference",
|
tag = "app.revanced.integrations.youtube.settings.preference.AlternativeThumbnailsAboutDeArrowPreference",
|
||||||
selectable = true
|
selectable = true
|
||||||
),
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Announcements",
|
name = "Announcements",
|
||||||
description = "Shows ReVanced announcements on startup.",
|
description = "Adds an option to show announcements from ReVanced on app startup.",
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.youtube")],
|
compatiblePackages = [CompatiblePackage("com.google.android.youtube")],
|
||||||
dependencies = [SettingsPatch::class]
|
dependencies = [SettingsPatch::class]
|
||||||
)
|
)
|
||||||
@@ -24,7 +24,7 @@ object AnnouncementsPatch : BytecodePatch(
|
|||||||
setOf(WatchWhileActivityFingerprint)
|
setOf(WatchWhileActivityFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/announcements/AnnouncementsPatch;"
|
"Lapp/revanced/integrations/youtube/patches/announcements/AnnouncementsPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
val onCreateMethod = WatchWhileActivityFingerprint.result?.let {
|
val onCreateMethod = WatchWhileActivityFingerprint.result?.let {
|
||||||
@@ -48,10 +48,12 @@ object AnnouncementsPatch : BytecodePatch(
|
|||||||
StringResource(
|
StringResource(
|
||||||
"revanced_announcements_summary_on",
|
"revanced_announcements_summary_on",
|
||||||
"Announcements are shown on startup"
|
"Announcements are shown on startup"
|
||||||
), StringResource(
|
),
|
||||||
|
StringResource(
|
||||||
"revanced_announcements_summary_off",
|
"revanced_announcements_summary_off",
|
||||||
"Announcements are not shown on startup"
|
"Announcements are not shown on startup"
|
||||||
), StringResource(
|
),
|
||||||
|
StringResource(
|
||||||
"revanced_announcements_enabled_summary",
|
"revanced_announcements_enabled_summary",
|
||||||
"Show announcements on startup"
|
"Show announcements on startup"
|
||||||
),
|
),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user