2

Can you tell from a .dmg file if it contains arm64 binaries?

I've got a Mac mini M1 running Big Sur. I don't want to run apps under Intel, only arm64. I don't even have Rosetta installed, and want to avoid installing it.

I can install apps, try to run them, and see if they request Rosetta installation. But I'd like to know if the .dmg file contains binaries compiled for arm64 without running the application.

nohillside
  • 100,768
Klas Mellbourn
  • 917
  • 2
  • 14
  • 34

2 Answers2

6

A DMG is just a container, it doesn't know about it contents.

If application is distributed without a package (so it's application you can just drag&drop to /Applications) you can run

hdiutil attach THE_DMG
file /Volume/THE_DMG/THE_APPLICATION.app/Contents/MacOS/*

to see what kind of binary it is.

Klas Mellbourn
  • 917
  • 2
  • 14
  • 34
nohillside
  • 100,768
  • Right, I realize that it is a container, but is there no tool to inspect it to figure out if it contains arm64 binaries or not? – Klas Mellbourn Dec 11 '20 at 13:54
  • 1
    @KlasMellbourn See the second part of the answer :-) You will need to mount the DMG to do so of course. – nohillside Dec 11 '20 at 13:55
  • Ok, and I can use hdiutil attach to mount it – Klas Mellbourn Dec 11 '20 at 14:01
  • 1
    @KlasMellbourn I usually just double-click, but hdiutil works as well :-) – nohillside Dec 11 '20 at 14:01
  • But won't double-clicking initiate installation? – Klas Mellbourn Dec 11 '20 at 14:02
  • 2
    @KlasMellbourn Not sure DMG can even do that. – nohillside Dec 11 '20 at 14:18
  • 1
    Generally speaking opening a DMG will not initiate an installation. It is possible to set up a DMG to do that but you can simply cancel the installer without running the App itself. And if it is just an App inside the DMG you can get info on it to see what kind of binary it is. – Steve Chambers Dec 11 '20 at 14:27
  • 1
    I am fairly sure it's not actually possible to make a DMG file automatically launch anything. They can display a license agreement, but they can't actually launch an application. As others have said, .dmg is just a container for a filesystem and double clicking simply mounts it so you can view (and optionally install) the contents – Josh Dec 11 '20 at 22:51
1

you can get info on the app, by right click and get info, or cmd+i, and see what it is designed for. Intel, Apple Silicon, or Universal.

Skyline X
  • 134