mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-09 21:49:33 +01:00
refactor: migrate to changes from ReVanced Patcher
This commit is contained in:
parent
eafe5b54a8
commit
24c57b80dd
@ -11,5 +11,8 @@ object ProUnlockFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT,
|
Opcode.MOVE_RESULT,
|
||||||
Opcode.IF_EQZ
|
Opcode.IF_EQZ
|
||||||
),
|
),
|
||||||
customFingerprint = { it.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;" && it.name == "lambda\$existPurchase\$0" }
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;"
|
||||||
|
&& methodDef.name == "lambda\$existPurchase\$0"
|
||||||
|
}
|
||||||
)
|
)
|
@ -3,5 +3,7 @@ package app.revanced.patches.citra.misc.premium.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object PremiumUnlockFingerprint : MethodFingerprint(
|
object PremiumUnlockFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { it.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && it.name == "isPremiumActive" }
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && methodDef.name == "isPremiumActive"
|
||||||
|
}
|
||||||
)
|
)
|
@ -7,7 +7,7 @@ object BootStateFingerprint : MethodFingerprint(
|
|||||||
"Z",
|
"Z",
|
||||||
access = AccessFlags.PUBLIC.value,
|
access = AccessFlags.PUBLIC.value,
|
||||||
strings = listOf("Boot state of device: %s"),
|
strings = listOf("Boot state of device: %s"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/AttestationHelper;")
|
methodDef.definingClass.endsWith("/AttestationHelper;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -7,7 +7,7 @@ object BootloaderDetectionFingerprint : MethodFingerprint(
|
|||||||
"Z",
|
"Z",
|
||||||
access = AccessFlags.PUBLIC.value,
|
access = AccessFlags.PUBLIC.value,
|
||||||
strings = listOf("Creation of attestation key succeeded", "Creation of attestation key failed"),
|
strings = listOf("Creation of attestation key succeeded", "Creation of attestation key failed"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/AttestationHelper;")
|
methodDef.definingClass.endsWith("/AttestationHelper;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lat/gv/bmf/bmf2go/tools/utils/z;"
|
methodDef.definingClass == "Lat/gv/bmf/bmf2go/tools/utils/z;"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object PrimaryAdsFingerprint : MethodFingerprint(
|
object PrimaryAdsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,5 +4,5 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object CheckProFingerprint : MethodFingerprint(
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
customFingerprint = { it.definingClass.endsWith("IPSPurchaseRepository;")}
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
access = AccessFlags.PUBLIC.value,
|
access = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -7,7 +7,7 @@ object SpoofSignatureFingerprint : MethodFingerprint(
|
|||||||
"L",
|
"L",
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
access = AccessFlags.PRIVATE.value,
|
access = AccessFlags.PRIVATE.value,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey"
|
methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,7 @@ import app.revanced.patcher.extensions.or
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import org.jf.dexlib2.iface.Method
|
||||||
|
|
||||||
abstract class MediaAdFingerprint(
|
abstract class MediaAdFingerprint(
|
||||||
@ -11,7 +12,7 @@ abstract class MediaAdFingerprint(
|
|||||||
access: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters: Iterable<String>? = listOf(),
|
parameters: Iterable<String>? = listOf(),
|
||||||
opcodes: Iterable<Opcode>?,
|
opcodes: Iterable<Opcode>?,
|
||||||
customFingerprint: ((methodDef: Method) -> Boolean)? = null
|
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null
|
||||||
) : MethodFingerprint(
|
) : MethodFingerprint(
|
||||||
returnType,
|
returnType,
|
||||||
access,
|
access,
|
||||||
|
@ -14,7 +14,7 @@ object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
|||||||
Opcode.IPUT_BOOLEAN,
|
Opcode.IPUT_BOOLEAN,
|
||||||
Opcode.IPUT_BOOLEAN
|
Opcode.IPUT_BOOLEAN
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("ClipsEditMetadataController;")
|
methodDef.definingClass.endsWith("ClipsEditMetadataController;")
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
@ -11,8 +11,8 @@ object LoadInboxAdsFingerprint : MethodFingerprint(
|
|||||||
"inbox_ads_fetch_start"
|
"inbox_ads_fetch_start"
|
||||||
),
|
),
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
access = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
customFingerprint = {
|
customFingerprint = { methodDef, _ ->
|
||||||
it.definingClass == "Lcom/facebook/messaging/business/inboxads/plugins/inboxads/itemsupplier/InboxAdsItemSupplierImplementation;"
|
methodDef.definingClass == "Lcom/facebook/messaging/business/inboxads/plugins/inboxads/itemsupplier/InboxAdsItemSupplierImplementation;"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ object UnlockProFingerprint : MethodFingerprint(
|
|||||||
Opcode.IGET_BOOLEAN,
|
Opcode.IGET_BOOLEAN,
|
||||||
Opcode.RETURN
|
Opcode.RETURN
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("MainActivity;")
|
methodDef.definingClass.endsWith("MainActivity;")
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.nyx.misc.pro.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object CheckProFingerprint : MethodFingerprint(
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
|
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -8,10 +8,10 @@ import org.jf.dexlib2.Opcode
|
|||||||
object CheckSignatureFingerprint : MethodFingerprint(
|
object CheckSignatureFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
customFingerprint = {
|
customFingerprint = { methodDef, _ ->
|
||||||
(it.definingClass == "Lcom/microblink/photomath/main/activity/LauncherActivity;" ||
|
(methodDef.definingClass == "Lcom/microblink/photomath/main/activity/LauncherActivity;" ||
|
||||||
it.definingClass == "Lcom/microblink/photomath/PhotoMath;") &&
|
methodDef.definingClass == "Lcom/microblink/photomath/PhotoMath;") &&
|
||||||
it.name == "onCreate"
|
methodDef.name == "onCreate"
|
||||||
},
|
},
|
||||||
strings = listOf(
|
strings = listOf(
|
||||||
"currentSignature"
|
"currentSignature"
|
||||||
|
@ -11,6 +11,6 @@ object IsPlusUnlockedFingerprint : MethodFingerprint(
|
|||||||
"genius"
|
"genius"
|
||||||
),
|
),
|
||||||
customFingerprint = {
|
customFingerprint = {
|
||||||
methodDef -> methodDef.definingClass.endsWith("/User;")
|
methodDef, _ -> methodDef.definingClass.endsWith("/User;")
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object PremiumIconFingerprint : MethodFingerprint(
|
object PremiumIconFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
|
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,5 +4,5 @@ package app.revanced.patches.shared.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SeekbarOnDrawFingerprint : MethodFingerprint(
|
object SeekbarOnDrawFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { it.name == "onDraw" }
|
customFingerprint = { methodDef, _ -> methodDef.name == "onDraw" }
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ package app.revanced.patches.shared.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object WatchWhileActivityFingerprint : MethodFingerprint(
|
object WatchWhileActivityFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
|
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -10,6 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import org.jf.dexlib2.iface.Method
|
||||||
|
|
||||||
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
||||||
@ -30,7 +31,7 @@ abstract class AbstractIntegrationsPatch(
|
|||||||
parameters: Iterable<String>? = null,
|
parameters: Iterable<String>? = null,
|
||||||
opcodes: Iterable<Opcode?>? = null,
|
opcodes: Iterable<Opcode?>? = null,
|
||||||
strings: Iterable<String>? = null,
|
strings: Iterable<String>? = null,
|
||||||
customFingerprint: ((methodDef: Method) -> Boolean)? = null,
|
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null,
|
||||||
private val contextRegisterResolver: (Method) -> Int = object : RegisterResolver {}
|
private val contextRegisterResolver: (Method) -> Int = object : RegisterResolver {}
|
||||||
) : MethodFingerprint(
|
) : MethodFingerprint(
|
||||||
returnType,
|
returnType,
|
||||||
|
@ -13,5 +13,5 @@ object CanScrollVerticallyFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT,
|
Opcode.MOVE_RESULT,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
|
||||||
)
|
)
|
||||||
|
@ -18,7 +18,7 @@ object DisableCaptureRestrictionAudioDriverFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.RETURN_OBJECT
|
Opcode.RETURN_OBJECT
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
// Check for method call to AudioAttributes$Builder.setAllowedCapturePolicy Android API
|
// Check for method call to AudioAttributes$Builder.setAllowedCapturePolicy Android API
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
((it as? ReferenceInstruction)?.reference as? MethodReference)?.name == "setAllowedCapturePolicy"
|
((it as? ReferenceInstruction)?.reference as? MethodReference)?.name == "setAllowedCapturePolicy"
|
||||||
|
@ -17,7 +17,7 @@ object PiracyDetectionFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.INVOKE_VIRTUAL
|
Opcode.INVOKE_VIRTUAL
|
||||||
),
|
),
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.implementation?.instructions?.any {
|
method.implementation?.instructions?.any {
|
||||||
if (it.opcode != Opcode.NEW_INSTANCE) return@any false
|
if (it.opcode != Opcode.NEW_INSTANCE) return@any false
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.ticktick.misc.themeunlock.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object CheckLockedThemesFingerprint : MethodFingerprint(
|
object CheckLockedThemesFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("Theme;") && methodDef.name == "isLockedTheme"
|
methodDef.definingClass.endsWith("Theme;") && methodDef.name == "isLockedTheme"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.ticktick.misc.themeunlock.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SetThemeFingerprint : MethodFingerprint(
|
object SetThemeFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("ThemePreviewActivity;") && methodDef.name == "lambda\$updateUserBtn\$1"
|
methodDef.definingClass.endsWith("ThemePreviewActivity;") && methodDef.name == "lambda\$updateUserBtn\$1"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.ad.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object ConvertHelpFeedItemListFingerprint : MethodFingerprint(
|
object ConvertHelpFeedItemListFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/ConvertHelp;") &&
|
methodDef.definingClass.endsWith("/ConvertHelp;") &&
|
||||||
methodDef.name.endsWith("${'$'}FeedItemList")
|
methodDef.name.endsWith("${'$'}FeedItemList")
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.ad.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object FeedItemListCloneFingerprint : MethodFingerprint(
|
object FeedItemListCloneFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
|
methodDef.definingClass.endsWith("/FeedItemList;") && methodDef.name == "clone"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
|
|
||||||
object FeedApiServiceLIZFingerprint : MethodFingerprint(
|
object FeedApiServiceLIZFingerprint : MethodFingerprint(
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.SYNTHETIC,
|
access = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.SYNTHETIC,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/FeedApiService;") && methodDef.name == "LIZ"
|
methodDef.definingClass.endsWith("/FeedApiService;") && methodDef.name == "LIZ"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -7,7 +7,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
object ACLCommonShareFingerprint : MethodFingerprint(
|
object ACLCommonShareFingerprint : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
|
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
|
||||||
methodDef.name == "getCode"
|
methodDef.name == "getCode"
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
object ACLCommonShareFingerprint2 : MethodFingerprint(
|
object ACLCommonShareFingerprint2 : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
|
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
|
||||||
methodDef.name == "getShowType"
|
methodDef.name == "getShowType"
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
object ACLCommonShareFingerprint3 : MethodFingerprint(
|
object ACLCommonShareFingerprint3 : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
|
methodDef.definingClass.endsWith("/ACLCommonShare;") &&
|
||||||
methodDef.name == "getTranscode"
|
methodDef.name == "getTranscode"
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
object AwemeGetVideoControlFingerprint : MethodFingerprint(
|
object AwemeGetVideoControlFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
AccessFlags.PUBLIC.value,
|
AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/Aweme;") && methodDef.name == "getVideoControl"
|
methodDef.definingClass.endsWith("/Aweme;") && methodDef.name == "getVideoControl"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.integrations.fingerprints
|
|||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
|
||||||
object InitFingerprint : IntegrationsFingerprint(
|
object InitFingerprint : IntegrationsFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/AwemeHostApplication;") &&
|
methodDef.definingClass.endsWith("/AwemeHostApplication;") &&
|
||||||
methodDef.name == "onCreate"
|
methodDef.name == "onCreate"
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
object MandatoryLoginServiceFingerprint : MethodFingerprint(
|
object MandatoryLoginServiceFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
||||||
methodDef.name == "enableForcedLogin"
|
methodDef.name == "enableForcedLogin"
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.Dis
|
|||||||
@DisableLoginRequirementCompatibility
|
@DisableLoginRequirementCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
|
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
||||||
methodDef.name == "shouldShowForcedLogin"
|
methodDef.name == "shouldShowForcedLogin"
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ object GoogleAuthAvailableFingerprint : MethodFingerprint(
|
|||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters = listOf(),
|
parameters = listOf(),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleAuth;"
|
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleAuth;"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -8,7 +8,7 @@ object GoogleOneTapAuthAvailableFingerprint : MethodFingerprint(
|
|||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters = listOf(),
|
parameters = listOf(),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleOneTapAuth;"
|
methodDef.definingClass == "Lcom/bytedance/lobby/google/GoogleOneTapAuth;"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object AdPersonalizationActivityOnCreateFingerprint : MethodFingerprint(
|
object AdPersonalizationActivityOnCreateFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/AdPersonalizationActivity;") &&
|
methodDef.definingClass.endsWith("/AdPersonalizationActivity;") &&
|
||||||
methodDef.name == "onCreate"
|
methodDef.name == "onCreate"
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SettingsOnViewCreatedFingerprint : MethodFingerprint(
|
object SettingsOnViewCreatedFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
|
methodDef.definingClass.endsWith("/SettingNewVersionFragment;") &&
|
||||||
methodDef.name == "onViewCreated"
|
methodDef.name == "onViewCreated"
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SettingsStatusLoadFingerprint : MethodFingerprint(
|
object SettingsStatusLoadFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
|
methodDef.definingClass.endsWith("Lapp/revanced/tiktok/settingsmenu/SettingsStatus;") &&
|
||||||
methodDef.name == "load"
|
methodDef.name == "load"
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
abstract class MethodUnlockFingerprint(private val className: String) : MethodFingerprint(
|
abstract class MethodUnlockFingerprint(private val className: String) : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
strings = listOf("binding.addButton"),
|
strings = listOf("binding.addButton"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/$className;")
|
methodDef.definingClass.endsWith("/$className;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,7 @@ package app.revanced.patches.twitch.ad.audio.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object AudioAdsPresenterPlayFingerprint : MethodFingerprint(
|
object AudioAdsPresenterPlayFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.definingClass.endsWith("AudioAdsPlayerPresenter;") && method.name == "playAd"
|
method.definingClass.endsWith("AudioAdsPlayerPresenter;") && method.name == "playAd"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.embedded.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object CreateUsherClientFingerprint : MethodFingerprint(
|
object CreateUsherClientFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.definingClass.endsWith("Ltv/twitch/android/network/OkHttpClientFactory;") && method.name == "buildOkHttpClient"
|
method.definingClass.endsWith("Ltv/twitch/android/network/OkHttpClientFactory;") && method.name == "buildOkHttpClient"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -8,7 +8,7 @@ object CheckAdEligibilityLambdaFingerprint : MethodFingerprint(
|
|||||||
"L",
|
"L",
|
||||||
AccessFlags.PRIVATE or AccessFlags.FINAL or AccessFlags.STATIC,
|
AccessFlags.PRIVATE or AccessFlags.FINAL or AccessFlags.STATIC,
|
||||||
listOf("L", "L", "L"),
|
listOf("L", "L", "L"),
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.definingClass.endsWith("AdEligibilityFetcher;") &&
|
method.definingClass.endsWith("AdEligibilityFetcher;") &&
|
||||||
method.name.contains("shouldRequestAd")
|
method.name.contains("shouldRequestAd")
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ package app.revanced.patches.twitch.ad.video.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object ContentConfigShowAdsFingerprint : MethodFingerprint(
|
object ContentConfigShowAdsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.definingClass.endsWith("ContentConfigData;") && method.name == "getShowAds"
|
method.definingClass.endsWith("ContentConfigData;") && method.name == "getShowAds"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.video.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object GetReadyToShowAdFingerprint : MethodFingerprint(
|
object GetReadyToShowAdFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
|
method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.chat.antidelete.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object ChatUtilCreateDeletedSpanFingerprint : MethodFingerprint(
|
object ChatUtilCreateDeletedSpanFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/ChatUtil\$Companion;") && methodDef.name == "createDeletedSpanFromChatMessageSpan"
|
methodDef.definingClass.endsWith("/ChatUtil\$Companion;") && methodDef.name == "createDeletedSpanFromChatMessageSpan"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -6,7 +6,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
|
|
||||||
object DeletedMessageClickableSpanCtorFingerprint : MethodFingerprint(
|
object DeletedMessageClickableSpanCtorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;")
|
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;")
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ package app.revanced.patches.twitch.chat.antidelete.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SetHasModAccessFingerprint : MethodFingerprint(
|
object SetHasModAccessFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;") && methodDef.name == "setHasModAccess"
|
methodDef.definingClass.endsWith("DeletedMessageClickableSpan;") && methodDef.name == "setHasModAccess"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.chat.autoclaim.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object CommunityPointsButtonViewDelegateFingerprint : MethodFingerprint(
|
object CommunityPointsButtonViewDelegateFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("CommunityPointsButtonViewDelegate;")
|
methodDef.definingClass.endsWith("CommunityPointsButtonViewDelegate;")
|
||||||
&& methodDef.name == "showClaimAvailable"
|
&& methodDef.name == "showClaimAvailable"
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ package app.revanced.patches.twitch.debug.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object IsDebugConfigEnabledFingerprint : MethodFingerprint(
|
object IsDebugConfigEnabledFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ package app.revanced.patches.twitch.debug.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object IsOmVerificationEnabledFingerprint : MethodFingerprint(
|
object IsOmVerificationEnabledFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ package app.revanced.patches.twitch.debug.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object ShouldShowDebugOptionsFingerprint : MethodFingerprint(
|
object ShouldShowDebugOptionsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -9,7 +9,7 @@ import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.
|
|||||||
@IntegrationsCompatibility
|
@IntegrationsCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object InitFingerprint : IntegrationsFingerprint(
|
object InitFingerprint : IntegrationsFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/TwitchApplication;") &&
|
methodDef.definingClass.endsWith("/TwitchApplication;") &&
|
||||||
methodDef.name == "onCreate"
|
methodDef.name == "onCreate"
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ object MenuGroupsOnClickFingerprint : MethodFingerprint(
|
|||||||
"V",
|
"V",
|
||||||
AccessFlags.PRIVATE or AccessFlags.STATIC or AccessFlags.FINAL,
|
AccessFlags.PRIVATE or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
listOf("L", "L", "L"),
|
listOf("L", "L", "L"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/SettingsMenuViewDelegate;")
|
methodDef.definingClass.endsWith("/SettingsMenuViewDelegate;")
|
||||||
&& methodDef.name.contains("render")
|
&& methodDef.name.contains("render")
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object MenuGroupsUpdatedFingerprint : MethodFingerprint(
|
object MenuGroupsUpdatedFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/SettingsMenuPresenter\$Event\$MenuGroupsUpdated;")
|
methodDef.definingClass.endsWith("/SettingsMenuPresenter\$Event\$MenuGroupsUpdated;")
|
||||||
&& methodDef.name == "<init>"
|
&& methodDef.name == "<init>"
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SettingsActivityOnCreateFingerprint : MethodFingerprint(
|
object SettingsActivityOnCreateFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/SettingsActivity;") &&
|
methodDef.definingClass.endsWith("/SettingsActivity;") &&
|
||||||
methodDef.name == "onCreate"
|
methodDef.name == "onCreate"
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SettingsMenuItemEnumFingerprint : MethodFingerprint(
|
object SettingsMenuItemEnumFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("/SettingsMenuItem;") && methodDef.name == "<clinit>"
|
methodDef.definingClass.endsWith("/SettingsMenuItem;") && methodDef.name == "<clinit>"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,6 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object JsonHookPatchFingerprint : MethodFingerprint(
|
object JsonHookPatchFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef -> methodDef.name == "<clinit>" },
|
customFingerprint = { methodDef, _ -> methodDef.name == "<clinit>" },
|
||||||
opcodes = listOf(Opcode.IGET_OBJECT)
|
opcodes = listOf(Opcode.IGET_OBJECT)
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package app.revanced.patches.twitter.misc.hook.json.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object JsonInputStreamFingerprint : MethodFingerprint(
|
object JsonInputStreamFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
if (methodDef.parameterTypes.size == 0) false
|
if (methodDef.parameterTypes.size == 0) false
|
||||||
else methodDef.parameterTypes.first() == "Ljava/io/InputStream;"
|
else methodDef.parameterTypes.first() == "Ljava/io/InputStream;"
|
||||||
}
|
}
|
||||||
|
@ -3,5 +3,5 @@ package app.revanced.patches.twitter.misc.hook.json.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object LoganSquareFingerprint : MethodFingerprint(
|
object LoganSquareFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("LoganSquare;") }
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("LoganSquare;") }
|
||||||
)
|
)
|
@ -2,7 +2,7 @@ package app.revanced.patches.warnwetter.misc.promocode.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object PromoCodeUnlockFingerprint : MethodFingerprint(
|
object PromoCodeUnlockFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
|
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object CheckProFingerprint : MethodFingerprint(
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("RawUserData;") && methodDef.name == "isPro"
|
methodDef.definingClass.endsWith("RawUserData;") && methodDef.name == "isPro"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -9,7 +9,7 @@ object ReelConstructorFingerprint : MethodFingerprint(
|
|||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL
|
Opcode.INVOKE_VIRTUAL
|
||||||
),
|
),
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.implementation?.instructions?.any {
|
method.implementation?.instructions?.any {
|
||||||
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral == GeneralAdsResourcePatch.reelMultipleItemShelfId
|
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral == GeneralAdsResourcePatch.reelMultipleItemShelfId
|
||||||
} ?: false
|
} ?: false
|
||||||
|
@ -4,7 +4,7 @@ package app.revanced.patches.youtube.interaction.swipecontrols.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" && methodDef.name == "<init>"
|
methodDef.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" && methodDef.name == "<init>"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object LayoutConstructorFingerprint : MethodFingerprint(
|
object LayoutConstructorFingerprint : MethodFingerprint(
|
||||||
strings = listOf("1.0x"),
|
strings = listOf("1.0x"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
|
methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -6,7 +6,7 @@ import org.jf.dexlib2.Opcode
|
|||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
object InitializeButtonsFingerprint : MethodFingerprint(
|
object InitializeButtonsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral ==
|
it.opcode == Opcode.CONST && (it as WideLiteralInstruction).wideLiteral ==
|
||||||
ResolvePivotBarFingerprintsPatch.imageOnlyTabResourceId
|
ResolvePivotBarFingerprintsPatch.imageOnlyTabResourceId
|
||||||
|
@ -14,7 +14,7 @@ object AlbumCardsFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == AlbumCardsResourcePatch.albumCardId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == AlbumCardsResourcePatch.albumCardId
|
||||||
|
@ -14,7 +14,7 @@ object BreakingNewsFingerprint : MethodFingerprint(
|
|||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
Opcode.IPUT_OBJECT,
|
Opcode.IPUT_OBJECT,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == BreakingNewsResourcePatch.horizontalCardListId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == BreakingNewsResourcePatch.horizontalCardListId
|
||||||
|
@ -9,7 +9,7 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|||||||
|
|
||||||
object ShortsCommentsButtonFingerprint : MethodFingerprint(
|
object ShortsCommentsButtonFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("Z", "Z", "L"),
|
"V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("Z", "Z", "L"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal && (it as WideLiteralInstruction).wideLiteral == CommentsResourcePatch.shortsCommentsButtonId
|
it.opcode.ordinal == Opcode.CONST.ordinal && (it as WideLiteralInstruction).wideLiteral == CommentsResourcePatch.shortsCommentsButtonId
|
||||||
} == true
|
} == true
|
||||||
|
@ -11,7 +11,7 @@ object CrowdfundingBoxFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.IPUT_OBJECT,
|
Opcode.IPUT_OBJECT,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == CrowdfundingBoxResourcePatch.crowdfundingBoxId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == CrowdfundingBoxResourcePatch.crowdfundingBoxId
|
||||||
|
@ -13,7 +13,7 @@ object LayoutCircleFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutCircle
|
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutCircle
|
||||||
|
@ -13,7 +13,7 @@ object LayoutIconFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutIcon
|
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutIcon
|
||||||
|
@ -13,7 +13,7 @@ object LayoutVideoFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutVideo
|
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEndscreenCardsResourcePatch.layoutVideo
|
||||||
|
@ -7,8 +7,8 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|||||||
|
|
||||||
abstract class LiteralOpcodesFingerprint(opcodes: List<Opcode>, literal: Long) : MethodFingerprint(
|
abstract class LiteralOpcodesFingerprint(opcodes: List<Opcode>, literal: Long) : MethodFingerprint(
|
||||||
opcodes = opcodes,
|
opcodes = opcodes,
|
||||||
customFingerprint = {
|
customFingerprint = { methodDef, _ ->
|
||||||
it.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
if (instruction.opcode != Opcode.CONST) return@any false
|
if (instruction.opcode != Opcode.CONST) return@any false
|
||||||
|
|
||||||
val wideLiteral = (instruction as WideLiteralInstruction).wideLiteral
|
val wideLiteral = (instruction as WideLiteralInstruction).wideLiteral
|
||||||
|
@ -11,7 +11,7 @@ object ShowFloatingMicrophoneButtonFingerprint : MethodFingerprint(
|
|||||||
Opcode.IF_EQZ,
|
Opcode.IF_EQZ,
|
||||||
Opcode.RETURN_VOID
|
Opcode.RETURN_VOID
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
(it as? WideLiteralInstruction)?.wideLiteral == HideFloatingMicrophoneButtonResourcePatch.fabButtonId
|
(it as? WideLiteralInstruction)?.wideLiteral == HideFloatingMicrophoneButtonResourcePatch.fabButtonId
|
||||||
} == true
|
} == true
|
||||||
|
@ -10,7 +10,7 @@ object GetPremiumViewFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.RETURN_VOID
|
Opcode.RETURN_VOID
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/red/presenter/CompactYpcOfferModuleView;"
|
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/red/presenter/CompactYpcOfferModuleView;"
|
||||||
&& methodDef.name == "onMeasure"
|
&& methodDef.name == "onMeasure"
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ object InfocardsMethodCallFingerprint : MethodFingerprint(
|
|||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
Opcode.INVOKE_INTERFACE,
|
Opcode.INVOKE_INTERFACE,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == HideInfocardsResourcePatch.drawerResourceId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == HideInfocardsResourcePatch.drawerResourceId
|
||||||
} == true
|
} == true
|
||||||
|
@ -17,7 +17,7 @@ object HideLoadMoreButtonFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_STATIC,
|
Opcode.INVOKE_STATIC,
|
||||||
Opcode.MOVE_RESULT_OBJECT
|
Opcode.MOVE_RESULT_OBJECT
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
if (it.opcode != Opcode.CONST) return@any false
|
if (it.opcode != Opcode.CONST) return@any false
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
|||||||
Opcode.APUT_OBJECT,
|
Opcode.APUT_OBJECT,
|
||||||
Opcode.CONST,
|
Opcode.CONST,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEmailAddressResourcePatch.accountSwitcherAccessibilityLabelId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == HideEmailAddressResourcePatch.accountSwitcherAccessibilityLabelId
|
||||||
|
@ -16,7 +16,7 @@ object CreatePlayerOverviewFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST
|
Opcode.CHECK_CAST
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
if (it.opcode != Opcode.CONST) return@any false
|
if (it.opcode != Opcode.CONST) return@any false
|
||||||
|
|
||||||
|
@ -14,5 +14,7 @@ object FullscreenViewAdderParentFingerprint : MethodFingerprint(
|
|||||||
Opcode.CONST_4,
|
Opcode.CONST_4,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
),
|
),
|
||||||
customFingerprint = { it.definingClass.endsWith("FullscreenEngagementPanelOverlay;") }
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("FullscreenEngagementPanelOverlay;")
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ object DislikesOldLayoutTextViewFingerprint : MethodFingerprint(
|
|||||||
Opcode.IF_NEZ, // textview register
|
Opcode.IF_NEZ, // textview register
|
||||||
Opcode.GOTO,
|
Opcode.GOTO,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == ReturnYouTubeDislikeResourcePatch.oldUIDislikeId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == ReturnYouTubeDislikeResourcePatch.oldUIDislikeId
|
||||||
|
@ -18,5 +18,5 @@ object SetWordmarkHeaderFingerprint : MethodFingerprint(
|
|||||||
Opcode.CONST,
|
Opcode.CONST,
|
||||||
Opcode.INVOKE_STATIC,
|
Opcode.INVOKE_STATIC,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef -> methodDef.parameterTypes.first() == "Landroid/widget/ImageView;" }
|
customFingerprint = { methodDef, _ -> methodDef.parameterTypes.first() == "Landroid/widget/ImageView;" }
|
||||||
)
|
)
|
@ -8,7 +8,7 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
|
|
||||||
object CreateDarkThemeSeekbarFingerprint : MethodFingerprint(
|
object CreateDarkThemeSeekbarFingerprint : MethodFingerprint(
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
customFingerprint = { method ->
|
customFingerprint = { method, _ ->
|
||||||
method.indexOfFirstConstantInstruction(SeekbarColorResourcePatch.inlineTimeBarColorizedBarPlayedColorDarkId) != -1
|
method.indexOfFirstConstantInstruction(SeekbarColorResourcePatch.inlineTimeBarColorizedBarPlayedColorDarkId) != -1
|
||||||
&& method.indexOfFirstConstantInstruction(SeekbarColorResourcePatch.inlineTimeBarPlayedNotHighlightedColorId) != -1
|
&& method.indexOfFirstConstantInstruction(SeekbarColorResourcePatch.inlineTimeBarPlayedNotHighlightedColorId) != -1
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ object ControlsOverlayFingerprint : MethodFingerprint(
|
|||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
Opcode.NEW_INSTANCE,
|
Opcode.NEW_INSTANCE,
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/player/overlay/YouTubeControlsOverlay;"
|
methodDef.definingClass == "Lcom/google/android/apps/youtube/app/player/overlay/YouTubeControlsOverlay;"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -7,7 +7,7 @@ import org.jf.dexlib2.iface.reference.MethodReference
|
|||||||
|
|
||||||
object RectangleFieldInvalidatorFingerprint : MethodFingerprint(
|
object RectangleFieldInvalidatorFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
customFingerprint = custom@{ methodDef ->
|
customFingerprint = custom@{ methodDef, _ ->
|
||||||
val instructions = methodDef.implementation?.instructions!!
|
val instructions = methodDef.implementation?.instructions!!
|
||||||
val instructionCount = instructions.count()
|
val instructionCount = instructions.count()
|
||||||
|
|
||||||
|
@ -8,5 +8,7 @@ object AutoRepeatFingerprint : MethodFingerprint(
|
|||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf(),
|
listOf(),
|
||||||
customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 && methodDef.annotations.isEmpty()}
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.implementation!!.instructions.count() == 3 && methodDef.annotations.isEmpty()
|
||||||
|
}
|
||||||
)
|
)
|
@ -7,7 +7,7 @@ object OnBackPressedFingerprint : MethodFingerprint(
|
|||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.RETURN_VOID
|
Opcode.RETURN_VOID
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("WatchWhileActivity;")
|
methodDef.definingClass.endsWith("WatchWhileActivity;")
|
||||||
&& methodDef.name == "onBackPressed"
|
&& methodDef.name == "onBackPressed"
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ object RecyclerViewTopScrollingParentFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.NEW_INSTANCE
|
Opcode.NEW_INSTANCE
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.name == "<init>"
|
methodDef.name == "<init>"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object SubtitleWindowSettingsConstructorFingerprint : MethodFingerprint(
|
object SubtitleWindowSettingsConstructorFingerprint : MethodFingerprint(
|
||||||
parameters = listOf("I", "I", "I", "Z", "Z"),
|
parameters = listOf("I", "I", "I", "Z", "Z"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lcom/google/android/libraries/youtube/player/subtitles/model/SubtitleWindowSettings;"
|
methodDef.definingClass == "Lcom/google/android/libraries/youtube/player/subtitles/model/SubtitleWindowSettings;"
|
||||||
&& methodDef.name == "<init>"
|
&& methodDef.name == "<init>"
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ object EmbeddedPlayerControlsOverlayFingerprint : IntegrationsFingerprint(
|
|||||||
access = AccessFlags.PRIVATE or AccessFlags.CONSTRUCTOR,
|
access = AccessFlags.PRIVATE or AccessFlags.CONSTRUCTOR,
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
parameters = listOf("L", "L", "L"),
|
parameters = listOf("L", "L", "L"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.startsWith("Lcom/google/android/apps/youtube/embeddedplayer/service/ui/overlays/controlsoverlay/remoteloaded/")
|
methodDef.definingClass.startsWith("Lcom/google/android/apps/youtube/embeddedplayer/service/ui/overlays/controlsoverlay/remoteloaded/")
|
||||||
},
|
},
|
||||||
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
||||||
|
@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints
|
|||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
|
||||||
object ServiceFingerprint : IntegrationsFingerprint(
|
object ServiceFingerprint : IntegrationsFingerprint(
|
||||||
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("ApiPlayerService;") && methodDef.name == "<init>" },
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("ApiPlayerService;") && methodDef.name == "<init>" },
|
||||||
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
||||||
)
|
)
|
@ -19,5 +19,7 @@ object KidsMinimizedPlaybackPolicyControllerFingerprint : MethodFingerprint(
|
|||||||
Opcode.IGET,
|
Opcode.IGET,
|
||||||
Opcode.INVOKE_STATIC
|
Opcode.INVOKE_STATIC
|
||||||
),
|
),
|
||||||
customFingerprint = { it.definingClass.endsWith("MinimizedPlaybackPolicyController;") }
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass.endsWith("MinimizedPlaybackPolicyController;")
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
@ -12,7 +12,7 @@ object BottomControlsInflateFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT
|
Opcode.MOVE_RESULT_OBJECT
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||||
(instruction as? WideLiteralInstruction)?.wideLiteral == PlayerControlsBytecodePatch.bottomUiContainerResourceId
|
(instruction as? WideLiteralInstruction)?.wideLiteral == PlayerControlsBytecodePatch.bottomUiContainerResourceId
|
||||||
|
@ -6,7 +6,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
object PlayerControlsVisibilityFingerprint : MethodFingerprint(
|
object PlayerControlsVisibilityFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
parameters = listOf("Z", "Z"),
|
parameters = listOf("Z", "Z"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
|
methodDef.definingClass.endsWith("YouTubeControlsOverlay;")
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ package app.revanced.patches.youtube.misc.playeroverlay.fingerprint
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object PlayerOverlaysOnFinishInflateFingerprint : MethodFingerprint(
|
object PlayerOverlaysOnFinishInflateFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("YouTubePlayerOverlaysLayout;") && methodDef.name == "onFinishInflate"
|
methodDef.definingClass.endsWith("YouTubePlayerOverlaysLayout;") && methodDef.name == "onFinishInflate"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object LicenseActivityFingerprint : MethodFingerprint(
|
object LicenseActivityFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("LicenseActivity;") && methodDef.name == "onCreate"
|
methodDef.definingClass.endsWith("LicenseActivity;") && methodDef.name == "onCreate"
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -8,7 +8,7 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|||||||
object ThemeSetterSystemFingerprint : MethodFingerprint(
|
object ThemeSetterSystemFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
opcodes = listOf(Opcode.RETURN_OBJECT),
|
opcodes = listOf(Opcode.RETURN_OBJECT),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.implementation?.instructions?.any {
|
methodDef.implementation?.instructions?.any {
|
||||||
it.opcode.ordinal == Opcode.CONST.ordinal && (it as WideLiteralInstruction).wideLiteral == SettingsResourcePatch.appearanceStringId
|
it.opcode.ordinal == Opcode.CONST.ordinal && (it as WideLiteralInstruction).wideLiteral == SettingsResourcePatch.appearanceStringId
|
||||||
} == true
|
} == true
|
||||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object OnPlaybackSpeedItemClickFingerprint : MethodFingerprint(
|
object OnPlaybackSpeedItemClickFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { it.name == "onItemClick" },
|
customFingerprint = { methodDef, _ -> methodDef.name == "onItemClick" },
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user