feat(Instagram): Add Disable analytics patch (#6531)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
85a9079c25
commit
ad92864483
3 changed files with 44 additions and 0 deletions
|
|
@ -336,6 +336,10 @@ public final class app/revanced/patches/instagram/misc/devmenu/EnableDeveloperMe
|
||||||
public static final fun getEnableDeveloperMenuPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getEnableDeveloperMenuPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/instagram/misc/disableAnalytics/DisableAnalyticsPatchKt {
|
||||||
|
public static final fun getDisableAnalyticsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/instagram/misc/extension/SharedExtensionPatchKt {
|
public final class app/revanced/patches/instagram/misc/extension/SharedExtensionPatchKt {
|
||||||
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getSharedExtensionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package app.revanced.patches.instagram.misc.disableAnalytics
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patches.instagram.shared.replaceStringWithBogus
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val disableAnalyticsPatch = bytecodePatch(
|
||||||
|
name = "Disable analytics",
|
||||||
|
description = "Disables analytics that are sent periodically.",
|
||||||
|
) {
|
||||||
|
compatibleWith("com.instagram.android")
|
||||||
|
|
||||||
|
execute {
|
||||||
|
// Returns BOGUS as analytics url.
|
||||||
|
instagramAnalyticsUrlBuilderMethodFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const-string v0, "BOGUS"
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
// Replaces analytics url as BOGUS.
|
||||||
|
facebookAnalyticsUrlInitMethodFingerprint.replaceStringWithBogus(TARGET_URL)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package app.revanced.patches.instagram.misc.disableAnalytics
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
|
internal val instagramAnalyticsUrlBuilderMethodFingerprint = fingerprint {
|
||||||
|
strings("/logging_client_events")
|
||||||
|
}
|
||||||
|
|
||||||
|
internal const val TARGET_URL = "https://graph.facebook.com/logging_client_events"
|
||||||
|
internal val facebookAnalyticsUrlInitMethodFingerprint = fingerprint {
|
||||||
|
strings("analytics_endpoint",TARGET_URL)
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue