Decoding APK for Source Code and Assets

Aaron Lin

Aaron Lin

March 28, 2020

2 min read

Prerequisites

#
  • Java - should be able to run java -version in your terminal
  • Apktool
  • Android device
  • Cloud based storage - OneDrive, Dropbox, Google Drive

Tutorial

#

This a quick guide on how to grab assets from an APK folder.
I'll be using a physical Android device for this guide

1 Follow the steps for this page to get Apktool downloaded. Keep this jar file and bat file if you're using Windows in a folder. We'll get back to this later.

2 Download the app from Google Playstore you want to decode assets from. For this guide, I'll be using Fire Emblem Heroes as an example.

3 Go search under your apps - Files

4 Under Installed apps, click on the arrow button next to the app you want to export the APK file and select Share

5 In my case, transfer the file over to Dropbox

6 Once the file transfer is complete, move the file to the folder where you downloaded the apktool

7 Run the following command java -jar apktool.jar d <apk_name>. In this case, it would be java -jar apktool.jar d feh.apk If you are using Windows, you can run apktool.bat d <apk_name>

8 The outputted folder should have the assets you want but under .bin.lz format

9 The following steps are specific for this apk. .bin.lz are xor encrytpted lz77 files. We can use FEHDataExtractor to grab the internal data

{
Developed by Aaron Lin
}

Built with Next.js and Chakra UI