Merge branch 'github/fork/obXfuse/amznmusic_crashupload' into 'dev'

feat(Amazon Music): Add `Prevent log upload`

See merge request ReVanced/revanced-patches!6858
This commit is contained in:
Placeholder github Source User 2026-03-25 02:30:52 +00:00
commit 1d3fe4ceb9
3 changed files with 41 additions and 0 deletions

View file

@ -165,6 +165,10 @@ public final class app/revanced/patches/amazon/DeepLinkingPatchKt {
public static final fun getAlwaysAllowDeepLinkingPatch ()Lapp/revanced/patcher/patch/Patch;
}
public final class app/revanced/patches/amazonmusic/privacy/PreventUploadLogsPatchKt {
public static final fun getPreventUploadLogsPatch ()Lapp/revanced/patcher/patch/Patch;
}
public final class app/revanced/patches/angulus/ads/RemoveAdsPatchKt {
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/Patch;
}

View file

@ -0,0 +1,19 @@
package app.revanced.patches.amazonmusic.privacy
import app.revanced.patcher.gettingFirstClassDefDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.name
import app.revanced.patcher.type
internal val BytecodePatchContext.pendingCrashLogsClass by gettingFirstClassDefDeclaratively {
type("Lcom/amazon/mp3/det/PendingCrashLogs;")
}
internal val BytecodePatchContext.uploadLogAfterCrashMethod by gettingFirstMethodDeclaratively {
name("uploadLogAfterCrash")
}
internal val BytecodePatchContext.uploadPendingCrashLogsIfRequiredMethod by gettingFirstMethodDeclaratively {
name("uploadPendingCrashLogsIfRequired")
}

View file

@ -0,0 +1,18 @@
package app.revanced.patches.amazonmusic.privacy
import app.revanced.patcher.firstMethod
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val preventUploadLogsPatch = bytecodePatch(
name = "Prevent log upload",
description = "Avoid uploading logs when the application crashes.",
) {
compatibleWith("com.amazon.mp3")
apply {
pendingCrashLogsClass.firstMethod(uploadLogAfterCrashMethod).returnEarly()
pendingCrashLogsClass.firstMethod(uploadPendingCrashLogsIfRequiredMethod).returnEarly()
}
}