Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top