Converting Android icon packs to icon themes

Downloading the icon pack
To use icons in Linux system one has to obtain them either bundled in .apk installation package or as separate images. Possible sources are:


 * 1) Application stores (Note that some application store clients - such as the official application of Google Play Store - do not save .apk files in storage to be accessed by user. In this case it is recommended to use other stores or third-party clients/frontends);
 * 2) Forums (e.g. XDA);
 * 3) Icon pack's repository.

Getting the icons
First of all, it is needed to find the directory which contains the icons. To do that, one has to check the list of files in the apk file first. It can be done with either an archiver application (e.g. xarchiver) or via command line.

Example:

where  means zipinfo mode and   sets the verbosity level.

Icons are most likely to be stored at one of  folders or in.

If there are multiple folders with icons, extract the icons with needed dpi. Here is the list of folders from highest to lowest dpi:

If not there, icons may be located at  which is for density-independent resources.

When the folder was found, one can do something like

This command extracts all files from  to directory named. If this directory doesn't exist, it is created.

Creating a theme
Icon themes can be located in  and   and consist of   file, which describes the theme, and directories with icons.

The basic  contents are as follows: [Icon Theme] Name=Icon Theme Name Comment=Detailed icon theme description goes here Directories=48x48/apps,scalable/apps

[scalable/apps] Size=48 Type=Scalable MinSize=1 MaxSize=256 Context=Applications

[48x48/apps] Size=48 Type=Fixed Context=Applications

key accepts the list of subdirectories separated by commas as value. There must be a section for every listed subdirectory. The subdirectories are checked from left to right. So, in this example, an icon from 48x48/apps is used if 48x48 icon is needed. If the size differs, a scalable icon is used instead.

Refer to the latest icon theme specification for example and detailed documentation.

To pick a proper filename for an icon, one should check the .desktop file of the related program in one of the directories

Example: for this desktop file [Desktop Entry] Name=random.txt Exec=gedit /home/user/random.txt Icon=gedit

icon name must be,   or. It is possible to use symlinks to reuse the same icon for multiple programs.