d4n3436 / revanced-patches-android5

YouTube ReVanced for Android 5
GNU General Public License v3.0
61 stars 4 forks source link

Can't see the "ReVanced Settings" option in YouTube settings. #1

Closed jonnyprogamer closed 9 months ago

jonnyprogamer commented 1 year ago

Type

Other

Bug description

I can't see the settings button, even after patching correctly, i attached patching log, screenshot from the phone and .Apk link.

http://www.mediafire.com/file/urc1wuflx2xtfv5/test2.apk/file

Steps to reproduce

Download .apk from above and check if it has the same issue, maybe it's related to the device DPI setting or the language.

Relevant log output

Revanced-cli Log:

C:\Users\jonnyprogamer\Downloads\VANCED NUKING\Android5>java -jar revanced-cli-2.20.1-all.jar -a YouTube_16.40.36.apk -o test2.apk -b revanced-patches-2.160.4.jar -m revanced-integrations-0.96.3.apk -i microg-support -i protobuf-spoof -i client-spoof -i hide-video-ads --exclusive
INFORMAZIONI: Reading dex files
INFORMAZIONI: Decoding AndroidManifest.xml only, because resources are not needed
INFORMAZIONI: Skipping custom-branding-icon-afn-blue: Excluded by default
INFORMAZIONI: Skipping custom-branding-icon-afn-red: Excluded by default
INFORMAZIONI: Skipping custom-branding-icon-revancify: Excluded by default
INFORMAZIONI: Skipping custom-branding-name: Excluded by default
INFORMAZIONI: Skipping custom-seekbar-color: Excluded by default
INFORMAZIONI: Skipping custom-video-speed: Excluded by default
INFORMAZIONI: Skipping default-video-quality: Excluded by default
INFORMAZIONI: Skipping default-video-speed: Excluded by default
INFORMAZIONI: Skipping disable-haptic-feedback: Excluded by default
INFORMAZIONI: Skipping enable-external-browser: Excluded by default
INFORMAZIONI: Skipping enable-minimized-playback: Excluded by default
INFORMAZIONI: Skipping enable-new-layout: Excluded by default
INFORMAZIONI: Skipping enable-old-quality-layout: Excluded by default
INFORMAZIONI: Skipping enable-open-links-directly: Excluded by default
INFORMAZIONI: Skipping enable-seekbar-tapping: Excluded by default
INFORMAZIONI: Skipping enable-tablet-miniplayer: Excluded by default
INFORMAZIONI: Skipping enable-wide-searchbar: Excluded by default
INFORMAZIONI: Skipping force-enable-new-layout: Excluded by default
INFORMAZIONI: Skipping force-premium-heading: Excluded by default
INFORMAZIONI: Skipping force-vp9-codec: Excluded by default
INFORMAZIONI: Skipping header-switch: Excluded by default
INFORMAZIONI: Skipping hide-auto-captions: Excluded by default
INFORMAZIONI: Skipping hide-auto-player-popup-panels: Excluded by default
INFORMAZIONI: Skipping hide-autoplay-button: Excluded by default
INFORMAZIONI: Skipping hide-button-container: Excluded by default
INFORMAZIONI: Skipping hide-cast-button: Excluded by default
INFORMAZIONI: Skipping hide-channel-watermark: Excluded by default
INFORMAZIONI: Skipping hide-comment-component: Excluded by default
INFORMAZIONI: Skipping hide-create-button: Excluded by default
INFORMAZIONI: Skipping hide-crowdfunding-box: Excluded by default
INFORMAZIONI: Skipping hide-email-address: Excluded by default
INFORMAZIONI: Skipping hide-endscreen-cards: Excluded by default
INFORMAZIONI: Skipping hide-endscreen-overlay: Excluded by default
INFORMAZIONI: Skipping hide-filmstrip-overlay: Excluded by default
INFORMAZIONI: Skipping hide-firsttime-background-notification: Excluded by default
INFORMAZIONI: Skipping hide-flyout-panel: Excluded by default
INFORMAZIONI: Skipping hide-fullscreen-panels: Excluded by default
INFORMAZIONI: Skipping hide-general-ads: Excluded by default
INFORMAZIONI: Skipping hide-info-cards: Excluded by default
INFORMAZIONI: Skipping hide-live-chat-button: Excluded by default
INFORMAZIONI: Skipping hide-mix-playlists: Excluded by default
INFORMAZIONI: Skipping hide-next-prev-button: Excluded by default
INFORMAZIONI: Skipping hide-player-captions-button: Excluded by default
INFORMAZIONI: Skipping hide-player-overlay-filter: Excluded by default
INFORMAZIONI: Skipping hide-shorts-button: Excluded by default
INFORMAZIONI: Skipping hide-shorts-component: Excluded by default
INFORMAZIONI: Skipping hide-shorts-pivot-bar: Excluded by default
INFORMAZIONI: Skipping hide-snackbar: Excluded by default
INFORMAZIONI: Skipping hide-startup-shorts-player: Excluded by default
INFORMAZIONI: Skipping hide-stories: Excluded by default
INFORMAZIONI: Skipping hide-suggested-actions: Excluded by default
INFORMAZIONI: Skipping hide-time-and-seekbar: Excluded by default
INFORMAZIONI: Skipping hide-tooltip-content: Excluded by default
INFORMAZIONI: Skipping layout-switch: Excluded by default
INFORMAZIONI: Skipping materialyou: Excluded by default
INFORMAZIONI: Skipping optimize-resource: Excluded by default
INFORMAZIONI: Skipping overlay-buttons: Excluded by default
INFORMAZIONI: Skipping patch-options: Excluded by default
INFORMAZIONI: Skipping remove-player-button-background: Excluded by default
INFORMAZIONI: Skipping return-youtube-dislike: Excluded by default
INFORMAZIONI: Skipping settings: Excluded by default
INFORMAZIONI: Skipping sponsorblock: Excluded by default
INFORMAZIONI: Skipping swipe-controls: Excluded by default
INFORMAZIONI: Skipping switch-create-notification: Excluded by default
INFORMAZIONI: Skipping theme: Excluded by default
INFORMAZIONI: Skipping translations: Excluded by default
INFORMAZIONI: Merging revanced-integrations-0.96.3.apk
INFORMAZIONI: Deleting existing resource cache directory
GRAVE: Failed to delete existing resource cache directory
INFORMAZIONI: Decoding resources
INFORMAZIONI: client-spoof succeeded
INFORMAZIONI: hide-video-ads succeeded
INFORMAZIONI: microg-support succeeded
INFORMAZIONI: protobuf-spoof succeeded
INFORMAZIONI: Compiling resources
INFORMAZIONI: Writing modified dex files
INFORMAZIONI: Aligning YouTube_16.40.36.apk to test2_aligned.apk
INFORMAZIONI: Signing test2_aligned.apk to test2_signed.apk
INFORMAZIONI: Copying test2_signed.apk to test2.apk
INFORMAZIONI: Finished

Screenshots or videos

Revanced CLI Log Revanced CLI Log Installing the patched APK with ADB No ReVanced settings option MicroG Login

Additional context

The device im trying this on is a Samsung Galaxy Note 1 (GT-N7000) running Android 5.1.1 (Cyanogenmod 12 unofficial)

Acknowledgements

d4n3436 commented 1 year ago

Hey, I installed the APK on the Android 5 emulator, changed the language, theme and I can see ReVanced settings. I can also enable protobuf spoof and watch videos. This is most likely a device issue.

You could try using logcat and see if there are any errors when opening Settings.

jonnyprogamer commented 1 year ago

So the apk patching was correct? yes im gonna try to check with adb logcat, the phone is a Samsung Note 1 with Cyanogenmod

jonnyprogamer commented 1 year ago

Here is ADB Logcat when pressing the Settings button in the app, im gonna try clearing the /dalvik_cache right now

I/Timeline( 6668): Timeline: Activity_launch_request id:app.rvx.android.youtube
time:626318
I/ActivityManager( 2352): START u0 {cmp=app.rvx.android.youtube/com.google.andro
id.apps.youtube.app.settings.SettingsActivity (has extras)} from uid 10083 on di
splay 0
V/WindowManager( 2352): addAppToken: AppWindowToken{21b7d00c token=Token{6a3bf3f
 ActivityRecord{3227ef5e u0 app.rvx.android.youtube/com.google.android.apps.yout
ube.app.settings.SettingsActivity t2}}} to stack=1 task=2 at 1
W/YT.mlplayer( 6668): Stayawake OFF
W/YouTube ( 6668): CsiAction [fgd] already ticked pl_int. Ignored.
V/WindowManager( 2352): Adding window Window{3affa36a u0 app.rvx.android.youtube
/com.google.android.apps.youtube.app.settings.SettingsActivity} at 4 of 7 (after
 Window{de26099 u0 app.rvx.android.youtube EXITING})
W/RecyclerView( 6668): No adapter attached; skipping layout
W/View    ( 6668): requestLayout() improperly called by android.widget.FrameLayo
ut{326d2553 V.E..... ......ID 0,0-0,1134 #7f0b0ebf app:id/settings_selection_con
tainer} during layout: running second layout pass
W/RecyclerView( 6668): No adapter attached; skipping layout
I/ActivityManager( 2352): Displayed app.rvx.android.youtube/com.google.android.a
pps.youtube.app.settings.SettingsActivity: +275ms

I/Timeline( 6668): Timeline: Activity_idle id: android.os.BinderProxy@d195d9e ti
me:626870
D/GmsMeasureBrokerSvc( 3539): onBind: Intent { act=com.google.android.gms.measur
ement.START pkg=com.mgoogle.android.gms }
D/SafeParcel( 3539): Unknown field id 10 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 11 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 12 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 13 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 14 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/GmsMeasureBrokerSvc( 3539): bound by: GetServiceRequest{serviceId=MEASUREMENT,
 gmsVersion=214080000, packageName='app.rvx.android.youtube', extras=Bundle[{}]}

D/SafeParcel( 3539): Unknown field id 2 in com.google.android.gms.measurement.in
ternal.EventParcel, skipping.
D/SafeParcel( 3539): Unknown field id 3 in com.google.android.gms.measurement.in
ternal.EventParcel, skipping.
D/SafeParcel( 3539): Unknown field id 4 in com.google.android.gms.measurement.in
ternal.EventParcel, skipping.
D/SafeParcel( 3539): Unknown field id 5 in com.google.android.gms.measurement.in
ternal.EventParcel, skipping.
W/SurfaceFlinger( 1938): couldn't log to binary event log: overflow.
D/GmsMeasureSvcImpl( 3539): f1: app.rvx.android.youtube
D/GmsMeasureSvcImpl( 3539): f10: null
D/GmsMeasureSvcImpl( 3539): f10: null
D/GmsPhenotypeSvc( 3539): onBind: Intent { act=com.mgoogle.android.gms.phenotype
.service.START pkg=com.mgoogle.android.gms }
D/SafeParcel( 3539): Unknown field id 10 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 11 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 12 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 13 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/SafeParcel( 3539): Unknown field id 14 in com.google.android.gms.common.intern
al.GetServiceRequest, skipping.
D/GmsPhenotypeSvc( 3539): bound by: GetServiceRequest{serviceId=PHENOTYPE, gmsVe
rsion=214080000, packageName='app.rvx.android.youtube', extras=Bundle[{}]}
W/GmsClient( 6668): service descriptor mismatch: com.google.android.gms.phenotyp
e.internal.IPhenotypeService vs. com.mgoogle.android.gms.phenotype.internal.IPhe
notypeService
I/Timeline( 2352): Timeline: Activity_windows_visible id: ActivityRecord{3227ef5
e u0 app.rvx.android.youtube/com.google.android.apps.youtube.app.settings.Settin
gsActivity t2} time:627078

I/DiscoveryManager( 2910): Filter criteria(null) scannerFlags(0)
W/MediaRouter( 6668): Ignoring invalid provider descriptor: null
W/DatabaseProcessor( 2910): processLocalDevices: failed to get the network info
with non-null networkId.
W/GuestModeDeviceProber( 2910): setFilterCriteria
W/DatabaseProcessor( 2910): processLocalDevices: failed to get the network info
with non-null networkId.
W/DatabaseProcessor( 2910): processLocalDevices: failed to get the network info
with non-null networkId.
D/ConnectivityService( 2352): releasing NetworkRequest NetworkRequest [ id=19, l
egacyType=-1, [ Transports: WIFI Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN] ]

D/ConnectivityManager.CallbackHandler( 2910): CM callback handler got msg 524296

D/BoundBrokerSvc( 2910): onRebind: Intent { act=com.google.android.gms.clearcut.
service.START dat=chimera-action: cmp=com.google.android.gms/.chimera.Persistent
DirectBootAwareApiService }
jonnyprogamer commented 1 year ago

Hey, I installed the APK on the Android 5 emulator, changed the language, theme and I can see ReVanced settings. I can also enable protobuf spoof and watch videos. This is most likely a device issue.

You could try using logcat and see if there are any errors when opening Settings.

Ok so i tried deleting the dalvik cache but it made no difference, is there a way i can launch the "Revanced Settings" directly? maybe with adb?

jonnyprogamer commented 1 year ago

i looked around for a little bit and if i understand correctly i think it's possible to use "am start" to launch the settings panel.

d4n3436 commented 1 year ago

Hey, I've been testing with multiple emulators and I noticed that ReVanced settings appear on Android 5.0 but it doesn't on Android 5.1, very strange. Since I can reproduce the issue I will try to fix it.

jonnyprogamer commented 1 year ago

Hey, I've been testing with multiple emulators and I noticed that ReVanced settings appear on Android 5.0 but it doesn't on Android 5.1, very strange. Since I can reproduce the issue I will try to fix it.

Yep indeed the phone is running Android 5.1.1 (API 22), if you find the issue let me know 👍

d4n3436 commented 1 year ago

I've been trying to fix the missing menu bug without success. I thought I could just enable protobuf spoof by default, so I did that and playback was just broken, and it happened with older versions of the v16 APKs.

After that I thought this had no solution, but then I deleted the 5.1 emulator, created a new one and installed MicroG, YouTube ReVanced and it suddenly worked. What a bizarre bug.

I updated the patches and integrations so protobuf spoof is enabled by default. Try again with the latest version of revanced-patches and revanced-integrations from here and tell me if it works.

Rusikxxx commented 1 year ago

Where is the patch itself?

d4n3436 commented 1 year ago

Where is the patch itself?

The patches are in this repository, if that's what you're asking.

Rusikxxx commented 1 year ago

I'm talking about the jar file

d4n3436 commented 1 year ago

https://github.com/d4n3436/revanced-patches-android5/releases

Rusikxxx commented 1 year ago

2023-05-02_225351

d4n3436 commented 1 year ago

I tought I uploaded it, weird. Now it should appear

Rusikxxx commented 1 year ago

I checked three times the item in the settings did not appear. Emulator 5.1.1 The protobuffer is also inactive or non-existent.

Rusikxxx commented 1 year ago

2023-05-02_230946

d4n3436 commented 1 year ago

As I mentioned before, the missing settings bug wasn't fixed, but now protobuf-spoof is enabled by default so it doesn't matter right now.

Rusikxxx commented 1 year ago

https://disk.yandex.ru/d/ga7gn3Jye9ogfw

Rusikxxx commented 1 year ago

It says that the content is not available in this application (

Rusikxxx commented 1 year ago

2023-05-02_231604

d4n3436 commented 1 year ago

Make sure you're using the latest version of revanced-patches and revanced-integrations. You can find them on the readme.

Rusikxxx commented 1 year ago

Most likely, I am in Russia and there are sanctions. Video works through VPN.

eldepor commented 1 year ago

I've been trying to fix the missing menu bug without success. I thought I could just enable protobuf spoof by default, so I did that and playback was just broken, and it happened with older versions of the v16 APKs.

After that I thought this had no solution, but then I deleted the 5.1 emulator, created a new one and installed MicroG, YouTube ReVanced and it suddenly worked. What a bizarre bug.

I updated the patches and integrations so protobuf spoof is enabled by default. Try again with the latest version of revanced-patches and revanced-integrations from here and tell me if it works.

Hi. So now we have to download integrations from your repo instead of kitadai's, or both work? Thanks.

d4n3436 commented 1 year ago

Hi. So now we have to download integrations from your repo instead of kitadai's, or both work? Thanks.

If YouTube works for you then you don't have to do anything, otherwise patch YouTube with the integrations from my repo.

Rusikxxx commented 1 year ago

I give a report: everything works as stated - settings are visible on 5.0, not visible on 5.1.1, but the protobuffer function is active. To activate, you need to restart YouTube or phone, who does not know how to unload the application from memory. Thank you!

d4n3436 commented 1 year ago

I will close this issue since the fix is working correctly, but I won't fix the missing ReVanced setting as I don't even know where to start.

If you have any other bugs, open a new issue.

jonnyprogamer commented 1 year ago

I will close this issue since the fix is working correctly, but I won't fix the missing ReVanced setting as I don't even know where to start.

If you have any other bugs, open a new issue.

Thanks for the fix, im gonna try repatching the apk later, as for the "Revanced settings" can you give me the activity name? So maybe we can launch that setting window directly from adb shell.

Because with the "am start" command it might be possible to bypass the issue and launch the setting panel directly.

d4n3436 commented 1 year ago

The activity name is app.rvx.android.youtube/com.google.android.apps.youtube.app.settings.videoquality.VideoQualitySettingsActivity. I've already tried to force open it but it crashes the app.

Rusikxxx commented 9 months ago

Hello! To make the item appear in the revanced_extended_settings for Android 5.1+, add this code to \res\xml-v22\settings_fragment.xml `

</Preference>`
Rusikxxx commented 9 months ago

Below is the finished file: settings_fragment.zip

jonnyprogamer commented 9 months ago

Hello! To make the item appear in the revanced_extended_settings for Android 5.1+, add this code to \res\xml-v22\settings_fragment.xml

Very nice that you found a way to fix it, let's hope @d4n3436 adds it in the next release. Unfortunately i can't test it anymore as im now using a Kitkat device with BraveNewPipe

d4n3436 commented 9 months ago

@Rusikxxx Can you please create a PR with the necessary changes or explain how to do it? I've tried adding the intent into the patching process through revanced_prefs.xml without success.

eldepor commented 9 months ago

Hope those changes don't affect or break future releases, because the current ones are working perfectly on android 5.0.2. Iollipop. Isn't there a way to split the process depending on your android version?

Rusikxxx commented 9 months ago

@Rusikxxx Can you please create a PR with the necessary changes or explain how to do it? I've tried adding the intent into the patching process through revanced_prefs.xml without success.

I didn’t quite understand what needed to be created. Here is the already assembled apk. https://4pda.to/forum/dl/post/28991024/ReVanced_v16.40.36_d4n3436_v2.160.7.apk

Rusikxxx commented 9 months ago

The problem is finding a working microg. Sometimes when I log into my account, the video cannot be played. If you don't log in, it works. I use this one: https://4pda.to/forum/dl/post/28903876/Vanced%2BMicroG%2Bv0.2.22.212658.apk

eldepor commented 9 months ago

The problem is finding a working microg. Sometimes when I log into my account, the video cannot be played. If you don't log in, it works. I use this one: https://4pda.to/forum/dl/post/28903876/Vanced%2BMicroG%2Bv0.2.22.212658.apk

@Rusikxxx Im using that version but from apkmirror

You can try these: v0.2.27.231413 v0.2.27.230755

d4n3436 commented 9 months ago

@Rusikxxx Can you explain how you added replaced the file inside of the APK and managed to get it working? I've tried but the app crashes when entering the settings menu (as expected). A new link with the built APK would be useful because the one you sent has expired.

Rusikxxx commented 9 months ago

@Rusikxxx Can you explain how you added replaced the file inside of the APK and managed to get it working? I've tried but the app crashes when entering the settings menu (as expected). A new link with the built APK would be useful because the one you sent has expired.

https://4pda.to/forum/dl/post/28991024/ReVanced_v16.40.36_d4n3436_v2.160.7.apk

d4n3436 commented 9 months ago

I'm getting a 404 error page. Can you upload it somewhere else?

Rusikxxx commented 9 months ago

I'm getting a 404 error page. Can you upload it somewhere else?

https://cloud.mail.ru/public/7FHH/dERpuj4Bq

d4n3436 commented 9 months ago

Ok, I've managed to fix the bug and will release updated versions of the patches, integrations and commands soon. The reason the settings didn't appear was because the old builds of YouTube included a variant of the settings file that is used with devices with API level 22+ (or Android 5.1+). The patches modified the settings_fragment.xml file in res\xml (the regular path) but not the one in res\xml-v22 because they didn't expect variants of the file.

jonnyprogamer commented 9 months ago

Ok, I've managed to fix the bug and will release updated versions of the patches, integrations and commands soon. The reason the settings didn't appear was because the old builds of YouTube included a variant of the settings file that is used with devices with API level 22+ (or Android 5.1+). The patches modified the settings_fragment.xml file in res\xml (the regular path) but not the one in res\xml-v22 because they didn't expect variants of the file.

Thanks for the fix! I will definitely check it out