Skip to content

Commit

Permalink
Updated AppsFlyer patch to increase compatibility. Now patching at th…
Browse files Browse the repository at this point in the history
…e root level initializer rather than at the wrapper level
  • Loading branch information
patchink0 committed Jul 31, 2024
1 parent a02dd18 commit 6b80eb8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object UniversalPrivacyPatch : BytecodePatch(
setOf(
StatsigClientFingerprint,
AnalyticsInitFingerprint,
AppsFlyerInitFingerprint,
AppsFlyerSDKInitFingerprint,
ComScoreSetupFingerprint,
SettingsSpiCallFingerprint,
DoConfigFetchFingerprint,
Expand Down Expand Up @@ -59,11 +59,11 @@ object UniversalPrivacyPatch : BytecodePatch(
description = "",
required = true
),
::disableAppsFlyer to booleanPatchOption(
key = "disableAppsFlyer",
::disableAppsFlyerSDK to booleanPatchOption(
key = "disableAppsFlyerSDK",
default = true,
values = mapOf(),
title = "Apps Flyer",
title = "Apps Flyer SDK",
description = "",
required = true
),
Expand Down Expand Up @@ -130,14 +130,8 @@ object UniversalPrivacyPatch : BytecodePatch(
StatsigClientFingerprint.resultOrThrow().mutableMethod.addInstructions(0,"return-void")
}

private fun disableAppsFlyer(context: BytecodeContext) {
AppsFlyerInitFingerprint.resultOrThrow().mutableMethod.addInstructions(
0,
"""
sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
return-object p0
"""
)
private fun disableAppsFlyerSDK(context: BytecodeContext) {
AppsFlyerSDKInitFingerprint.resultOrThrow().mutableMethod.addInstructions(0,"return-object p0")
}

// This plugin is used to interact with a non-Java app technology, like Flutter or React Native
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package app.revanced.patches.all.privacy.fingerprints

import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags

// Original method path is com.appsflyer.internal.AFb1vSDK.init
internal object AppsFlyerSDKInitFingerprint : MethodFingerprint(
returnType = "L",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("L", "L", "L"),
strings = listOf("Initializing AppsFlyer SDK: (v%s.%s)")
)

0 comments on commit 6b80eb8

Please sign in to comment.