Skip to content

Conversation

rsanjuan87
Copy link

Get app icon (--get-app-icon)

The --get-app-icon option allows you to extract the icon of one or more installed applications from the Android device.

Syntax

scrcpy --get-app-icon=<packageID>[:path]
  • <packageID>: Required. One or more package IDs, separated by a comma (,) (e.g., com.android.settings,com.android.chrome). If the special value all is used, icons for all installed applications are extracted.
  • [:path]: Optional. Destination path to save the extracted icons.

Path behavior

  • If path is an existing folder, each icon is saved as <packageID>.png inside that folder.
  • If path is an existing file, the extracted icon will overwrite that file, so be careful.
  • If path does not exist, the containing folder is created and the file is named with the last segment of the path (regardless of extension).
  • If path is tmpDir, the files are stored in the user's temporary folder: scrcpy/icons/<deviceId>.

Examples

  • scrcpy --get-app-icon=com.android.settings
  • scrcpy --get-app-icon=com.android.settings:~/icon.png
  • scrcpy --get-app-icon=com.android.settings,com.android.chrome:$HOME/icons/
  • scrcpy --get-app-icon=all:/home/user/all_icons/
  • scrcpy --get-app-icon=com.android.chrome,com.android.settings:tmpDir

Notes

  • If multiple packageIDs are specified, all indicated icons are extracted.
  • For all, the --list-apps functionality is reused to obtain all package IDs and extract their icons.
  • If :path is not specified, icons are saved in the current directory.

Tested on MacOS Tahoe + Xiaomi HyperOS 1.0.12 (Android 13)

@rom1v
Copy link
Collaborator

rom1v commented Sep 11, 2025

Hi,

Thank you for the contribution.

However, I think this feature does not really belong in scrcpy (it could be a separate app to retrieve the icon of an app).

I don't want to add the complexity of extracting, storing, retrieving the icons for a feature which is not really the purpose of scrcpy. It could be useful to retrieve the icons internally to expose it in a client UI if scrcpy had such an UI, but currently it's not the case.

Also refs #5574

@rsanjuan87
Copy link
Author

this is a first step of a internal roadmap to get more gui and behavior to the app
feat: get icon
feat: exit on close PR
feat: launch as app (scrcpy icon and name, exit on close)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants