Can't change APFS external drive icons

Solution 1:

In a similar issue I had an actual ".VolumeIcon.icns" file on the system volume of a Catalina installation, instead of only on the data volume, just linked to from the system volume. Only the generic icon showed on the Desktop, no matter what.

Removing this icon file and replacing it with a link to the data volume (as intended) solved the issue for me and I could subsequently paste an icon that did show on the Desktop again.

Also, when pasting a new icon, use the Data volume, not the icon on the Desktop. If you cannot find it in Finder, use Disk Utility, select "APFS - Data" in the sidebar, right-click and choose "Show in Finder". You could try this, before carrying on removing the icon file on the system volume.

Since you are running Big Sur on the external drive, which seems to have an actual icon file in the system volume's root directory, I've tried an exercise and removed the link there on a Big Sur volume and again replaced it with the same link: .VolumeIcon.icns -> System/Volumes/Data/.VolumeIcon.icns

Setting the external drive (in your case named "APFS") as startup disk in System Preferences, I rebooted into its Recovery, holding cmdR at reboot.

There - launching Terminal from the "Utilities" menu - I disabled authenticated root with...

csrutil authenticated-root disable

(Note: csrutil disable was used earlier, but I don't think this should make a difference)

Without restart I checked the volumes and their mount path with... mount ...which shows the system and data volumes of the drive in question (named "APFS" and "APFS - Data" respectively). The system volume clearly shows "read-only":
/dev/disk6s5 on /Volumes/APFS (apfs, sealed, local, read-only, journaled)

So I went ahead and mounted it writeable:

mount -uw /Volumes/APFS

...and checked that "read-only" had gone with another mount command, which showed: /dev/disk6s5 on /Volumes/APFS (apfs, sealed, local, journaled)

Going ahead, I removed the link (which would be a file in your case):

rm /Volumes/APFS/.VolumeIcon.icns

...changed to the root directory of the drive's system volume...

cd /Volumes/APFS

...and created the link again:

ln -s System/Volumes/Data/.VolumeIcon.icns .VolumeIcon.icns

Checking again with... ls -al ...showed the correct link:

lrwxr-xr-x   1 root  wheel    36  3 May 14:10 .VolumeIcon.icns -> System/Volumes/Data/.VolumeIcon.icns

Now I deviated from the instructions on this site and did not bless a new snapshot

bless --folder /Volumes/APFS/System/Library/CoreServices --bootefi --create-snapshot

...but just rebooted twice into the APFS volume, which I was allowed to do (maybe deleting the link and just recreating it was not considered change enough).

PS. The question is though, if this is worth doing for the sake of an icon on the Desktop.