Apktool is a tool for reverse engineering Android apps.

v2.9.0 has been released with Android 14 support, aapt2 as a default and a new resource modes flag.

Via t.me/mishaalandroidnews

  • spicycape
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Well I’m not acquainted with Apk tool, but I understand a bit about reverse engineering, so I went on their github page to read about it.

    Essentially, an android application is packaged under the .APK extension which lets you install and run the application on your phone. This is akin to a software with the .exe extension on windows. An .apk or .exe is a bunch of compiled code and ressources, this means that in this form, the code is mostly a bunch of mumbo jumbo that no one can understand or make edit to.

    By reverse engineering, you transform the .apk to it’s initial state before compilation, the code is now organised, readable, and editable. This allows you to understand what is going on under hood and add new code and functionnalities. If you decide to edit the code, you can package/compile this extended application into a new .APK and enjoy additionnal features in the application.

    Note that reverse engineering will not get you an exact copy of the code and file structures the original developper created, it is (in general) an approximation. Depending on the decompiler, you can lose variables names, function names…etc, but the code will work fine.

    For an example

    If the original developper had this function. private String getAge(String userId) { String age = this.users.get(userId); return age; }

    Decompiling might get you :

    private String getAge(String var1) { String var2 = this.var3.get(var1); return var2; }

    You get the code, but it’s harder to understand than if you had the original code. So reverse engineering / decompiling is useful in some use cases, but not always a miracle.

    • Aux@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      1 year ago

      Apktool doesn’t decompile the code back into Java, it simply unpacks APK files. You then need a separate decompiler to check the source code.