Tried to fix filesystem type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF and failed [duplicate]

Solution 1:

You need to post a hexadecimal dump of a few sectors of the internal drive. I need to see this before determining if a fix can be found. Unfortunately, Internet Recovery does not provide a hexadecimal dump utility. Therefore, I propose you do the following. Let me know if you have any problems.

The next step would be for you to post a hexdump of the first 3 sectors following the first partition. Below are the steps I would use to accomplish this task. These steps will not change the internal drive.

  1. Using the working Mac, format a flash drive for a single FAT32 volume labeled MyFat. The flash drive probably should be MBR partitioned, but I believe GPT partitioning will also work.
  2. Boot the broken Mac to Recovery Mode.
  3. Open a Terminal application window.
  4. Insert the flash drive into a USB port on the Mac.
  5. Enter the command given below. This will write out a binary copy of the first three 512 bytes sectors following disk0s1.

    Note: I assume the internal drive is disk0. If not, make the appropriate substitutions.

    dd if=/dev/disk0 count=3 skip=409640 of=/Volumes/MyFat/disk0.bin
    
  6. Shutdown the Mac.

  7. Insert the flash drive in the working Mac.

  8. Enter the command given below in a Terminal application window.

    hexdump -Cv /Volumes/MyFat/disk0.bin
    
  9. Post the output to your question. I would prefer you copy and paste the text to your question. An image (picture) is very inconvenient.

Once you have provided this dump, I will be able to determine how to proceed.

Update #1

The third line, in the output you posted, shows the letters NXSB. This is a good indication that a APFS partition once resided at offset 409640. The hexadecimal sequence c8 d1 5a 01 00 00 00 00 appears on the same line. One can enter, into the Calculator application, these hexadecimal pairs in reverse order, as shown below.

This value can be converted to decimal by clicking on the 10 button. The result is shown below.

Next, one can click on the x8= buttons to multiply by 8. The result is shown below. This is the value you should have used for the partition size instead of 372637568.

Note: This step was required because your sector size is 512 bytes. This step can be skipped when the sector size is 4096 bytes.

This what you entered:

diskutil umountDisk disk0
gpt add -i 2 -b 409640 -s 372637568 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0

This is what you should have entered:

diskutil umountDisk disk0
gpt add -i 2 -b 409640 -s 181833280 -t 7C3457EF-0000-11AA-AA11-00306543ECAC disk0

References

Apple File System Reference, dated 2019-02-07, page 25.