Case Study: Reverse Engineering Protection test with Appwatermark


Today we will try to “hack” our protected APK file using very popular reverse engineering tool – ApkTools.

It will very be a very simple task – we will just decompile and build our apk again, without editing or injecting anything.

So, all we need is love ApkTool and command line.

And some basic additional software:

  • Java SDK and JRE
  • Android SDK
  • Jarsigner tool

You can download the latest ApkTool here. Use the version suitable for your operating system. We will show you how to do the job using Windows OS.

Download Java SDK and JRE – here:
Java JDK and JRE

Download Android SDK – here:
 Android SDK

Now the showtime.

Use the APK tool to decompile our protected APK:

  • Open command prompt
  • Navigate to the folder where you placed apktool.jar
  • Type the following command:
    apktool d name-of-the-app.apk
  • Wait for a while. After the app is correctly decompiled, a new folder will be created in the same folder where you placed your app. This contains all the xml’s and smali files. Folder name is the same as apk file.
  • Now we need to recompile our APK. To recompile the app use the following command “B”. The “b” simply means “build”:
    apktool b name-of-the-app-folder -o output-apk-file-name.apk
  • If everything is fine – you’ll find new builded apk in your folder.
  • Now sign this APK using jarsigner:
    jarsigner -verbose -keystore name-of-the-key.keystore output-apk-file-name.apk key-alias
    After running it prompt for key password. Enter it and hit Enter key.

Now, install this APK to your phone and launch it.\

If will crash, just like any other modified/reverse engineered/injected app.

Share This!

Leave a Reply

Your email address will not be published. Required fields are marked *