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
:
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:
- Download it from APK Mirror
- 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.
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
- Extract the ZIP somewhere
- Open Asset Studio and open the extracted folder
- Select types of assets you want to dump (filter them)
- 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:
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
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.
Here are the results we got, Texture2D
subfolder used as an example:
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.