mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-23 02:31:03 +00:00
Compare commits
37 Commits
v5.15.0-de
...
v5.18.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
127b0a63fe | ||
|
|
27aafd0ee1 | ||
|
|
49c54c0e54 | ||
|
|
842ba4fc4d | ||
|
|
66ecadce4f | ||
|
|
73ca04da5e | ||
|
|
a5d26208c1 | ||
|
|
497291c478 | ||
|
|
b24278a544 | ||
|
|
135f9ead3c | ||
|
|
ca4f960171 | ||
|
|
7f228cc535 | ||
|
|
bf91e127d8 | ||
|
|
f07fc1ad93 | ||
|
|
c84be120bd | ||
|
|
e67f390e2b | ||
|
|
4d910fea93 | ||
|
|
72adbe5519 | ||
|
|
54d49b774e | ||
|
|
283bb31567 | ||
|
|
2724fcbd27 | ||
|
|
7c28193579 | ||
|
|
cd1ee814c4 | ||
|
|
d9ccd73b5f | ||
|
|
5c5a1e4b8b | ||
|
|
66a2ee2416 | ||
|
|
d8c276cf96 | ||
|
|
d5845abd08 | ||
|
|
54eef22ce7 | ||
|
|
e287bdc59d | ||
|
|
20a82ef956 | ||
|
|
1e29da9e06 | ||
|
|
56e6a90a90 | ||
|
|
76d32e21c2 | ||
|
|
54a7afa540 | ||
|
|
ef86438bac | ||
|
|
0683cedac0 |
2
.github/workflows/pull_strings.yml
vendored
2
.github/workflows/pull_strings.yml
vendored
@@ -2,7 +2,7 @@ name: Pull strings
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 */8 * * *"
|
- cron: "0 */12 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
139
CHANGELOG.md
139
CHANGELOG.md
@@ -1,3 +1,142 @@
|
|||||||
|
# [5.18.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.18.0-dev.1...v5.18.0-dev.2) (2025-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify:** Ignore optional attributes if not present ([#4688](https://github.com/ReVanced/revanced-patches/issues/4688)) ([84f5854](https://github.com/ReVanced/revanced-patches/commit/84f585492e4be3604c6c7680ffb3bebcea5a675f))
|
||||||
|
|
||||||
|
# [5.18.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.17.0...v5.18.0-dev.1) (2025-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Support version `20.07.39` ([#4677](https://github.com/ReVanced/revanced-patches/issues/4677)) ([c1379f6](https://github.com/ReVanced/revanced-patches/commit/c1379f6e520c683d2c9d6a490a69ca542168b3b3))
|
||||||
|
|
||||||
|
# [5.17.0](https://github.com/ReVanced/revanced-patches/compare/v5.16.1...v5.17.0) (2025-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Facebook - Hide 'Sponsored Stories':** Constrain patch to latest compatible version ([#4657](https://github.com/ReVanced/revanced-patches/issues/4657)) ([46bd1c8](https://github.com/ReVanced/revanced-patches/commit/46bd1c829acd5f83600025e0ceb7d482ae80be69))
|
||||||
|
* **Spotify - Unlock Premium:** Override additional attributes ([#4651](https://github.com/ReVanced/revanced-patches/issues/4651)) ([568b40d](https://github.com/ReVanced/revanced-patches/commit/568b40da9692eae9039bbb3cec513a61ca627c24))
|
||||||
|
* **Spotify - Unlock Premium:** Use correct patch description convention ([a486522](https://github.com/ReVanced/revanced-patches/commit/a4865228f8481d2efc8fbf4e90902a03289d9a3f))
|
||||||
|
* **X / Twitter:** Constrain patches to latest compatible versions ([#4683](https://github.com/ReVanced/revanced-patches/issues/4683)) ([f579728](https://github.com/ReVanced/revanced-patches/commit/f5797289f45186052537982c7f5db6f2b0769aee))
|
||||||
|
* **YouTube - Navigation buttons:** Add user dialog message to 'Disable translucent status bar' ([a4a0e68](https://github.com/ReVanced/revanced-patches/commit/a4a0e6869e23d15ee09262460f4e290c90629eeb))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Spotify - Unlock Premium:** Disable the "Spotify Premium" upsell experiment in context menus ([9a10ee4](https://github.com/ReVanced/revanced-patches/commit/9a10ee4d22fb53da2012a182e038749d3ad72377))
|
||||||
|
|
||||||
|
# [5.17.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.17.0-dev.3...v5.17.0-dev.4) (2025-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **X / Twitter:** Constrain patches to latest compatible versions ([#4683](https://github.com/ReVanced/revanced-patches/issues/4683)) ([f579728](https://github.com/ReVanced/revanced-patches/commit/f5797289f45186052537982c7f5db6f2b0769aee))
|
||||||
|
|
||||||
|
# [5.17.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.17.0-dev.2...v5.17.0-dev.3) (2025-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify - Unlock Premium:** Override additional attributes ([#4651](https://github.com/ReVanced/revanced-patches/issues/4651)) ([568b40d](https://github.com/ReVanced/revanced-patches/commit/568b40da9692eae9039bbb3cec513a61ca627c24))
|
||||||
|
|
||||||
|
# [5.17.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.17.0-dev.1...v5.17.0-dev.2) (2025-03-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Navigation buttons:** Add user dialog message to 'Disable translucent status bar' ([a4a0e68](https://github.com/ReVanced/revanced-patches/commit/a4a0e6869e23d15ee09262460f4e290c90629eeb))
|
||||||
|
|
||||||
|
# [5.17.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.16.2-dev.1...v5.17.0-dev.1) (2025-03-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify - Unlock Premium:** Use correct patch description convention ([a486522](https://github.com/ReVanced/revanced-patches/commit/a4865228f8481d2efc8fbf4e90902a03289d9a3f))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Spotify - Unlock Premium:** Disable the "Spotify Premium" upsell experiment in context menus ([9a10ee4](https://github.com/ReVanced/revanced-patches/commit/9a10ee4d22fb53da2012a182e038749d3ad72377))
|
||||||
|
|
||||||
|
## [5.16.2-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.16.1...v5.16.2-dev.1) (2025-03-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Facebook - Hide 'Sponsored Stories':** Constrain patch to latest compatible version ([#4657](https://github.com/ReVanced/revanced-patches/issues/4657)) ([46bd1c8](https://github.com/ReVanced/revanced-patches/commit/46bd1c829acd5f83600025e0ceb7d482ae80be69))
|
||||||
|
|
||||||
|
## [5.16.1](https://github.com/ReVanced/revanced-patches/compare/v5.16.0...v5.16.1) (2025-03-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify - Unlock Premium:** Override streaming attribute attempting to fix streaming issues ([06be36c](https://github.com/ReVanced/revanced-patches/commit/06be36cddf3430b4179dff696b3d15718cd6963b))
|
||||||
|
|
||||||
|
## [5.16.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.16.0...v5.16.1-dev.1) (2025-03-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify - Unlock Premium:** Override streaming attribute attempting to fix streaming issues ([06be36c](https://github.com/ReVanced/revanced-patches/commit/06be36cddf3430b4179dff696b3d15718cd6963b))
|
||||||
|
|
||||||
|
# [5.16.0](https://github.com/ReVanced/revanced-patches/compare/v5.15.0...v5.16.0) (2025-03-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Settings:** System navigation bar is located above the settings ui on Android 15+ ([f7497be](https://github.com/ReVanced/revanced-patches/commit/f7497be2c5e4abcde6eb55b84955124a28f55cae))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Spotify:** Add `Unlock premium` patch ([#4644](https://github.com/ReVanced/revanced-patches/issues/4644)) ([f048c50](https://github.com/ReVanced/revanced-patches/commit/f048c50e56fc1f5a5c607860be4206ef83b528fe))
|
||||||
|
* **YouTube - Comments:** Add `Hide AI Comments summary` ([#4634](https://github.com/ReVanced/revanced-patches/issues/4634)) ([e9b7f26](https://github.com/ReVanced/revanced-patches/commit/e9b7f263f739bd130f6ea79913851a52355977c5))
|
||||||
|
* **YouTube - Video description:** Add `Hide AI-generated video summary` ([#4636](https://github.com/ReVanced/revanced-patches/issues/4636)) ([521fd48](https://github.com/ReVanced/revanced-patches/commit/521fd48602432ab436d8711c19d7130b2b05af12))
|
||||||
|
|
||||||
|
# [5.16.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.16.0-dev.1...v5.16.0-dev.2) (2025-03-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Spotify:** Add `Unlock premium` patch ([#4644](https://github.com/ReVanced/revanced-patches/issues/4644)) ([f048c50](https://github.com/ReVanced/revanced-patches/commit/f048c50e56fc1f5a5c607860be4206ef83b528fe))
|
||||||
|
|
||||||
|
# [5.16.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.15.0...v5.16.0-dev.1) (2025-03-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Settings:** System navigation bar is located above the settings ui on Android 15+ ([f7497be](https://github.com/ReVanced/revanced-patches/commit/f7497be2c5e4abcde6eb55b84955124a28f55cae))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Comments:** Add `Hide AI Comments summary` ([#4634](https://github.com/ReVanced/revanced-patches/issues/4634)) ([e9b7f26](https://github.com/ReVanced/revanced-patches/commit/e9b7f263f739bd130f6ea79913851a52355977c5))
|
||||||
|
* **YouTube - Video description:** Add `Hide AI-generated video summary` ([#4636](https://github.com/ReVanced/revanced-patches/issues/4636)) ([521fd48](https://github.com/ReVanced/revanced-patches/commit/521fd48602432ab436d8711c19d7130b2b05af12))
|
||||||
|
|
||||||
|
# [5.15.0](https://github.com/ReVanced/revanced-patches/compare/v5.14.0...v5.15.0) (2025-03-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Spoof app version:** Change oldest spoof target to 19.01.34 ([5012439](https://github.com/ReVanced/revanced-patches/commit/5012439a8e53b2a4ab5e85c47976e1ab28a51208))
|
||||||
|
* **YouTube - Spoof app version:** Remove broken spoof targets that YouTube no longer supports ([#4610](https://github.com/ReVanced/revanced-patches/issues/4610)) ([883fbe7](https://github.com/ReVanced/revanced-patches/commit/883fbe71233c57cb1241e57c122b43f40722acc7))
|
||||||
|
* **YouTube:** Do not show restart prompt more than once if setting change is canceled ([49797fe](https://github.com/ReVanced/revanced-patches/commit/49797fe8d0c4a0981ef621a31356c4315ae3777b))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - SponsorBlock:** Add opacity setting to category segment colors ([#4582](https://github.com/ReVanced/revanced-patches/issues/4582)) ([6e8ffba](https://github.com/ReVanced/revanced-patches/commit/6e8ffbade9e03658f725622631e44dabf2995861))
|
||||||
|
|
||||||
|
# [5.15.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.15.0-dev.3...v5.15.0-dev.4) (2025-03-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Spoof app version:** Change oldest spoof target to 19.01.34 ([5012439](https://github.com/ReVanced/revanced-patches/commit/5012439a8e53b2a4ab5e85c47976e1ab28a51208))
|
||||||
|
|
||||||
# [5.15.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.15.0-dev.2...v5.15.0-dev.3) (2025-03-20)
|
# [5.15.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.15.0-dev.2...v5.15.0-dev.3) (2025-03-20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,21 @@ public class SpoofVideoStreamsPatch {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
* Turns off a feature flag that interferes with video playback.
|
||||||
|
*/
|
||||||
|
public static boolean usePlaybackStartFeatureFlag(boolean original) {
|
||||||
|
if (original) {
|
||||||
|
Logger.printDebug(() -> "usePlaybackStartFeatureFlag is set on");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SPOOF_STREAMING_DATA) {
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
|
|||||||
16
extensions/spotify/build.gradle.kts
Normal file
16
extensions/spotify/build.gradle.kts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
dependencies {
|
||||||
|
compileOnly(project(":extensions:shared:library"))
|
||||||
|
compileOnly(project(":extensions:spotify:stub"))
|
||||||
|
compileOnly(libs.annotation)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = 24
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
}
|
||||||
1
extensions/spotify/src/main/AndroidManifest.xml
Normal file
1
extensions/spotify/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<manifest/>
|
||||||
17
extensions/spotify/stub/build.gradle.kts
Normal file
17
extensions/spotify/stub/build.gradle.kts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id(libs.plugins.android.library.get().pluginId)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "app.revanced.extension"
|
||||||
|
compileSdk = 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = 26
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
}
|
||||||
1
extensions/spotify/stub/src/main/AndroidManifest.xml
Normal file
1
extensions/spotify/stub/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<manifest/>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.spotify.remoteconfig.internal;
|
||||||
|
|
||||||
|
public final class AccountAttribute {
|
||||||
|
public Object value_;
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ package app.revanced.extension.youtube.patches;
|
|||||||
|
|
||||||
import app.revanced.extension.youtube.settings.Settings;
|
import app.revanced.extension.youtube.settings.Settings;
|
||||||
|
|
||||||
/** @noinspection unused*/
|
@SuppressWarnings("unused")
|
||||||
public class DisableResumingStartupShortsPlayerPatch {
|
public class DisableResumingStartupShortsPlayerPatch {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,4 +11,11 @@ public class DisableResumingStartupShortsPlayerPatch {
|
|||||||
public static boolean disableResumingStartupShortsPlayer() {
|
public static boolean disableResumingStartupShortsPlayer() {
|
||||||
return Settings.DISABLE_RESUMING_SHORTS_PLAYER.get();
|
return Settings.DISABLE_RESUMING_SHORTS_PLAYER.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static boolean disableResumingStartupShortsPlayer(boolean original) {
|
||||||
|
return original && !Settings.DISABLE_RESUMING_SHORTS_PLAYER.get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,10 +43,13 @@ public final class MiniplayerPatch {
|
|||||||
MODERN_2(null, 2),
|
MODERN_2(null, 2),
|
||||||
MODERN_3(null, 3),
|
MODERN_3(null, 3),
|
||||||
/**
|
/**
|
||||||
* Half broken miniplayer, that might be work in progress or left over abandoned code.
|
* Works and is functional with 20.03+
|
||||||
* Can force this type by editing the import/export settings.
|
|
||||||
*/
|
*/
|
||||||
MODERN_4(null, 4);
|
MODERN_4(null, 4),
|
||||||
|
/**
|
||||||
|
* Half broken miniplayer, and in 20.02 and earlier is declared as type 4.
|
||||||
|
*/
|
||||||
|
MODERN_5(null, 5);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Legacy tablet hook value.
|
* Legacy tablet hook value.
|
||||||
@@ -126,12 +129,13 @@ public final class MiniplayerPatch {
|
|||||||
private static final boolean DRAG_AND_DROP_ENABLED =
|
private static final boolean DRAG_AND_DROP_ENABLED =
|
||||||
CURRENT_TYPE.isModern() && Settings.MINIPLAYER_DRAG_AND_DROP.get();
|
CURRENT_TYPE.isModern() && Settings.MINIPLAYER_DRAG_AND_DROP.get();
|
||||||
|
|
||||||
private static final boolean HIDE_EXPAND_CLOSE_ENABLED =
|
private static final boolean HIDE_OVERLAY_BUTTONS_ENABLED =
|
||||||
Settings.MINIPLAYER_HIDE_EXPAND_CLOSE.get()
|
Settings.MINIPLAYER_HIDE_OVERLAY_BUTTONS.get()
|
||||||
&& Settings.MINIPLAYER_HIDE_EXPAND_CLOSE.isAvailable();
|
&& Settings.MINIPLAYER_HIDE_OVERLAY_BUTTONS.isAvailable();
|
||||||
|
|
||||||
private static final boolean HIDE_SUBTEXT_ENABLED =
|
private static final boolean HIDE_SUBTEXT_ENABLED =
|
||||||
(CURRENT_TYPE == MODERN_1 || CURRENT_TYPE == MODERN_3) && Settings.MINIPLAYER_HIDE_SUBTEXT.get();
|
(CURRENT_TYPE == MODERN_1 || CURRENT_TYPE == MODERN_3 || CURRENT_TYPE == MODERN_4)
|
||||||
|
&& Settings.MINIPLAYER_HIDE_SUBTEXT.get();
|
||||||
|
|
||||||
// 19.25 is last version that has forward/back buttons for phones,
|
// 19.25 is last version that has forward/back buttons for phones,
|
||||||
// but buttons still show for tablets/foldable devices and they don't work well so always hide.
|
// but buttons still show for tablets/foldable devices and they don't work well so always hide.
|
||||||
@@ -139,7 +143,7 @@ public final class MiniplayerPatch {
|
|||||||
&& (VersionCheckPatch.IS_19_34_OR_GREATER || Settings.MINIPLAYER_HIDE_REWIND_FORWARD.get());
|
&& (VersionCheckPatch.IS_19_34_OR_GREATER || Settings.MINIPLAYER_HIDE_REWIND_FORWARD.get());
|
||||||
|
|
||||||
private static final boolean MINIPLAYER_ROUNDED_CORNERS_ENABLED =
|
private static final boolean MINIPLAYER_ROUNDED_CORNERS_ENABLED =
|
||||||
Settings.MINIPLAYER_ROUNDED_CORNERS.get();
|
CURRENT_TYPE.isModern() && Settings.MINIPLAYER_ROUNDED_CORNERS.get();
|
||||||
|
|
||||||
private static final boolean MINIPLAYER_HORIZONTAL_DRAG_ENABLED =
|
private static final boolean MINIPLAYER_HORIZONTAL_DRAG_ENABLED =
|
||||||
DRAG_AND_DROP_ENABLED && Settings.MINIPLAYER_HORIZONTAL_DRAG.get();
|
DRAG_AND_DROP_ENABLED && Settings.MINIPLAYER_HORIZONTAL_DRAG.get();
|
||||||
@@ -172,11 +176,12 @@ public final class MiniplayerPatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class MiniplayerHideExpandCloseAvailability implements Setting.Availability {
|
public static final class MiniplayerHideOverlayButtonsAvailability implements Setting.Availability {
|
||||||
@Override
|
@Override
|
||||||
public boolean isAvailable() {
|
public boolean isAvailable() {
|
||||||
MiniplayerType type = Settings.MINIPLAYER_TYPE.get();
|
MiniplayerType type = Settings.MINIPLAYER_TYPE.get();
|
||||||
return (!IS_19_20_OR_GREATER && (type == MODERN_1 || type == MODERN_3))
|
return type == MODERN_4
|
||||||
|
|| (!IS_19_20_OR_GREATER && (type == MODERN_1 || type == MODERN_3))
|
||||||
|| (!IS_19_26_OR_GREATER && type == MODERN_1
|
|| (!IS_19_26_OR_GREATER && type == MODERN_1
|
||||||
&& !Settings.MINIPLAYER_DOUBLE_TAP_ACTION.get() && !Settings.MINIPLAYER_DRAG_AND_DROP.get())
|
&& !Settings.MINIPLAYER_DOUBLE_TAP_ACTION.get() && !Settings.MINIPLAYER_DRAG_AND_DROP.get())
|
||||||
|| (IS_19_29_OR_GREATER && type == MODERN_3);
|
|| (IS_19_29_OR_GREATER && type == MODERN_3);
|
||||||
@@ -227,9 +232,13 @@ public final class MiniplayerPatch {
|
|||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static void adjustMiniplayerOpacity(ImageView view) {
|
public static void adjustMiniplayerOpacity(View view) {
|
||||||
if (CURRENT_TYPE == MODERN_1) {
|
if (CURRENT_TYPE == MODERN_1) {
|
||||||
view.setImageAlpha(OPACITY_LEVEL);
|
if (view instanceof ImageView imageView) {
|
||||||
|
imageView.setImageAlpha(OPACITY_LEVEL);
|
||||||
|
} else {
|
||||||
|
Logger.printException(() -> "Unknown miniplayer overlay view: " + view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +256,7 @@ public final class MiniplayerPatch {
|
|||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static boolean enableMiniplayerDoubleTapAction(boolean original) {
|
public static boolean getMiniplayerDoubleTapAction(boolean original) {
|
||||||
if (CURRENT_TYPE == DEFAULT) {
|
if (CURRENT_TYPE == DEFAULT) {
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
@@ -258,7 +267,7 @@ public final class MiniplayerPatch {
|
|||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static boolean enableMiniplayerDragAndDrop(boolean original) {
|
public static boolean getMiniplayerDragAndDrop(boolean original) {
|
||||||
if (CURRENT_TYPE == DEFAULT) {
|
if (CURRENT_TYPE == DEFAULT) {
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
@@ -266,13 +275,36 @@ public final class MiniplayerPatch {
|
|||||||
return DRAG_AND_DROP_ENABLED;
|
return DRAG_AND_DROP_ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static boolean getRoundedCorners(boolean original) {
|
||||||
|
if (CURRENT_TYPE == DEFAULT) {
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MINIPLAYER_ROUNDED_CORNERS_ENABLED;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static boolean setRoundedCorners(boolean original) {
|
public static boolean getHorizontalDrag(boolean original) {
|
||||||
if (CURRENT_TYPE.isModern()) {
|
if (CURRENT_TYPE == DEFAULT) {
|
||||||
return MINIPLAYER_ROUNDED_CORNERS_ENABLED;
|
return original;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MINIPLAYER_HORIZONTAL_DRAG_ENABLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static boolean getMaximizeAnimation(boolean original) {
|
||||||
|
// This must be forced on if horizontal drag is enabled,
|
||||||
|
// otherwise the UI has visual glitches when maximizing the miniplayer.
|
||||||
|
if (MINIPLAYER_HORIZONTAL_DRAG_ENABLED) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return original;
|
return original;
|
||||||
@@ -281,7 +313,7 @@ public final class MiniplayerPatch {
|
|||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static int setMiniplayerDefaultSize(int original) {
|
public static int getMiniplayerDefaultSize(int original) {
|
||||||
if (CURRENT_TYPE.isModern()) {
|
if (CURRENT_TYPE.isModern()) {
|
||||||
return MINIPLAYER_SIZE;
|
return MINIPLAYER_SIZE;
|
||||||
}
|
}
|
||||||
@@ -289,29 +321,26 @@ public final class MiniplayerPatch {
|
|||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static void hideMiniplayerExpandClose(View view) {
|
||||||
|
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_OVERLAY_BUTTONS_ENABLED, view);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static boolean setHorizontalDrag(boolean original) {
|
public static void hideMiniplayerActionButton(View view) {
|
||||||
if (CURRENT_TYPE.isModern()) {
|
if (CURRENT_TYPE == MODERN_4) {
|
||||||
return MINIPLAYER_HORIZONTAL_DRAG_ENABLED;
|
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_OVERLAY_BUTTONS_ENABLED, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
return original;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injection point.
|
* Injection point.
|
||||||
*/
|
*/
|
||||||
public static void hideMiniplayerExpandClose(ImageView view) {
|
public static void hideMiniplayerRewindForward(View view) {
|
||||||
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_EXPAND_CLOSE_ENABLED, view);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Injection point.
|
|
||||||
*/
|
|
||||||
public static void hideMiniplayerRewindForward(ImageView view) {
|
|
||||||
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_REWIND_FORWARD_ENABLED, view);
|
Utils.hideViewByRemovingFromParentUnderCondition(HIDE_REWIND_FORWARD_ENABLED, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,15 @@ package app.revanced.extension.youtube.patches;
|
|||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
|
|
||||||
public class VersionCheckPatch {
|
public class VersionCheckPatch {
|
||||||
public static final boolean IS_19_17_OR_GREATER = Utils.getAppVersionName().compareTo("19.17.00") >= 0;
|
private static boolean isVersionOrGreater(String version) {
|
||||||
public static final boolean IS_19_20_OR_GREATER = Utils.getAppVersionName().compareTo("19.20.00") >= 0;
|
return Utils.getAppVersionName().compareTo(version) >= 0;
|
||||||
public static final boolean IS_19_21_OR_GREATER = Utils.getAppVersionName().compareTo("19.21.00") >= 0;
|
}
|
||||||
public static final boolean IS_19_26_OR_GREATER = Utils.getAppVersionName().compareTo("19.26.00") >= 0;
|
|
||||||
public static final boolean IS_19_29_OR_GREATER = Utils.getAppVersionName().compareTo("19.29.00") >= 0;
|
public static final boolean IS_19_17_OR_GREATER = isVersionOrGreater("19.17.00");
|
||||||
public static final boolean IS_19_34_OR_GREATER = Utils.getAppVersionName().compareTo("19.34.00") >= 0;
|
public static final boolean IS_19_20_OR_GREATER = isVersionOrGreater("19.20.00");
|
||||||
public static final boolean IS_19_46_OR_GREATER = Utils.getAppVersionName().compareTo("19.46.00") >= 0;
|
public static final boolean IS_19_21_OR_GREATER = isVersionOrGreater("19.21.00");
|
||||||
|
public static final boolean IS_19_26_OR_GREATER = isVersionOrGreater("19.26.00");
|
||||||
|
public static final boolean IS_19_29_OR_GREATER = isVersionOrGreater("19.29.00");
|
||||||
|
public static final boolean IS_19_34_OR_GREATER = isVersionOrGreater("19.34.00");
|
||||||
|
public static final boolean IS_19_46_OR_GREATER = isVersionOrGreater("19.46.00");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,12 @@ final class CommentsFilter extends Filter {
|
|||||||
|
|
||||||
private final StringFilterGroup commentComposer;
|
private final StringFilterGroup commentComposer;
|
||||||
private final ByteArrayFilterGroup emojiPickerBufferGroup;
|
private final ByteArrayFilterGroup emojiPickerBufferGroup;
|
||||||
|
private final StringFilterGroup filterChipBar;
|
||||||
|
private final ByteArrayFilterGroup aiCommentsSummary;
|
||||||
|
|
||||||
public CommentsFilter() {
|
public CommentsFilter() {
|
||||||
var chatSummary = new StringFilterGroup(
|
var chatSummary = new StringFilterGroup(
|
||||||
Settings.HIDE_COMMENTS_CHAT_SUMMARY,
|
Settings.HIDE_COMMENTS_AI_CHAT_SUMMARY,
|
||||||
"live_chat_summary_banner.eml"
|
"live_chat_summary_banner.eml"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -58,6 +60,16 @@ final class CommentsFilter extends Filter {
|
|||||||
"id.comment.quick_emoji.button"
|
"id.comment.quick_emoji.button"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
filterChipBar = new StringFilterGroup(
|
||||||
|
Settings.HIDE_COMMENTS_AI_SUMMARY,
|
||||||
|
"filter_chip_bar.eml"
|
||||||
|
);
|
||||||
|
|
||||||
|
aiCommentsSummary = new ByteArrayFilterGroup(
|
||||||
|
null,
|
||||||
|
"yt_fill_spark_"
|
||||||
|
);
|
||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
chatSummary,
|
chatSummary,
|
||||||
commentsByMembers,
|
commentsByMembers,
|
||||||
@@ -65,7 +77,8 @@ final class CommentsFilter extends Filter {
|
|||||||
createAShort,
|
createAShort,
|
||||||
previewComment,
|
previewComment,
|
||||||
thanksButton,
|
thanksButton,
|
||||||
commentComposer
|
commentComposer,
|
||||||
|
filterChipBar
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,6 +97,13 @@ final class CommentsFilter extends Filter {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (matchedGroup == filterChipBar) {
|
||||||
|
if (aiCommentsSummary.check(protobufBufferArray).isFiltered()) {
|
||||||
|
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
"metadata"
|
"metadata"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final StringFilterGroup aiGeneratedVideoSummarySection = new StringFilterGroup(
|
||||||
|
Settings.HIDE_AI_GENERATED_VIDEO_SUMMARY_SECTION,
|
||||||
|
"cell_expandable_metadata.eml"
|
||||||
|
);
|
||||||
|
|
||||||
final StringFilterGroup attributesSection = new StringFilterGroup(
|
final StringFilterGroup attributesSection = new StringFilterGroup(
|
||||||
Settings.HIDE_ATTRIBUTES_SECTION,
|
Settings.HIDE_ATTRIBUTES_SECTION,
|
||||||
"gaming_section",
|
"gaming_section",
|
||||||
@@ -67,6 +72,7 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
);
|
);
|
||||||
|
|
||||||
addPathCallbacks(
|
addPathCallbacks(
|
||||||
|
aiGeneratedVideoSummarySection,
|
||||||
attributesSection,
|
attributesSection,
|
||||||
infoCardsSection,
|
infoCardsSection,
|
||||||
howThisWasMadeSection,
|
howThisWasMadeSection,
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class ReturnYouTubeDislike {
|
|||||||
private static final Rect middleSeparatorBounds;
|
private static final Rect middleSeparatorBounds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Left separator horizontal padding for Rolling Number layout.
|
* Horizontal padding between the left and middle separator.
|
||||||
*/
|
*/
|
||||||
public static final int leftSeparatorShapePaddingPixels;
|
public static final int leftSeparatorShapePaddingPixels;
|
||||||
private static final ShapeDrawable leftSeparatorShape;
|
private static final ShapeDrawable leftSeparatorShape;
|
||||||
@@ -129,7 +129,7 @@ public class ReturnYouTubeDislike {
|
|||||||
(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3.7f, dp);
|
(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3.7f, dp);
|
||||||
middleSeparatorBounds = new Rect(0, 0, middleSeparatorSize, middleSeparatorSize);
|
middleSeparatorBounds = new Rect(0, 0, middleSeparatorSize, middleSeparatorSize);
|
||||||
|
|
||||||
leftSeparatorShapePaddingPixels = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10.0f, dp);
|
leftSeparatorShapePaddingPixels = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8.4f, dp);
|
||||||
|
|
||||||
leftSeparatorShape = new ShapeDrawable(new RectShape());
|
leftSeparatorShape = new ShapeDrawable(new RectShape());
|
||||||
leftSeparatorShape.setBounds(leftSeparatorBounds);
|
leftSeparatorShape.setBounds(leftSeparatorBounds);
|
||||||
@@ -238,7 +238,7 @@ public class ReturnYouTubeDislike {
|
|||||||
String leftSeparatorString = getTextDirectionString();
|
String leftSeparatorString = getTextDirectionString();
|
||||||
final Spannable leftSeparatorSpan;
|
final Spannable leftSeparatorSpan;
|
||||||
if (isRollingNumber) {
|
if (isRollingNumber) {
|
||||||
leftSeparatorSpan = new SpannableString(leftSeparatorString);
|
leftSeparatorSpan = new SpannableString(leftSeparatorString);
|
||||||
} else {
|
} else {
|
||||||
leftSeparatorString += " ";
|
leftSeparatorString += " ";
|
||||||
leftSeparatorSpan = new SpannableString(leftSeparatorString);
|
leftSeparatorSpan = new SpannableString(leftSeparatorString);
|
||||||
@@ -623,7 +623,7 @@ public class ReturnYouTubeDislike {
|
|||||||
userVote = vote;
|
userVote = vote;
|
||||||
clearUICache();
|
clearUICache();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (future.isDone()) {
|
if (future.isDone()) {
|
||||||
// Update the fetched vote data.
|
// Update the fetched vote data.
|
||||||
RYDVoteData voteData = getFetchData(MAX_MILLISECONDS_TO_BLOCK_UI_WAITING_FOR_FETCH);
|
RYDVoteData voteData = getFetchData(MAX_MILLISECONDS_TO_BLOCK_UI_WAITING_FOR_FETCH);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import static app.revanced.extension.youtube.patches.ChangeFormFactorPatch.FormF
|
|||||||
import static app.revanced.extension.youtube.patches.ChangeStartPagePatch.StartPage;
|
import static app.revanced.extension.youtube.patches.ChangeStartPagePatch.StartPage;
|
||||||
import static app.revanced.extension.youtube.patches.ExitFullscreenPatch.FullscreenMode;
|
import static app.revanced.extension.youtube.patches.ExitFullscreenPatch.FullscreenMode;
|
||||||
import static app.revanced.extension.youtube.patches.ForceOriginalAudioPatch.ForceOriginalAudioAvailability;
|
import static app.revanced.extension.youtube.patches.ForceOriginalAudioPatch.ForceOriginalAudioAvailability;
|
||||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHideExpandCloseAvailability;
|
|
||||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHorizontalDragAvailability;
|
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerHorizontalDragAvailability;
|
||||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType;
|
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType;
|
||||||
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType.MINIMAL;
|
import static app.revanced.extension.youtube.patches.MiniplayerPatch.MiniplayerType.MINIMAL;
|
||||||
@@ -40,6 +39,7 @@ import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.DeArrow
|
|||||||
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.StillImagesAvailability;
|
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.StillImagesAvailability;
|
||||||
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailOption;
|
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailOption;
|
||||||
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailStillTime;
|
import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailStillTime;
|
||||||
|
import app.revanced.extension.youtube.patches.MiniplayerPatch;
|
||||||
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings;
|
||||||
|
|
||||||
public class Settings extends BaseSettings {
|
public class Settings extends BaseSettings {
|
||||||
@@ -156,7 +156,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, MINIPLAYER_ANY_MODERN);
|
public static final BooleanSetting MINIPLAYER_DOUBLE_TAP_ACTION = new BooleanSetting("revanced_miniplayer_double_tap_action", TRUE, true, MINIPLAYER_ANY_MODERN);
|
||||||
public static final BooleanSetting MINIPLAYER_DRAG_AND_DROP = new BooleanSetting("revanced_miniplayer_drag_and_drop", TRUE, true, MINIPLAYER_ANY_MODERN);
|
public static final BooleanSetting MINIPLAYER_DRAG_AND_DROP = new BooleanSetting("revanced_miniplayer_drag_and_drop", TRUE, true, MINIPLAYER_ANY_MODERN);
|
||||||
public static final BooleanSetting MINIPLAYER_HORIZONTAL_DRAG = new BooleanSetting("revanced_miniplayer_horizontal_drag", FALSE, true, new MiniplayerHorizontalDragAvailability());
|
public static final BooleanSetting MINIPLAYER_HORIZONTAL_DRAG = new BooleanSetting("revanced_miniplayer_horizontal_drag", FALSE, true, new MiniplayerHorizontalDragAvailability());
|
||||||
public static final BooleanSetting MINIPLAYER_HIDE_EXPAND_CLOSE = new BooleanSetting("revanced_miniplayer_hide_expand_close", FALSE, true, new MiniplayerHideExpandCloseAvailability());
|
public static final BooleanSetting MINIPLAYER_HIDE_OVERLAY_BUTTONS = new BooleanSetting("revanced_miniplayer_hide_overlay_buttons", FALSE, true, new MiniplayerPatch.MiniplayerHideOverlayButtonsAvailability());
|
||||||
public static final BooleanSetting MINIPLAYER_HIDE_SUBTEXT = new BooleanSetting("revanced_miniplayer_hide_subtext", FALSE, true, MINIPLAYER_TYPE.availability(MODERN_1, MODERN_3));
|
public static final BooleanSetting MINIPLAYER_HIDE_SUBTEXT = new BooleanSetting("revanced_miniplayer_hide_subtext", FALSE, true, MINIPLAYER_TYPE.availability(MODERN_1, MODERN_3));
|
||||||
public static final BooleanSetting MINIPLAYER_HIDE_REWIND_FORWARD = new BooleanSetting("revanced_miniplayer_hide_rewind_forward", TRUE, true, MINIPLAYER_TYPE.availability(MODERN_1));
|
public static final BooleanSetting MINIPLAYER_HIDE_REWIND_FORWARD = new BooleanSetting("revanced_miniplayer_hide_rewind_forward", TRUE, true, MINIPLAYER_TYPE.availability(MODERN_1));
|
||||||
public static final BooleanSetting MINIPLAYER_ROUNDED_CORNERS = new BooleanSetting("revanced_miniplayer_rounded_corners", TRUE, true, MINIPLAYER_ANY_MODERN);
|
public static final BooleanSetting MINIPLAYER_ROUNDED_CORNERS = new BooleanSetting("revanced_miniplayer_rounded_corners", TRUE, true, MINIPLAYER_ANY_MODERN);
|
||||||
@@ -168,7 +168,8 @@ public class Settings extends BaseSettings {
|
|||||||
public static final StringSetting EXTERNAL_DOWNLOADER_PACKAGE_NAME = new StringSetting("revanced_external_downloader_name",
|
public static final StringSetting EXTERNAL_DOWNLOADER_PACKAGE_NAME = new StringSetting("revanced_external_downloader_name",
|
||||||
"org.schabi.newpipe" /* NewPipe */, parentsAny(EXTERNAL_DOWNLOADER, EXTERNAL_DOWNLOADER_ACTION_BUTTON));
|
"org.schabi.newpipe" /* NewPipe */, parentsAny(EXTERNAL_DOWNLOADER, EXTERNAL_DOWNLOADER_ACTION_BUTTON));
|
||||||
// Comments
|
// Comments
|
||||||
public static final BooleanSetting HIDE_COMMENTS_CHAT_SUMMARY = new BooleanSetting("revanced_hide_comments_chat_summary", FALSE);
|
public static final BooleanSetting HIDE_COMMENTS_AI_CHAT_SUMMARY = new BooleanSetting("revanced_hide_comments_ai_chat_summary", FALSE);
|
||||||
|
public static final BooleanSetting HIDE_COMMENTS_AI_SUMMARY = new BooleanSetting("revanced_hide_comments_ai_summary", FALSE);
|
||||||
public static final BooleanSetting HIDE_COMMENTS_BY_MEMBERS_HEADER = new BooleanSetting("revanced_hide_comments_by_members_header", FALSE);
|
public static final BooleanSetting HIDE_COMMENTS_BY_MEMBERS_HEADER = new BooleanSetting("revanced_hide_comments_by_members_header", FALSE);
|
||||||
public static final BooleanSetting HIDE_COMMENTS_CREATE_A_SHORT_BUTTON = new BooleanSetting("revanced_hide_comments_create_a_short_button", TRUE);
|
public static final BooleanSetting HIDE_COMMENTS_CREATE_A_SHORT_BUTTON = new BooleanSetting("revanced_hide_comments_create_a_short_button", TRUE);
|
||||||
public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comments_timestamp_and_emoji_buttons", TRUE);
|
public static final BooleanSetting HIDE_COMMENTS_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comments_timestamp_and_emoji_buttons", TRUE);
|
||||||
@@ -176,6 +177,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_COMMENTS_SECTION = new BooleanSetting("revanced_hide_comments_section", FALSE);
|
public static final BooleanSetting HIDE_COMMENTS_SECTION = new BooleanSetting("revanced_hide_comments_section", FALSE);
|
||||||
public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE);
|
public static final BooleanSetting HIDE_COMMENTS_THANKS_BUTTON = new BooleanSetting("revanced_hide_comments_thanks_button", TRUE);
|
||||||
// Description
|
// Description
|
||||||
|
public static final BooleanSetting HIDE_AI_GENERATED_VIDEO_SUMMARY_SECTION = new BooleanSetting("revanced_hide_ai_generated_video_summary_section", FALSE);
|
||||||
public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE);
|
public static final BooleanSetting HIDE_ATTRIBUTES_SECTION = new BooleanSetting("revanced_hide_attributes_section", FALSE);
|
||||||
public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE);
|
public static final BooleanSetting HIDE_CHAPTERS_SECTION = new BooleanSetting("revanced_hide_chapters_section", TRUE);
|
||||||
public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("revanced_hide_how_this_was_made_section", FALSE);
|
public static final BooleanSetting HIDE_HOW_THIS_WAS_MADE_SECTION = new BooleanSetting("revanced_hide_how_this_was_made_section", FALSE);
|
||||||
@@ -218,7 +220,7 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
public static final BooleanSetting SPOOF_APP_VERSION = new BooleanSetting("revanced_spoof_app_version", FALSE, true, "revanced_spoof_app_version_user_dialog_message");
|
||||||
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
public static final BooleanSetting WIDE_SEARCHBAR = new BooleanSetting("revanced_wide_searchbar", FALSE, true);
|
||||||
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.DEFAULT, true);
|
public static final EnumSetting<StartPage> CHANGE_START_PAGE = new EnumSetting<>("revanced_change_start_page", StartPage.DEFAULT, true);
|
||||||
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", "19.26.42", true, parent(SPOOF_APP_VERSION));
|
public static final StringSetting SPOOF_APP_VERSION_TARGET = new StringSetting("revanced_spoof_app_version_target", "19.01.34", true, parent(SPOOF_APP_VERSION));
|
||||||
// Custom filter
|
// Custom filter
|
||||||
public static final BooleanSetting CUSTOM_FILTER = new BooleanSetting("revanced_custom_filter", FALSE);
|
public static final BooleanSetting CUSTOM_FILTER = new BooleanSetting("revanced_custom_filter", FALSE);
|
||||||
public static final StringSetting CUSTOM_FILTER_STRINGS = new StringSetting("revanced_custom_filter_strings", "", true, parent(CUSTOM_FILTER));
|
public static final StringSetting CUSTOM_FILTER_STRINGS = new StringSetting("revanced_custom_filter_strings", "", true, parent(CUSTOM_FILTER));
|
||||||
@@ -231,7 +233,8 @@ public class Settings extends BaseSettings {
|
|||||||
public static final BooleanSetting HIDE_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_hide_notifications_button", FALSE, true);
|
public static final BooleanSetting HIDE_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_hide_notifications_button", FALSE, true);
|
||||||
public static final BooleanSetting SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_switch_create_with_notifications_button", TRUE, true,
|
public static final BooleanSetting SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_switch_create_with_notifications_button", TRUE, true,
|
||||||
"revanced_switch_create_with_notifications_button_user_dialog_message");
|
"revanced_switch_create_with_notifications_button_user_dialog_message");
|
||||||
public static final BooleanSetting DISABLE_TRANSLUCENT_STATUS_BAR = new BooleanSetting("revanced_disable_translucent_status_bar", FALSE, true);
|
public static final BooleanSetting DISABLE_TRANSLUCENT_STATUS_BAR = new BooleanSetting("revanced_disable_translucent_status_bar", FALSE, true,
|
||||||
|
"revanced_disable_translucent_status_bar_user_dialog_message");
|
||||||
public static final BooleanSetting DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT = new BooleanSetting("revanced_disable_translucent_navigation_bar_light", FALSE, true);
|
public static final BooleanSetting DISABLE_TRANSLUCENT_NAVIGATION_BAR_LIGHT = new BooleanSetting("revanced_disable_translucent_navigation_bar_light", FALSE, true);
|
||||||
public static final BooleanSetting DISABLE_TRANSLUCENT_NAVIGATION_BAR_DARK = new BooleanSetting("revanced_disable_translucent_navigation_bar_dark", FALSE, true);
|
public static final BooleanSetting DISABLE_TRANSLUCENT_NAVIGATION_BAR_DARK = new BooleanSetting("revanced_disable_translucent_navigation_bar_dark", FALSE, true);
|
||||||
|
|
||||||
@@ -446,7 +449,7 @@ public class Settings extends BaseSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Old spoof versions that no longer work.
|
// Old spoof versions that no longer work.
|
||||||
if (SPOOF_APP_VERSION_TARGET.get().compareTo("19.00.00") < 0) {
|
if (SPOOF_APP_VERSION_TARGET.get().compareTo(SPOOF_APP_VERSION_TARGET.defaultValue) < 0) {
|
||||||
Logger.printInfo(() -> "Resetting spoof app version target");
|
Logger.printInfo(() -> "Resetting spoof app version target");
|
||||||
SPOOF_APP_VERSION_TARGET.resetToDefault();
|
SPOOF_APP_VERSION_TARGET.resetToDefault();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import android.widget.Toolbar;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import app.revanced.extension.shared.Logger;
|
import app.revanced.extension.shared.Logger;
|
||||||
import app.revanced.extension.shared.Utils;
|
import app.revanced.extension.shared.Utils;
|
||||||
@@ -139,11 +138,13 @@ public class ReVancedPreferenceFragment extends AbstractPreferenceFragment {
|
|||||||
.findViewById(android.R.id.content)
|
.findViewById(android.R.id.content)
|
||||||
.getParent();
|
.getParent();
|
||||||
|
|
||||||
// Fix required for Android 15 and YT 19.45+
|
// Fix edge-to-edge screen with Android 15 and YT 19.45+
|
||||||
|
// https://developer.android.com/develop/ui/views/layout/edge-to-edge#system-bars-insets
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
rootView.setOnApplyWindowInsetsListener((v, insets) -> {
|
rootView.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
Insets statusInsets = insets.getInsets(WindowInsets.Type.statusBars());
|
Insets statusInsets = insets.getInsets(WindowInsets.Type.statusBars());
|
||||||
v.setPadding(0, statusInsets.top, 0, 0);
|
Insets navInsets = insets.getInsets(WindowInsets.Type.navigationBars());
|
||||||
|
v.setPadding(0, statusInsets.top, 0, navInsets.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
android.useAndroidX = true
|
android.useAndroidX = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 5.15.0-dev.3
|
version = 5.18.0-dev.2
|
||||||
|
|||||||
@@ -776,8 +776,8 @@ public final class app/revanced/patches/shared/misc/settings/preference/TextPref
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatchKt {
|
public final class app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatchKt {
|
||||||
public static final fun spoofVideoStreamsPatch (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun spoofVideoStreamsPatch (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static synthetic fun spoofVideoStreamsPatch$default (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/BytecodePatch;
|
public static synthetic fun spoofVideoStreamsPatch$default (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/shared/misc/spoof/UserAgentClientSpoofPatchKt {
|
public final class app/revanced/patches/shared/misc/spoof/UserAgentClientSpoofPatchKt {
|
||||||
@@ -816,6 +816,14 @@ public final class app/revanced/patches/spotify/lite/ondemand/OnDemandPatchKt {
|
|||||||
public static final fun getOnDemandPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getOnDemandPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/misc/UnlockPremiumPatchKt {
|
||||||
|
public static final fun getUnlockPremiumPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/spotify/misc/extension/ExtensionPatchKt {
|
||||||
|
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/spotify/misc/fix/SpoofSignaturePatchKt {
|
public final class app/revanced/patches/spotify/misc/fix/SpoofSignaturePatchKt {
|
||||||
public static final fun getSpoofSignaturePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSpoofSignaturePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
@@ -1177,17 +1185,7 @@ public final class app/revanced/patches/youtube/layout/hide/time/HideTimestampPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatchKt {
|
public final class app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatchKt {
|
||||||
public static final fun getFloatyBarButtonTopMargin ()J
|
|
||||||
public static final fun getMiniplayerMaxSize ()J
|
|
||||||
public static final fun getMiniplayerPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getMiniplayerPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
public static final fun getModernMiniplayerClose ()J
|
|
||||||
public static final fun getModernMiniplayerExpand ()J
|
|
||||||
public static final fun getModernMiniplayerForwardButton ()J
|
|
||||||
public static final fun getModernMiniplayerRewindButton ()J
|
|
||||||
public static final fun getPlayerOverlays ()J
|
|
||||||
public static final fun getScrimOverlay ()J
|
|
||||||
public static final fun getYtOutlinePictureInPictureWhite24 ()J
|
|
||||||
public static final fun getYtOutlineXWhite24 ()J
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatchKt {
|
public final class app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatchKt {
|
||||||
@@ -1382,6 +1380,12 @@ public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPat
|
|||||||
public static final fun is_19_46_or_greater ()Z
|
public static final fun is_19_46_or_greater ()Z
|
||||||
public static final fun is_19_47_or_greater ()Z
|
public static final fun is_19_47_or_greater ()Z
|
||||||
public static final fun is_19_49_or_greater ()Z
|
public static final fun is_19_49_or_greater ()Z
|
||||||
|
public static final fun is_20_02_or_greater ()Z
|
||||||
|
public static final fun is_20_03_or_greater ()Z
|
||||||
|
public static final fun is_20_05_or_greater ()Z
|
||||||
|
public static final fun is_20_07_or_greater ()Z
|
||||||
|
public static final fun is_20_09_or_greater ()Z
|
||||||
|
public static final fun is_20_10_or_greater ()Z
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatchKt {
|
public final class app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatchKt {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
|||||||
val hideSponsoredStoriesPatch = bytecodePatch(
|
val hideSponsoredStoriesPatch = bytecodePatch(
|
||||||
name = "Hide 'Sponsored Stories'",
|
name = "Hide 'Sponsored Stories'",
|
||||||
) {
|
) {
|
||||||
compatibleWith("com.facebook.katana")
|
compatibleWith("com.facebook.katana"("490.0.0.63.82"))
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
val sponsoredDataModelTemplateMethod = getSponsoredDataModelTemplateFingerprint.originalMethod
|
val sponsoredDataModelTemplateMethod = getSponsoredDataModelTemplateFingerprint.originalMethod
|
||||||
|
|||||||
@@ -145,7 +145,25 @@ internal val patchIncludedExtensionMethodFingerprint = fingerprint {
|
|||||||
internal const val MEDIA_FETCH_HOT_CONFIG_FEATURE_FLAG = 45645570L
|
internal const val MEDIA_FETCH_HOT_CONFIG_FEATURE_FLAG = 45645570L
|
||||||
|
|
||||||
internal val mediaFetchHotConfigFingerprint = fingerprint {
|
internal val mediaFetchHotConfigFingerprint = fingerprint {
|
||||||
literal {
|
literal { MEDIA_FETCH_HOT_CONFIG_FEATURE_FLAG }
|
||||||
MEDIA_FETCH_HOT_CONFIG_FEATURE_FLAG
|
}
|
||||||
}
|
|
||||||
|
// 20.10+
|
||||||
|
internal const val MEDIA_FETCH_HOT_CONFIG_ALTERNATIVE_FEATURE_FLAG = 45683169L
|
||||||
|
|
||||||
|
internal val mediaFetchHotConfigAlternativeFingerprint = fingerprint {
|
||||||
|
literal { MEDIA_FETCH_HOT_CONFIG_ALTERNATIVE_FEATURE_FLAG }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Feature flag that enables different code for parsing and starting video playback,
|
||||||
|
// but it's exact purpose is not known. If this flag is enabled while stream spoofing
|
||||||
|
// then videos will never start playback and load forever.
|
||||||
|
// Flag does not seem to affect playback if spoofing is off.
|
||||||
|
internal const val PLAYBACK_START_CHECK_ENDPOINT_USED_FEATURE_FLAG = 45665455L
|
||||||
|
|
||||||
|
internal val playbackStartDescriptorFeatureFlagFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
parameters()
|
||||||
|
returns("Z")
|
||||||
|
literal { PLAYBACK_START_CHECK_ENDPOINT_USED_FEATURE_FLAG }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ internal const val EXTENSION_CLASS_DESCRIPTOR =
|
|||||||
|
|
||||||
fun spoofVideoStreamsPatch(
|
fun spoofVideoStreamsPatch(
|
||||||
block: BytecodePatchBuilder.() -> Unit = {},
|
block: BytecodePatchBuilder.() -> Unit = {},
|
||||||
applyMediaFetchHotConfigChanges: BytecodePatchBuilder.() -> Boolean = { false },
|
fixMediaFetchHotConfigChanges: BytecodePatchBuilder.() -> Boolean = { false },
|
||||||
|
fixMediaFetchHotConfigAlternativeChanges: BytecodePatchBuilder.() -> Boolean = { false },
|
||||||
|
fixParsePlaybackResponseFeatureFlag: BytecodePatchBuilder.() -> Boolean = { false },
|
||||||
executeBlock: BytecodePatchContext.() -> Unit = {},
|
executeBlock: BytecodePatchContext.() -> Unit = {},
|
||||||
) = bytecodePatch(
|
) = bytecodePatch(
|
||||||
name = "Spoof video streams",
|
name = "Spoof video streams",
|
||||||
@@ -241,13 +243,27 @@ fun spoofVideoStreamsPatch(
|
|||||||
|
|
||||||
// region turn off stream config replacement feature flag.
|
// region turn off stream config replacement feature flag.
|
||||||
|
|
||||||
if (applyMediaFetchHotConfigChanges()) {
|
if (fixMediaFetchHotConfigChanges()) {
|
||||||
mediaFetchHotConfigFingerprint.method.insertFeatureFlagBooleanOverride(
|
mediaFetchHotConfigFingerprint.method.insertFeatureFlagBooleanOverride(
|
||||||
MEDIA_FETCH_HOT_CONFIG_FEATURE_FLAG,
|
MEDIA_FETCH_HOT_CONFIG_FEATURE_FLAG,
|
||||||
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z"
|
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fixMediaFetchHotConfigAlternativeChanges()) {
|
||||||
|
mediaFetchHotConfigAlternativeFingerprint.method.insertFeatureFlagBooleanOverride(
|
||||||
|
MEDIA_FETCH_HOT_CONFIG_ALTERNATIVE_FEATURE_FLAG,
|
||||||
|
"$EXTENSION_CLASS_DESCRIPTOR->useMediaFetchHotConfigReplacement(Z)Z"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fixParsePlaybackResponseFeatureFlag()) {
|
||||||
|
playbackStartDescriptorFeatureFlagFingerprint.method.insertFeatureFlagBooleanOverride(
|
||||||
|
PLAYBACK_START_CHECK_ENDPOINT_USED_FEATURE_FLAG,
|
||||||
|
"$EXTENSION_CLASS_DESCRIPTOR->usePlaybackStartFeatureFlag(Z)Z"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
executeBlock()
|
executeBlock()
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.w3c.dom.Element
|
|||||||
val customThemePatch = resourcePatch(
|
val customThemePatch = resourcePatch(
|
||||||
name = "Custom theme",
|
name = "Custom theme",
|
||||||
description = "Applies a custom theme.",
|
description = "Applies a custom theme.",
|
||||||
|
use = false,
|
||||||
) {
|
) {
|
||||||
compatibleWith("com.spotify.music")
|
compatibleWith("com.spotify.music")
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.patches.spotify.misc
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
|
internal val accountAttributeFingerprint = fingerprint {
|
||||||
|
custom { _, c -> c.endsWith("internal/AccountAttribute;") }
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val productStateProtoFingerprint = fingerprint {
|
||||||
|
returns("Ljava/util/Map;")
|
||||||
|
custom { _, classDef ->
|
||||||
|
classDef.endsWith("ProductStateProto;")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val buildQueryParametersFingerprint = fingerprint {
|
||||||
|
strings("trackRows", "device_type:tablet")
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val contextMenuExperimentsFingerprint = fingerprint {
|
||||||
|
parameters("L")
|
||||||
|
strings("remove_ads_upsell_enabled")
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package app.revanced.patches.spotify.misc.extension
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.misc.extension.sharedExtensionPatch
|
||||||
|
|
||||||
|
val sharedExtensionPatch = sharedExtensionPatch("spotify", spotifyMainActivityOnCreate)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.spotify.misc.extension
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.misc.extension.extensionHook
|
||||||
|
|
||||||
|
internal val spotifyMainActivityOnCreate = extensionHook {
|
||||||
|
custom { method, classDef ->
|
||||||
|
classDef.type == "Lcom/spotify/music/SpotifyMainActivity;" &&
|
||||||
|
method.name == "onCreate"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package app.revanced.patches.spotify.navbar
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint
|
|
||||||
import app.revanced.util.literal
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
|
|
||||||
internal val addNavBarItemFingerprint = fingerprint {
|
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
|
||||||
returns("V")
|
|
||||||
literal { showBottomNavigationItemsTextId }
|
|
||||||
}
|
|
||||||
@@ -1,50 +1,12 @@
|
|||||||
package app.revanced.patches.spotify.navbar
|
package app.revanced.patches.spotify.navbar
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patcher.patch.resourcePatch
|
import app.revanced.patches.spotify.misc.unlockPremiumPatch
|
||||||
import app.revanced.patches.shared.misc.mapping.get
|
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
|
||||||
|
|
||||||
internal var showBottomNavigationItemsTextId = -1L
|
|
||||||
private set
|
|
||||||
internal var premiumTabId = -1L
|
|
||||||
private set
|
|
||||||
|
|
||||||
private val premiumNavbarTabResourcePatch = resourcePatch {
|
|
||||||
dependsOn(resourceMappingPatch)
|
|
||||||
|
|
||||||
execute {
|
|
||||||
premiumTabId = resourceMappings["id", "premium_tab"]
|
|
||||||
|
|
||||||
showBottomNavigationItemsTextId = resourceMappings[
|
|
||||||
"bool",
|
|
||||||
"show_bottom_navigation_items_text",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@Deprecated("Superseded by unlockPremiumPatch", ReplaceWith("unlockPremiumPatch"))
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val premiumNavbarTabPatch = bytecodePatch(
|
val premiumNavbarTabPatch = bytecodePatch(
|
||||||
name = "Premium navbar tab",
|
|
||||||
description = "Hides the premium tab from the navigation bar.",
|
description = "Hides the premium tab from the navigation bar.",
|
||||||
) {
|
) {
|
||||||
dependsOn(premiumNavbarTabResourcePatch)
|
dependsOn(unlockPremiumPatch)
|
||||||
|
|
||||||
compatibleWith("com.spotify.music")
|
|
||||||
|
|
||||||
// If the navigation bar item is the premium tab, do not add it.
|
|
||||||
execute {
|
|
||||||
addNavBarItemFingerprint.method.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const v1, $premiumTabId
|
|
||||||
if-ne p5, v1, :continue
|
|
||||||
return-void
|
|
||||||
:continue
|
|
||||||
nop
|
|
||||||
""",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,13 @@ val dynamicColorPatch = resourcePatch(
|
|||||||
name = "Dynamic color",
|
name = "Dynamic color",
|
||||||
description = "Replaces the default X (Formerly Twitter) Blue with the user's Material You palette.",
|
description = "Replaces the default X (Formerly Twitter) Blue with the user's Material You palette.",
|
||||||
) {
|
) {
|
||||||
compatibleWith("com.twitter.android")
|
compatibleWith(
|
||||||
|
"com.twitter.android"(
|
||||||
|
"10.84.0-release.0",
|
||||||
|
"10.60.0-release.0",
|
||||||
|
"10.48.0-release.0"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
val resDirectory = get("res")
|
val resDirectory = get("res")
|
||||||
|
|||||||
@@ -11,7 +11,15 @@ fun hookPatch(
|
|||||||
) = bytecodePatch(name) {
|
) = bytecodePatch(name) {
|
||||||
dependsOn(jsonHookPatch)
|
dependsOn(jsonHookPatch)
|
||||||
|
|
||||||
compatibleWith("com.twitter.android")
|
compatibleWith(
|
||||||
|
"com.twitter.android"(
|
||||||
|
// 10.85+ uses Pairip and requires additional changes to work.
|
||||||
|
"10.84.0-release.0",
|
||||||
|
// Confirmed to not show reply ads. Slightly newer versions may also work.
|
||||||
|
"10.60.0-release.0",
|
||||||
|
"10.48.0-release.0"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
addJsonHook(JsonHook(hookClassDescriptor))
|
addJsonHook(JsonHook(hookClassDescriptor))
|
||||||
|
|||||||
@@ -37,7 +37,13 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
|||||||
sharedExtensionPatch,
|
sharedExtensionPatch,
|
||||||
)
|
)
|
||||||
|
|
||||||
compatibleWith("com.twitter.android")
|
compatibleWith(
|
||||||
|
"com.twitter.android"(
|
||||||
|
"10.84.0-release.0",
|
||||||
|
"10.60.0-release.0",
|
||||||
|
"10.48.0-release.0"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
val domainName by stringOption(
|
val domainName by stringOption(
|
||||||
key = "domainName",
|
key = "domainName",
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ val sanitizeSharingLinksPatch = bytecodePatch(
|
|||||||
name = "Sanitize sharing links",
|
name = "Sanitize sharing links",
|
||||||
description = "Removes the tracking query parameters from links before they are shared.",
|
description = "Removes the tracking query parameters from links before they are shared.",
|
||||||
) {
|
) {
|
||||||
compatibleWith("com.twitter.android")
|
compatibleWith(
|
||||||
|
"com.twitter.android"(
|
||||||
|
"10.84.0-release.0",
|
||||||
|
"10.60.0-release.0",
|
||||||
|
"10.48.0-release.0"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
sanitizeSharingLinksFingerprint.method.addInstructions(
|
sanitizeSharingLinksFingerprint.method.addInstructions(
|
||||||
|
|||||||
@@ -82,9 +82,8 @@ val hideAdsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,8 @@ val hideGetPremiumPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,8 @@ val videoAdsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,8 @@ val copyVideoUrlPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,8 @@ val removeViewerDiscretionDialogPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -72,9 +72,8 @@ val downloadsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,8 @@ val disablePreciseSeekingGesturePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,8 @@ val enableSeekbarTappingPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,8 @@ val enableSlideToSeekPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,8 @@ val seekbarThumbnailsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -84,9 +84,8 @@ val swipeControlsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,8 @@ val autoCaptionsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,8 @@ val customBrandingPatch = resourcePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -45,9 +45,8 @@ val changeHeaderPatch = resourcePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,8 @@ val hideButtonsPatch = resourcePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -44,9 +44,8 @@ val navigationButtonsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,8 @@ val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ val changeFormFactorPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,8 @@ val hideEndscreenCardsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ val hideEndScreenSuggestedVideoPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,8 @@ val disableFullscreenAmbientModePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,21 @@ internal val hideShowMoreButtonFingerprint = fingerprint {
|
|||||||
literal { expandButtonDownId }
|
literal { expandButtonDownId }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20.07+
|
||||||
|
*/
|
||||||
internal val parseElementFromBufferFingerprint = fingerprint {
|
internal val parseElementFromBufferFingerprint = fingerprint {
|
||||||
|
parameters("L", "L", "[B", "L", "L")
|
||||||
|
opcodes(
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.IGET_BOOLEAN,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
)
|
||||||
|
strings("Failed to parse Element") // String is a partial match.
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val parseElementFromBufferLegacyFingerprint = fingerprint {
|
||||||
parameters("L", "L", "[B", "L", "L")
|
parameters("L", "L", "[B", "L", "L")
|
||||||
opcodes(
|
opcodes(
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
@@ -110,7 +124,6 @@ internal val showFloatingMicrophoneButtonFingerprint = fingerprint {
|
|||||||
opcodes(
|
opcodes(
|
||||||
Opcode.IGET_BOOLEAN,
|
Opcode.IGET_BOOLEAN,
|
||||||
Opcode.IF_EQZ,
|
Opcode.IF_EQZ,
|
||||||
Opcode.RETURN_VOID,
|
|
||||||
)
|
)
|
||||||
literal { fabButtonId }
|
literal { fabButtonId }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,14 @@ import app.revanced.patches.youtube.misc.litho.filter.addLithoFilter
|
|||||||
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
||||||
import app.revanced.patches.youtube.misc.navigation.navigationBarHookPatch
|
import app.revanced.patches.youtube.misc.navigation.navigationBarHookPatch
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_19_47_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_19_47_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_07_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import app.revanced.util.findInstructionIndicesReversedOrThrow
|
import app.revanced.util.findInstructionIndicesReversedOrThrow
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
|
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||||
|
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
@@ -132,6 +135,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
|||||||
"19.45.38",
|
"19.45.38",
|
||||||
"19.46.42",
|
"19.46.42",
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -142,6 +146,7 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
|||||||
PreferenceScreenPreference(
|
PreferenceScreenPreference(
|
||||||
key = "revanced_hide_description_components_screen",
|
key = "revanced_hide_description_components_screen",
|
||||||
preferences = setOf(
|
preferences = setOf(
|
||||||
|
SwitchPreference("revanced_hide_ai_generated_video_summary_section"),
|
||||||
SwitchPreference("revanced_hide_attributes_section"),
|
SwitchPreference("revanced_hide_attributes_section"),
|
||||||
SwitchPreference("revanced_hide_chapters_section"),
|
SwitchPreference("revanced_hide_chapters_section"),
|
||||||
SwitchPreference("revanced_hide_info_cards_section"),
|
SwitchPreference("revanced_hide_info_cards_section"),
|
||||||
@@ -154,7 +159,8 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
|||||||
PreferenceScreenPreference(
|
PreferenceScreenPreference(
|
||||||
"revanced_comments_screen",
|
"revanced_comments_screen",
|
||||||
preferences = setOf(
|
preferences = setOf(
|
||||||
SwitchPreference("revanced_hide_comments_chat_summary"),
|
SwitchPreference("revanced_hide_comments_ai_chat_summary"),
|
||||||
|
SwitchPreference("revanced_hide_comments_ai_summary"),
|
||||||
SwitchPreference("revanced_hide_comments_by_members_header"),
|
SwitchPreference("revanced_hide_comments_by_members_header"),
|
||||||
SwitchPreference("revanced_hide_comments_section"),
|
SwitchPreference("revanced_hide_comments_section"),
|
||||||
SwitchPreference("revanced_hide_comments_create_a_short_button"),
|
SwitchPreference("revanced_hide_comments_create_a_short_button"),
|
||||||
@@ -245,29 +251,32 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
|||||||
|
|
||||||
// region Mix playlists
|
// region Mix playlists
|
||||||
|
|
||||||
parseElementFromBufferFingerprint.method.apply {
|
(if (is_20_07_or_greater) parseElementFromBufferFingerprint
|
||||||
val startIndex = parseElementFromBufferFingerprint.patternMatch!!.startIndex
|
else parseElementFromBufferLegacyFingerprint).let {
|
||||||
// Target code is a mess with a lot of register moves.
|
it.method.apply {
|
||||||
// There is no simple way to find a free register for all versions so this is hard coded.
|
// Target code is a mess with a lot of register moves.
|
||||||
val freeRegister = if (is_19_47_or_greater) 6 else 0
|
// There is no simple way to find a free register for all versions so this is hard coded.
|
||||||
val byteArrayParameter = "p3"
|
val freeRegister = if (is_19_47_or_greater) 6 else 0
|
||||||
val conversionContextRegister = getInstruction<TwoRegisterInstruction>(startIndex).registerA
|
val byteArrayParameter = "p3"
|
||||||
val returnEmptyComponentInstruction = instructions.last { it.opcode == Opcode.INVOKE_STATIC }
|
val startIndex = it.patternMatch!!.startIndex
|
||||||
val returnEmptyComponentRegister = (returnEmptyComponentInstruction as FiveRegisterInstruction).registerC
|
val conversionContextRegister = getInstruction<TwoRegisterInstruction>(startIndex).registerA
|
||||||
|
val returnEmptyComponentInstruction = instructions.last { it.opcode == Opcode.INVOKE_STATIC }
|
||||||
|
val returnEmptyComponentRegister = (returnEmptyComponentInstruction as FiveRegisterInstruction).registerC
|
||||||
|
|
||||||
addInstructionsWithLabels(
|
addInstructionsWithLabels(
|
||||||
startIndex + 1,
|
startIndex + 1,
|
||||||
"""
|
"""
|
||||||
invoke-static { v$conversionContextRegister, $byteArrayParameter }, $LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR->filterMixPlaylists(Ljava/lang/Object;[B)Z
|
invoke-static { v$conversionContextRegister, $byteArrayParameter }, $LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR->filterMixPlaylists(Ljava/lang/Object;[B)Z
|
||||||
move-result v$freeRegister
|
move-result v$freeRegister
|
||||||
if-eqz v$freeRegister, :show
|
if-eqz v$freeRegister, :show
|
||||||
move-object v$returnEmptyComponentRegister, p1 # Required for 19.47
|
move-object v$returnEmptyComponentRegister, p1 # Required for 19.47
|
||||||
goto :return_empty_component
|
goto :return_empty_component
|
||||||
:show
|
:show
|
||||||
const/4 v$freeRegister, 0x0 # Restore register, required for 19.16
|
const/4 v$freeRegister, 0x0 # Restore register, required for 19.16
|
||||||
""",
|
""",
|
||||||
ExternalLabel("return_empty_component", returnEmptyComponentInstruction),
|
ExternalLabel("return_empty_component", returnEmptyComponentInstruction),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
@@ -343,19 +352,18 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
|||||||
|
|
||||||
// region hide floating microphone
|
// region hide floating microphone
|
||||||
|
|
||||||
showFloatingMicrophoneButtonFingerprint.let {
|
showFloatingMicrophoneButtonFingerprint.method.apply {
|
||||||
it.method.apply {
|
val literalIndex = indexOfFirstLiteralInstructionOrThrow(fabButtonId)
|
||||||
val startIndex = it.patternMatch!!.startIndex
|
val booleanIndex = indexOfFirstInstructionOrThrow(literalIndex, Opcode.IGET_BOOLEAN)
|
||||||
val register = getInstruction<TwoRegisterInstruction>(startIndex).registerA
|
val register = getInstruction<TwoRegisterInstruction>(booleanIndex).registerA
|
||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
startIndex + 1,
|
booleanIndex + 1,
|
||||||
"""
|
"""
|
||||||
invoke-static { v$register }, $LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR->hideFloatingMicrophoneButton(Z)Z
|
invoke-static { v$register }, $LAYOUT_COMPONENTS_FILTER_CLASS_DESCRIPTOR->hideFloatingMicrophoneButton(Z)Z
|
||||||
move-result v$register
|
move-result v$register
|
||||||
""",
|
"""
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|||||||
@@ -61,9 +61,8 @@ val hideInfoCardsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,8 @@ val hidePlayerFlyoutMenuPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,8 @@ val disableRollingNumberAnimationPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,8 @@ val hideSeekbarPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -176,9 +176,8 @@ val hideShortsComponentsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ val hideTimestampPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ internal val miniplayerModernAddViewListenerFingerprint = fingerprint {
|
|||||||
|
|
||||||
internal val miniplayerModernCloseButtonFingerprint = fingerprint {
|
internal val miniplayerModernCloseButtonFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("Landroid/widget/ImageView;")
|
returns("L")
|
||||||
parameters()
|
parameters()
|
||||||
literal { modernMiniplayerClose }
|
literal { modernMiniplayerClose }
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ internal val miniplayerOnCloseHandlerFingerprint = fingerprint {
|
|||||||
*/
|
*/
|
||||||
internal val miniplayerModernExpandButtonFingerprint = fingerprint {
|
internal val miniplayerModernExpandButtonFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("Landroid/widget/ImageView;")
|
returns("L")
|
||||||
parameters()
|
parameters()
|
||||||
literal { modernMiniplayerExpand }
|
literal { modernMiniplayerExpand }
|
||||||
}
|
}
|
||||||
@@ -82,7 +82,7 @@ internal val miniplayerModernExpandCloseDrawablesFingerprint = fingerprint {
|
|||||||
*/
|
*/
|
||||||
internal val miniplayerModernForwardButtonFingerprint = fingerprint {
|
internal val miniplayerModernForwardButtonFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("Landroid/widget/ImageView;")
|
returns("L")
|
||||||
parameters()
|
parameters()
|
||||||
literal { modernMiniplayerForwardButton }
|
literal { modernMiniplayerForwardButton }
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,6 @@ internal val miniplayerModernForwardButtonFingerprint = fingerprint {
|
|||||||
*/
|
*/
|
||||||
internal val miniplayerModernOverlayViewFingerprint = fingerprint {
|
internal val miniplayerModernOverlayViewFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("V")
|
|
||||||
parameters()
|
parameters()
|
||||||
literal { scrimOverlay }
|
literal { scrimOverlay }
|
||||||
}
|
}
|
||||||
@@ -102,7 +101,7 @@ internal val miniplayerModernOverlayViewFingerprint = fingerprint {
|
|||||||
*/
|
*/
|
||||||
internal val miniplayerModernRewindButtonFingerprint = fingerprint {
|
internal val miniplayerModernRewindButtonFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("Landroid/widget/ImageView;")
|
returns("L")
|
||||||
parameters()
|
parameters()
|
||||||
literal { modernMiniplayerRewindButton }
|
literal { modernMiniplayerRewindButton }
|
||||||
}
|
}
|
||||||
@@ -114,6 +113,13 @@ internal val miniplayerModernViewParentFingerprint = fingerprint {
|
|||||||
strings("player_overlay_modern_mini_player_controls")
|
strings("player_overlay_modern_mini_player_controls")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal val miniplayerModernActionButtonFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
returns("L")
|
||||||
|
parameters()
|
||||||
|
literal { modernMiniPlayerOverlayActionButton }
|
||||||
|
}
|
||||||
|
|
||||||
internal val miniplayerMinimumSizeFingerprint = fingerprint {
|
internal val miniplayerMinimumSizeFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||||
custom { method, _ ->
|
custom { method, _ ->
|
||||||
|
|||||||
@@ -34,27 +34,29 @@ import com.android.tools.smali.dexlib2.iface.reference.TypeReference
|
|||||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
||||||
|
|
||||||
var floatyBarButtonTopMargin = -1L
|
internal var floatyBarButtonTopMargin = -1L
|
||||||
private set
|
private set
|
||||||
|
|
||||||
// Only available in 19.15 and upwards.
|
// Only available in 19.15 and upwards.
|
||||||
var ytOutlineXWhite24 = -1L
|
internal var ytOutlineXWhite24 = -1L
|
||||||
private set
|
private set
|
||||||
var ytOutlinePictureInPictureWhite24 = -1L
|
internal var ytOutlinePictureInPictureWhite24 = -1L
|
||||||
private set
|
private set
|
||||||
var scrimOverlay = -1L
|
internal var scrimOverlay = -1L
|
||||||
private set
|
private set
|
||||||
var modernMiniplayerClose = -1L
|
internal var modernMiniplayerClose = -1L
|
||||||
private set
|
private set
|
||||||
var modernMiniplayerExpand = -1L
|
internal var modernMiniplayerExpand = -1L
|
||||||
private set
|
private set
|
||||||
var modernMiniplayerRewindButton = -1L
|
internal var modernMiniplayerRewindButton = -1L
|
||||||
private set
|
private set
|
||||||
var modernMiniplayerForwardButton = -1L
|
internal var modernMiniplayerForwardButton = -1L
|
||||||
private set
|
private set
|
||||||
var playerOverlays = -1L
|
internal var modernMiniPlayerOverlayActionButton = -1L
|
||||||
private set
|
private set
|
||||||
var miniplayerMaxSize = -1L
|
internal var playerOverlays = -1L
|
||||||
|
private set
|
||||||
|
internal var miniplayerMaxSize = -1L
|
||||||
private set
|
private set
|
||||||
|
|
||||||
private val miniplayerResourcePatch = resourcePatch {
|
private val miniplayerResourcePatch = resourcePatch {
|
||||||
@@ -100,6 +102,11 @@ private val miniplayerResourcePatch = resourcePatch {
|
|||||||
"modern_miniplayer_forward_button",
|
"modern_miniplayer_forward_button",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
modernMiniPlayerOverlayActionButton = resourceMappings[
|
||||||
|
"id",
|
||||||
|
"modern_miniplayer_overlay_action_button"
|
||||||
|
]
|
||||||
|
|
||||||
// Resource id is not used during patching, but is used by extension.
|
// Resource id is not used during patching, but is used by extension.
|
||||||
// Verify the resource is present while patching.
|
// Verify the resource is present while patching.
|
||||||
resourceMappings[
|
resourceMappings[
|
||||||
@@ -167,6 +174,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
"19.45.38",
|
"19.45.38",
|
||||||
"19.46.42",
|
"19.46.42",
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -175,19 +183,25 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
|
|
||||||
val preferences = mutableSetOf<BasePreference>()
|
val preferences = mutableSetOf<BasePreference>()
|
||||||
|
|
||||||
|
|
||||||
preferences +=
|
preferences +=
|
||||||
if (is_19_43_or_greater) {
|
if (is_20_03_or_greater) {
|
||||||
ListPreference(
|
ListPreference(
|
||||||
"revanced_miniplayer_type",
|
"revanced_miniplayer_type",
|
||||||
summaryKey = null,
|
summaryKey = null,
|
||||||
)
|
)
|
||||||
|
} else if (is_19_43_or_greater) {
|
||||||
|
ListPreference(
|
||||||
|
"revanced_miniplayer_type",
|
||||||
|
summaryKey = null,
|
||||||
|
entriesKey = "revanced_miniplayer_type_legacy_19_43_entries",
|
||||||
|
entryValuesKey = "revanced_miniplayer_type_legacy_19_43_entry_values",
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
ListPreference(
|
ListPreference(
|
||||||
"revanced_miniplayer_type",
|
"revanced_miniplayer_type",
|
||||||
summaryKey = null,
|
summaryKey = null,
|
||||||
entriesKey = "revanced_miniplayer_type_legacy_entries",
|
entriesKey = "revanced_miniplayer_type_legacy_19_16_entries",
|
||||||
entryValuesKey = "revanced_miniplayer_type_legacy_entry_values",
|
entryValuesKey = "revanced_miniplayer_type_legacy_19_16_entry_values",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,13 +223,13 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
preferences += SwitchPreference("revanced_miniplayer_hide_subtext")
|
preferences += SwitchPreference("revanced_miniplayer_hide_subtext")
|
||||||
|
|
||||||
preferences += if (is_19_26_or_greater) {
|
preferences += if (is_19_26_or_greater) {
|
||||||
SwitchPreference("revanced_miniplayer_hide_expand_close")
|
SwitchPreference("revanced_miniplayer_hide_overlay_buttons")
|
||||||
} else {
|
} else {
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
key = "revanced_miniplayer_hide_expand_close",
|
key = "revanced_miniplayer_hide_overlay_buttons",
|
||||||
titleKey = "revanced_miniplayer_hide_expand_close_legacy_title",
|
titleKey = "revanced_miniplayer_hide_overlay_buttons_legacy_title",
|
||||||
summaryOnKey = "revanced_miniplayer_hide_expand_close_legacy_summary_on",
|
summaryOnKey = "revanced_miniplayer_hide_overlay_buttons_legacy_summary_on",
|
||||||
summaryOffKey = "revanced_miniplayer_hide_expand_close_legacy_summary_off",
|
summaryOffKey = "revanced_miniplayer_hide_overlay_buttons_legacy_summary_off",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +379,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
if (is_19_23_or_greater) {
|
if (is_19_23_or_greater) {
|
||||||
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
||||||
MINIPLAYER_DRAG_DROP_FEATURE_KEY,
|
MINIPLAYER_DRAG_DROP_FEATURE_KEY,
|
||||||
"enableMiniplayerDragAndDrop",
|
"getMiniplayerDragAndDrop",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,7 +396,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
|
|
||||||
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
||||||
MINIPLAYER_DOUBLE_TAP_FEATURE_KEY,
|
MINIPLAYER_DOUBLE_TAP_FEATURE_KEY,
|
||||||
"enableMiniplayerDoubleTapAction",
|
"getMiniplayerDoubleTapAction",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +412,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
targetIndex + 1,
|
targetIndex + 1,
|
||||||
"""
|
"""
|
||||||
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->setMiniplayerDefaultSize(I)I
|
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->getMiniplayerDefaultSize(I)I
|
||||||
move-result v$register
|
move-result v$register
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
@@ -421,7 +435,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
if (is_19_36_or_greater) {
|
if (is_19_36_or_greater) {
|
||||||
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
||||||
MINIPLAYER_ROUNDED_CORNERS_FEATURE_KEY,
|
MINIPLAYER_ROUNDED_CORNERS_FEATURE_KEY,
|
||||||
"setRoundedCorners",
|
"getRoundedCorners",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,7 +447,7 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
|
|
||||||
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
miniplayerModernConstructorFingerprint.insertMiniplayerFeatureFlagBooleanOverride(
|
||||||
MINIPLAYER_HORIZONTAL_DRAG_FEATURE_KEY,
|
MINIPLAYER_HORIZONTAL_DRAG_FEATURE_KEY,
|
||||||
"setHorizontalDrag",
|
"getHorizontalDrag",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,6 +487,11 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
modernMiniplayerClose,
|
modernMiniplayerClose,
|
||||||
"hideMiniplayerExpandClose",
|
"hideMiniplayerExpandClose",
|
||||||
),
|
),
|
||||||
|
Triple(
|
||||||
|
miniplayerModernActionButtonFingerprint,
|
||||||
|
modernMiniPlayerOverlayActionButton,
|
||||||
|
"hideMiniplayerActionButton"
|
||||||
|
),
|
||||||
Triple(
|
Triple(
|
||||||
miniplayerModernRewindButtonFingerprint,
|
miniplayerModernRewindButtonFingerprint,
|
||||||
modernMiniplayerRewindButton,
|
modernMiniplayerRewindButton,
|
||||||
@@ -490,12 +509,25 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
),
|
),
|
||||||
).forEach { (fingerprint, literalValue, methodName) ->
|
).forEach { (fingerprint, literalValue, methodName) ->
|
||||||
fingerprint.match(
|
fingerprint.match(
|
||||||
miniplayerModernViewParentFingerprint.classDef,
|
miniplayerModernViewParentFingerprint.originalClassDef
|
||||||
).method.hookInflatedView(
|
).method.apply {
|
||||||
literalValue,
|
val literalIndex = indexOfFirstLiteralInstructionOrThrow(literalValue)
|
||||||
"Landroid/widget/ImageView;",
|
val checkCastIndex = indexOfFirstInstruction(literalIndex) {
|
||||||
"$EXTENSION_CLASS_DESCRIPTOR->$methodName(Landroid/widget/ImageView;)V",
|
opcode == Opcode.CHECK_CAST &&
|
||||||
)
|
getReference<TypeReference>()?.type == "Landroid/widget/ImageView;"
|
||||||
|
}
|
||||||
|
val viewIndex = if (checkCastIndex >= 0) {
|
||||||
|
checkCastIndex
|
||||||
|
} else {
|
||||||
|
indexOfFirstInstructionOrThrow(literalIndex, Opcode.MOVE_RESULT_OBJECT)
|
||||||
|
}
|
||||||
|
val viewRegister = getInstruction<OneRegisterInstruction>(viewIndex).registerA
|
||||||
|
|
||||||
|
addInstruction(
|
||||||
|
viewIndex + 1,
|
||||||
|
"invoke-static { v$viewRegister }, $EXTENSION_CLASS_DESCRIPTOR->$methodName(Landroid/view/View;)V"
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
miniplayerModernAddViewListenerFingerprint.match(
|
miniplayerModernAddViewListenerFingerprint.match(
|
||||||
@@ -510,33 +542,40 @@ val miniplayerPatch = bytecodePatch(
|
|||||||
// Modern 2 uses the same overlay controls as the regular video player,
|
// Modern 2 uses the same overlay controls as the regular video player,
|
||||||
// and the overlay views are added at runtime.
|
// and the overlay views are added at runtime.
|
||||||
// Add a hook to the overlay class, and pass the added views to extension.
|
// Add a hook to the overlay class, and pass the added views to extension.
|
||||||
|
// Problem is fixed in 19.21+
|
||||||
//
|
//
|
||||||
// NOTE: Modern 2 uses the same video UI as the regular player except resized to smaller.
|
// NOTE: Modern 2 uses the same video UI as the regular player except resized to smaller.
|
||||||
// This patch code could be used to hide other player overlays that do not use Litho.
|
// This patch code could be used to hide other player overlays that do not use Litho.
|
||||||
playerOverlaysLayoutFingerprint.classDef.methods.add(
|
if (!is_19_17_or_greater) {
|
||||||
ImmutableMethod(
|
playerOverlaysLayoutFingerprint.classDef.methods.add(
|
||||||
YOUTUBE_PLAYER_OVERLAYS_LAYOUT_CLASS_NAME,
|
ImmutableMethod(
|
||||||
"addView",
|
YOUTUBE_PLAYER_OVERLAYS_LAYOUT_CLASS_NAME,
|
||||||
listOf(
|
"addView",
|
||||||
ImmutableMethodParameter("Landroid/view/View;", null, null),
|
listOf(
|
||||||
ImmutableMethodParameter("I", null, null),
|
ImmutableMethodParameter("Landroid/view/View;", null, null),
|
||||||
ImmutableMethodParameter("Landroid/view/ViewGroup\$LayoutParams;", null, null),
|
ImmutableMethodParameter("I", null, null),
|
||||||
),
|
ImmutableMethodParameter(
|
||||||
"V",
|
"Landroid/view/ViewGroup\$LayoutParams;",
|
||||||
AccessFlags.PUBLIC.value,
|
null,
|
||||||
null,
|
null
|
||||||
null,
|
),
|
||||||
MutableMethodImplementation(4),
|
),
|
||||||
).toMutable().apply {
|
"V",
|
||||||
addInstructions(
|
AccessFlags.PUBLIC.value,
|
||||||
"""
|
null,
|
||||||
invoke-super { p0, p1, p2, p3 }, Landroid/view/ViewGroup;->addView(Landroid/view/View;ILandroid/view/ViewGroup${'$'}LayoutParams;)V
|
null,
|
||||||
invoke-static { p1 }, $EXTENSION_CLASS_DESCRIPTOR->playerOverlayGroupCreated(Landroid/view/View;)V
|
MutableMethodImplementation(4),
|
||||||
return-void
|
).toMutable().apply {
|
||||||
"""
|
addInstructions(
|
||||||
)
|
"""
|
||||||
}
|
invoke-super { p0, p1, p2, p3 }, Landroid/view/ViewGroup;->addView(Landroid/view/View;ILandroid/view/ViewGroup${'$'}LayoutParams;)V
|
||||||
)
|
invoke-static { p1 }, $EXTENSION_CLASS_DESCRIPTOR->playerOverlayGroupCreated(Landroid/view/View;)V
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ val playerPopupPanelsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,8 @@ val playerControlsBackgroundPatch = resourcePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ internal val exitFullscreenPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ val openVideosFullscreenPatch = bytecodePatch(
|
|||||||
"com.google.android.youtube"(
|
"com.google.android.youtube"(
|
||||||
"19.46.42",
|
"19.46.42",
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -56,9 +56,8 @@ val customPlayerOverlayOpacityPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import app.revanced.patches.youtube.misc.litho.filter.addLithoFilter
|
|||||||
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
||||||
import app.revanced.patches.youtube.misc.playertype.playerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.playerTypeHookPatch
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_19_33_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_19_33_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_10_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.addSettingPreference
|
import app.revanced.patches.youtube.misc.settings.addSettingPreference
|
||||||
import app.revanced.patches.youtube.misc.settings.newIntent
|
import app.revanced.patches.youtube.misc.settings.newIntent
|
||||||
@@ -56,9 +57,8 @@ val returnYouTubeDislikePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ val returnYouTubeDislikePatch = bytecodePatch(
|
|||||||
val tempRegister: Int
|
val tempRegister: Int
|
||||||
val charSequenceRegister: Int
|
val charSequenceRegister: Int
|
||||||
|
|
||||||
if (is_19_33_or_greater) {
|
if (is_19_33_or_greater && !is_20_10_or_greater) {
|
||||||
insertIndex = indexOfFirstInstructionOrThrow {
|
insertIndex = indexOfFirstInstructionOrThrow {
|
||||||
(opcode == Opcode.INVOKE_STATIC || opcode == Opcode.INVOKE_STATIC_RANGE)
|
(opcode == Opcode.INVOKE_STATIC || opcode == Opcode.INVOKE_STATIC_RANGE)
|
||||||
&& getReference<MethodReference>()?.returnType == textDataClassType
|
&& getReference<MethodReference>()?.returnType == textDataClassType
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
|
|||||||
"Lapp/revanced/extension/youtube/patches/WideSearchbarPatch;"
|
"Lapp/revanced/extension/youtube/patches/WideSearchbarPatch;"
|
||||||
|
|
||||||
val wideSearchbarPatch = bytecodePatch(
|
val wideSearchbarPatch = bytecodePatch(
|
||||||
name = "Wide searchbar",
|
name = "Wide search bar",
|
||||||
description = "Adds an option to replace the search icon with a wide search bar. This will hide the YouTube logo when active.",
|
description = "Adds an option to replace the search icon with a wide search bar. This will hide the YouTube logo when active.",
|
||||||
) {
|
) {
|
||||||
dependsOn(
|
dependsOn(
|
||||||
@@ -33,9 +33,8 @@ val wideSearchbarPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,25 @@ internal val shortsSeekbarColorFingerprint = fingerprint {
|
|||||||
literal { reelTimeBarPlayedColorId }
|
literal { reelTimeBarPlayedColorId }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val playerSeekbarHandleColorFingerprint = fingerprint {
|
internal val playerSeekbarHandle1ColorFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||||
parameters("Landroid/content/Context;")
|
parameters("Landroid/content/Context;")
|
||||||
literal { ytStaticBrandRedId }
|
custom { method, _ ->
|
||||||
|
method.containsLiteralInstruction(ytTextSecondaryId) &&
|
||||||
|
method.containsLiteralInstruction(ytStaticBrandRedId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal val playerSeekbarHandle2ColorFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||||
|
parameters("Landroid/content/Context;")
|
||||||
|
custom { method, _ ->
|
||||||
|
method.containsLiteralInstruction(inlineTimeBarLiveSeekableRangeId) &&
|
||||||
|
method.containsLiteralInstruction(ytStaticBrandRedId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
internal val watchHistoryMenuUseProgressDrawableFingerprint = fingerprint {
|
internal val watchHistoryMenuUseProgressDrawableFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("V")
|
returns("V")
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ internal var ytYoutubeMagentaColorId = -1L
|
|||||||
private set
|
private set
|
||||||
internal var ytStaticBrandRedId = -1L
|
internal var ytStaticBrandRedId = -1L
|
||||||
private set
|
private set
|
||||||
|
internal var ytTextSecondaryId = -1L
|
||||||
|
private set
|
||||||
|
internal var inlineTimeBarLiveSeekableRangeId = -1L
|
||||||
|
private set
|
||||||
|
|
||||||
internal const val splashSeekbarColorAttributeName = "splash_custom_seekbar_color"
|
internal const val splashSeekbarColorAttributeName = "splash_custom_seekbar_color"
|
||||||
|
|
||||||
@@ -76,6 +80,18 @@ private val seekbarColorResourcePatch = resourcePatch {
|
|||||||
"color",
|
"color",
|
||||||
"inline_time_bar_played_not_highlighted_color",
|
"inline_time_bar_played_not_highlighted_color",
|
||||||
]
|
]
|
||||||
|
ytStaticBrandRedId = resourceMappings[
|
||||||
|
"attr",
|
||||||
|
"ytStaticBrandRed"
|
||||||
|
]
|
||||||
|
ytTextSecondaryId = resourceMappings[
|
||||||
|
"attr",
|
||||||
|
"ytTextSecondary"
|
||||||
|
]
|
||||||
|
inlineTimeBarLiveSeekableRangeId = resourceMappings[
|
||||||
|
"color",
|
||||||
|
"inline_time_bar_live_seekable_range"
|
||||||
|
]
|
||||||
|
|
||||||
// Modify the resume playback drawable and replace the progress bar with a custom drawable.
|
// Modify the resume playback drawable and replace the progress bar with a custom drawable.
|
||||||
document("res/drawable/resume_playback_progressbar_drawable.xml").use { document ->
|
document("res/drawable/resume_playback_progressbar_drawable.xml").use { document ->
|
||||||
@@ -211,7 +227,7 @@ val seekbarColorPatch = bytecodePatch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
fun MutableMethod.addColorChangeInstructions(resourceId: Long, methodName: String) {
|
fun MutableMethod.addColorChangeInstructions(resourceId: Long) {
|
||||||
val index = indexOfFirstLiteralInstructionOrThrow(resourceId)
|
val index = indexOfFirstLiteralInstructionOrThrow(resourceId)
|
||||||
val insertIndex = indexOfFirstInstructionOrThrow(index, Opcode.MOVE_RESULT)
|
val insertIndex = indexOfFirstInstructionOrThrow(index, Opcode.MOVE_RESULT)
|
||||||
val register = getInstruction<OneRegisterInstruction>(insertIndex).registerA
|
val register = getInstruction<OneRegisterInstruction>(insertIndex).registerA
|
||||||
@@ -219,19 +235,19 @@ val seekbarColorPatch = bytecodePatch(
|
|||||||
addInstructions(
|
addInstructions(
|
||||||
insertIndex + 1,
|
insertIndex + 1,
|
||||||
"""
|
"""
|
||||||
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->$methodName(I)I
|
invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->getVideoPlayerSeekbarColor(I)I
|
||||||
move-result v$register
|
move-result v$register
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
playerSeekbarColorFingerprint.method.apply {
|
playerSeekbarColorFingerprint.method.apply {
|
||||||
addColorChangeInstructions(inlineTimeBarColorizedBarPlayedColorDarkId, "getVideoPlayerSeekbarColor")
|
addColorChangeInstructions(inlineTimeBarColorizedBarPlayedColorDarkId)
|
||||||
addColorChangeInstructions(inlineTimeBarPlayedNotHighlightedColorId, "getVideoPlayerSeekbarColor")
|
addColorChangeInstructions(inlineTimeBarPlayedNotHighlightedColorId)
|
||||||
}
|
}
|
||||||
|
|
||||||
shortsSeekbarColorFingerprint.method.apply {
|
shortsSeekbarColorFingerprint.method.apply {
|
||||||
addColorChangeInstructions(reelTimeBarPlayedColorId, "getVideoPlayerSeekbarColor")
|
addColorChangeInstructions(reelTimeBarPlayedColorId)
|
||||||
}
|
}
|
||||||
|
|
||||||
setSeekbarClickedColorFingerprint.originalMethod.let {
|
setSeekbarClickedColorFingerprint.originalMethod.let {
|
||||||
@@ -257,8 +273,11 @@ val seekbarColorPatch = bytecodePatch(
|
|||||||
|
|
||||||
// 19.25+ changes
|
// 19.25+ changes
|
||||||
|
|
||||||
playerSeekbarHandleColorFingerprint.method.apply {
|
arrayOf(
|
||||||
addColorChangeInstructions(ytStaticBrandRedId, "getVideoPlayerSeekbarColor")
|
playerSeekbarHandle1ColorFingerprint,
|
||||||
|
playerSeekbarHandle2ColorFingerprint
|
||||||
|
).forEach {
|
||||||
|
it.method.addColorChangeInstructions(ytStaticBrandRedId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If hiding feed seekbar thumbnails, then turn off the cairo gradient
|
// If hiding feed seekbar thumbnails, then turn off the cairo gradient
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ val shortsAutoplayPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -45,9 +45,8 @@ val openShortsInRegularPlayerPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -110,9 +110,8 @@ val sponsorBlockPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import app.revanced.patches.shared.misc.settings.preference.PreferenceCategory
|
|||||||
import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference.Sorting
|
import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference.Sorting
|
||||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_19_43_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
@@ -57,13 +58,12 @@ val spoofAppVersionPatch = bytecodePatch(
|
|||||||
|
|
||||||
compatibleWith(
|
compatibleWith(
|
||||||
"com.google.android.youtube"(
|
"com.google.android.youtube"(
|
||||||
// "19.16.39", // Cannot be supported because the lowest spoof target is higher.
|
"19.16.39",
|
||||||
// "19.25.37", // Cannot be supported because the lowest spoof target is higher.
|
"19.25.37",
|
||||||
// "19.34.42", // Cannot be supported because the lowest spoof target is higher.
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -79,19 +79,27 @@ val spoofAppVersionPatch = bytecodePatch(
|
|||||||
tag = "app.revanced.extension.shared.settings.preference.NoTitlePreferenceCategory",
|
tag = "app.revanced.extension.shared.settings.preference.NoTitlePreferenceCategory",
|
||||||
preferences = setOf(
|
preferences = setOf(
|
||||||
SwitchPreference("revanced_spoof_app_version"),
|
SwitchPreference("revanced_spoof_app_version"),
|
||||||
ListPreference(
|
if (is_19_43_or_greater) {
|
||||||
key = "revanced_spoof_app_version_target",
|
ListPreference(
|
||||||
summaryKey = null,
|
key = "revanced_spoof_app_version_target",
|
||||||
)
|
summaryKey = null,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
ListPreference(
|
||||||
|
key = "revanced_spoof_app_version_target",
|
||||||
|
summaryKey = null,
|
||||||
|
entriesKey = "revanced_spoof_app_version_target_legacy_entries",
|
||||||
|
entryValuesKey = "revanced_spoof_app_version_target_legacy_entry_values"
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If a user really wants to spoof to very old versions with the latest app target
|
* If spoofing to target 19.20 or earlier the Library tab can crash due to
|
||||||
* they can modify the import/export spoof version. But when spoofing the 19.20.xx
|
* missing image resources. As a workaround, do not set an image in the
|
||||||
* or earlier the Library tab can crash due to missing image resources trying to load.
|
* toolbar when the enum name is UNKNOWN.
|
||||||
* As a temporary workaround, do not set an image in the toolbar when the enum name is UNKNOWN.
|
|
||||||
*/
|
*/
|
||||||
toolBarButtonFingerprint.method.apply {
|
toolBarButtonFingerprint.method.apply {
|
||||||
val getDrawableIndex = indexOfGetDrawableInstruction(this)
|
val getDrawableIndex = indexOfGetDrawableInstruction(this)
|
||||||
|
|||||||
@@ -33,9 +33,8 @@ val changeStartPagePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
package app.revanced.patches.youtube.layout.startupshortsreset
|
package app.revanced.patches.youtube.layout.startupshortsreset
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patches.all.misc.resources.addResources
|
import app.revanced.patches.all.misc.resources.addResources
|
||||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_02_or_greater
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import app.revanced.util.addInstructionsAtControlFlowLabel
|
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||||
|
import app.revanced.util.indexOfFirstInstructionReversedOrThrow
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.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
|
||||||
|
|
||||||
@@ -38,6 +42,7 @@ val disableResumingShortsOnStartupPatch = bytecodePatch(
|
|||||||
"19.45.38",
|
"19.45.38",
|
||||||
"19.46.42",
|
"19.46.42",
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -48,25 +53,51 @@ val disableResumingShortsOnStartupPatch = bytecodePatch(
|
|||||||
SwitchPreference("revanced_disable_resuming_shorts_player"),
|
SwitchPreference("revanced_disable_resuming_shorts_player"),
|
||||||
)
|
)
|
||||||
|
|
||||||
userWasInShortsFingerprint.method.apply {
|
if (is_20_02_or_greater) {
|
||||||
val listenableInstructionIndex = indexOfFirstInstructionOrThrow {
|
userWasInShortsAlternativeFingerprint.let {
|
||||||
opcode == Opcode.INVOKE_INTERFACE &&
|
it.method.apply {
|
||||||
getReference<MethodReference>()?.definingClass == "Lcom/google/common/util/concurrent/ListenableFuture;" &&
|
val stringIndex = it.stringMatches!!.first().index
|
||||||
getReference<MethodReference>()?.name == "isDone"
|
val booleanValueIndex = indexOfFirstInstructionReversedOrThrow(stringIndex) {
|
||||||
}
|
opcode == Opcode.INVOKE_VIRTUAL &&
|
||||||
val freeRegister = getInstruction<OneRegisterInstruction>(listenableInstructionIndex + 1).registerA
|
getReference<MethodReference>()?.name == "booleanValue"
|
||||||
|
}
|
||||||
|
val booleanValueRegister =
|
||||||
|
getInstruction<OneRegisterInstruction>(booleanValueIndex + 1).registerA
|
||||||
|
|
||||||
addInstructionsAtControlFlowLabel(
|
addInstructions(
|
||||||
listenableInstructionIndex,
|
booleanValueIndex + 2, """
|
||||||
"""
|
invoke-static {v$booleanValueRegister}, $EXTENSION_CLASS_DESCRIPTOR->disableResumingStartupShortsPlayer(Z)Z
|
||||||
invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->disableResumingStartupShortsPlayer()Z
|
move-result v$booleanValueRegister
|
||||||
move-result v$freeRegister
|
"""
|
||||||
if-eqz v$freeRegister, :show_startup_shorts_player
|
)
|
||||||
return-void
|
}
|
||||||
:show_startup_shorts_player
|
}
|
||||||
nop
|
} else {
|
||||||
""",
|
userWasInShortsLegacyFingerprint.method.apply {
|
||||||
)
|
val listenableInstructionIndex = indexOfFirstInstructionOrThrow {
|
||||||
|
val reference = getReference<MethodReference>()
|
||||||
|
opcode == Opcode.INVOKE_INTERFACE &&
|
||||||
|
reference?.definingClass == "Lcom/google/common/util/concurrent/ListenableFuture;" &&
|
||||||
|
reference.name == "isDone"
|
||||||
|
}
|
||||||
|
val originalInstructionRegister =
|
||||||
|
getInstruction<FiveRegisterInstruction>(listenableInstructionIndex).registerC
|
||||||
|
val freeRegister =
|
||||||
|
getInstruction<OneRegisterInstruction>(listenableInstructionIndex + 1).registerA
|
||||||
|
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
listenableInstructionIndex + 1,
|
||||||
|
"""
|
||||||
|
invoke-static {}, $EXTENSION_CLASS_DESCRIPTOR->disableResumingStartupShortsPlayer()Z
|
||||||
|
move-result v$freeRegister
|
||||||
|
if-eqz v$freeRegister, :show
|
||||||
|
return-void
|
||||||
|
:show
|
||||||
|
invoke-interface {v$originalInstructionRegister}, Lcom/google/common/util/concurrent/ListenableFuture;->isDone()Z
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
removeInstruction(listenableInstructionIndex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
userWasInShortsConfigFingerprint.method.addInstructions(
|
userWasInShortsConfigFingerprint.method.addInstructions(
|
||||||
|
|||||||
@@ -4,7 +4,17 @@ import app.revanced.patcher.fingerprint
|
|||||||
import app.revanced.util.literal
|
import app.revanced.util.literal
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal val userWasInShortsFingerprint = fingerprint {
|
/**
|
||||||
|
* YouTube 20.02.08 ~
|
||||||
|
*/
|
||||||
|
internal val userWasInShortsAlternativeFingerprint = fingerprint {
|
||||||
|
returns("V")
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
parameters("Ljava/lang/Object;")
|
||||||
|
strings("userIsInShorts: ")
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val userWasInShortsLegacyFingerprint = fingerprint {
|
||||||
returns("V")
|
returns("V")
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
parameters("Ljava/lang/Object;")
|
parameters("Ljava/lang/Object;")
|
||||||
|
|||||||
@@ -221,9 +221,8 @@ val themePatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,8 @@ val alternativeThumbnailsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,8 @@ val bypassImageRegionRestrictionsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,8 @@ val announcementsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,8 @@ val autoRepeatPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,8 @@ val backgroundPlaybackPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,8 @@ val enableDebuggingPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,8 @@ val spoofDeviceDimensionsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ val checkWatchHistoryDomainNameResolutionPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,8 @@ val gmsCoreSupportPatch = gmsCoreSupportPatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,11 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
|||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
import app.revanced.util.indexOfFirstInstruction
|
import app.revanced.util.indexOfFirstInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.TypeReference
|
||||||
|
|
||||||
val bypassURLRedirectsPatch = bytecodePatch(
|
val bypassURLRedirectsPatch = bytecodePatch(
|
||||||
name = "Bypass URL redirects",
|
name = "Bypass URL redirects",
|
||||||
@@ -37,6 +39,7 @@ val bypassURLRedirectsPatch = bytecodePatch(
|
|||||||
"19.45.38",
|
"19.45.38",
|
||||||
"19.46.42",
|
"19.46.42",
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -80,3 +83,8 @@ internal fun Method.findUriParseIndex() = indexOfFirstInstruction {
|
|||||||
val reference = getReference<MethodReference>()
|
val reference = getReference<MethodReference>()
|
||||||
reference?.returnType == "Landroid/net/Uri;" && reference.name == "parse"
|
reference?.returnType == "Landroid/net/Uri;" && reference.name == "parse"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun Method.findWebViewCheckCastIndex() = indexOfFirstInstruction {
|
||||||
|
val reference = getReference<TypeReference>()
|
||||||
|
opcode == Opcode.CHECK_CAST && reference?.type?.endsWith("/WebviewEndpointOuterClass${'$'}WebviewEndpoint;") == true
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,12 +11,21 @@ internal val abUriParserFingerprint = fingerprint {
|
|||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("Ljava/lang/Object")
|
returns("Ljava/lang/Object")
|
||||||
parameters("Ljava/lang/Object")
|
parameters("Ljava/lang/Object")
|
||||||
strings(
|
|
||||||
"Found entityKey=`",
|
|
||||||
"` that does not contain a PlaylistVideoEntityId message as it's identifier.",
|
|
||||||
)
|
|
||||||
custom { method, _ ->
|
custom { method, _ ->
|
||||||
method.findUriParseIndex() >= 0
|
method.findUriParseIndex() >= 0 && method.findWebViewCheckCastIndex() >= 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Target 19.33+
|
||||||
|
*/
|
||||||
|
internal val httpUriParserFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||||
|
returns("Landroid/net/Uri")
|
||||||
|
parameters("Ljava/lang/String")
|
||||||
|
strings("https", "://", "https:")
|
||||||
|
custom { methodDef, _ ->
|
||||||
|
methodDef.findUriParseIndex() >= 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,19 +56,6 @@ internal val abUriParserLegacyFingerprint = fingerprint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Target 19.33+
|
|
||||||
*/
|
|
||||||
internal val httpUriParserFingerprint = fingerprint {
|
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
|
||||||
returns("Landroid/net/Uri")
|
|
||||||
parameters("Ljava/lang/String")
|
|
||||||
strings("https", "https:", "://")
|
|
||||||
custom { methodDef, _ ->
|
|
||||||
methodDef.findUriParseIndex() >= 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal val httpUriParserLegacyFingerprint = fingerprint {
|
internal val httpUriParserLegacyFingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||||
returns("Landroid/net/Uri")
|
returns("Landroid/net/Uri")
|
||||||
|
|||||||
@@ -45,9 +45,8 @@ val openLinksExternallyPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
* In 19.18+ this resolves to a different method.
|
* In 19.18+ this resolves to a different method.
|
||||||
*/
|
*/
|
||||||
internal val componentContextParserFingerprint = fingerprint {
|
internal val componentContextParserFingerprint = fingerprint {
|
||||||
strings("Component was not found %s because it was removed due to duplicate converter bindings.")
|
strings(
|
||||||
|
"TreeNode result must be set.",
|
||||||
|
// String is a partial match and changed slightly in 20.03+
|
||||||
|
"it was removed due to duplicate converter bindings."
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val lithoFilterFingerprint = fingerprint {
|
internal val lithoFilterFingerprint = fingerprint {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
|
|||||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_19_18_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_19_18_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_19_25_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_19_25_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_05_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||||
@@ -235,7 +236,10 @@ val lithoFilterPatch = bytecodePatch(
|
|||||||
|
|
||||||
// Turn off native code that handles litho component names. If this feature is on then nearly
|
// Turn off native code that handles litho component names. If this feature is on then nearly
|
||||||
// all litho components have a null name and identifier/path filtering is completely broken.
|
// all litho components have a null name and identifier/path filtering is completely broken.
|
||||||
if (is_19_25_or_greater) {
|
//
|
||||||
|
// Flag was removed in 20.05. It appears a new flag might be used instead (45660109L),
|
||||||
|
// but if the flag is forced on then litho filtering still works correctly.
|
||||||
|
if (is_19_25_or_greater && !is_20_05_or_greater) {
|
||||||
lithoComponentNameUpbFeatureFlagFingerprint.method.apply {
|
lithoComponentNameUpbFeatureFlagFingerprint.method.apply {
|
||||||
// Don't use return early, so the debug patch logs if this was originally on.
|
// Don't use return early, so the debug patch logs if this was originally on.
|
||||||
val insertIndex = indexOfFirstInstructionOrThrow(Opcode.RETURN)
|
val insertIndex = indexOfFirstInstructionOrThrow(Opcode.RETURN)
|
||||||
|
|||||||
@@ -46,6 +46,18 @@ var is_19_47_or_greater = false
|
|||||||
private set
|
private set
|
||||||
var is_19_49_or_greater = false
|
var is_19_49_or_greater = false
|
||||||
private set
|
private set
|
||||||
|
var is_20_02_or_greater = false
|
||||||
|
private set
|
||||||
|
var is_20_03_or_greater = false
|
||||||
|
private set
|
||||||
|
var is_20_05_or_greater = false
|
||||||
|
private set
|
||||||
|
var is_20_07_or_greater = false
|
||||||
|
private set
|
||||||
|
var is_20_09_or_greater = false
|
||||||
|
private set
|
||||||
|
var is_20_10_or_greater = false
|
||||||
|
private set
|
||||||
|
|
||||||
val versionCheckPatch = resourcePatch(
|
val versionCheckPatch = resourcePatch(
|
||||||
description = "Uses the Play Store service version to find the major/minor version of the YouTube target app.",
|
description = "Uses the Play Store service version to find the major/minor version of the YouTube target app.",
|
||||||
@@ -80,5 +92,11 @@ val versionCheckPatch = resourcePatch(
|
|||||||
is_19_46_or_greater = 244705000 <= playStoreServicesVersion
|
is_19_46_or_greater = 244705000 <= playStoreServicesVersion
|
||||||
is_19_47_or_greater = 244799000 <= playStoreServicesVersion
|
is_19_47_or_greater = 244799000 <= playStoreServicesVersion
|
||||||
is_19_49_or_greater = 245005000 <= playStoreServicesVersion
|
is_19_49_or_greater = 245005000 <= playStoreServicesVersion
|
||||||
|
is_20_02_or_greater = 250299000 <= playStoreServicesVersion
|
||||||
|
is_20_03_or_greater = 250405000 <= playStoreServicesVersion
|
||||||
|
is_20_05_or_greater = 250605000 <= playStoreServicesVersion
|
||||||
|
is_20_07_or_greater = 250805000 <= playStoreServicesVersion
|
||||||
|
is_20_09_or_greater = 251006000 <= playStoreServicesVersion
|
||||||
|
is_20_10_or_greater = 251105000 <= playStoreServicesVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,9 +34,8 @@ val removeTrackingQueryParameterPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPref
|
|||||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||||
import app.revanced.patches.shared.misc.spoof.spoofVideoStreamsPatch
|
import app.revanced.patches.shared.misc.spoof.spoofVideoStreamsPatch
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_19_34_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_19_34_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_03_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_10_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
@@ -18,9 +20,8 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch({
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -31,6 +32,10 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch({
|
|||||||
)
|
)
|
||||||
}, {
|
}, {
|
||||||
is_19_34_or_greater
|
is_19_34_or_greater
|
||||||
|
}, {
|
||||||
|
is_20_10_or_greater
|
||||||
|
}, {
|
||||||
|
is_20_03_or_greater
|
||||||
}, {
|
}, {
|
||||||
addResources("youtube", "misc.fix.playback.spoofVideoStreamsPatch")
|
addResources("youtube", "misc.fix.playback.spoofVideoStreamsPatch")
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ val zoomHapticsPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -45,9 +45,8 @@ val forceOriginalAudioPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,8 @@ val disableHdrPatch = bytecodePatch(
|
|||||||
"19.25.37",
|
"19.25.37",
|
||||||
"19.34.42",
|
"19.34.42",
|
||||||
"19.43.41",
|
"19.43.41",
|
||||||
"19.45.38",
|
|
||||||
"19.46.42",
|
|
||||||
"19.47.53",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,65 @@ package app.revanced.patches.youtube.video.playerresponse
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint
|
import app.revanced.patcher.fingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import org.stringtemplate.v4.compiler.Bytecode.instructions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For targets 19.25 and later.
|
* For targets 20.10 and later.
|
||||||
*/
|
*/
|
||||||
internal val playerParameterBuilderFingerprint = fingerprint {
|
internal val playerParameterBuilderFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
returns("L")
|
||||||
|
parameters(
|
||||||
|
"Ljava/lang/String;", // VideoId.
|
||||||
|
"[B",
|
||||||
|
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
"I",
|
||||||
|
"Z",
|
||||||
|
"I",
|
||||||
|
"L",
|
||||||
|
"Ljava/util/Set;",
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
"L",
|
||||||
|
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||||
|
"Z",
|
||||||
|
"Z",
|
||||||
|
"Z"
|
||||||
|
)
|
||||||
|
strings("psps")
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For targets 20.02 to 20.09.
|
||||||
|
*/
|
||||||
|
internal val playerParameterBuilder2002Fingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
returns("L")
|
||||||
|
parameters(
|
||||||
|
"Ljava/lang/String;", // VideoId.
|
||||||
|
"[B",
|
||||||
|
"Ljava/lang/String;", // Player parameters proto buffer.
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
"I",
|
||||||
|
"I",
|
||||||
|
"L", // 19.25+ parameter
|
||||||
|
"Ljava/util/Set;",
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
"Ljava/lang/String;",
|
||||||
|
"L",
|
||||||
|
"Z", // Appears to indicate if the video id is being opened or is currently playing.
|
||||||
|
"Z",
|
||||||
|
"Z",
|
||||||
|
"Z",
|
||||||
|
)
|
||||||
|
strings("psps")
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For targets 19.25 to 19.50.
|
||||||
|
*/
|
||||||
|
internal val playerParameterBuilder1925Fingerprint = fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("L")
|
returns("L")
|
||||||
parameters(
|
parameters(
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user