HushFeed icon indicating copy to clipboard operation
HushFeed copied to clipboard

bug: Errors while patching

Open ahmedsaber957 opened this issue 2 months ago • 4 comments

TikTok package and version

com.zhiliaoapp.musically 46.2.3 & 46.8.3

Morphe Manager and Hushfeed versions

Android v1.32.0-dev2 & Desktop 1.16.1-dev.1 Hushfeed v0.42.0

Phone and Android version

Galaxy A73 5G & Windows 11

Selected patches

Every patch besides the four ones causing the errors.

Affected surface

Other

Bug description

Four patches produce errors on both Android and the Morphe desktop : "Block P2P video relay," "Remove content credential and card scanner assets," "Remove creation tools," and "Remove unused language packs." Alternatively, when I tried patching version 46.8.3, I received an error for the "Downloads" patch. I did not continue patching with that version, and instead kept removing each subsequent patch that produced errors.

Ordered reproduction and settings changes

Applying the latest patch to TikTok

Error logs

Patch 'Block P2P video relay' failed:
app.morphe.patcher.patch.PatchException: P2P Relay Blocker: target resources do not match a reviewed TikTok build.
	at app.morphe.patches.tiktok.misc.optimizer.VerifiedResourceStripperKt.stripVerifiedResources(VerifiedResourceStripper.kt:95)
	at app.morphe.patches.tiktok.misc.optimizer.ResourceOptimizerPatchesKt.p2pRelayBlockerPatch$lambda$0$0(ResourceOptimizerPatches.kt:28)
	at app.morphe.patcher.patch.Patch.execute(Patch.kt:120)
	at app.morphe.patcher.patch.RawResourcePatch.execute$morphe_patcher(Patch.kt:334)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:96)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:120)
	at app.morphe.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.morphe.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.morphe.engine.PatchEngine.patch(PatchEngine.kt:182)
	at app.morphe.gui.util.PatchService$patch$3.invokeSuspend(PatchService.kt:173)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

Patch 'Remove content credential and card scanner assets' failed:
app.morphe.patcher.patch.PatchException: Core Asset De-bloat: found 25 target files, but no reviewed path set matched (expected file counts: 23, 33).
	at app.morphe.patches.tiktok.misc.optimizer.VerifiedResourceStripperKt.stripVerifiedResources(VerifiedResourceStripper.kt:74)
	at app.morphe.patches.tiktok.misc.optimizer.ResourceOptimizerPatchesKt.coreAssetDebloatPatch$lambda$0$0(ResourceOptimizerPatches.kt:78)
	at app.morphe.patcher.patch.Patch.execute(Patch.kt:120)
	at app.morphe.patcher.patch.RawResourcePatch.execute$morphe_patcher(Patch.kt:334)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:96)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:120)
	at app.morphe.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.morphe.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.morphe.engine.PatchEngine.patch(PatchEngine.kt:182)
	at app.morphe.gui.util.PatchService$patch$3.invokeSuspend(PatchService.kt:173)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

Patch 'Remove creation tools' failed:
app.morphe.patcher.patch.PatchException: Studio & Creation De-bloat: target resources do not match a reviewed TikTok build.
	at app.morphe.patches.tiktok.misc.optimizer.VerifiedResourceStripperKt.stripVerifiedResources(VerifiedResourceStripper.kt:95)
	at app.morphe.patches.tiktok.misc.optimizer.ResourceOptimizerPatchesKt.studioCreationDebloatPatch$lambda$0$0(ResourceOptimizerPatches.kt:129)
	at app.morphe.patcher.patch.Patch.execute(Patch.kt:120)
	at app.morphe.patcher.patch.RawResourcePatch.execute$morphe_patcher(Patch.kt:334)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:96)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:120)
	at app.morphe.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.morphe.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.morphe.engine.PatchEngine.patch(PatchEngine.kt:182)
	at app.morphe.gui.util.PatchService$patch$3.invokeSuspend(PatchService.kt:173)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

Patch 'Remove unused language packs' failed:
app.morphe.patcher.patch.PatchException: Language Pack Purger: found 25 language directories, but the reviewed set has 64.
	at app.morphe.patches.tiktok.misc.optimizer.VerifiedResourceStripperKt.stripVerifiedLanguagePacks(VerifiedResourceStripper.kt:139)
	at app.morphe.patches.tiktok.misc.optimizer.ResourceOptimizerPatchesKt.languagePackPurgerPatch$lambda$0$1(ResourceOptimizerPatches.kt:106)
	at app.morphe.patcher.patch.Patch.execute(Patch.kt:120)
	at app.morphe.patcher.patch.RawResourcePatch.execute$morphe_patcher(Patch.kt:334)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:96)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:120)
	at app.morphe.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.morphe.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.morphe.engine.PatchEngine.patch(PatchEngine.kt:182)
	at app.morphe.gui.util.PatchService$patch$3.invokeSuspend(PatchService.kt:173)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

TikTok 46.8.3

Patch 'Downloads' failed:
app.morphe.patcher.patch.PatchException: Downloads: invokeSuspend has 18 local registers, and the download name hook needs two of them below v16.
	at app.morphe.patches.tiktok.interaction.downloads.DownloadsPatchKt.downloadsPatch$lambda$0$0(DownloadsPatch.kt:270)
	at app.morphe.patcher.patch.Patch.execute(Patch.kt:120)
	at app.morphe.patcher.patch.BytecodePatch.execute$morphe_patcher(Patch.kt:264)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend$execute(Patcher.kt:96)
	at app.morphe.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:120)
	at app.morphe.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.morphe.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.morphe.engine.PatchEngine.patch(PatchEngine.kt:182)
	at app.morphe.gui.util.PatchService$patch$3.invokeSuspend(PatchService.kt:173)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

Solution

Removing said patches

Additional context

No response

Acknowledgements

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

ahmedsaber957 avatar Sep 18 '26 17:09 ahmedsaber957

Can't reproduce on 0.43.1. All four patches and Downloads apply on the APKMirror universal 46.2.3 and arm64 46.8.3 builds, and your files differ from those. Where did each APK come from? A filename or link is enough.

SysAdminDoc avatar Sep 18 '26 19:09 SysAdminDoc

I have re-downloaded the APK from APK Mirror and it succeeded this time, so it's indeed a mistake from my end. This worked perfectly com.zhiliaoapp.musically_46.2.3-2024602030_minAPI23(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk As for 46.8.3 This is the APK I have used com.zhiliaoapp.musically_46.8.3-2024608030_minAPI23(arm64-v8a,armeabi-v7a)(nodpi)_apkmirror.com.apk Apk Mirror

ahmedsaber957 avatar Sep 18 '26 21:09 ahmedsaber957

Downloads on your 46.8.3 should patch in 0.44.0. The four cleanup patches still need the APK source.

SysAdminDoc avatar Sep 19 '26 01:09 SysAdminDoc

Fixed in 0.45.0 for APKMirror's 46.2.3 bundle. AMOLED dark theme still needs the plain APK. Reopen if your APK came from somewhere else.

SysAdminDoc avatar Sep 19 '26 02:09 SysAdminDoc