Home » OS » Android » Extract Assets from Android Unity Apps

How to extract Assets from android apps – Unity Engine

Introduction

These days, most Android, iOS are built with Unity. As one would expect, Unity unified the development platform, allowing developers to build once and easily deploy at a various platforms.

Today, we’re gonna show you how to extract textures, sprites, audio files, shaders, text and other visual elements from a Unity application. For this we’ll be using PG Sharp Game, as it’s a very popular mod of Pokemon GO game which is written in Unity. The process is similar for every other Unity application or game, with a few tweaks here and there.

Prerequisites

This guide makes a few assumptions about your knowledge and tools. You will need the following to follow along with the guide:

  • 8GB Ram and good CPU is also recommended, as the extraction process can take some time, mostly depending on your hard drive and CPU speed.
  • WinRar or any other ZIP file extractor. Android applications are ZIP file disguised as  APK files. In order to inspect their content, you will need to extract them.

Render an animation as video in Blender.

Step 1 – Downloading extraction tools

In order to start extracting, you will need at least one Unity Asset extraction tool.These tools will allow you to dump assets with ease and they don’t require any coding skills.

There are two tools which we recommend using:

  • Recommended: AssetStudio by Prefare,a GUI based tool that allows you to filter which type(s) of assets you want to export. Asset Studio is very straightforward and perfect for beginners.
  • Unity Asset Bundle Extractor is a lower level tool that can even manipulate Unity bundles. Useful for advanced data miners and readers who want to mess around with loading custom skins and color schemes.

Head over to Asset Studio’s Releases section on Github and grab the latest release from there. Asset Studio doesn’t require any installation. You can extract the downloaded ZIP file anywhere and start the Studio by opening AssetStudioGUI.exe:

PG Sharp Game extracted folder
Asset Studio GUI, nothing opened yet.
Asset Studio GUI, nothing opened yet.

Step 2 – Getting and extracting the APK

APK files are packages used for distributing Android applications. APK files contain everything needed to start the application and they often contain a ton of visual assets. As mentioned before, we will be using Pokemon GO as a model Unity app in this tutorial

You can get the latest Pokemon GO APK in one of two ways:

  1. Download it from APK Mirror
  2. Extract it from your device by using APK Extractor

The easiest way is to download it from APK mirror. Grab the latest APK from APK Mirror, head over to your Downloads folder and open the APK with 7-Zip. Extract the contents into a sub-folder and navigate into it.

File contents of the PG Sharp APK include various Android and Unity files. We are mostly interested in the assets folder. Future guides will target classes.dex and other hidden gems.

We could go on and on about the files and folders inside the APK, but let’s focus on the task at hand: dumping assets.

Step 3 – Extracting the assets

TLDR

  1. Extract the ZIP somewhere
  2. Open Asset Studio and open the extracted folder
  3. Select types of assets you want to dump (filter them)
  4. Press Export > Filtered assets

We are now ready to explore and dump the assets. Switch over to Asset Studio and follow the instructions below:

  • Click File > Load Folder
  • Navigate to the folder where you extracted Pokemon GO
  • Select assets and click Select Folder
  • Let Asset Studio do it’s magic

Once the process completes, you should see the following screen:

Asset Studio has finished parsing the folder and is now ready to export.
Asset Studio has finished parsing the folder and is now ready to export.

Switch over to the Asset List tab. These are all of the files you can export from the APK. As you can notice, some of them are Texture2D, some are sprites, some are TextAssets etc.

Before exporting select which files you want to dump. The easiest way to do that is to filter the Asset List by using the Filter Type dropdown from the menu bar. Open the Filter Type dropdown and select the following:

  • Animation Clip
  • Animator
  • AudioClip
  • Sprite
  • Shader
  • Texture2D
Asset Studio Selecting the File Type Filter
Asset Studio Selecting the File Type Filter

In order to start the export process, click on the Export dropdown and select Filtered assets. Select a folder where you want to save the exported files. Let Asset Studio chew through your filtered files. The destination folder will automatically open when the process is done.

Asset Studio exporting the selected filtered assets
Asset Studio exporting the selected filtered assets

Here are the results we got, Texture2D subfolder used as an example:

Texture2D from Pokemon GO were dumped inside the /Texture2D subfolder. Sprites, text assets and sounds were dumped in other subfolders.

Parting words

This article covers the simple way of extracting assets from Unity Games and apps. You can use this process for a wide variety of games and apps on mobile and the PC.

If you have any query regarding to this article you can ask through comment section.

Leave a Reply

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