如何在Smali中将iput-object布尔值设置为true?

时间:2019-05-12 21:48:24

标签: java android boolean apk smali

我正在尝试编辑(合法)拥有的反编译Android APK的smali文件。我不知道如何使此布尔值始终为真:

.method public setValid(Ljava/lang/Boolean;)V
    .locals 0

    .line 34
    iput-object p1, p0, Ltr/net/tbc/api/entity/GoalValidity;->valid:Ljava/lang/Boolean;

    return-void
.end method

和/或这个:

.method public getValid()Ljava/lang/Boolean;
    .locals 1

    .line 30
    iget-object v0, p0, Ltr/net/tbc/api/entity/GoalValidity;->valid:Ljava/lang/Boolean;

    return-object v0
.end method

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

在iput-object指令之前放置"initially" actualWord := 'phlebotomy'. actualMask := actualWord collect: [:ch| $?]. "after each guess" word := actualWord readStream. mask := actualMask readStream. newMask := WriteStream on: String new. [ word atEnd ] whileFalse: [ nextCh := word next = guessedCharcter ifTrue: [mask skip. guessedCharacter] ifFalse: [mask next]. newMask nextPut: nextCh ]. actualMask := newMask contents

或者,将iget-object指令替换为sget-object p1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;