mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-29 09:15:48 +01:00
feat(id-austria): remove-root-detection
patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
355a847b1c
commit
3cf77cdb4e
@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
access = AccessFlags.PUBLIC.value,
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
|
}
|
||||||
|
)
|
@ -0,0 +1,25 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.root.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.*
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
|
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("remove-root-detection")
|
||||||
|
@Description("Removes the check for root permissions and unlocked bootloader.")
|
||||||
|
@DetectionCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class RootDetectionPatch : BytecodePatch(
|
||||||
|
listOf(RootDetectionFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
RootDetectionFingerprint.result!!.mutableMethod.addInstructions(0, "return-void")
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.shared.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("at.gv.oe.app", arrayOf("2.5.2"))])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class DetectionCompatibility
|
@ -7,12 +7,13 @@ import app.revanced.patcher.patch.BytecodePatch
|
|||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
||||||
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("spoof-signature")
|
@Name("spoof-signature")
|
||||||
@Description("Spoofs the signature of the app.")
|
@Description("Spoofs the signature of the app.")
|
||||||
@Compatibility([Package("at.gv.oe.app", arrayOf("2.5.2"))])
|
@DetectionCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SpoofSignaturePatch : BytecodePatch(
|
class SpoofSignaturePatch : BytecodePatch(
|
||||||
listOf(SpoofSignatureFingerprint)
|
listOf(SpoofSignatureFingerprint)
|
||||||
|
Loading…
Reference in New Issue
Block a user