Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where application icons are stored in an Android device?

Just out of curiosity, I wanted to know where on the file system of an Android device the application icons are stored.

Like I have shortcuts to various applications on the homescreen of my device, where those icons files (or images) are stored. Is it only inside the application package (.apk) or Android stores it some where else?

If it is in application package only does Android loads all the imagess from each of the apk and loads it when it is started for the first time?

like image 938
Mayank Avatar asked Oct 21 '22 08:10

Mayank


1 Answers

When an app file is installed, the .apk file is analyzed and various items of information are extracted by the launcher. (This process does not involve loading and running the app itself.) Among these items is the app icon, which the launcher typically caches in its own private area. Exactly how this is done depends on the launcher currently active on your device. You might be able to browse through the source for your launcher to find out more details about how it caches these items extracted from the app .apk files, but I'm not sure what practical use there would be to that exercise.

The launcher's use of its own cache greatly speeds up start-up, as otherwise every installed app would have to be scanned at every reboot to extract the requisite information for the launcher to show itself. However, the cache is the source of occasional problems, such as the icon not updating right away when an updated app (with a new icon and possibly a new app name) is installed. (See, for example, this thread and this one.)

like image 102
Ted Hopp Avatar answered Oct 23 '22 08:10

Ted Hopp