Skip to content

Conversation

@LisoUseInAIKyrios
Copy link
Contributor

Initial usage of Patcher v22 method instruction filters.

ReVanced/revanced-patcher#329

…tion_filters

# Conflicts:
#	patches/api/patches.api
#	patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/PermanentShufflePatch.kt
#	patches/src/main/kotlin/app/revanced/patches/music/misc/spoof/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/music/misc/spoof/SpoofClientPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatch.kt
…tion_filters

# Conflicts:
#	patches/api/patches.api
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/Fingerprints.kt
…tion_filters

# Conflicts:
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/spoof/requests/StreamingDataRequest.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/LicenseActivityHook.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/preference/ReVancedPreferenceFragment.java
#	patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/PermanentRepeatPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/theme/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/extension/hooks/ApplicationInitHook.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/shared/Fingerprints.kt
…tion_filters

# Conflicts:
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/spoof/requests/StreamingDataRequest.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/LithoFilterPatch.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/ReturnYouTubeDislikeFilter.java
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/viber/ads/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt
…tion_filters

# Conflicts:
#	patches/api/patches.api
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/SpoofVideoStreamsPatch.kt
…tion_filters

# Conflicts:
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/components/ButtonsFilter.java
#	patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/spoof/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/FixBackToExitGesturePatch.kt
…tion_filters

# Conflicts:
#	extensions/music/src/main/java/app/revanced/extension/music/settings/GoogleApiActivityHook.java
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/Utils.java
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/checks/Check.java
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/BaseActivityHook.java
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/preference/ColorPickerPreference.java
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/preference/CustomDialogListPreference.java
#	extensions/shared/library/src/main/java/app/revanced/extension/shared/settings/preference/ToolbarPreferenceFragment.java
#	extensions/twitch/src/main/java/app/revanced/extension/twitch/settings/TwitchActivityHook.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/AlternativeThumbnailsPatch.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/HidePlayerOverlayButtonsPatch.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/theme/SeekbarColorPatch.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/SearchViewController.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/YouTubeActivityHook.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/preference/ExternalDownloaderPreference.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/preference/ReVancedPreferenceFragment.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/objects/SegmentCategoryListPreference.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/ui/NewSegmentLayout.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/ui/SkipSponsorButton.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/sponsorblock/ui/SponsorBlockViewController.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/videoplayer/VideoQualityDialogButton.java
#	patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/PermanentShufflePatch.kt
#	patches/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/HideUpgradeButtonPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/music/misc/settings/SettingsPatch.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt
…tion_filters

# Conflicts:
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/RemoveTrackingQueryParameterPatch.java
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/privacy/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/misc/privacy/RemoveTrackingQueryParameterPatch.kt
…tion_filters

# Conflicts:
#	patches/src/main/kotlin/app/revanced/patches/youtube/shared/Fingerprints.kt
…tion_filters

# Conflicts:
#	patches/src/main/kotlin/app/revanced/patches/shared/misc/settings/SettingsPatch.kt
…tion_filters

# Conflicts:
#	patches/src/main/kotlin/app/revanced/patches/instagram/hide/navigation/Fingerprints.kt
#	patches/src/main/kotlin/app/revanced/patches/music/misc/extension/hooks/ApplicationInitHook.kt
#	patches/src/main/kotlin/app/revanced/patches/youtube/video/quality/Fingerprints.kt
@0xrxL
Copy link

0xrxL commented Oct 27, 2025

No crashes for me too on 20.43.35

Maybe it's an A/B test?

@LisoUseInAIKyrios
Copy link
Contributor Author

Yes it's probably a glitch in a/b flags. The exception is a null pointer exception in YT's own code.

@0xrxL
Copy link

0xrxL commented Oct 27, 2025

Yes it's probably a glitch in a/b flags. The exception is a null pointer exception in YT's own code.

Probably another trap to prevent app execution.

…tion_filters

# Conflicts:
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/ChangeHeaderPatch.java
#	extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java
@cyberboh
Copy link
Contributor

New save to playlist UI @MarcaDian

Screen_Recording_20251025_024601.mp4

From this screenshot, I can see dislikes is not shown, same like me, seems RYD broken in newest target.

@LisoUseInAIKyrios
Copy link
Contributor Author

LisoUseInAIKyrios commented Oct 29, 2025

@MarcaDian previously mentioned he has RYD turned off.

If you're referring to @0xrxL , udrop doesn't do RYD

@MarcaDian
Copy link
Contributor

20.43 RYD works for me.

IMG_20251029_131644.jpg

…tion_filters

# Conflicts:
#	patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt
@cyberboh
Copy link
Contributor

@LisoUseInAIKyrios Google had changed something in RYD, I see many in the logs:

10-30 17:59:07.148 26516 28103 D revanced: LithoFilterPatch: Searching ID: images_post_root_slim.eml-fe|5be0450aa6b5bc05 Path: images_post_root_slim.eml-fe|5be0450aa6b5bc05|CellType|images_post_slim.eml-fe|fdd0acf800731ec0|ContainerType|ContainerType|post_engagement_toolbar_slim.eml-fe|e52fec4da29643a8|ContainerType|post_like_dislike_slim.eml-fe|a26dc35204eb4790|ContainerType|ContainerType|TextType| BufferStrings: -images_post_root_slim.eml-fe|5be0450aa6b5bc05*❙//yt3.googleusercontent.com/D6VvYSN8nxKAaPmVvvuH-4BMR_O81TWz-w5hAuXIzHQBryuGz-U4Ofd8Cm3_S6et9_0CFp523Q=s68-c-k-c0x00ffffff-no-rj-mo❙
10-30 17:59:10.178 26516 28103 D revanced: LithoFilterPatch: Searching ID: video_action_bar.eml-fe|aae8f39ea7433c49 Path: video_action_bar.eml-fe|aae8f39ea7433c49|CellType|CollectionType|CellType|video_action_button_with_vm_input.eml-fe|72eb31a6206f1df3|ContainerType|segmented_like_dislike_button.eml-fe|520f2f5c726d355b|ContainerType|segmented_like_dislike_button_inner.eml-fe|8edaca561ccd9730|video_action_button_pill.eml-fe|79da9c5d561c6a6a|ContainerType|ContainerType|ContainerType| BufferStrings: (video_action_bar.eml-fe|aae8f39ea7433c49*❙theme|91d22b6eda0b64bc❙333?❙dismiss❙-AD_IMAGE_KEN_BURNS_ANIMATION_TYPE_UNSPECIFIED❙capabilities|8ae1542e3e5ef522:❙Eg0KC2l6Ny1xa0czUDRBIPYBKAE%3DZ.❙,EhVpbnN0cmVhbV9hZHNfcGxheWJhY2sgjAIoAQ%3D%3Db$❙"EhAKC2l6Ny1xa0czUDRBEIUCII0BKAE%3Dr❙6Eh8veW91dHViZS9hcHAvd2F0Y2gvcGxheWVyX3N0YXRlIMMCKAE%3D❙)yt_outline_experimental_thumb_up_black_24❙iz7-qkG3P4A20Cg0KC2l6Ny1xa0czUDRBIAAyDAj8iY3IBhCj6dS1Aw%3D%3D**like this video with 2.487 other people8❙id.video.like.button❙

They add eml-fe in the filter.

@LisoUseInAIKyrios
Copy link
Contributor Author

That doesn't mater. .eml-fe is still filtered because filtering is now done on just .e

I added some temporary logging. Clear the logs, open a regular video, then check the logs for RYD conversion context:
Currently it is looking for segmented_like_dislike_button.e, but maybe that has changed. If you find a different string that might be the dislikes, then try changing it here:

if (conversionContextString.contains("segmented_like_dislike_button.e")) {

@cyberboh
Copy link
Contributor

cyberboh commented Oct 30, 2025

I am not compiling yet for new commits, but This log might the culprit

10-30 17:59:10.607 26516 26516 D revanced: LithoFilterPatch: Searching ID: video_action_bar.eml-fe|aae8f39ea7433c49 Path: video_action_bar.eml-fe|aae8f39ea7433c49|CellType|CollectionType|CellType|video_action_button_with_vm_input.eml-fe|72eb31a6206f1df3|ContainerType|segmented_like_dislike_button.eml-fe|520f2f5c726d355b|ContainerType|segmented_like_dislike_button_inner.eml-fe|8edaca561ccd9730|video_action_button_pill.eml-fe|79da9c5d561c6a6a|ContainerType|ContainerType|ContainerType|animated_like_icon.eml-fe|16f480c2325d6faf|ContainerType|AnimatedVectorType|

segmented_like_dislike_button_inner.eml-fe

@LisoUseInAIKyrios
Copy link
Contributor Author

segmented_like_dislike_button.e is still present.

Pull the latest and check the logs for RYD conversion context:. RYD is not exactly the same as litho filtering.

@cyberboh
Copy link
Contributor

segmented_like_dislike_button.e is still present.

Pull the latest and check the logs for RYD conversion context:. RYD is not exactly the same as litho filtering.

There is no log for "RYD conversion context:" I tried many times, even on full logcat adb logcat > log.txt, I can not find it also ini adb logcat | findstr "RYD conversion context:" > log.txt

@cyberboh
Copy link
Contributor

I only got these

10-30 20:42:37.023 25406 30864 D revanced: ReturnYouTubeDislikePatch: Prefetching RYD for video: EumFMAaCTrA 10-30 20:42:37.268 25406 30919 D revanced: ReturnYouTubeDislikeApi: Voting data fetched: RYDVoteData{videoId=EumFMAaCTrA, viewCount=8426, likeCount=125, dislikeCount=4, likePercentage=0.96899223, dislikePercentage=0.031007752} 10-30 20:42:49.994 25406 30944 D revanced: ReturnYouTubeDislikePatch: Prefetching RYD for video: hwKDBNUNdks 10-30 20:42:50.221 25406 30919 D revanced: ReturnYouTubeDislikeApi: Voting data fetched: RYDVoteData{videoId=hwKDBNUNdks, viewCount=2458, likeCount=92, dislikeCount=4, likePercentage=0.9583333, dislikePercentage=0.041666668}

@LisoUseInAIKyrios
Copy link
Contributor Author

Modify this method:

public static boolean isBooleanFeatureFlagEnabled(boolean value, Long flag) {

Change the first line to:
if (true) return false;

@cyberboh
Copy link
Contributor

cyberboh commented Oct 30, 2025

Like this?:

public static boolean isBooleanFeatureFlagEnabled(boolean value, Long flag) {
    if (true) return false;

    if (LOG_FEATURE_FLAGS && value) {
        if (featureFlags.putIfAbsent(flag, true) == null) {
            Logger.printDebug(() -> "boolean feature is enabled: " + flag);
        }
    }

    return value;
}

@MarcaDian
Copy link
Contributor

Or if you have enough knowledge, you can make these changes, or cherry pick this commit, and manually check the block flags you get, and find the one that is causing this problem.

To get a sorted list of flags, enable debugging in the ReVanced settings, clear the logs, restart the app, export the logs to txt file. Then, open any AI chat, and give it the task of sorting boolean flags from your logs.

@LisoUseInAIKyrios
Copy link
Contributor Author

Like this?:

Yes.

Also try version spoofing.

@cyberboh
Copy link
Contributor

Or if you have enough knowledge, you can make these changes, or cherry pick this commit, and manually check the block flags you get, and find the one that is causing this problem.

To get a sorted list of flags, enable debugging in the ReVanced settings, clear the logs, restart the app, export the logs to txt file. Then, open any AI chat, and give it the task of sorting boolean flags from your logs.

Done, cherry-picked and built patches. So many flags inside
flags-originale.txt
flags-sorted.txt

Like this?:

Yes.

Also try version spoofing.

Done built, and also version spoofed, all did not work.

@MarcaDian
Copy link
Contributor

Custom speed is not set above 2.0 on 20.43

@MarcaDian
Copy link
Contributor

Implemented a "raw" version of the boolean flag blocking dialog.
There are still some problems with parsing saved flags from the settings.
Maybe you have any comments about the interface?

Screenshot_2025-10-31-13-18-55-723_app.revancede.android.youtube.jpg

@cyberboh
Copy link
Contributor

Implemented a "raw" version of the boolean flag blocking dialog. There are still some problems with parsing saved flags from the settings. Maybe you have any comments about the interface?

Screenshot_2025-10-31-13-18-55-723_app.revancede.android.youtube.jpg

Did you import hundreds flags in "flags manager" manually? 300+ flags is heavy, the interface should wider then.
For my RYD issue, I still can not find the match flag, it's complicated 😄

@MarcaDian
Copy link
Contributor

MarcaDian commented Oct 31, 2025

They are added to the list automatically through the debugging patch.

@LisoUseInAIKyrios
Copy link
Contributor Author

Implemented a "raw" version of the boolean flag blocking dialog. There are still some problems with parsing saved flags from the settings. Maybe you have any comments about the interface?

If possible, the dialog can be larger (or use a full view that's fullscreen, I think that's even better).

Maybe have a way to select multiple flags at once? Like tap one flag, then tap and hold another flag and it'll select all flags between the last flag and the currently tapped.

Whatever flag enables the settings menu should be hard coded as always on, otherwise the user can turn off all flags and then it's impossible to change the settings again until they clear the app data.

An automatic binary search feature could be useful, I previously described how it could work. But if the flags are selectable in large numbers then that may not be needed since the user can manually do their own binary search with a little more work.

Optionally we could add a map of flags to descriptions for all known flags, and accept PR's to add more descriptions. Then show the description in the flags settings. But maybe that's not needed because any useful flags are already exposed as patches and any unknown flags can be added as patches.

@LisoUseInAIKyrios
Copy link
Contributor Author

For my RYD issue, I still can not find the match flag, it's complicated 😄

You turned off all boolean flags and it wasn't fixed. It's either a flag not hooked, or it's a layout change not controlled client side. It's most likely a server side layout change.

@MarcaDian
Copy link
Contributor

MarcaDian commented Oct 31, 2025

I don't know how to inform the user about a short description of the flag (if available), I wanted to add a small pop-up window, but long pressing is used to select checkboxes between flags. Maybe add some kind of field at the bottom.

Also, probably at the bottom of each column need to add button to copy flags to the clipboard.

Added a whitelist for flags that will not be displayed in the list.

Screenshot_2025-10-31-17-09-31-949_app.revancede.android.youtube.jpg

@LisoUseInAIKyrios
Copy link
Contributor Author

Feel free to make a pull request if you want. It's an advanced feature but it's still useful, especially if users want to fiddle and find a/b flags.

I don't think text descriptions are needed in the app. Any flags found that are useful can be added as a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants