idb icon indicating copy to clipboard operation
idb copied to clipboard

[Request] Support app icon PNG data command

Open JJdeGroot opened this issue 1 year ago • 4 comments

Description

I would like to submit a feature request to support the retrieval of app icons.

Solution

In file: FBSpringboardServicesClient.m add method getAppIcon:(NSString *)bundleId

Command:

[self.connection sendAndReceiveMessage:@{@"command": @"getIconPNGData", @"bundleId": bundleId, @"formatVersion": @"2"} error:error];

This command should return the icon PNG data for the app with the specified bundle id.

In file: app.py add class AppIconCommand(ClientCommand) with name --app-icon, taking bundle-id as argument.

Extra: expand AppListCommand with argument --icons to retrieve icons for each app.

I've tried adding this myself, but can't manage to get the companion project to compile.

JJdeGroot avatar Sep 26 '23 12:09 JJdeGroot

you can use following cmd get app location

xcrun simctl get_app_container${device_id} ${bundle_id} app

and find icon in the app container.

answer-huang avatar Sep 28 '23 09:09 answer-huang

@answer-huang this only works for iOS simulators.

For iOS 17+ we now have devicectl, but the app icon command seems to be broken: https://developer.apple.com/forums/thread/738793

JJdeGroot avatar Nov 21 '23 15:11 JJdeGroot

@answer-huang this only works for iOS simulators.

For iOS 17+ we now have devicectl, but the app icon command seems to be broken: https://developer.apple.com/forums/thread/738793

@JJdeGroot devicectl works fine in my computer with:

MacOS: 14.0 iPhone: 17.0.3 Xcode: 15.0

answer-huang avatar Nov 22 '23 09:11 answer-huang

@answer-huang yeah devicectl works fine, just the app icon command was broken before macOS 14.x - but works now.

JJdeGroot avatar Nov 24 '23 10:11 JJdeGroot