Post Reply

[APP][2.3+] Tool - App Icon Detective

OP Dark3n

21st June 2014, 07:57 PM   |  #1  
Dark3n's Avatar
OP Recognized Developer
Thanks Meter: 2,270
 
2,014 posts
Join Date:Joined: Sep 2007
What?
A small tool that asks every installed app for its icon and compares the returned with the icon it would expect for that type of display.

Why?
Android has a system of specific folders relating to different display densities (ldpi,mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi).
Also see Android Iconograhy.
Android tries to pick the best possible resource out of those folders.
If one resource for a specific density is missing it will pick the closest one and scale it up/down.

Example:
A dev puts the Google Play highres (512x512) version of his app icon that is normally for the web,
in the folder (inside the apk) "drawable" (which is treated as mdpi, i.e. 48x48dp for the launcher icon).
The user opens this app on his Nexus5 (which has a screen density of type xxhdpi [factor 3.0 of mdpi] by default).
Android only finds the app icon in the folder "drawable" and scales it up to match the xxhdpi density used on the Nexus5.
This means that the resulting image that gets returned is 512px x 512px scaled up by 3.0, so a 1536px x 1536px image.
(Thats huge in comparison to the 144px x 144px it expected).

Okay, but why?
It's an interesting issue i wanted to look into.
If your App or ROM or Mod or Plugin or WhatEver is not prepared for this it may crash. (Usually due to running out of memory)
If you suspect it could be the cause for a mysterious crash you are experiencing, you can use this app to check for stuff out of the ordinary.
A logcat would have shown "OutOfMemory" exception while mentioning image/appicon related methods in the stacktrace.
(Will post an example when i find one).

How do i interpret the results?
Look at the % displayed in the corner of each row and the color code.
I wouldn't worry about an icon that is ~400% of the expected size, there's room for improvement but its not critical.
But if you get an app with an icon 11377% of the expected size such as in my screenshot, that's a pretty hefty difference.
You could send the dev mail asking him politely if he could check it out.
No one does it with malicious intent, sorting in the drawables in the correct folders is a PITA and you don't notice it later on.

The sourcecode for this app is available on Github.

Screenshot:
Click image for larger version

Name:	2014-06-21 18.21.06.jpg
Views:	342
Size:	205.9 KB
ID:	2810592
Attached Files
File Type: apk AppIconDetective_v1.0_(1).apk - [Click for QR Code] (885.1 KB, 230 views)
Last edited by Dark3n; 21st June 2014 at 08:02 PM.
The Following 4 Users Say Thank You to Dark3n For This Useful Post: [ View ]
21st June 2014, 07:58 PM   |  #2  
Dark3n's Avatar
OP Recognized Developer
Thanks Meter: 2,270
 
2,014 posts
Join Date:Joined: Sep 2007
The whole dpi stuff is very confusing, if I'm wrong with my explanation please let me know.
Maybe another dev or themer is more familiar with the topic and can shed more insight into the issue.
25th June 2014, 11:33 AM   |  #3  
Vagelis1608's Avatar
Senior Member
Flag Athens
Thanks Meter: 128
 
615 posts
Join Date:Joined: Sep 2012
More
Very cool app.
And usefull.

PS: Why is your SystemUI at 2422% ?
EDIT: Mine is too. I don't get it. Someone please explain it to me.

Sent from my D620R [Stock 4.4.2]
25th June 2014, 11:58 AM   |  #4  
Senior Member
Thanks Meter: 638
 
224 posts
Join Date:Joined: Jan 2010
More
Great tool for developers
25th June 2014, 12:51 PM   |  #5  
Dark3n's Avatar
OP Recognized Developer
Thanks Meter: 2,270
 
2,014 posts
Join Date:Joined: Sep 2007
Quote:
Originally Posted by Vagelis1608

Very cool app.
And usefull.

PS: Why is your SystemUI at 2422% ?
EDIT: Mine is too. I don't get it. Someone please explain it to me.

Sent from my D620R [Stock 4.4.2]

I think thats where Google tried to "efficiently store" the KitKat logo.
If you go into System->Settings and tab the Android version a lot, there will be an animation and a graphic and that graphic is the huge one that's also the SystemUI icon.
Attached Thumbnails
Click image for larger version

Name:	2014-06-25 11.50.31.png
Views:	49
Size:	70.9 KB
ID:	2816759  
The Following User Says Thank You to Dark3n For This Useful Post: [ View ]
25th June 2014, 02:32 PM   |  #6  
Vagelis1608's Avatar
Senior Member
Flag Athens
Thanks Meter: 128
 
615 posts
Join Date:Joined: Sep 2012
More
Quote:
Originally Posted by Dark3n

I think thats where Google tried to "efficiently store" the KitKat logo.
If you go into System->Settings and tab the Android version a lot, there will be an animation and a graphic and that graphic is the huge one that's also the SystemUI icon.

So, the only reason your SystemUI is at 2422% and mine at 9k + something (lol) is because of that one image?

And by the way, I know about the "Easter Egg"

Sent from my D620R [Stock 4.4.2]
25th June 2014, 03:39 PM   |  #7  
Dark3n's Avatar
OP Recognized Developer
Thanks Meter: 2,270
 
2,014 posts
Join Date:Joined: Sep 2007
Quote:
Originally Posted by Vagelis1608

So, the only reason your SystemUI is at 2422% and mine at 9k + something (lol) is because of that one image?

And by the way, I know about the "Easter Egg"

Sent from my D620R [Stock 4.4.2]

Yeah I think so, because they used the same image as icon.

Sent from my Nexus 5 using XDA Premium 4 mobile app
The Following User Says Thank You to Dark3n For This Useful Post: [ View ]
10th July 2014, 12:09 PM   |  #8  
debernardis's Avatar
Senior Member
Flag Acireale, Sicily
Thanks Meter: 117
 
449 posts
Join Date:Joined: Jun 2011
Here are my red results (3 pics)

Galaxy Note 2, 4.1.2 stock firmware, n.e.a.k. kernel, xposed framework



Sent from my GT-N7100 using XDA Premium 4 mobile app
Attached Thumbnails
Click image for larger version

Name:	1404990506288.jpg
Views:	36
Size:	95.2 KB
ID:	2843737   Click image for larger version

Name:	1404990525274.jpg
Views:	38
Size:	90.1 KB
ID:	2843738   Click image for larger version

Name:	1404990542165.jpg
Views:	37
Size:	81.9 KB
ID:	2843740  
Last edited by debernardis; 10th July 2014 at 12:17 PM.

The Following User Says Thank You to debernardis For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
dpi, drawable, icon, resolution, tool
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Apps and Games by ThreadRank