Smali if structure modification

こ雲淡風輕ζ 提交于 2019-12-11 21:06:41

问题


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){
.....
}

convert to:

    if(true){
    ...
    }

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.


回答1:


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").

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.



来源:https://stackoverflow.com/questions/17002419/smali-if-structure-modification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!