Mac SSD Partition Type Incorrect I have been using an external SSD as my primary drive on my iMac for over a year. I'm not sure if it got unplugged or nudged while powered up but it now doesn't work. I can mount the drive but I get errors when trying to mount the main partition.

I have followed advice given here:

External disk - Unrecognized file system (-69846)

Mount external HDD readOnly option

How to change the &quot;Recovery HD&quot; partition to type &quot;Apple_Boot&quot;?

however none of the solutions have had much effect.

Looking at my partition list I see that the partition type and name for my main partition is screwy:

 /dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *275.1 GB   disk4
   1:                        EFI EFI                     209.7 MB   disk4s1
   2: 7C3457EF-0000-11AA-AA11-00306543ECAC               274.9 GB   disk4s2


I presume that they should be "Apple_Boot" and "Macintosh HD".

I had hoped that using

sudo asr adjust --target /dev/disk4s2 -settype "Apple_Boot"

would do the trick (or at least help) but all I get is

asr: Volume adjustment failed: Invalid argument

and as there appears to be very little documentation on the "adjust" functionality of asr I don't know how to proceed. I bought a new drive and hoped to restore my data from a Time Machine backup but it turns out that's corrupted!! So, I really do need to try and get this drive back into action again. Any help would be hugely appreciated.

Drive was running OSX 10.14.3 Mojave.
Here, I assumed "primary drive" meant a drive containing a APFS container from which you boot Mojave.

I have not seen an recent posts referring to asr adjust. There is is no mention of adjust in the man page of asr in both High Sierra or Mojave. I would recommend avoiding the use of undocumented commands when other documented commands can accomplish the same task. In this case, you could have used gpt or the third party command gdisk.

In your case, you are trying to change a value that is already correct. The GUID for a APFS container partition is suppose to be 7C3457EF-0000-11AA-AA11-00306543ECAC.  I assume when you executed diskutil you were booted to either a macOS (OS X) operating system or recovery that was too old to recognize the APFS partition type.

If you wish to boot to macOS Recovery over the Internet, then you should use the key combination Option-⌘-R to boot to the latest version compatible with your Mac. See the  Apple website About macOS Recovery for more information.