Xamarin Insider

Tutorials, Tips and Insights for Xamarin developers

HowTo

Retrieving assets from an installed APK

Earlier today I was looking through some files, trying to find some assets that I used in an Android app a few months ago.

Normally I would just go straight to the source code, in this case Visual Studio Team Services, but for some long winded reasons that I won’t go into here, I didn’t have access so it wasn’t that easy.

I did, however, have the app installed on my phone.  In this HowTo, I’ll show you how to get at the installed APKs on your device, get them on to your PC and take them apart.

adb.exe

adb.exe, or the Android Debug Bridge, is a command line tool that lets you communicate with an Android device (emulated or physical).

To use adb with a USB connected device, you will need to enable USB Debugging from your devices Developer Options. Now, plug in your phone and “allow USB Debugging” when prompted.

It’s possible that multiple devices are currently attached, so to keep things simple, close down any emulators that you have running and make sure you only have one device attached.

See what apps are installed

Start by opening a command prompt and navigating to the platform-tools folder in the Android SDK:

adb0

I prefer to use Cmdr but any command prompt will do.

Next, let’s use adb to take a look at what apps are installed.  I’ll be looking for a game I wrote when I was learning Xamarin Forms, called Checkpoint.

Transfer the package to your PC

Next, back up the package to your PC using this command:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: