Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract app icon from apk file [closed]

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.

like image 640
www.jensolsson.se Avatar asked Sep 28 '12 12:09

www.jensolsson.se


People also ask

How do I extract an app icon?

Getting these icons is very simple. Extract the . apk file (which is the app) using a supported program or app (e.g. Root Explorer on Android, 7zip on Windows) and dig through the folders called drawable-XXXX (e.g. drawable-hdpi) in the /res folder. There you'll have the icons in ready-to-go .

Where are app icons stored in APK?

Icons for Android 2.2 (API level 8) and lower are placed in res/drawable- density / directories. Icons for Android 2.3 to 2.3.7 (API level 9 to 10) are placed in res/drawable- density -v9/ directories. Icons for Android 3 (API level 11) and higher are placed in res/drawable- density -v11/ directories.

Can I unpack an APK file?

From the Google Play Store, copy the URL of the app you want to extract. Next, head to this web tool in your browser and paste the URL. Select “Generate Download Link.” This web app will then automatically extract the APK file and provide you with the relevant link to access it.

How APK files are opened?

Since APK files come in compressed ZIP format, any ZIP decompression tool can open it. So, for viewing the contents of an APK file, all you have to do is rename its extension to . zip and open it. Or, you can open it directly through an open dialogue box of a zip application.


1 Answers

  • Rename the .apk file to .zip
  • Unzip it with a tool like 7zip
  • Find the icons as png files under: /res/drawable-hdpi/icon.png

Edit: Note that this file is not present in all apk files but in most of them. I could not find a better solution besides extracting all .png files and picking one from the list.

like image 90
adrianTNT Avatar answered Sep 23 '22 11:09

adrianTNT