Extract app icon from apk file

www.jensolsson.se picture www.jensolsson.se · Sep 28, 2012 · Viewed 35.6k times · Source

I am in need of extracting the app icon from an apk-file. I just need one icon, i don't want to extract everything else in the apk. The files are easy to get hold on, but how do I determine which icon file is the correct app-icon. I guess this is stored in the resource table? So I guess what I need is actually to read the resource table and I hope that from the resource table I can determine the icon file namne which I can then extract from the app.

I need a simple tool for this, i know about apktool that can extract the entire apk file but this is not what I want since

  • it does a lof of other stuff that I dont need (decompile, decompress other files etc)

  • it takes a lot of time to run

Is there any other tool I can use just to get hold of the icon file path?

All suggestions are appreciated

EDIT: To clarify, I am not trying to do this on the device. I am trying to do this on a PC.

Answer

user1480400 picture user1480400 · Jan 23, 2013

aapt tool ships with Android SDK, found under platform-tools should give you the details you need. apktool ships with aapt.

aapt d --values badging payload.apk

Using this output, you can extract the icon file out of apk (which is a zip file).