feat(kakaotalk): Add additional opcodes to GhostModeFingerprint for enhanced functionality
For support 25.4.1
This commit is contained in:
@ -244,6 +244,10 @@ public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
|
||||
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/kakaotalk/ads/RemoveBizBoardPatchKt {
|
||||
public static final fun getRemoveBizBoardPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/kakaotalk/changemodel/ChangeModelPatchKt {
|
||||
public static final fun getChangeModelPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
package app.revanced.patches.kakaotalk.ads
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.kakaotalk.ads.fingerprints.removeBizBoardFingerprint
|
||||
|
||||
@Suppress("unused")
|
||||
val removeBizBoardPatch = bytecodePatch(
|
||||
name = "Remove BizBoard ads",
|
||||
description = "Removes the BizBoard ad by forcing its dimensions to 0x0 and visibility to GONE in onMeasure.",
|
||||
) {
|
||||
compatibleWith("com.kakao.talk"("25.4.1"))
|
||||
|
||||
execute {
|
||||
val method = removeBizBoardFingerprint.method
|
||||
|
||||
method.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x0
|
||||
const/4 v1, 0x0
|
||||
invoke-virtual {p0, v0, v1}, Landroid/widget/FrameLayout;->setMeasuredDimension(II)V
|
||||
|
||||
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getVisibility()I
|
||||
move-result v0
|
||||
|
||||
const/16 v1, 0x8
|
||||
|
||||
if-eq v0, v1, :skip_set_visibility
|
||||
|
||||
invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V
|
||||
|
||||
:skip_set_visibility
|
||||
|
||||
return-void
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package app.revanced.patches.kakaotalk.ads.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val removeBizBoardFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returns("V")
|
||||
parameters("I", "I")
|
||||
opcodes(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.INT_TO_FLOAT,
|
||||
Opcode.CONST,
|
||||
Opcode.MUL_FLOAT_2ADDR,
|
||||
Opcode.FLOAT_TO_INT,
|
||||
Opcode.IGET,
|
||||
Opcode.IF_LE,
|
||||
Opcode.MOVE,
|
||||
Opcode.CONST_HIGH16,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.INVOKE_SUPER,
|
||||
Opcode.RETURN_VOID
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user