mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-10 21:26:17 +00:00
feat(IdAustria - Remove device integrity check): Update patch to work with latest version (#6360)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@@ -268,6 +268,10 @@ public final class app/revanced/patches/iconpackstudio/misc/pro/UnlockProPatchKt
|
|||||||
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getUnlockProPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/idaustria/detection/deviceintegrity/RemoveDeviceIntegrityChecksPatchKt {
|
||||||
|
public static final fun getRemoveDeviceIntegrityChecksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/idaustria/detection/root/RootDetectionPatchKt {
|
public final class app/revanced/patches/idaustria/detection/root/RootDetectionPatchKt {
|
||||||
public static final fun getRootDetectionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getRootDetectionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.deviceintegrity
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
internal val isDeviceBootloaderOpenFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC)
|
||||||
|
returns("Ljava/lang/Object;")
|
||||||
|
custom { method, classDef ->
|
||||||
|
method.name == "isDeviceBootloaderOpen" &&
|
||||||
|
classDef.endsWith("/DeviceIntegrityCheckProviderImpl;")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val isDeviceRootedFingerprint = fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC)
|
||||||
|
returns("Z")
|
||||||
|
custom { method, classDef ->
|
||||||
|
method.name == "isDeviceRooted" &&
|
||||||
|
classDef.endsWith("/DeviceIntegrityCheckProviderImpl;")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.deviceintegrity
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.util.returnEarly
|
||||||
|
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val removeDeviceIntegrityChecksPatch = bytecodePatch(
|
||||||
|
name = "Remove device integrity checks",
|
||||||
|
description = "Removes the check for root permissions and unlocked bootloader.",
|
||||||
|
) {
|
||||||
|
compatibleWith("at.gv.oe.app")
|
||||||
|
|
||||||
|
execute {
|
||||||
|
isDeviceRootedFingerprint.method.returnEarly(false)
|
||||||
|
|
||||||
|
isDeviceBootloaderOpenFingerprint.method.apply {
|
||||||
|
addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x0
|
||||||
|
invoke-static { v0 }, Lkotlin/coroutines/jvm/internal/Boxing;->boxBoolean(Z)Ljava/lang/Boolean;
|
||||||
|
move-result-object v0
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
|
|
||||||
internal val attestationSupportedCheckFingerprint = fingerprint {
|
|
||||||
accessFlags(AccessFlags.PUBLIC)
|
|
||||||
returns("V")
|
|
||||||
custom { method, classDef ->
|
|
||||||
method.name == "attestationSupportCheck" &&
|
|
||||||
classDef.endsWith("/DeviceIntegrityCheck;")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal val bootloaderCheckFingerprint = fingerprint {
|
|
||||||
accessFlags(AccessFlags.PUBLIC)
|
|
||||||
returns("Z")
|
|
||||||
custom { method, classDef ->
|
|
||||||
method.name == "bootloaderCheck" &&
|
|
||||||
classDef.endsWith("/DeviceIntegrityCheck;")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal val rootCheckFingerprint = fingerprint {
|
|
||||||
accessFlags(AccessFlags.PUBLIC)
|
|
||||||
returns("V")
|
|
||||||
custom { method, classDef ->
|
|
||||||
method.name == "rootCheck" &&
|
|
||||||
classDef.endsWith("/DeviceIntegrityCheck;")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,10 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root
|
package app.revanced.patches.idaustria.detection.root
|
||||||
|
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
import app.revanced.patches.shared.PATCH_DESCRIPTION_REMOVE_ROOT_DETECTION
|
import app.revanced.patches.idaustria.detection.deviceintegrity.removeDeviceIntegrityChecksPatch
|
||||||
import app.revanced.patches.shared.PATCH_NAME_REMOVE_ROOT_DETECTION
|
|
||||||
import app.revanced.util.returnEarly
|
|
||||||
|
|
||||||
|
@Deprecated("Patch was superseded", ReplaceWith("removeDeviceIntegrityChecksPatch"))
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val rootDetectionPatch = bytecodePatch(
|
val rootDetectionPatch = bytecodePatch {
|
||||||
name = PATCH_NAME_REMOVE_ROOT_DETECTION,
|
dependsOn(removeDeviceIntegrityChecksPatch)
|
||||||
description = PATCH_DESCRIPTION_REMOVE_ROOT_DETECTION
|
|
||||||
) {
|
|
||||||
compatibleWith("at.gv.oe.app")
|
|
||||||
|
|
||||||
execute {
|
|
||||||
setOf(
|
|
||||||
attestationSupportedCheckFingerprint,
|
|
||||||
bootloaderCheckFingerprint,
|
|
||||||
rootCheckFingerprint,
|
|
||||||
).forEach { it.method.returnEarly(true) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user