AMPDevicesAgent helps with synchronisation of iOS devices, but can also be the cause of many errors and high CPU usage. What is AMPDevicesAgent and why do you need it?
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:
- Open Keychain Access.app. Find this in /Applications/Utilities (or Spotlight search with cmd-space).
- Search for ‘iOS Backup’. You’ll find one or more application passwords in the login keychain.
- Double-click on the first password row in the results. An attributes page opens for the password.
- Switch to the Access Control tab at the top of the dialog.
- 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.
- Click the plus (+) button at the bottom-left corner of the window.
- Press shift-cmd-g and paste the path:
/System/Library/PrivateFrameworks/AMPDevices.framework/Versions/A/Support/AMPDevicesAgent
- 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.
- 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.
Choose the device in the sidebar and untick ‘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
Code language: CSS (css)
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
Code language: CSS (css)
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
Code language: PHP (php)
George, thank you so much for your post!
After upgrading to Catalina, and connecting my iPhone, I was presented with an automatic sync that stuck at 'Syncing (Step 4 of 4) - Waiting for changes to be applied'. This didn't complete, even after a few hours. Nothing I tried would let it get past this, and there's no UI option to terminate it. (So that I could uncheck 'Automatically sync when this iPhone is connected').
The step 'Stop Finder automatically opening' above did the trick. I can now connect my phone, turn off this option, back up, and I'm back in control. I was thinking I'd have to switch to iCloud backup, which I really don't want to do - I want to be in control of my backups.
Thank you for a very comprehensive article!
Kind regards,
Matt Gumbley
Hi George,
I've been trying to troubleshoot an issue with constant "Disk Not Ejected Properly" errors affecting my external drives, which disconnect spontaneously. I was thinking these log entries:
AMPDeviceDiscoveryAgent[616]: Entered:_AMMuxedDeviceDisconnected, mux-device
was related, but from your description it sounds like it would not be related to external drives?
Hi Tom, I would say that message looks like it’s trying to say your iPhone or other device has disconnected its wireless connection to your Mac.
George, I avoid iCloud and want to set up my Mac to automatically perform encrypted iPhone backups when the phone is connected via cable (or even better, whenever it's seen on WiFi).
It seems that "sync" and "backup" are two different things, because the "Sync" button, as well as the "Automatically sync when this phone is connected" option, do not bump the "Last backup to this Mac" timestamp—aka, they don't trigger backups. I need to manually press the "Back Up Now" button for the timestamp to update.
Is there some way to trigger the Backup via Automator ("Watch me do" failed), or even better via a shell command that I can periodically run via Cron?
This is about Big Sur. Thank you!
Sounds like you want
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/Current/AppleMobileDeviceHelper.app/Contents/Resources/AppleMobileBackup
. Pass it-h
for usage information. I can write a full blog post about this if that would be helpful? I can't find any documentation on that command actually!I went through the steps of adding AMPDeviceAgent to the list of allowable applications but after I hit save changes, I get beach-balled for a long time...is this normal? Do I just have to wait it out?
The problem is that all Apple passwords I know of are not working for the password prompt. What should I do?
defaults delete -g ignore-devices -bool false
This command is not working for me. Command syntax is incorrect
Thanks, I’ve updated the post to fix the typo with that command.