.method public c()Ljava/lang/String;
.locals 3
const/4 v1, 0x0
const-string v0, "wifi"
invoke-virtual {p0, v0}, Lcom/genwen/looltv/start/Appstart;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/wifi/WifiManager;
if-nez v0, :cond_1
move-object v0, v1
:goto_0
if-eqz v0, :cond_2
invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getMacAddress()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
const-string v1, ":"
const-string v2, ""
invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "8c0f"
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
:cond_0
:goto_1
return-object v0
:cond_1
invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;
move-result-object v0
goto :goto_0
:cond_2
move-object v0, v1
goto :goto_1
.end method
這是一個簡單的smali函數,它在從mac地址剝離:後從開始處返回具有'8c0f'的設備的mac地址。如何在smali函數中返回一個靜態結果
我希望它返回一個靜態MAC地址,如'8c0f0f0f0f0f0f0f'不是真正的MAC地址。我怎樣才能做到這一點?
如果這是Java,我遠不如熟悉的語言比我還以爲我是。 – Rainbolt
這不是java。它是小的。當它被反編譯回java時,它看起來更符合邏輯: – user3329615
在java中,它看起來像這樣: http://pastebin.com/yMRngsGb – user3329615