d4n3436 / revanced-patches-android5

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

bug: Multiple bugs #11

Closed Alpak0n3 closed 1 year ago

Alpak0n3 commented 1 year ago

Type

Other

Bug description

  1. Patch "return-youtube-dislike" not compiling without "overlay-buttons". Error - https://lostpix.com/img/2023-11/07/x2ukvezxkxs82fkwmbg5ypyox.png
  2. Patch "overlay-buttons" moves fullscreen button. Without patch: https://lostpix.com/img/2023-11/07/upa2jcldsqh4qh0p6934ynupi.jpg With patch: https://lostpix.com/img/2023-11/07/j4apxovqfxboqk8hgd4fc2ixu.jpg
  3. Patch "hide-endscreen-overlay" not working.

Ps: There are still problems in the patches, but since I do not speak English, it is difficult for me to describe them. But all major patches work fine.

Steps to reproduce

RYD compiling no problem. java -jar revanced-cli.jar patch YouTube_16.40.36.apk -p -o YouTube_ReVanced_16.40.36.apk -b revanced-patches-2.161.1.jar -m revanced-integrations-0.96.8.apk -i return-youtube-dislike -i overlay-buttons -i client-spoof --exclusive ..............................................................................................................................................................................

RYD error compiling [without -i overlay-buttons ]. java -jar revanced-cli.jar patch YouTube_16.40.36.apk -p -o YouTube_ReVanced_16.40.36.apk -b revanced-patches-2.161.1.jar -m revanced-integrations-0.96.8.apk -i return-youtube-dislike -i client-spoof --exclusive

Relevant log output

SEVERE: return-youtube-dislike failed: app.revanced.patcher.patch.PatchException: 'return-youtube-dislike' depends on 'return-youtube-dislike-bytecode-patch' that raised an exception: app.revanced.patcher.patch.PatchException: lateinit property insertMethod has not been initialized
        at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:128)
        at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:170)
        at app.revanced.patcher.Patcher$apply$1.invoke(Patcher.kt)
        at app.revanced.patcher.Patcher$apply$1.invoke(Patcher.kt)
        at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
        at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
        at app.revanced.cli.command.PatchCommand$run$result$1$1.invokeSuspend(PatchCommand.kt:186)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:185)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:40)

Screenshots or videos

No response

Solution

No response

Additional context

No response

Device Environment

Android 5.1

Acknowledgements

d4n3436 commented 1 year ago

Patch "return-youtube-dislike" not compiling without "overlay-buttons".

This happened because a patch dependency got removed when updating the RYD patch so it relied on another patch to trigger it. I've pushed a commit that fixes it.

Patch "overlay-buttons" moves fullscreen button.

I've noticed this too. It's not a disruptive bug but I'll try to fix it.

Patch "hide-endscreen-overlay" not working.

I've tested the patch and it works. This is how it looks with the patch disabled. The overlay gets hidden when enabled.

Ps: There are still problems in the patches, but since I do not speak English, it is difficult for me to describe them.

Can you describe the issues? I'll attempt to fix them according to their severity.

Alpak0n3 commented 1 year ago

I've noticed this too. It's not a disruptive bug but I'll try to fix it.

I have no knowledge of programming, but I found where this button is located on one of the forums. I compared the file from the original Youtube and ReVanced.

res -> layout - youtube_controls_bottom_ui_container.xml

I found the differences in the file. Then I edited the lines of the ReVanced file to be the same as in the original Youtube. Then I compiled it using the Apktool M program. The button returned to its place.

Original Youtube.

    yt:layout_constraintRight_toLeftOf="@id/fullscreen_button" />
<com.google.android.libraries.youtube.common.ui.TouchImageView
    android:id="@id/fullscreen_button"
    android:paddingLeft="24.0dip"
    android:paddingTop="22.0dip"
    android:paddingRight="12.0dip"
    android:paddingBottom="16.0dip"
    android:longClickable="false"
    android:layout_width="60.0dip"
    android:layout_height="60.0dip"

ReVanced.

    yt:layout_constraintRight_toLeftOf="@id/copy_button" />
<com.google.android.libraries.youtube.common.ui.TouchImageView
    android:id="@id/fullscreen_button"
    android:paddingLeft="24.0dip"
    android:paddingTop="22.0dip"
    android:paddingRight="0.0dip"
    android:paddingBottom="28.0dip"
    android:longClickable="false"
    android:layout_width="48.0dip"
    android:layout_height="48.0dip"

I've tested the patch and it works. This is how it looks with the patch disabled. The overlay gets hidden when enabled.

Oops, sorry, the patch works, I didn't enable it in the settings because it was translated incorrectly. I switched to English, went into the Revanced settings and saw what it is called in English. I turned it on. The patch works. Sorry for the misinformation :)

Can you describe the issues? I'll attempt to fix them according to their severity.

I will try to :)

Patch - "hide-snackbar". ReVanced settings -> layout settings -> Hide snackbar. If this patch is enabled, it is impossible to delete the downloaded video. If patch is disabled, the video is deleted. Video - https://mega.nz/file/aOIUBDoR#D_bu-_SNYDWBLh6vC1WIC7V-TgnAIq7Qq2rM7RvVjlI

Patch - "hide-shorts-component". ReVanced settings -> layout settings -> Hide shorts component. "Hide shorts player remix button" and "Hide shorts player thanks button". These two items can be removed, there are no such buttons in the version of Youtube 16.40.36.

Patch - "hide-button-container". ReVanced settings -> layout settings -> Hide button container component. All items not working. And "Hide thanks button" can be removed, there are no such buttons in the version of Youtube 16.40.36. Video - https://mega.nz/file/qGxgELYS#aujf5mox9-oWRnFGZ1uF7LwifB-ySEN_SzkxNTk-dQM

Patch - "hide-flyout-panel". The same with the patch - "hide-button-container". All items not working.

Ps: Maybe there are some other bugs, if I find them I will write to you. Pss: There is one more thing, but maybe it's not a bug, but a feature of my phone, I can't say for sure. Then maybe I will write.

eldepor commented 1 year ago
Patch - "hide-snackbar".
ReVanced settings -> layout settings -> Hide snackbar.
If this patch is enabled, it is impossible to delete the downloaded video. If patch is disabled, the video is deleted.
Video - https://mega.nz/file/aOIUBDoR#D_bu-_SNYDWBLh6vC1WIC7V-TgnAIq7Qq2rM7RvVjlI

@Alpak0n3 Do you have paid premium? Because I don´t have that download feature

Alpak0n3 commented 1 year ago

@eldepor No. All files are downloaded from the theme and compiled on the computer.

eldepor commented 1 year ago

@eldepor No. All files are downloaded from the theme and compiled on the computer.

How can I use the download feature then? I dont see that option in the menu. When I click "Download" on the YT app it just show me a screen to subscribe to paid premium.

https://github.com/d4n3436/revanced-patches-android5/assets/19383172/9d2accfa-da9c-4751-b87c-f0f468dfd462

d4n3436 commented 1 year ago

IIRC it's possible to download videos using the built-in download feature without premium in some countries, but I'm not sure if that's the case here.

eldepor commented 1 year ago

IIRC it's possible to download videos using the built-in download feature without premium in some countries, but I'm not sure if that's the case here.

Omg true, I tried with Ukraine vpn and it works lol.

d4n3436 commented 1 year ago

I've removed the useless options from the hide shorts components menu and fixed the fullscreen button bug.

About the hide-snackbar patch bug, I don't think it'll be possible to fix it without inspecting the smali code and finding where that specific snackbar is called to avoid hiding it. I suggest you disable the patch or use an external downloader.

About the hide-button-container and hide-flyout-panel patches, these target the new layout (something the old app doesn't support properly). I will probably remove the patches since there doesn't seem to be any way to fix them.

Alpak0n3 commented 1 year ago

I've removed the useless options from the hide shorts components menu and fixed the fullscreen button bug.

About the hide-snackbar patch bug, I don't think it'll be possible to fix it without inspecting the smali code and finding where that specific snackbar is called to avoid hiding it. I suggest you disable the patch or use an external downloader.

About the hide-button-container and hide-flyout-panel patches, these target the new layout (something the old app doesn't support properly). I will probably remove the patches since there doesn't seem to be any way to fix them.

You can remove these patches, I don't think they are needed. I have already removed them. The main thing is that the main patches like blocking ads and background mode are working. Also thanks for the working "return-youtube-dislike" patch. Is it possible to remove the "revanced_ryd_failure_generic" notification in the "return-youtube-dislike" patch?

Alpak0n3 commented 1 year ago

@d4n3436 I noticed that the "revanced-patches-2.161.1.jar" file is updated. There is also a new version of the file "revanced-integrations-0.96.9.apk" But the "return-youtube-dislike" patch still doesn't compile without "overlay-buttons". Or do need to wait for the new "revanced-patches" version?

d4n3436 commented 1 year ago

@Alpak0n3 I've updated the jar file to test it with ReVanced Manager. I noticed that would break support with auto-cli so I reverted it. I'll release a new version soon.