Smali如果结构修改 [英] Smali if structure modification

查看:142
本文介绍了Smali如果结构修改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要修改从smali代码到条件的if语句为真,在java中可能是这样的:

i need to modify "if statements" from smali codes to the condition will be true, in java could be something like that:

if(a > b){
.....
}

转换为:

    if(true){
    ...
    }

如果可以在smali代码中执行吗?并且有人知道如何在smali代码中修改这个结构?
非常感谢。

If is it possible to do in smali code? And have anyone idea that how should will modify this structure in smali code? Thanks a lot.

推荐答案

在dalvik字节码中,if语句将表示为某种条件跳转。在这种情况下,可能是 if-le 指令(如果小于或等于的缩写)。

In the dalvik bytecode, the if statement will be represented as some sort of conditional jump. In this case, likely an if-le instruction (short for "if less than or equal to").

完成此操作的最简单方法是注释掉/删除 if-le 指令,以便之前有条件跳过的指令将始终执行。

The easiest way to accomplish this would be to comment out/remove the if-le instruction, so that the instructions it previously would have conditionally jumped over will always be executed instead.

这篇关于Smali如果结构修改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆