Smali
Smali is an assembler for the Dalvik Virtual Machine (DVM) bytecode used by Android applications.
Smali code can be useful to modify android applications after it has been decompiled, you cant's change the android application by only changing Java code after decompiling the APK file. when recompiling the APK it will only depeneds on the Smali code not the Java code
Logcat using smali :
const-string v0, "MyTag"
new-instance v1, Ljava/lang/String;
const-string v2, "utf-8"
invoke-direct {v1, p2, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const-string v0, "MyTag"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
\\ the v0 contains the "MyTag" string and the v1 is the string you want to it
\\ to be printed in the logs of mobile
This command in smali will print the string in v1 variable in the log of the android mobile system
Dalvik opcodes : http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html
Last updated