alesimula / wsa_pacman

A GUI package manager and package installer for Windows Subsystem for Android (WSA)
GNU General Public License v3.0
3.9k stars 838 forks source link

Application icons #38

Closed ShlomoCode closed 2 years ago

ShlomoCode commented 2 years ago

@alesimula Is there a situation where the icons of the apps are real - that is, of the app image, as in file explorers on Android devices? And not everyone is the same, with the PacMan logo ... This will help a lot! Thanks.

alesimula commented 2 years ago

@shlomo-shlomo If you mean showing every app icon in the Windows file explorer instead of the WSA-PacMan logo, that wouldn't be ideal: parsing the apk icon is a relatively CPU/RAM heavy operation, doing for a single apk file at a time is fine, but doing it for every apk on the currently open folder (leaving feasibility aside) would be tremendously heavy

ShlomoCode commented 2 years ago

@alesimula OK, too bad. Do you know any software that knows how to do this? By the way, how on Android devices does it display icons, and even dozens of files at once?

alesimula commented 2 years ago

@shlomo-shlomo I don't know any software that does.

As for Android devices, being apk files a native Android extension, there are certainly libraries written by google that do exactly that and do it very efficiently.

I had to rely on high-level tools like aapt.exe and aapt2.exe to read package information, my modified version of axmldec.exe to decode binary XML files without decompiling the whole apk file, the jovial_svg library to parse vector drawables and my own code to process the XML icons and put it all together. In the end I did manage to make it pretty fast, but it's not as resource efficient as how Google does it