0

Short form of the question: How, on either macOS Sierra or Windows, do I compress a folder into a MacBinary (.bin) format?

Long story: I have a dashcam firmware upgrade folder from one of the mainstream dashcam manufacturers. The sounds that dashcam makes are of really low quality. I went ahead and inspected the files on the firmware upgrade, and one of the largest files turned out to be in .bin format. Looking at its info on macOS Sierra, I've noticed it says its MacBinary archive. I was able to easily unpack it into a folder wich turned out to be a snapshot of a typical linux distro. I tracked down the audio files I needed to replace with a better versions. Now I need to "package" the folder back into MacBinary archive to get the dashcam to upgrade from it, importing the new audio files. How can I convert a folder back to MacBinary?

Maxim V. Pavlov
  • 1,583
  • 6
  • 22
  • 35

1 Answers1

0

There’s a misconception here. MacBinary is not some kind of compressed archive format for a whole directory full of files. It’s just a way to take both forks and the Finder metadata of a single old-school Mac file and turn it into a monolithic file that can traverse non-Mac systems that didn’t have the concepts of multiple file streams and extensible metadata back in the dark ages of the 1980’s and 90’s.

Back then ‘.bin’ in the Mac world usually did mean MacBinary, but .bin has also always been a generic extension for a file containing unspecified binary data. It is often used for ROM dumps, including firmware images for embedded systems.

I suspect your dashcam firmware is the latter sense of .bin, not MacBinary. To find its real file type, use the “file” command on it, which looks for well known file type signatures in the first few bytes of the file. See the man pages for file(1) and magic(5(?)) for more information.

Spiff
  • 101,729
  • 17
  • 175
  • 229
  • I’ve read all this about MacBinary before writing this question, but thanks! :) The file in question is a MacBinary. It de-archives well into a directory full of files on both Mac by Archiver and by 7zip on Windows. Thus far only 7zip has been able to add files to MacBinary .bin for me on Windows without disturbing the single-file thing. How to do it on Mac remains a secret :) – Maxim V. Pavlov Nov 18 '17 at 21:02
  • If it ultimately expands into a directory full of files, then it is more than just a MacBinary. It may be, say, a .zip archive or a .tar that was then combined with its Finder metadata to become a MacBinary. But MacBinary by itself only handles one file at a time. The answer you need will probably come from undoing the MacBinary encoding without processing it further. Find out if it’s a zip file or a rar file or a 7z file or a tar file inside that .bin. Because it has to contain a separate multi-file archive format inside it, because MacBinary doesn’t handle multiple files. – Spiff Nov 18 '17 at 21:11