title: Modifying existing methods in Smali
body: <p>I've been looking at a simple method in smali (coming from Android here), and any I was wondering how I'd do something simple to it, such as return false. I've been trying to understand it from comparing with the Java counterparts to some examples and I think I get how most of it works, but any changes I make don't seem to go well.</p>
  
  <p>Currently, in Java the method is:</p>
  
  <pre><code>public static boolean isEnabled(){
      return com.example.test.isEnabled();
  }
  </code></pre>
  
  <p>and in smali it's:</p>
  
  <pre><code>.method public static isEnabled()Z
      .registers 1
  
      .prologue
      .line 3714
      invoke-static {}, Lcom/example/test;-&gt;isEnabled()Z
  
      move-result v0
  
      return v0
  .end method
  </code></pre>
  
  <p>In the context above, how would I modify the method to just do the equivalent of Java <code>return false;</code>? From what I've been able to see, <code>0x0</code> is false, but just returning that causing issue when compiling the smali (expecting REGISTER?) so I was wondering what exactly I'd need to do. </p>
  
  <p>A solution, as well as an explanation, would be appreciated! It's not for anything in particular, I just like to look at this stuff.</p>