George Garside Blog

A place of many ramblings about macOS and development. If you find something useful on here, it's probably an accident.

When connecting iPhone or iPad to Mac using USB to Lightning, the Finder app will open with iPhone shown for you to sync content and settings with. Want that to stop, or investigate more about AMP devices agent performing the syncing?

What is AMPDevicesAgent?

AMPDevicesAgent in Catalina is a new background daemon in macOS Catalina responsible for synchronisation of iOS devices using Finder. This functionality was split from iTunes in Catalina, and such helper code has been split into different daemons, such as this one. AMPDevicesAgent is located at:

/System/Library/PrivateFrameworks/AMPDevices.framework/Versions/A/Support/AMPDevicesAgent

This agent is not malware but is part of macOS and written by Apple. It works alongside AMPDeviceDiscoveryAgent which performs the discovery of connected devices over Wi-Fi when the relevant option is enabled in the device’s settings in Finder.

AMPDevicesAgent wants to use your confidential information

AMPDevicesAgent wants to use your confidential information stored in “iOS backup” in your keychain. To allow this, enter the login keychain password.

This message is displayed when AMP devices agent in macOS Catalina needs to perform a local backup of your iPhone or iPad. You can grant this permission by entering your keychain password, which by default is the password you use to log into your Mac.

iOS Backup is the password to an encrypted backup of your iPhone iOS device or iPad iPadOS device. To fix the issue and stop the prompt from being displayed, follow the steps below:

  1. Open Keychain Access.app. Find this in /Applications/Utilities (or Spotlight search with cmd-space).
  2. Search for ‘iOS Backup’. You’ll find one or more application passwords in the login keychain.
  3. Double-click on the first password row in the results. An attributes page opens for the password.
  4. Switch to the Access Control tab at the top of the dialog.
  5. Under ‘Always allow access by these applications’, check the box below those words. If ‘AMPDevicesAgent’ is already listed in the box, go to step 9. If not, continue with step 6.
  6. Click the plus (+) button at the bottom-left corner of the window.
  7. Press shift-cmd-g and paste the path:
    /System/Library/PrivateFrameworks/AMPDevices.framework/Versions/A/Support/AMPDevicesAgent
  8. Click the blue Add button at the bottom-right of the window. This adds AMPDevicesAgent to the list of applications allowed to access the iOS backup keychain item.
  9. Close the window. Repeat with any other iOS backup items in the list.

AMPDevicesAgent CPU

AMPDevicesAgent high CPU up to 100% of total or 200% in Activity Monitor can be caused by an iOS sync in progress. This might not be immediately apparent, since synchronisation with an iPhone can happen in the background, wirelessly. This is perfectly normal and AMPDevicesAgent CPU will decrease after the sync or backup has concluded.

You can either disable automatic synchronisation always or just disable wireless background sync. See the next section for detailed instructions.

Remove iPhone from Finder sidebar

Choose the device in the sidebar and untick ‘Show this iPhone when on Wi-Fi’.

Finder show this iPhone when on Wi-Fi

This will hide the device in the sidebar when not connected to your computer over USB: when the device is on the same Wi-Fi network as your Mac. This won’t hide the iPhone in all cases.

All connected iOS devices will be shown in Finder sidebar when connected via a USB to Lightning cable. If your device is connected with USB, you’ll need to disconnect it to remove it from the sidebar. Alternatively, you can remove all iOS devices from Finder sidebar by going to Finder Preferences (cmd-,) and deselecting ‘CDs, DVDs and iOS Devices’ from the Sidebar tab.

Stop Finder automatically opening

You can disable this by running the following command in Terminal.

defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool true

This sets a user preference on the com.apple.AMPDevicesAgent.plist preference list to disable AMPDevicesAgent from automatically syncing iOS devices, which stops Finder automatically opening when connecting such a device. You need to log out and back in for the change to take effect.

To undo the change, delete the preference:

defaults delete com.apple.AMPDevicesAgent

If you only need to disable AMPDevicesAgent temporarily, you can send the process the STOP signal instead:

pkill --signal SIGSTOP AMPDeviceDiscoveryAgent

What does the defaults write command do?

The command given at the top of this post uses the defaults command line tool to set (write) a value to a preference list. Preferences are stored in ~/Library/Preferences. This preference is then read when AMPDevicesAgent is loaded by macOS and changes its behaviour.

Disable iPhone syncing in Finder

You can disable all iPhone management in Finder by setting the ignore-devices preference. This will remove the ability to configure iOS devices in Finder, requiring the use of third-party tools. This is not recommended unless you are familiar with such tools or do not use a computer to manage your device.

defaults write -g ignore-devices -bool true

# undo
defaults delete -g ignore-devices

Leave a Reply

0 ZJ’s avatar

defaults delete -g ignore-devices -bool false

This command is not working for me. Command syntax is incorrect

Reply