mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-21 16:34:08 +01:00
Compare commits
33 Commits
v4.10.0-de
...
v4.11.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a80825cbc2 | ||
|
|
55556f3efc | ||
|
|
70e54f8794 | ||
|
|
e2f9193aa8 | ||
|
|
decdff9037 | ||
|
|
8f6519d206 | ||
|
|
b0b809d222 | ||
|
|
979af7ddd0 | ||
|
|
0b098a2027 | ||
|
|
2bfd75ce96 | ||
|
|
047e6d994b | ||
|
|
03eb9c032a | ||
|
|
dfc14c1a26 | ||
|
|
20dedb2605 | ||
|
|
cb7a283be1 | ||
|
|
7fa7ef6c4f | ||
|
|
5a93660825 | ||
|
|
e5ced6310d | ||
|
|
1147094241 | ||
|
|
f0cc415199 | ||
|
|
c0f8ddac52 | ||
|
|
3cfe745d59 | ||
|
|
550ac09e32 | ||
|
|
e2409213d4 | ||
|
|
a8b14d560f | ||
|
|
d5c0b5ed65 | ||
|
|
343fdec796 | ||
|
|
2ea583c220 | ||
|
|
8dda8988ef | ||
|
|
b575fc68ff | ||
|
|
c979e92676 | ||
|
|
b78b7cfe6c | ||
|
|
4919cba478 |
1
.github/workflows/pull_strings.yml
vendored
1
.github/workflows/pull_strings.yml
vendored
@@ -14,6 +14,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ref: dev
|
||||||
|
|
||||||
- name: Pull strings
|
- name: Pull strings
|
||||||
uses: crowdin/github-action@v1
|
uses: crowdin/github-action@v1
|
||||||
|
|||||||
3
.github/workflows/push_strings.yml
vendored
3
.github/workflows/push_strings.yml
vendored
@@ -3,6 +3,8 @@ name: Push strings
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
paths:
|
paths:
|
||||||
- /src/main/resources/addresources/values/strings.xml
|
- /src/main/resources/addresources/values/strings.xml
|
||||||
|
|
||||||
@@ -15,6 +17,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ref: dev
|
||||||
|
|
||||||
- name: Push strings
|
- name: Push strings
|
||||||
uses: crowdin/github-action@v1
|
uses: crowdin/github-action@v1
|
||||||
|
|||||||
109
CHANGELOG.md
109
CHANGELOG.md
@@ -1,3 +1,112 @@
|
|||||||
|
# [4.11.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v4.10.1-dev.2...v4.11.0-dev.1) (2024-06-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Remove share targets` patch ([#3334](https://github.com/ReVanced/revanced-patches/issues/3334)) ([9414122](https://github.com/ReVanced/revanced-patches/commit/94141228163aee8d051491db51fc1e4c8b86f0e6))
|
||||||
|
* **Instagram:** Add `Hide ads` patch ([#3380](https://github.com/ReVanced/revanced-patches/issues/3380)) ([c6b2f8c](https://github.com/ReVanced/revanced-patches/commit/c6b2f8c0172b4fd142927d9448ed855831c86ae4))
|
||||||
|
* **RAR:** Add `Hide purchase reminder` patch ([#3321](https://github.com/ReVanced/revanced-patches/issues/3321)) ([8fbe7e3](https://github.com/ReVanced/revanced-patches/commit/8fbe7e3d38c43adfa0755bcbe87f8c6b7696da3a))
|
||||||
|
* **Stocard:** Add `Hide offers tab` and `Hide story bubbles` patch ([#3359](https://github.com/ReVanced/revanced-patches/issues/3359)) ([fbd0507](https://github.com/ReVanced/revanced-patches/commit/fbd0507ce5cdeb93a1f661aa8097139c61e643a0))
|
||||||
|
|
||||||
|
## [4.10.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v4.10.1-dev.1...v4.10.1-dev.2) (2024-06-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Boost for reddit - Fix missing audio in video downloads:** Replace correct strings ([#3379](https://github.com/ReVanced/revanced-patches/issues/3379)) ([b43db98](https://github.com/ReVanced/revanced-patches/commit/b43db98e8483e2939d8fb9cd02443f24aeaae3c3))
|
||||||
|
|
||||||
|
## [4.10.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v4.10.0...v4.10.1-dev.1) (2024-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide layout components:** Detect if a keyword filter hides all videos ([#3365](https://github.com/ReVanced/revanced-patches/issues/3365)) ([6aa47ec](https://github.com/ReVanced/revanced-patches/commit/6aa47ec1050cf32158ab608441c0649501184971))
|
||||||
|
|
||||||
|
# [4.10.0](https://github.com/ReVanced/revanced-patches/compare/v4.9.0...v4.10.0) (2024-06-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Correct invalid string name ([b84494f](https://github.com/ReVanced/revanced-patches/commit/b84494f4e26e040ada69ed7a516f331f2d47da87))
|
||||||
|
* **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([#3316](https://github.com/ReVanced/revanced-patches/issues/3316)) ([c05264a](https://github.com/ReVanced/revanced-patches/commit/c05264af3944cbfe8d9aa34fb0e0fddb05a1d42f))
|
||||||
|
* **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([#3327](https://github.com/ReVanced/revanced-patches/issues/3327)) ([0198a43](https://github.com/ReVanced/revanced-patches/commit/0198a436f97b127a2a5dd283644254f9a0ae3e43))
|
||||||
|
* **YouTube Music:** Rename `Minimized playback` to `Remove background playback restrictions` ([#3315](https://github.com/ReVanced/revanced-patches/issues/3315)) ([3c31e55](https://github.com/ReVanced/revanced-patches/commit/3c31e55b13d9495e857f068f8cd2b4320112d763))
|
||||||
|
* **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([#3314](https://github.com/ReVanced/revanced-patches/issues/3314)) ([37d415b](https://github.com/ReVanced/revanced-patches/commit/37d415b53af4771d9c97a8b1c153be32bf3ac2e0))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Change version code` patch ([#3338](https://github.com/ReVanced/revanced-patches/issues/3338)) ([685ef39](https://github.com/ReVanced/revanced-patches/commit/685ef39119daf1033a83262982519531c481c40f))
|
||||||
|
* **Boost For Reddit:** Add `Fix /s/ links` patch ([#3154](https://github.com/ReVanced/revanced-patches/issues/3154)) ([5fa9fd2](https://github.com/ReVanced/revanced-patches/commit/5fa9fd2dfef43838d7311a967a3e805256a5d116))
|
||||||
|
* **Boost for Reddit:** Add `Fix audio missing in video downloads` patch ([#3287](https://github.com/ReVanced/revanced-patches/issues/3287)) ([a9258d4](https://github.com/ReVanced/revanced-patches/commit/a9258d48d3ddf8552ab56219677a3b31ee553666))
|
||||||
|
* **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([#3333](https://github.com/ReVanced/revanced-patches/issues/3333)) ([be9e244](https://github.com/ReVanced/revanced-patches/commit/be9e24420fda80903e44e2e2278ea4904ecac4e1))
|
||||||
|
* **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([#3317](https://github.com/ReVanced/revanced-patches/issues/3317)) ([9c4c4f0](https://github.com/ReVanced/revanced-patches/commit/9c4c4f05a762d745404101bbc3925ab4eba2deb8))
|
||||||
|
* **YouTube - Miniplayer:** Rename `Tablet mini player` and allow selecting the style of the in-app miniplayer ([#3302](https://github.com/ReVanced/revanced-patches/issues/3302)) ([5511736](https://github.com/ReVanced/revanced-patches/commit/5511736b0c5dd409db6a68db0f85e389bb95be47))
|
||||||
|
|
||||||
|
# [4.10.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.9...v4.10.0-dev.10) (2024-06-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Correct invalid string name ([b84494f](https://github.com/ReVanced/revanced-patches/commit/b84494f4e26e040ada69ed7a516f331f2d47da87))
|
||||||
|
|
||||||
|
# [4.10.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.8...v4.10.0-dev.9) (2024-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide description components:** Replace `Hide game section` and `Hide music section` with `Hide attributes section` ([#3327](https://github.com/ReVanced/revanced-patches/issues/3327)) ([0198a43](https://github.com/ReVanced/revanced-patches/commit/0198a436f97b127a2a5dd283644254f9a0ae3e43))
|
||||||
|
|
||||||
|
# [4.10.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.7...v4.10.0-dev.8) (2024-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Comments:** Add `Hide 'Create a Short' button` option ([#3333](https://github.com/ReVanced/revanced-patches/issues/3333)) ([be9e244](https://github.com/ReVanced/revanced-patches/commit/be9e24420fda80903e44e2e2278ea4904ecac4e1))
|
||||||
|
|
||||||
|
# [4.10.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.6...v4.10.0-dev.7) (2024-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Change version code` patch ([#3338](https://github.com/ReVanced/revanced-patches/issues/3338)) ([685ef39](https://github.com/ReVanced/revanced-patches/commit/685ef39119daf1033a83262982519531c481c40f))
|
||||||
|
|
||||||
|
# [4.10.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.5...v4.10.0-dev.6) (2024-06-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Comments:** Add `Hide Thanks button` and `Hide 'Comments by members' header` options ([#3317](https://github.com/ReVanced/revanced-patches/issues/3317)) ([9c4c4f0](https://github.com/ReVanced/revanced-patches/commit/9c4c4f05a762d745404101bbc3925ab4eba2deb8))
|
||||||
|
|
||||||
|
# [4.10.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.4...v4.10.0-dev.5) (2024-06-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** Correctly play more livestreams using Android VR ([#3316](https://github.com/ReVanced/revanced-patches/issues/3316)) ([c05264a](https://github.com/ReVanced/revanced-patches/commit/c05264af3944cbfe8d9aa34fb0e0fddb05a1d42f))
|
||||||
|
|
||||||
|
# [4.10.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.3...v4.10.0-dev.4) (2024-06-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Boost for Reddit:** Add `Fix audio missing in video downloads` patch ([#3287](https://github.com/ReVanced/revanced-patches/issues/3287)) ([a9258d4](https://github.com/ReVanced/revanced-patches/commit/a9258d48d3ddf8552ab56219677a3b31ee553666))
|
||||||
|
|
||||||
|
# [4.10.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.2...v4.10.0-dev.3) (2024-06-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Boost For Reddit:** Add `Fix /s/ links` patch ([#3154](https://github.com/ReVanced/revanced-patches/issues/3154)) ([5fa9fd2](https://github.com/ReVanced/revanced-patches/commit/5fa9fd2dfef43838d7311a967a3e805256a5d116))
|
||||||
|
|
||||||
|
# [4.10.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v4.10.0-dev.1...v4.10.0-dev.2) (2024-06-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube Music:** Rename `Minimized playback` to `Remove background playback restrictions` ([#3315](https://github.com/ReVanced/revanced-patches/issues/3315)) ([3c31e55](https://github.com/ReVanced/revanced-patches/commit/3c31e55b13d9495e857f068f8cd2b4320112d763))
|
||||||
|
* **YouTube:** Rename `Minimized playback` to `Remove background playback restrictions` ([#3314](https://github.com/ReVanced/revanced-patches/issues/3314)) ([37d415b](https://github.com/ReVanced/revanced-patches/commit/37d415b53af4771d9c97a8b1c153be32bf3ac2e0))
|
||||||
|
|
||||||
# [4.10.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v4.9.0...v4.10.0-dev.1) (2024-06-07)
|
# [4.10.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v4.9.0...v4.10.0-dev.1) (2024-06-07)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,12 @@ public final class app/revanced/patches/all/misc/transformation/IMethodCall$Defa
|
|||||||
public static fun replaceInvokeVirtualWithIntegrations (Lapp/revanced/patches/all/misc/transformation/IMethodCall;Ljava/lang/String;Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Lcom/android/tools/smali/dexlib2/iface/instruction/formats/Instruction35c;I)V
|
public static fun replaceInvokeVirtualWithIntegrations (Lapp/revanced/patches/all/misc/transformation/IMethodCall;Ljava/lang/String;Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;Lcom/android/tools/smali/dexlib2/iface/instruction/formats/Instruction35c;I)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch : app/revanced/patcher/patch/ResourcePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch;
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/screencapture/removerestriction/RemoveCaptureRestrictionPatch : app/revanced/patches/all/misc/transformation/BaseTransformInstructionsPatch {
|
public final class app/revanced/patches/all/screencapture/removerestriction/RemoveCaptureRestrictionPatch : app/revanced/patches/all/misc/transformation/BaseTransformInstructionsPatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/all/screencapture/removerestriction/RemoveCaptureRestrictionPatch;
|
public static final field INSTANCE Lapp/revanced/patches/all/screencapture/removerestriction/RemoveCaptureRestrictionPatch;
|
||||||
public synthetic fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Ljava/lang/Object;
|
public synthetic fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Ljava/lang/Object;
|
||||||
@@ -149,6 +155,12 @@ public final class app/revanced/patches/all/screenshot/removerestriction/RemoveS
|
|||||||
public static fun values ()[Lapp/revanced/patches/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch$MethodCall;
|
public static fun values ()[Lapp/revanced/patches/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch$MethodCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/all/shortcut/sharetargets/RemoveShareTargetsPatch : app/revanced/patcher/patch/ResourcePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/all/shortcut/sharetargets/RemoveShareTargetsPatch;
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/all/telephony/sim/spoof/SpoofSimCountryPatch : app/revanced/patches/all/misc/transformation/BaseTransformInstructionsPatch {
|
public final class app/revanced/patches/all/telephony/sim/spoof/SpoofSimCountryPatch : app/revanced/patches/all/misc/transformation/BaseTransformInstructionsPatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/all/telephony/sim/spoof/SpoofSimCountryPatch;
|
public static final field INSTANCE Lapp/revanced/patches/all/telephony/sim/spoof/SpoofSimCountryPatch;
|
||||||
public synthetic fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Ljava/lang/Object;
|
public synthetic fun filterMap (Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;I)Ljava/lang/Object;
|
||||||
@@ -235,6 +247,12 @@ public final class app/revanced/patches/inshorts/ad/HideAdsPatch : app/revanced/
|
|||||||
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/instagram/patches/ad/HideAdsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/instagram/patches/ad/HideAdsPatch;
|
||||||
|
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/instagram/patches/ads/timeline/HideTimelineAdsPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/instagram/patches/ads/timeline/HideTimelineAdsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/instagram/patches/ads/timeline/HideTimelineAdsPatch;
|
public static final field INSTANCE Lapp/revanced/patches/instagram/patches/ads/timeline/HideTimelineAdsPatch;
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
@@ -403,6 +421,12 @@ public final class app/revanced/patches/music/misc/androidauto/BypassCertificate
|
|||||||
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/music/misc/backgroundplayback/BackgroundPlaybackPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/music/misc/backgroundplayback/BackgroundPlaybackPatch;
|
||||||
|
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/music/misc/gms/Constants {
|
public final class app/revanced/patches/music/misc/gms/Constants {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/music/misc/gms/Constants;
|
public static final field INSTANCE Lapp/revanced/patches/music/misc/gms/Constants;
|
||||||
}
|
}
|
||||||
@@ -511,6 +535,16 @@ public final class app/revanced/patches/pixiv/ads/HideAdsPatch : app/revanced/pa
|
|||||||
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/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatch;
|
||||||
|
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/rar/misc/annoyances/purchasereminder/fingerprints/ShowReminderFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/rar/misc/annoyances/purchasereminder/fingerprints/ShowReminderFingerprint;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/reddit/ad/banner/HideBannerPatch : app/revanced/patcher/patch/ResourcePatch {
|
public final class app/revanced/patches/reddit/ad/banner/HideBannerPatch : app/revanced/patcher/patch/ResourcePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/reddit/ad/banner/HideBannerPatch;
|
public static final field INSTANCE Lapp/revanced/patches/reddit/ad/banner/HideBannerPatch;
|
||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
@@ -529,6 +563,18 @@ public final class app/revanced/patches/reddit/ad/general/HideAdsPatch : app/rev
|
|||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract class app/revanced/patches/reddit/customclients/BaseFixSLinksPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public fun <init> (Lapp/revanced/patcher/fingerprint/MethodFingerprint;Lapp/revanced/patcher/fingerprint/MethodFingerprint;Ljava/util/Set;Ljava/util/Set;)V
|
||||||
|
public synthetic fun <init> (Lapp/revanced/patcher/fingerprint/MethodFingerprint;Lapp/revanced/patcher/fingerprint/MethodFingerprint;Ljava/util/Set;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
protected abstract fun getIntegrationsClassDescriptor ()Ljava/lang/String;
|
||||||
|
protected final fun getResolveSLinkMethod ()Ljava/lang/String;
|
||||||
|
protected final fun getSetAccessTokenMethod ()Ljava/lang/String;
|
||||||
|
protected abstract fun patchNavigationHandler (Lapp/revanced/patcher/fingerprint/MethodFingerprintResult;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
protected abstract fun patchSetAccessToken (Lapp/revanced/patcher/fingerprint/MethodFingerprintResult;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
}
|
||||||
|
|
||||||
public abstract class app/revanced/patches/reddit/customclients/BaseSpoofClientPatch : app/revanced/patcher/patch/BytecodePatch {
|
public abstract class app/revanced/patches/reddit/customclients/BaseSpoofClientPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public fun <init> (Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;)V
|
public fun <init> (Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;Ljava/util/Set;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
@@ -564,6 +610,20 @@ public final class app/revanced/patches/reddit/customclients/boostforreddit/api/
|
|||||||
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun patchUserAgent (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch;
|
||||||
|
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/reddit/customclients/boostforreddit/fix/slink/FixSLinksPatch : app/revanced/patches/reddit/customclients/BaseFixSLinksPatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/boostforreddit/fix/slink/FixSLinksPatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/reddit/customclients/boostforreddit/misc/integrations/IntegrationsPatch : app/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/boostforreddit/misc/integrations/IntegrationsPatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/reddit/customclients/infinityforreddit/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/BaseSpoofClientPatch {
|
public final class app/revanced/patches/reddit/customclients/infinityforreddit/api/SpoofClientPatch : app/revanced/patches/reddit/customclients/BaseSpoofClientPatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/infinityforreddit/api/SpoofClientPatch;
|
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/infinityforreddit/api/SpoofClientPatch;
|
||||||
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun patchClientId (Ljava/util/Set;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
@@ -642,10 +702,12 @@ public final class app/revanced/patches/reddit/customclients/syncforreddit/detec
|
|||||||
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/reddit/customclients/syncforreddit/fix/slink/FixSLinksPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/reddit/customclients/syncforreddit/fix/slink/FixSLinksPatch : app/revanced/patches/reddit/customclients/BaseFixSLinksPatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/fix/slink/FixSLinksPatch;
|
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/fix/slink/FixSLinksPatch;
|
||||||
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/reddit/customclients/syncforreddit/misc/integrations/IntegrationsPatch : app/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/misc/integrations/IntegrationsPatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
@@ -994,6 +1056,18 @@ public final class app/revanced/patches/spotify/navbar/PremiumNavbarTabResourceP
|
|||||||
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
|
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/stocard/layout/HideOffersTabPatch : app/revanced/patcher/patch/ResourcePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/stocard/layout/HideOffersTabPatch;
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/stocard/layout/HideStoryBubblesPatch : app/revanced/patcher/patch/ResourcePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/stocard/layout/HideStoryBubblesPatch;
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/ResourceContext;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/strava/subscription/UnlockSubscriptionPatch;
|
public static final field INSTANCE Lapp/revanced/patches/strava/subscription/UnlockSubscriptionPatch;
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
@@ -1638,6 +1712,12 @@ public final class app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch
|
|||||||
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/misc/backgroundplayback/BackgroundPlaybackPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatch;
|
||||||
|
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/misc/debugging/DebuggingPatch : app/revanced/patcher/patch/ResourcePatch {
|
public final class app/revanced/patches/youtube/misc/debugging/DebuggingPatch : app/revanced/patcher/patch/ResourcePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/debugging/DebuggingPatch;
|
public static final field INSTANCE Lapp/revanced/patches/youtube/misc/debugging/DebuggingPatch;
|
||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
|||||||
@@ -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 = 4.10.0-dev.1
|
version = 4.11.0-dev.1
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package app.revanced.patches.all.misc.versioncode
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.intPatchOption
|
||||||
|
import app.revanced.util.getNode
|
||||||
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Change version code",
|
||||||
|
description = "Changes the version code of the app. By default the highest version code is set. " +
|
||||||
|
"This allows older versions of an app to be installed " +
|
||||||
|
"if their version code is set to the same or a higher value and can stop app stores to update the app.",
|
||||||
|
use = false,
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object ChangeVersionCodePatch : ResourcePatch() {
|
||||||
|
private val versionCode by intPatchOption(
|
||||||
|
key = "versionCode",
|
||||||
|
default = Int.MAX_VALUE,
|
||||||
|
values = mapOf(
|
||||||
|
"Lowest" to 1,
|
||||||
|
"Highest" to Int.MAX_VALUE,
|
||||||
|
),
|
||||||
|
title = "Version code",
|
||||||
|
description = "The version code to use",
|
||||||
|
required = true,
|
||||||
|
) {
|
||||||
|
it!! >= 1
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun execute(context: ResourceContext) {
|
||||||
|
context.document["AndroidManifest.xml"].use { document ->
|
||||||
|
val manifestElement = document.getNode("manifest") as Element
|
||||||
|
manifestElement.setAttribute("android:versionCode", "$versionCode")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package app.revanced.patches.all.shortcut.sharetargets
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.util.asSequence
|
||||||
|
import app.revanced.util.getNode
|
||||||
|
import org.w3c.dom.Element
|
||||||
|
import java.io.FileNotFoundException
|
||||||
|
import java.util.logging.Logger
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove share targets",
|
||||||
|
description = "Removes share targets like directly sharing to a frequent contact.",
|
||||||
|
use = false,
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RemoveShareTargetsPatch : ResourcePatch() {
|
||||||
|
override fun execute(context: ResourceContext) {
|
||||||
|
try {
|
||||||
|
context.document["res/xml/shortcuts.xml"]
|
||||||
|
} catch (_: FileNotFoundException) {
|
||||||
|
return Logger.getLogger(this::class.java.name).warning("The app has no shortcuts")
|
||||||
|
}.use { document ->
|
||||||
|
val rootNode = document.getNode("shortcuts") as? Element ?: return@use
|
||||||
|
|
||||||
|
document.getElementsByTagName("share-target").asSequence().forEach {
|
||||||
|
rootNode.removeChild(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package app.revanced.patches.instagram.patches.ad
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.instagram.patches.ad.fingerprints.AdInjectorFingerprint
|
||||||
|
import app.revanced.util.exception
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Hide ads",
|
||||||
|
description = "Hides ads in stories, discover, profile, etc." +
|
||||||
|
"An ad can still appear once when refreshing the home feed.",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.instagram.android")],
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object HideAdsPatch : BytecodePatch(
|
||||||
|
setOf(AdInjectorFingerprint),
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) =
|
||||||
|
AdInjectorFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return v0
|
||||||
|
""",
|
||||||
|
) ?: throw AdInjectorFingerprint.exception
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package app.revanced.patches.instagram.patches.ad.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
internal object AdInjectorFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
accessFlags = AccessFlags.PRIVATE.value,
|
||||||
|
parameters = listOf("L", "L"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.IGET,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
),
|
||||||
|
strings = listOf("SponsoredContentController::Delivery"),
|
||||||
|
)
|
||||||
@@ -1,50 +1,13 @@
|
|||||||
package app.revanced.patches.music.layout.minimizedplayback
|
package app.revanced.patches.music.layout.minimizedplayback
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patches.music.misc.backgroundplayback.BackgroundPlaybackPatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.BackgroundPlaybackDisableFingerprint
|
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.KidsMinimizedPlaybackPolicyControllerFingerprint
|
|
||||||
import app.revanced.util.exception
|
|
||||||
|
|
||||||
@Patch(
|
@Deprecated("This patch has been merged into BackgroundPlaybackPatch.")
|
||||||
name = "Minimized playback",
|
|
||||||
description = "Unlocks options for picture-in-picture and background playback.",
|
|
||||||
compatiblePackages = [
|
|
||||||
CompatiblePackage(
|
|
||||||
"com.google.android.apps.youtube.music",
|
|
||||||
[
|
|
||||||
"6.45.54",
|
|
||||||
"6.51.53",
|
|
||||||
"7.01.53",
|
|
||||||
"7.02.52",
|
|
||||||
"7.03.52",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object MinimizedPlaybackPatch : BytecodePatch(
|
object MinimizedPlaybackPatch : BytecodePatch(
|
||||||
setOf(
|
dependencies = setOf(BackgroundPlaybackPatch::class),
|
||||||
KidsMinimizedPlaybackPolicyControllerFingerprint,
|
|
||||||
BackgroundPlaybackDisableFingerprint,
|
|
||||||
),
|
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
KidsMinimizedPlaybackPolicyControllerFingerprint.result?.mutableMethod?.addInstruction(
|
|
||||||
0,
|
|
||||||
"return-void",
|
|
||||||
) ?: throw KidsMinimizedPlaybackPolicyControllerFingerprint.exception
|
|
||||||
|
|
||||||
BackgroundPlaybackDisableFingerprint.result?.mutableMethod?.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
return v0
|
|
||||||
""",
|
|
||||||
) ?: throw BackgroundPlaybackDisableFingerprint.exception
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package app.revanced.patches.music.misc.backgroundplayback
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.music.misc.backgroundplayback.fingerprints.BackgroundPlaybackDisableFingerprint
|
||||||
|
import app.revanced.patches.music.misc.backgroundplayback.fingerprints.KidsBackgroundPlaybackPolicyControllerFingerprint
|
||||||
|
import app.revanced.util.resultOrThrow
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove background playback restrictions",
|
||||||
|
description = "Removes restrictions on background playback.",
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.45.54",
|
||||||
|
"6.51.53",
|
||||||
|
"7.01.53",
|
||||||
|
"7.02.52",
|
||||||
|
"7.03.52",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object BackgroundPlaybackPatch : BytecodePatch(
|
||||||
|
setOf(
|
||||||
|
KidsBackgroundPlaybackPolicyControllerFingerprint,
|
||||||
|
BackgroundPlaybackDisableFingerprint,
|
||||||
|
),
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
KidsBackgroundPlaybackPolicyControllerFingerprint.resultOrThrow().mutableMethod.addInstruction(
|
||||||
|
0,
|
||||||
|
"return-void",
|
||||||
|
)
|
||||||
|
|
||||||
|
BackgroundPlaybackDisableFingerprint.resultOrThrow().mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
""",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
package app.revanced.patches.music.misc.backgroundplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
package app.revanced.patches.music.misc.backgroundplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object KidsMinimizedPlaybackPolicyControllerFingerprint : MethodFingerprint(
|
internal object KidsBackgroundPlaybackPolicyControllerFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf("I", "L", "Z"),
|
listOf("I", "L", "Z"),
|
||||||
@@ -2,10 +2,11 @@ package app.revanced.patches.music.premium.backgroundplay
|
|||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.MinimizedPlaybackPatch
|
import app.revanced.patches.music.misc.backgroundplayback.BackgroundPlaybackPatch
|
||||||
@Deprecated("This patch has been merged into MinimizedPlaybackPatch.")
|
|
||||||
|
@Deprecated("This patch has been merged into BackgroundPlaybackPatch.")
|
||||||
object BackgroundPlayPatch : BytecodePatch(
|
object BackgroundPlayPatch : BytecodePatch(
|
||||||
dependencies = setOf(MinimizedPlaybackPatch::class),
|
dependencies = setOf(BackgroundPlaybackPatch::class),
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package app.revanced.patches.rar.misc.annoyances.purchasereminder
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.rar.misc.annoyances.purchasereminder.fingerprints.ShowReminderFingerprint
|
||||||
|
import app.revanced.util.exception
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Hide purchase reminder",
|
||||||
|
description = "Hides the popup that reminds you to purchase the app.",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.rarlab.rar")],
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object HidePurchaseReminderPatch : BytecodePatch(
|
||||||
|
setOf(ShowReminderFingerprint),
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
ShowReminderFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||||
|
?: throw ShowReminderFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.rar.misc.annoyances.purchasereminder.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object ShowReminderFingerprint : MethodFingerprint(
|
||||||
|
returnType = "V",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("AdsNotify;") && methodDef.name == "show"
|
||||||
|
},
|
||||||
|
)
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients
|
||||||
|
|
||||||
|
import app.revanced.patcher.PatchClass
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprintResult
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.util.resultOrThrow
|
||||||
|
|
||||||
|
abstract class BaseFixSLinksPatch(
|
||||||
|
private val handleNavigationFingerprint: MethodFingerprint,
|
||||||
|
private val setAccessTokenFingerprint: MethodFingerprint,
|
||||||
|
compatiblePackages: Set<CompatiblePackage>,
|
||||||
|
dependencies: Set<PatchClass> = emptySet(),
|
||||||
|
) : BytecodePatch(
|
||||||
|
name = "Fix /s/ links",
|
||||||
|
fingerprints = setOf(handleNavigationFingerprint, setAccessTokenFingerprint),
|
||||||
|
compatiblePackages = compatiblePackages,
|
||||||
|
dependencies = dependencies,
|
||||||
|
) {
|
||||||
|
protected abstract val integrationsClassDescriptor: String
|
||||||
|
|
||||||
|
protected val resolveSLinkMethod =
|
||||||
|
"patchResolveSLink(Ljava/lang/String;)Z"
|
||||||
|
|
||||||
|
protected val setAccessTokenMethod =
|
||||||
|
"patchSetAccessToken(Ljava/lang/String;)V"
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
handleNavigationFingerprint.resultOrThrow().patchNavigationHandler(context)
|
||||||
|
setAccessTokenFingerprint.resultOrThrow().patchSetAccessToken(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch app's navigation handler to resolve /s/ links.
|
||||||
|
*
|
||||||
|
* @param context The current [BytecodeContext].
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
protected abstract fun MethodFingerprintResult.patchNavigationHandler(context: BytecodeContext)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch access token setup in app to resolve /s/ links with an access token
|
||||||
|
* in order to bypass API bans when making unauthorized requests.
|
||||||
|
*
|
||||||
|
* @param context The current [BytecodeContext].
|
||||||
|
*/
|
||||||
|
protected abstract fun MethodFingerprintResult.patchSetAccessToken(context: BytecodeContext)
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.fix.downloads
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.reddit.customclients.boostforreddit.fix.downloads.fingerprints.DownloadAudioFingerprint
|
||||||
|
import app.revanced.util.resultOrThrow
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Fix missing audio in video downloads",
|
||||||
|
description = "Fixes audio missing in videos downloaded from v.redd.it.",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.rubenmayayo.reddit")],
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object FixAudioMissingInDownloadsPatch : BytecodePatch(
|
||||||
|
setOf(DownloadAudioFingerprint),
|
||||||
|
) {
|
||||||
|
private val endpointReplacements = mapOf(
|
||||||
|
"/DASH_audio.mp4" to "/DASH_AUDIO_128.mp4",
|
||||||
|
"/audio" to "/DASH_AUDIO_64.mp4",
|
||||||
|
)
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
DownloadAudioFingerprint.resultOrThrow().let { result ->
|
||||||
|
result.scanResult.stringsScanResult!!.matches.forEach { match ->
|
||||||
|
result.mutableMethod.apply {
|
||||||
|
val replacement = endpointReplacements[match.string]
|
||||||
|
val register = getInstruction<OneRegisterInstruction>(match.index).registerA
|
||||||
|
|
||||||
|
replaceInstruction(match.index, "const-string v$register, \"$replacement\"")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.fix.downloads.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object DownloadAudioFingerprint : MethodFingerprint(
|
||||||
|
strings = setOf("/DASH_audio.mp4", "/audio"),
|
||||||
|
)
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.fix.slink
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprintResult
|
||||||
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
|
import app.revanced.patches.reddit.customclients.BaseFixSLinksPatch
|
||||||
|
import app.revanced.patches.reddit.customclients.boostforreddit.fix.slink.fingerprints.GetOAuthAccessTokenFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.boostforreddit.fix.slink.fingerprints.HandleNavigationFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.boostforreddit.misc.integrations.IntegrationsPatch
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
object FixSLinksPatch : BaseFixSLinksPatch(
|
||||||
|
handleNavigationFingerprint = HandleNavigationFingerprint,
|
||||||
|
setAccessTokenFingerprint = GetOAuthAccessTokenFingerprint,
|
||||||
|
compatiblePackages = setOf(CompatiblePackage("com.rubenmayayo.reddit")),
|
||||||
|
dependencies = setOf(IntegrationsPatch::class),
|
||||||
|
) {
|
||||||
|
override val integrationsClassDescriptor = "Lapp/revanced/integrations/boostforreddit/FixSLinksPatch;"
|
||||||
|
|
||||||
|
override fun MethodFingerprintResult.patchNavigationHandler(context: BytecodeContext) {
|
||||||
|
mutableMethod.apply {
|
||||||
|
val urlRegister = "p1"
|
||||||
|
val tempRegister = "v1"
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
invoke-static { $urlRegister }, $integrationsClassDescriptor->$resolveSLinkMethod
|
||||||
|
move-result $tempRegister
|
||||||
|
if-eqz $tempRegister, :continue
|
||||||
|
return $tempRegister
|
||||||
|
""",
|
||||||
|
ExternalLabel("continue", getInstruction(0)),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun MethodFingerprintResult.patchSetAccessToken(context: BytecodeContext) = mutableMethod.addInstruction(
|
||||||
|
3,
|
||||||
|
"invoke-static { v0 }, $integrationsClassDescriptor->$setAccessTokenMethod",
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.fix.slink.fingerprints
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
internal object GetOAuthAccessTokenFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf("access_token"),
|
||||||
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
|
returnType = "Ljava/lang/String",
|
||||||
|
customFingerprint = { _, classDef -> classDef.type == "Lnet/dean/jraw/http/oauth/OAuthData;" },
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.fix.slink.fingerprints
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object HandleNavigationFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf(
|
||||||
|
"android.intent.action.SEARCH",
|
||||||
|
"subscription",
|
||||||
|
"sort",
|
||||||
|
"period",
|
||||||
|
"boostforreddit.com/themes",
|
||||||
|
),
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.misc.integrations
|
||||||
|
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch
|
||||||
|
import app.revanced.patches.reddit.customclients.boostforreddit.misc.integrations.fingerprints.InitFingerprint
|
||||||
|
|
||||||
|
@Patch(requiresIntegrations = true)
|
||||||
|
object IntegrationsPatch : BaseIntegrationsPatch(
|
||||||
|
setOf(InitFingerprint)
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.boostforreddit.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
internal object InitFingerprint : IntegrationsFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ -> methodDef.definingClass == "Lcom/rubenmayayo/reddit/MyApplication;" && methodDef.name == "onCreate" },
|
||||||
|
insertIndexResolver = { 1 } // Insert after call to super class.
|
||||||
|
)
|
||||||
@@ -1,32 +1,49 @@
|
|||||||
package app.revanced.patches.reddit.customclients.syncforreddit.fix.slink
|
package app.revanced.patches.reddit.customclients.syncforreddit.fix.slink
|
||||||
|
|
||||||
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.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.fingerprint.MethodFingerprintResult
|
||||||
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
|
import app.revanced.patches.reddit.customclients.BaseFixSLinksPatch
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.fix.slink.fingerprints.LinkHelperOpenLinkFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.fix.slink.fingerprints.LinkHelperOpenLinkFingerprint
|
||||||
import app.revanced.util.exception
|
import app.revanced.patches.reddit.customclients.syncforreddit.fix.slink.fingerprints.SetAuthorizationHeaderFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.syncforreddit.misc.integrations.IntegrationsPatch
|
||||||
|
|
||||||
@Patch(
|
@Suppress("unused")
|
||||||
name = "Fix /s/ links",
|
object FixSLinksPatch : BaseFixSLinksPatch(
|
||||||
description = "Fixes the issue where /s/ links do not work.",
|
handleNavigationFingerprint = LinkHelperOpenLinkFingerprint,
|
||||||
compatiblePackages = [
|
setAccessTokenFingerprint = SetAuthorizationHeaderFingerprint,
|
||||||
|
compatiblePackages = setOf(
|
||||||
CompatiblePackage("com.laurencedawson.reddit_sync"),
|
CompatiblePackage("com.laurencedawson.reddit_sync"),
|
||||||
CompatiblePackage("com.laurencedawson.reddit_sync.pro"),
|
CompatiblePackage("com.laurencedawson.reddit_sync.pro"),
|
||||||
CompatiblePackage("com.laurencedawson.reddit_sync.dev")
|
CompatiblePackage("com.laurencedawson.reddit_sync.dev"),
|
||||||
],
|
),
|
||||||
requiresIntegrations = true
|
dependencies = setOf(IntegrationsPatch::class),
|
||||||
)
|
|
||||||
object FixSLinksPatch : BytecodePatch(
|
|
||||||
setOf(LinkHelperOpenLinkFingerprint)
|
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) =
|
override val integrationsClassDescriptor = "Lapp/revanced/integrations/syncforreddit/FixSLinksPatch;"
|
||||||
LinkHelperOpenLinkFingerprint.result?.mutableMethod?.addInstructions(
|
|
||||||
1,
|
override fun MethodFingerprintResult.patchNavigationHandler(context: BytecodeContext) {
|
||||||
|
mutableMethod.apply {
|
||||||
|
val urlRegister = "p3"
|
||||||
|
val tempRegister = "v2"
|
||||||
|
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { p3 }, Lapp/revanced/integrations/syncforreddit/FixSLinksPatch;->resolveSLink(Ljava/lang/String;)Ljava/lang/String;
|
invoke-static { $urlRegister }, $integrationsClassDescriptor->$resolveSLinkMethod
|
||||||
move-result-object p3
|
move-result $tempRegister
|
||||||
"""
|
if-eqz $tempRegister, :continue
|
||||||
) ?: throw LinkHelperOpenLinkFingerprint.exception
|
return $tempRegister
|
||||||
|
""",
|
||||||
|
ExternalLabel("continue", getInstruction(0)),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun MethodFingerprintResult.patchSetAccessToken(context: BytecodeContext) = mutableMethod.addInstruction(
|
||||||
|
0,
|
||||||
|
"invoke-static { p0 }, $integrationsClassDescriptor->$setAccessTokenMethod",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.syncforreddit.fix.slink.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object SetAuthorizationHeaderFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf("Authorization", "bearer "),
|
||||||
|
returnType = "Ljava/util/HashMap;",
|
||||||
|
customFingerprint = { methodDef, _ -> methodDef.definingClass == "Lcom/laurencedawson/reddit_sync/singleton/a;" },
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.syncforreddit.misc.integrations
|
||||||
|
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch
|
||||||
|
import app.revanced.patches.reddit.customclients.syncforreddit.misc.integrations.fingerprints.InitFingerprint
|
||||||
|
|
||||||
|
@Patch(requiresIntegrations = true)
|
||||||
|
object IntegrationsPatch : BaseIntegrationsPatch(
|
||||||
|
setOf(InitFingerprint)
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.customclients.syncforreddit.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
|
||||||
|
internal object InitFingerprint : IntegrationsFingerprint(
|
||||||
|
customFingerprint = { methodDef, classDef ->
|
||||||
|
methodDef.name == "onCreate" && classDef.type == "Lcom/laurencedawson/reddit_sync/RedditApplication;"
|
||||||
|
},
|
||||||
|
insertIndexResolver = { 1 }, // Insert after call to super class.
|
||||||
|
)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.patches.stocard.layout
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.util.childElementsSequence
|
||||||
|
import app.revanced.util.getNode
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Hide offers tab",
|
||||||
|
compatiblePackages = [CompatiblePackage("de.stocard.stocard")],
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object HideOffersTabPatch : ResourcePatch() {
|
||||||
|
override fun execute(context: ResourceContext) {
|
||||||
|
context.document["res/menu/bottom_navigation_menu.xml"].use { document ->
|
||||||
|
document.getNode("menu").apply {
|
||||||
|
removeChild(
|
||||||
|
childElementsSequence().first {
|
||||||
|
it.attributes.getNamedItem("android:id")?.nodeValue?.contains("offer") ?: false
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.patches.stocard.layout
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.util.getNode
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Hide story bubbles",
|
||||||
|
compatiblePackages = [CompatiblePackage("de.stocard.stocard")],
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object HideStoryBubblesPatch : ResourcePatch() {
|
||||||
|
override fun execute(context: ResourceContext) {
|
||||||
|
context.document["res/layout/rv_story_bubbles_list.xml"].use { document ->
|
||||||
|
document.getNode("androidx.recyclerview.widget.RecyclerView").apply {
|
||||||
|
arrayOf(
|
||||||
|
"android:layout_width",
|
||||||
|
"android:layout_height",
|
||||||
|
).forEach {
|
||||||
|
attributes.getNamedItem(it).nodeValue = "0dp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,7 +13,6 @@ import app.revanced.patches.tiktok.interaction.speed.fingerprints.OnRenderFirstF
|
|||||||
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SetSpeedFingerprint
|
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SetSpeedFingerprint
|
||||||
import app.revanced.util.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
import app.revanced.util.indexOfFirstInstruction
|
|
||||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction11x
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction11x
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|||||||
@@ -62,9 +62,12 @@ object CommentsPatch : ResourcePatch() {
|
|||||||
PreferenceScreen(
|
PreferenceScreen(
|
||||||
"revanced_comments_screen",
|
"revanced_comments_screen",
|
||||||
preferences = setOf(
|
preferences = setOf(
|
||||||
SwitchPreference("revanced_hide_preview_comment"),
|
SwitchPreference("revanced_hide_comments_by_members_header"),
|
||||||
SwitchPreference("revanced_hide_comments_section"),
|
SwitchPreference("revanced_hide_comments_section"),
|
||||||
SwitchPreference("revanced_hide_comment_timestamp_and_emoji_buttons")
|
SwitchPreference("revanced_hide_comments_create_a_short_button"),
|
||||||
|
SwitchPreference("revanced_hide_comments_preview_comment"),
|
||||||
|
SwitchPreference("revanced_hide_comments_thanks_button"),
|
||||||
|
SwitchPreference("revanced_hide_comments_timestamp_and_emoji_buttons")
|
||||||
),
|
),
|
||||||
sorting = PreferenceScreen.Sorting.UNSORTED
|
sorting = PreferenceScreen.Sorting.UNSORTED
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -94,10 +94,9 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
PreferenceScreen(
|
PreferenceScreen(
|
||||||
key = "revanced_hide_description_components_screen",
|
key = "revanced_hide_description_components_screen",
|
||||||
preferences = setOf(
|
preferences = setOf(
|
||||||
SwitchPreference("revanced_hide_chapters"),
|
SwitchPreference("revanced_hide_attributes_section"),
|
||||||
|
SwitchPreference("revanced_hide_chapters_section"),
|
||||||
SwitchPreference("revanced_hide_info_cards_section"),
|
SwitchPreference("revanced_hide_info_cards_section"),
|
||||||
SwitchPreference("revanced_hide_game_section"),
|
|
||||||
SwitchPreference("revanced_hide_music_section"),
|
|
||||||
SwitchPreference("revanced_hide_podcast_section"),
|
SwitchPreference("revanced_hide_podcast_section"),
|
||||||
SwitchPreference("revanced_hide_transcript_section"),
|
SwitchPreference("revanced_hide_transcript_section"),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.backgroundplayback
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
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.proxy.mutableTypes.MutableMethod
|
||||||
|
import app.revanced.patches.all.misc.resources.AddResourcesPatch
|
||||||
|
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.KidsBackgroundPlaybackPolicyControllerFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.BackgroundPlaybackManagerFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.backgroundplayback.fingerprints.BackgroundPlaybackSettingsFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
||||||
|
import app.revanced.util.resultOrThrow
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove background playback restrictions",
|
||||||
|
description = "Removes restrictions on background playback, including playing kids videos in the background.",
|
||||||
|
dependencies = [
|
||||||
|
BackgroundPlaybackResourcePatch::class,
|
||||||
|
IntegrationsPatch::class,
|
||||||
|
PlayerTypeHookPatch::class,
|
||||||
|
VideoInformationPatch::class,
|
||||||
|
SettingsPatch::class,
|
||||||
|
AddResourcesPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.youtube",
|
||||||
|
[
|
||||||
|
"18.48.39",
|
||||||
|
"18.49.37",
|
||||||
|
"19.01.34",
|
||||||
|
"19.02.39",
|
||||||
|
"19.03.36",
|
||||||
|
"19.04.38",
|
||||||
|
"19.05.36",
|
||||||
|
"19.06.39",
|
||||||
|
"19.07.40",
|
||||||
|
"19.08.36",
|
||||||
|
"19.09.38",
|
||||||
|
"19.10.39",
|
||||||
|
"19.11.43",
|
||||||
|
"19.12.41",
|
||||||
|
"19.13.37",
|
||||||
|
"19.14.43",
|
||||||
|
"19.15.36",
|
||||||
|
"19.16.39",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object BackgroundPlaybackPatch : BytecodePatch(
|
||||||
|
setOf(
|
||||||
|
BackgroundPlaybackManagerFingerprint,
|
||||||
|
BackgroundPlaybackSettingsFingerprint,
|
||||||
|
KidsBackgroundPlaybackPolicyControllerFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
|
"Lapp/revanced/integrations/youtube/patches/BackgroundPlaybackPatch;"
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
AddResourcesPatch(this::class)
|
||||||
|
|
||||||
|
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||||
|
NonInteractivePreference("revanced_background_playback")
|
||||||
|
)
|
||||||
|
|
||||||
|
BackgroundPlaybackManagerFingerprint.resultOrThrow().mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->playbackIsNotShort()Z
|
||||||
|
move-result v0
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enable background playback option in YouTube settings
|
||||||
|
BackgroundPlaybackSettingsFingerprint.resultOrThrow().mutableMethod.apply {
|
||||||
|
val booleanCalls = implementation!!.instructions.withIndex()
|
||||||
|
.filter { ((it.value as? ReferenceInstruction)?.reference as? MethodReference)?.returnType == "Z" }
|
||||||
|
|
||||||
|
val settingsBooleanIndex = booleanCalls.elementAt(1).index
|
||||||
|
val settingsBooleanMethod =
|
||||||
|
context.toMethodWalker(this).nextMethod(settingsBooleanIndex, true).getMethod() as MutableMethod
|
||||||
|
|
||||||
|
settingsBooleanMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->overrideBackgroundPlaybackAvailable()Z
|
||||||
|
move-result v0
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Force allowing background play for videos labeled for kids.
|
||||||
|
KidsBackgroundPlaybackPolicyControllerFingerprint.resultOrThrow().mutableMethod.addInstruction(
|
||||||
|
0,
|
||||||
|
"return-void"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.misc.minimizedplayback
|
package app.revanced.patches.youtube.misc.backgroundplayback
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
@@ -8,7 +8,7 @@ import app.revanced.patches.shared.misc.mapping.ResourceMappingPatch
|
|||||||
@Patch(
|
@Patch(
|
||||||
dependencies = [ResourceMappingPatch::class],
|
dependencies = [ResourceMappingPatch::class],
|
||||||
)
|
)
|
||||||
internal object MinimizedPlaybackResourcePatch : ResourcePatch() {
|
internal object BackgroundPlaybackResourcePatch : ResourcePatch() {
|
||||||
internal var prefBackgroundAndOfflineCategoryId: Long = -1
|
internal var prefBackgroundAndOfflineCategoryId: Long = -1
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints
|
package app.revanced.patches.youtube.misc.backgroundplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
internal object BackgroundPlaybackManagerFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
listOf("L"),
|
listOf("L"),
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints
|
package app.revanced.patches.youtube.misc.backgroundplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patches.youtube.misc.minimizedplayback.MinimizedPlaybackResourcePatch
|
import app.revanced.patches.youtube.misc.backgroundplayback.BackgroundPlaybackResourcePatch
|
||||||
import app.revanced.util.patch.LiteralValueFingerprint
|
import app.revanced.util.patch.LiteralValueFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object MinimizedPlaybackSettingsFingerprint : LiteralValueFingerprint(
|
internal object BackgroundPlaybackSettingsFingerprint : LiteralValueFingerprint(
|
||||||
returnType = "Ljava/lang/String;",
|
returnType = "Ljava/lang/String;",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters = listOf(),
|
parameters = listOf(),
|
||||||
@@ -19,5 +19,5 @@ internal object MinimizedPlaybackSettingsFingerprint : LiteralValueFingerprint(
|
|||||||
Opcode.IF_NEZ,
|
Opcode.IF_NEZ,
|
||||||
Opcode.GOTO
|
Opcode.GOTO
|
||||||
),
|
),
|
||||||
literalSupplier = { MinimizedPlaybackResourcePatch.prefBackgroundAndOfflineCategoryId }
|
literalSupplier = { BackgroundPlaybackResourcePatch.prefBackgroundAndOfflineCategoryId }
|
||||||
)
|
)
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints
|
package app.revanced.patches.youtube.misc.backgroundplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.util.patch.LiteralValueFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction
|
|
||||||
|
|
||||||
internal object KidsMinimizedPlaybackPolicyControllerFingerprint : MethodFingerprint(
|
internal object KidsBackgroundPlaybackPolicyControllerFingerprint : LiteralValueFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters = listOf("I", "L", "L"),
|
parameters = listOf("I", "L", "L"),
|
||||||
@@ -26,9 +25,5 @@ internal object KidsMinimizedPlaybackPolicyControllerFingerprint : MethodFingerp
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.RETURN_VOID
|
Opcode.RETURN_VOID
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef, _ ->
|
literalSupplier = { 5 },
|
||||||
methodDef.implementation!!.instructions.any {
|
|
||||||
((it as? NarrowLiteralInstruction)?.narrowLiteral == 5)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
@@ -8,11 +8,14 @@ import app.revanced.patches.all.misc.transformation.IMethodCall
|
|||||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
|
import app.revanced.util.indexOfFirstInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||||
|
|
||||||
object UserAgentClientSpoofPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
object UserAgentClientSpoofPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val ORIGINAL_PACKAGE_NAME = "com.google.android.youtube"
|
private const val ORIGINAL_PACKAGE_NAME = "com.google.android.youtube"
|
||||||
@@ -42,20 +45,31 @@ object UserAgentClientSpoofPatch : BaseTransformInstructionsPatch<Instruction35c
|
|||||||
as? OneRegisterInstruction ?: return
|
as? OneRegisterInstruction ?: return
|
||||||
).registerA
|
).registerA
|
||||||
|
|
||||||
// IndexOutOfBoundsException is not possible here,
|
// IndexOutOfBoundsException is possible here,
|
||||||
// but no such occurrences are present in the app.
|
// but no such occurrences are present in the app.
|
||||||
val referee = getInstruction(instructionIndex + 2).getReference<MethodReference>()?.toString()
|
val referee = getInstruction(instructionIndex + 2).getReference<MethodReference>()?.toString()
|
||||||
|
|
||||||
// This can technically also match non-user agent string builder append methods,
|
// Only replace string builder usage.
|
||||||
// but no such occurrences are present in the app.
|
|
||||||
if (referee != USER_AGENT_STRING_BUILDER_APPEND_METHOD_REFERENCE) {
|
if (referee != USER_AGENT_STRING_BUILDER_APPEND_METHOD_REFERENCE) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not change the package name in methods that use resources, or for methods that use GmsCore.
|
||||||
|
// Changing these package names will result in playback limitations,
|
||||||
|
// particularly Android VR background audio only playback.
|
||||||
|
val resourceOrGmsStringInstructionIndex = indexOfFirstInstruction {
|
||||||
|
val reference = getReference<StringReference>()
|
||||||
|
opcode == Opcode.CONST_STRING &&
|
||||||
|
(reference?.string == "android.resource://" || reference?.string == "gcore_")
|
||||||
|
}
|
||||||
|
if (resourceOrGmsStringInstructionIndex >= 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Overwrite the result of context.getPackageName() with the original package name.
|
// Overwrite the result of context.getPackageName() with the original package name.
|
||||||
replaceInstruction(
|
replaceInstruction(
|
||||||
instructionIndex + 1,
|
instructionIndex + 1,
|
||||||
"const-string v$targetRegister, \"${ORIGINAL_PACKAGE_NAME}\"",
|
"const-string v$targetRegister, \"$ORIGINAL_PACKAGE_NAME\"",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,117 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.misc.minimizedplayback
|
package app.revanced.patches.youtube.misc.minimizedplayback
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patches.youtube.misc.backgroundplayback.BackgroundPlaybackPatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.all.misc.resources.AddResourcesPatch
|
|
||||||
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
|
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.KidsMinimizedPlaybackPolicyControllerFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackSettingsFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|
||||||
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
|
||||||
import app.revanced.util.exception
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Minimized playback",
|
|
||||||
description = "Unlocks options for picture-in-picture and background playback.",
|
|
||||||
dependencies = [
|
|
||||||
MinimizedPlaybackResourcePatch::class,
|
|
||||||
IntegrationsPatch::class,
|
|
||||||
PlayerTypeHookPatch::class,
|
|
||||||
VideoInformationPatch::class,
|
|
||||||
SettingsPatch::class,
|
|
||||||
AddResourcesPatch::class
|
|
||||||
],
|
|
||||||
compatiblePackages = [
|
|
||||||
CompatiblePackage(
|
|
||||||
"com.google.android.youtube",
|
|
||||||
[
|
|
||||||
"18.48.39",
|
|
||||||
"18.49.37",
|
|
||||||
"19.01.34",
|
|
||||||
"19.02.39",
|
|
||||||
"19.03.36",
|
|
||||||
"19.04.38",
|
|
||||||
"19.05.36",
|
|
||||||
"19.06.39",
|
|
||||||
"19.07.40",
|
|
||||||
"19.08.36",
|
|
||||||
"19.09.38",
|
|
||||||
"19.10.39",
|
|
||||||
"19.11.43",
|
|
||||||
"19.12.41",
|
|
||||||
"19.13.37",
|
|
||||||
"19.14.43",
|
|
||||||
"19.15.36",
|
|
||||||
"19.16.39",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object MinimizedPlaybackPatch : BytecodePatch(
|
|
||||||
setOf(
|
|
||||||
MinimizedPlaybackManagerFingerprint,
|
|
||||||
MinimizedPlaybackSettingsFingerprint,
|
|
||||||
KidsMinimizedPlaybackPolicyControllerFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
|
||||||
"Lapp/revanced/integrations/youtube/patches/MinimizedPlaybackPatch;"
|
|
||||||
|
|
||||||
|
@Deprecated("This patch class has been renamed to BackgroundPlaybackPatch.")
|
||||||
|
object MinimizedPlaybackPatch : BytecodePatch(dependencies = setOf(BackgroundPlaybackPatch::class)) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
AddResourcesPatch(this::class)
|
|
||||||
|
|
||||||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
|
||||||
NonInteractivePreference("revanced_minimized_playback")
|
|
||||||
)
|
|
||||||
|
|
||||||
MinimizedPlaybackManagerFingerprint.result?.apply {
|
|
||||||
mutableMethod.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->playbackIsNotShort()Z
|
|
||||||
move-result v0
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
} ?: throw MinimizedPlaybackManagerFingerprint.exception
|
|
||||||
|
|
||||||
// Enable minimized playback option in YouTube settings
|
|
||||||
MinimizedPlaybackSettingsFingerprint.result?.apply {
|
|
||||||
val booleanCalls = method.implementation!!.instructions.withIndex()
|
|
||||||
.filter { ((it.value as? ReferenceInstruction)?.reference as? MethodReference)?.returnType == "Z" }
|
|
||||||
|
|
||||||
val settingsBooleanIndex = booleanCalls.elementAt(1).index
|
|
||||||
val settingsBooleanMethod =
|
|
||||||
context.toMethodWalker(method).nextMethod(settingsBooleanIndex, true).getMethod() as MutableMethod
|
|
||||||
|
|
||||||
settingsBooleanMethod.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->overrideMinimizedPlaybackAvailable()Z
|
|
||||||
move-result v0
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
} ?: throw MinimizedPlaybackSettingsFingerprint.exception
|
|
||||||
|
|
||||||
// Force allowing background play for videos labeled for kids.
|
|
||||||
// Some regions and YouTube accounts do not require this patch.
|
|
||||||
KidsMinimizedPlaybackPolicyControllerFingerprint.result?.apply {
|
|
||||||
mutableMethod.addInstruction(
|
|
||||||
0,
|
|
||||||
"return-void"
|
|
||||||
)
|
|
||||||
} ?: throw KidsMinimizedPlaybackPolicyControllerFingerprint.exception
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,22 +198,19 @@
|
|||||||
<string name="revanced_hide_chips_shelf_title">Hide chips shelf</string>
|
<string name="revanced_hide_chips_shelf_title">Hide chips shelf</string>
|
||||||
<string name="revanced_hide_chips_shelf_summary_on">Chips shelf is hidden</string>
|
<string name="revanced_hide_chips_shelf_summary_on">Chips shelf is hidden</string>
|
||||||
<string name="revanced_hide_chips_shelf_summary_off">Chips shelf is shown</string>
|
<string name="revanced_hide_chips_shelf_summary_off">Chips shelf is shown</string>
|
||||||
|
<string name="revanced_hide_attributes_section_title">Hide attributes section</string>
|
||||||
|
<string name="revanced_hide_attributes_section_summary_on">\'Featured places\', Games and Music sections are hidden</string>
|
||||||
|
<string name="revanced_hide_attributes_section_summary_off">\'Featured places\', Games and Music sections are shown</string>
|
||||||
|
<string name="revanced_hide_chapters_section_title">Hide Chapters section</string>
|
||||||
|
<string name="revanced_hide_chapters_section_summary_on">Chapters section is hidden</string>
|
||||||
|
<string name="revanced_hide_chapters_section_summary_off">Chapters section is shown</string>
|
||||||
|
<string name="revanced_hide_podcast_section_title">Hide \'Explore the podcast\' section</string>
|
||||||
|
<string name="revanced_hide_podcast_section_summary_on">\'Explore the podcast\' section is hidden</string>
|
||||||
|
<string name="revanced_hide_podcast_section_summary_off">\'Explore the podcast\' section is shown</string>
|
||||||
<string name="revanced_hide_info_cards_section_title">Hide info cards section</string>
|
<string name="revanced_hide_info_cards_section_title">Hide info cards section</string>
|
||||||
<string name="revanced_hide_info_cards_section_summary_on">Info cards section is hidden</string>
|
<string name="revanced_hide_info_cards_section_summary_on">Info cards section is hidden</string>
|
||||||
<string name="revanced_hide_info_cards_section_summary_off">Info cards section is shown</string>
|
<string name="revanced_hide_info_cards_section_summary_off">Info cards section is shown</string>
|
||||||
<string name="revanced_hide_chapters_title">Hide chapters</string>
|
<string name="revanced_hide_transcript_section_title">Hide Transcript section</string>
|
||||||
<string name="revanced_hide_chapters_summary_on">Chapters are hidden</string>
|
|
||||||
<string name="revanced_hide_chapters_summary_off">Chapters are shown</string>
|
|
||||||
<string name="revanced_hide_game_section_title">Hide game section</string>
|
|
||||||
<string name="revanced_hide_game_section_summary_on">Game section is hidden</string>
|
|
||||||
<string name="revanced_hide_game_section_summary_off">Game section is shown</string>
|
|
||||||
<string name="revanced_hide_music_section_title">Hide music section</string>
|
|
||||||
<string name="revanced_hide_music_section_summary_on">Music section is hidden</string>
|
|
||||||
<string name="revanced_hide_music_section_summary_off">Music section is shown</string>
|
|
||||||
<string name="revanced_hide_podcast_section_title">Hide podcast section</string>
|
|
||||||
<string name="revanced_hide_podcast_section_summary_on">Podcast section is hidden</string>
|
|
||||||
<string name="revanced_hide_podcast_section_summary_off">Podcast section is shown</string>
|
|
||||||
<string name="revanced_hide_transcript_section_title">Hide transcript section</string>
|
|
||||||
<string name="revanced_hide_transcript_section_summary_on">Transcript section is hidden</string>
|
<string name="revanced_hide_transcript_section_summary_on">Transcript section is hidden</string>
|
||||||
<string name="revanced_hide_transcript_section_summary_off">Transcript section is shown</string>
|
<string name="revanced_hide_transcript_section_summary_off">Transcript section is shown</string>
|
||||||
<string name="revanced_hide_description_components_screen_title">Video description</string>
|
<string name="revanced_hide_description_components_screen_title">Video description</string>
|
||||||
@@ -244,8 +241,11 @@
|
|||||||
<string name="revanced_hide_keyword_content_phrases_summary">Keywords and phrases to hide, separated by new lines\n\nWords with uppercase letters in the middle must be entered with the casing (ie: iPhone, TikTok, LeBlanc)</string>
|
<string name="revanced_hide_keyword_content_phrases_summary">Keywords and phrases to hide, separated by new lines\n\nWords with uppercase letters in the middle must be entered with the casing (ie: iPhone, TikTok, LeBlanc)</string>
|
||||||
<string name="revanced_hide_keyword_content_about_title">About keyword filtering</string>
|
<string name="revanced_hide_keyword_content_about_title">About keyword filtering</string>
|
||||||
<string name="revanced_hide_keyword_content_about_summary">Home/Subscription/Search results are filtered to hide content that matches keyword phrases\n\nLimitations\n• Some Shorts may not be hidden\n• Some UI components may not be hidden\n• Searching for a keyword may show no results</string>
|
<string name="revanced_hide_keyword_content_about_summary">Home/Subscription/Search results are filtered to hide content that matches keyword phrases\n\nLimitations\n• Some Shorts may not be hidden\n• Some UI components may not be hidden\n• Searching for a keyword may show no results</string>
|
||||||
|
<!-- Translations of this should not be longer than the original English text, otherwise the text can be clipped and not entirely shown. -->
|
||||||
<string name="revanced_hide_keyword_toast_invalid_common">Invalid keyword. Cannot use: \'%s\' as a filter</string>
|
<string name="revanced_hide_keyword_toast_invalid_common">Invalid keyword. Cannot use: \'%s\' as a filter</string>
|
||||||
|
<!-- Translations of this should not be longer than the original English text, otherwise the text can be clipped and not entirely shown. -->
|
||||||
<string name="revanced_hide_keyword_toast_invalid_length">Invalid keyword. \'%1$s\' is less than %2$d characters</string>
|
<string name="revanced_hide_keyword_toast_invalid_length">Invalid keyword. \'%1$s\' is less than %2$d characters</string>
|
||||||
|
<string name="revanced_hide_keyword_toast_invalid_broad">Keyword \'$s\' will hide all videos</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="ad.general.HideAdsResourcePatch">
|
<patch id="ad.general.HideAdsResourcePatch">
|
||||||
<string name="revanced_hide_general_ads_title">Hide general ads</string>
|
<string name="revanced_hide_general_ads_title">Hide general ads</string>
|
||||||
@@ -279,6 +279,7 @@
|
|||||||
<string name="revanced_hide_merchandise_banners_title">Hide merchandise banners</string>
|
<string name="revanced_hide_merchandise_banners_title">Hide merchandise banners</string>
|
||||||
<string name="revanced_hide_merchandise_banners_summary_on">Merchandise banners are hidden</string>
|
<string name="revanced_hide_merchandise_banners_summary_on">Merchandise banners are hidden</string>
|
||||||
<string name="revanced_hide_merchandise_banners_summary_off">Merchandise banners are shown</string>
|
<string name="revanced_hide_merchandise_banners_summary_off">Merchandise banners are shown</string>
|
||||||
|
<!-- Translations of this should not be longer than the original English text, otherwise the text can be clipped and not entirely shown. -->
|
||||||
<string name="revanced_hide_fullscreen_ads_feature_not_available_toast">Hide fullscreen ads only works with older devices</string>
|
<string name="revanced_hide_fullscreen_ads_feature_not_available_toast">Hide fullscreen ads only works with older devices</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="ad.getpremium.HideGetPremiumPatch">
|
<patch id="ad.getpremium.HideGetPremiumPatch">
|
||||||
@@ -502,15 +503,24 @@
|
|||||||
<patch id="layout.hide.comments.CommentsPatch">
|
<patch id="layout.hide.comments.CommentsPatch">
|
||||||
<string name="revanced_comments_screen_title">Comments</string>
|
<string name="revanced_comments_screen_title">Comments</string>
|
||||||
<string name="revanced_comments_screen_summary">Hide or show comments section components</string>
|
<string name="revanced_comments_screen_summary">Hide or show comments section components</string>
|
||||||
<string name="revanced_hide_preview_comment_title">Hide preview comment</string>
|
<string name="revanced_hide_comments_by_members_header_title">Hide \'Comments by members\' header</string>
|
||||||
<string name="revanced_hide_preview_comment_summary_on">Preview comment is hidden</string>
|
<string name="revanced_hide_comments_by_members_header_summary_on">\'Comments by members\' header is hidden</string>
|
||||||
<string name="revanced_hide_preview_comment_summary_off">Preview comment is shown</string>
|
<string name="revanced_hide_comments_by_members_header_summary_off">\'Comments by members\' header is shown</string>
|
||||||
<string name="revanced_hide_comments_section_title">Hide comments section</string>
|
<string name="revanced_hide_comments_section_title">Hide comments section</string>
|
||||||
<string name="revanced_hide_comments_section_summary_on">Comment section is hidden</string>
|
<string name="revanced_hide_comments_section_summary_on">Comments section is hidden</string>
|
||||||
<string name="revanced_hide_comments_section_summary_off">Comment section is shown</string>
|
<string name="revanced_hide_comments_section_summary_off">Comments section is shown</string>
|
||||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_title">Hide timestamp and emoji buttons</string>
|
<string name="revanced_hide_comments_create_a_short_button_title">Hide \'Create a Short\' button</string>
|
||||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_summary_on">Comment timestamp and emoji buttons are hidden</string>
|
<string name="revanced_hide_comments_create_a_short_button_summary_on">\'Create a Short\' button is hidden</string>
|
||||||
<string name="revanced_hide_comment_timestamp_and_emoji_buttons_summary_off">Comment timestamp and emoji buttons are shown</string>
|
<string name="revanced_hide_comments_create_a_short_button_summary_off">\'Create a Short\' button is shown</string>
|
||||||
|
<string name="revanced_hide_comments_preview_comment_title">Hide preview comment</string>
|
||||||
|
<string name="revanced_hide_comments_preview_comment_summary_on">Preview comment is hidden</string>
|
||||||
|
<string name="revanced_hide_comments_preview_comment_summary_off">Preview comment is shown</string>
|
||||||
|
<string name="revanced_hide_comments_thanks_button_title">Hide thanks button</string>
|
||||||
|
<string name="revanced_hide_comments_thanks_button_summary_on">Thanks button is hidden</string>
|
||||||
|
<string name="revanced_hide_comments_thanks_button_summary_off">Thanks button is shown</string>
|
||||||
|
<string name="revanced_hide_comments_timestamp_and_emoji_buttons_title">Hide timestamp and emoji buttons</string>
|
||||||
|
<string name="revanced_hide_comments_timestamp_and_emoji_buttons_summary_on">Timestamp and emoji buttons are hidden</string>
|
||||||
|
<string name="revanced_hide_comments_timestamp_and_emoji_buttons_summary_off">Timestamp and emoji buttons are shown</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="layout.hide.crowdfundingbox.CrowdfundingBoxResourcePatch">
|
<patch id="layout.hide.crowdfundingbox.CrowdfundingBoxResourcePatch">
|
||||||
<string name="revanced_hide_crowdfunding_box_title">Hide crowdfunding box</string>
|
<string name="revanced_hide_crowdfunding_box_title">Hide crowdfunding box</string>
|
||||||
@@ -1051,9 +1061,9 @@
|
|||||||
<string name="revanced_external_browser_summary_on">Opening links externally</string>
|
<string name="revanced_external_browser_summary_on">Opening links externally</string>
|
||||||
<string name="revanced_external_browser_summary_off">Opening links in app</string>
|
<string name="revanced_external_browser_summary_off">Opening links in app</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="misc.minimizedplayback.MinimizedPlaybackPatch">
|
<patch id="misc.backgroundplayback.BackgroundPlaybackPatch">
|
||||||
<string name="revanced_minimized_playback_title">Minimized playback</string>
|
<string name="revanced_background_playback_title">Background playback</string>
|
||||||
<string name="revanced_minimized_playback_summary">This setting can be found in Settings -> Background</string>
|
<string name="revanced_background_playback_summary">This setting can be found in Settings -> Background</string>
|
||||||
</patch>
|
</patch>
|
||||||
<patch id="misc.privacy.RemoveTrackingQueryParameterPatch">
|
<patch id="misc.privacy.RemoveTrackingQueryParameterPatch">
|
||||||
<string name="revanced_remove_tracking_query_parameter_title">Remove tracking query parameter</string>
|
<string name="revanced_remove_tracking_query_parameter_title">Remove tracking query parameter</string>
|
||||||
@@ -1121,7 +1131,7 @@
|
|||||||
<string name="revanced_spoof_client_user_dialog_message">Turning off this setting may cause video playback issues.</string>
|
<string name="revanced_spoof_client_user_dialog_message">Turning off this setting may cause video playback issues.</string>
|
||||||
<string name="revanced_spoof_client_use_ios_title">Spoof client to iOS</string>
|
<string name="revanced_spoof_client_use_ios_title">Spoof client to iOS</string>
|
||||||
<string name="revanced_spoof_client_use_ios_summary_on">Client is currently spoofed to iOS\n\nSide effects include:\n• No HDR video\n• Watch history may not work\n• Higher video qualities may be missing\n• Live streams cannot play as audio only\n• Live streams not available on Android 8.0</string>
|
<string name="revanced_spoof_client_use_ios_summary_on">Client is currently spoofed to iOS\n\nSide effects include:\n• No HDR video\n• Watch history may not work\n• Higher video qualities may be missing\n• Live streams cannot play as audio only\n• Live streams not available on Android 8.0</string>
|
||||||
<string name="revanced_spoof_client_use_ios_summary_off">Client is currently spoofed to Android VR\n\nSide effects include:\n• No HDR video\n• Kids videos do not playback\n• Paused videos can randomly resume</string>
|
<string name="revanced_spoof_client_use_ios_summary_off">Client is currently spoofed to Android VR\n\nSide effects include:\n• No HDR video\n• Kids videos do not playback\n• Paused videos can randomly resume\n• Low quality Shorts seekbar thumbnails\n• Download action button is always hidden\n• End screen cards are always hidden</string>
|
||||||
<string name="revanced_spoof_client_storyboard_timeout">Spoof client thumbnails not available (API timed out)</string>
|
<string name="revanced_spoof_client_storyboard_timeout">Spoof client thumbnails not available (API timed out)</string>
|
||||||
<string name="revanced_spoof_client_storyboard_io_exception">Spoof client thumbnails temporarily not available: %s</string>
|
<string name="revanced_spoof_client_storyboard_io_exception">Spoof client thumbnails temporarily not available: %s</string>
|
||||||
</patch>
|
</patch>
|
||||||
|
|||||||
Reference in New Issue
Block a user