Smali syntax for String

168 views Asked by At

Is there a website to learn smali syntax ?

I don't understand anything, I can't even affect a String !

Original code :

sget-object v1, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

I want to put "samsung" in v1

sget-object v1, "samsung":Ljava/lang/String; -> error
sget-object v1, "samsung"; -> error
v1 = "samsung"; -> error
1

There are 1 answers

0
Robert On

The DEX command sget-object is for loading a value from a static field of a class:

Perform the identified object static field operation with the identified static field, loading or storing into the value register. 1

If you want to load a string constant into a register you can simply write

const-string v1, "samsung"