Skip to content

Instantly share code, notes, and snippets.

@aknik
Last active June 9, 2018 18:57
Show Gist options
  • Select an option

  • Save aknik/088aed3d725ee66cbed6baf83e32c1da to your computer and use it in GitHub Desktop.

Select an option

Save aknik/088aed3d725ee66cbed6baf83e32c1da to your computer and use it in GitHub Desktop.

Revisions

  1. Aknik revised this gist Jun 9, 2018. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,8 @@
    you can use the following smali code. It will call Thread.dumpStack() which logs the current thread's call stack.

    invoke-static {}, Ljava/lang/Thread;->dumpStack()V

    ---------------------------------------------------------------------------------------

    apktool d -r -s mod.apk #Extrae classes.dex
    d2j-dex2jar mod/classes.dex #Decompila
    java -jar /opt/jd-gui/jd-gui-1.4.0.jar #Visualiza el codigo java
  2. Aknik created this gist Jun 9, 2018.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    If you need to know the value of a string - e.g. a parameter -
    you can use Log.d(String tag, String message) to log it to the system log.

    const-string/jumbo v0, "YourTag"
    invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I



    If you are having trouble navigating the smali code and understand the flow of an app
    you can use the following smali code. It will call Thread.dumpStack() which logs the current thread's call stack.

    invoke-static {}, Ljava/lang/Thread;->dumpStack()V