Skip to content

bug(X/Twitter): Patch Unlock downloads fails to apply in version 10.85.x or upper #4620

@cyberboh

Description

@cyberboh

Bug description

It fails to apply since 10.85.x (maybe upper)

Error logs

SEVERE: "Unlock downloads" failed:
app.revanced.patcher.patch.PatchException: class com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c cannot be cast to class com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction (com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c and com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction are in unnamed module of loader 'app')
        at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:90)
        at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:109)
        at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
        at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
        at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:57)
        at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:226)
        at app.revanced.cli.command.PatchCommand$run$1$4.invokeSuspend(PatchCommand.kt:315)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:314)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
        at picocli.CommandLine.execute(CommandLine.java:2174)
        at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: java.lang.ClassCastException: class com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c cannot be cast to class com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction (com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c and com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction are in unnamed module of loader 'app')
        at app.revanced.patches.twitter.interaction.downloads.UnlockDownloadsPatchKt.unlockDownloadsPatch$lambda$5$lambda$4$lambda$1(UnlockDownloadsPatch.kt:39)
        at app.revanced.patches.twitter.interaction.downloads.UnlockDownloadsPatchKt.unlockDownloadsPatch$lambda$5$lambda$4$patch(UnlockDownloadsPatch.kt:24)
        at app.revanced.patches.twitter.interaction.downloads.UnlockDownloadsPatchKt.unlockDownloadsPatch$lambda$5$lambda$4(UnlockDownloadsPatch.kt:37)
        at app.revanced.patcher.patch.Patch.execute(Patch.kt:71)
        at app.revanced.patcher.patch.BytecodePatch.execute$revanced_patcher(Patch.kt:160)
        at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:84)
        ... 24 more

Solution

Fix the patch to support 10.85.xx and upper

Additional context

No response

Acknowledgements

  • I have checked all open and closed bug reports and this is not a duplicate.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug reportSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions