Skip to main content
  1. Posts/

How to decompile an APK file

·291 words·2 mins· loading · loading · ·
English Hacking Android E-Mobility
rOger Eisenecher
Author ::..
rOger Eisenecher
> 12 years leading and building a SOC for MSSP • > 20 years working in security • > 40 years working with IT • 100% tech nerd.
Table of Contents
APK Hacking - This article is part of a series.
Part 2: This Article

After successfully downloading the APK archive we have to decompile it in the next step. This article describes this procedure.


The process is basically simple and involves following steps:

  1. Reverse the APK archive with Apktool .
  2. Tool Dex2jar to deal with android .dex and .class files.
  3. JD-GUI is the Java Decompiler to analyse Java “byte code”.

Install those packages if not already done.

Plan B

Unfortunatly I was not able to install those tools; I had to fight with some package issues on my system. Bottom line I was not able to use mentioned tools.

Luckily this process is something also others do so there is also a nice web service where you can upload you APK and download the decompiled files:

javadecompiler after uploading an APK and decompilation is done.

Just uplaod your APK and after some processing time you can download all the decompiled files.

First observations

My goal was initially to find out which web based APIs are used from the application. So after getting the source of the application it is easy to find them with a simple command: grep -ri "https://" . in the corresponding directory. The result? Interesting, see following screenshot:

Here you see all referenced https urls in the application.

And here is an example of the source code as it looks like.

Decompiled source code with corresponding urls.

Key take aways

I checked the application from Swisscharge . Due the analysis of the used urls I was suprised to find out that in the back the application is from Virta .

The other piece which every should be aware of when using applications in general that they do a intensive monitoring of them. One of the famous helper is DataDog .

APK Hacking - This article is part of a series.
Part 2: This Article