ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.35k stars 271 forks source link

bug: #3742

Closed maksimaee closed 2 weeks ago

maksimaee commented 2 weeks ago

Bug description

I can't patch TikTok version 36.5.4 using the latest Revanced version 4.16.0 patches or the latest Revanced app. The revanced-cli crashes with the error "Not a valid dex magic value: 5b 7b 22 6e 61 6d 65 22," and the Revanced app crashes while compiling classes21.dex with an "out of memory" error (both on the S24 Ultra and Z Fold 4).

I have tried multiple sources for the TikTok 36.5.4 APK, and all result in the same error. Surprisingly, the revanced-cli completed a patch for TikTok version 36.5.5 with warnings about incompatible patches, but it finished patching successfully.

Error logs

java -jar revanced-cli-4.6.0-all.jar patch -b revanced-patches-4.16.0.jar -m patches.json "com.zhiliaoapp.musically_36.5.4-2023605040_minAPI21(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk" -o patched_tiktok.apk INFO: Loading patches INFO: Decoding app manifest INFO: SIM spoof excluded INFO: Export all activities excluded INFO: Predictive back gesture excluded INFO: Remove screenshot restriction excluded INFO: Spoof Wi-Fi connection excluded INFO: Remove screen capture restriction excluded INFO: Hide mock location excluded INFO: Remove share targets excluded INFO: Change version code excluded INFO: Hex excluded INFO: Spoof build info excluded INFO: Enable Android debugging excluded INFO: Override certificate pinning excluded INFO: Change package name excluded INFO: Spoof SIM country excluded INFO: Change data directory location excluded INFO: Setting patch options INFO: Merging integrations com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$NotADexFile: Not a valid dex magic value: 5b 7b 22 6e 61 6d 65 22 at com.android.tools.smali.dexlib2.util.DexUtil.verifyDexHeader(DexUtil.java:92) at lanchon.multidexlib2.RawDexIO.readRawDexFile(RawDexIO.java:61) at lanchon.multidexlib2.RawDexIO.readRawDexFile(RawDexIO.java:48) at lanchon.multidexlib2.MultiDexIO.readMultiDexContainer(MultiDexIO.java:63) at lanchon.multidexlib2.MultiDexIO.readMultiDexContainer(MultiDexIO.java:48) at lanchon.multidexlib2.MultiDexIO.readMultiDexContainer(MultiDexIO.java:39) at lanchon.multidexlib2.MultiDexIO.readDexFile(MultiDexIO.java:33) at app.revanced.patcher.data.BytecodeContext$Integrations.flush(BytecodeContext.kt:156) at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:191) 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$4$1$1.invokeSuspend(PatchCommand.kt:303) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking(Builders.kt:59) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking$default(Builders.kt:38) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:302) 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:12)

Solution

No response

Additional context

No response

Acknowledgements

oSumAtrIX commented 2 weeks ago

Image

-m expects the integrations, not the patches.json