问题
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