Mac computers with Apple silicon use the Rosetta translation environment to install and run Intel-based Auto Apps
Apple silicon processors are built on the arm64 Apple silicon CPU architecture, which is very different from the x86_64 Intel architecture. Software applications must be recompiled to run on the new architecture and can then be distributed as universal binary packages that include both the new Apple silicon version and the Intel version. Some software titles have not been updated to include an Apple silicon version in a universal binary package and include only the Intel version of the application.
Mac computers with Apple silicon are still capable of running software built for Intel processors using the Rosetta translation environment. This translation technology is not pre-installed on computers with Apple silicon but can be installed by the user or with the softwareupdate command-line tool.
Automatic Rosetta Installation for Auto Apps
This section references the expected behavior for Rosetta when deploying Kandji Auto Apps. For the expected behavior when deploying Custom Apps, view this section.
When an Auto App requires Rosetta in order to run on a Mac computer with Apple silicon, you will see the warning below on the library item. In this event, the Kandji Agent will automatically check for and install Rosetta as needed. Please note that these banners may be removed without notice as developers shift to universal binaries.
Intel-based Custom Apps Require Rosetta
This section references the expected behavior for Rosetta when deploying Custom Apps. For the expected behavior when deploying Auto Apps, view this section.
As of November 2020, when Apple first introduced computers with Apple silicon, many of the Auto Apps from Kandji were available only as Intel-based software applications. When a computer with Apple silicon detects an installer package for Intel-based software, it will send that package to the Rosetta translation environment for processing. If Rosetta is not already installed, then one of two things will happen.
- If the user opened the installer package, the user will be prompted by the system to install Rosetta.
- If Kandji runs the installer package, the installation will stop because Rosetta is not available on the system.
In order to prevent a failed installation, or a prompt for the end user when deploying a Custom App that requires Rosetta, the Rosetta translation environment must be installed on the Mac via Kandji. Below is a script that will allow the system to install the Rosetta translation environment, if it is not already present, on a computer with Apple silicon.
Install Rosetta with Kandji
In order to install Intel-based Custom Apps on a computer with Apple silicon, the Kandji Blueprint for that computer will need to install Rosetta first. This can be accomplished by adding a custom script to your Blueprint. You should name this script 00 Install Rosetta for Apple Silicon to ensure that it runs first before any other items. You can follow the steps below to create this custom script in your Kandji instance.
- Log in to Kandji.
- Go to your Library and click + Add New.
Click Custom Script, then Add & Configure +.
- Set the name of the script to 00 Install Rosetta for Apple Silicon.
- Assign the item to the Blueprints as necessary.
- Set the execution frequency to Once per device.
- In the script details, paste in the script block that appears below.
- Click Save.
Script to install Rosetta
This script is maintained in the Kandji Support GitHub repo.
#!/bin/zsh
################################################################################################
# Created by Nicholas McDonald | se@kandji.io | Kandji, Inc. | Solutions Engineering
################################################################################################
# Created on 11/24/2020
# Updated on 09/24/2021 - David Larrea and Matt Wilson
################################################################################################
# Software Information
################################################################################################
# This script checks the architecture of a macOS Device, if the Mac is running on Apple Silicon
# The script then checks if Rosetta is installed, and if not, installs it silently
#
# Tested on the following macOS versions
#
# - 12.0.1
# - 11.6
# - 11.5.1
# - 11.4
# - 11.3
# - 11.2.3
#
################################################################################################
# License Information
################################################################################################
# Copyright 2020 Kandji, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
# substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
################################################################################################
# Version
VERSION="1.1.0"
# Determine the processor brand
processorBrand=$(/usr/sbin/sysctl -n machdep.cpu.brand_string)
if [[ "${processorBrand}" = *"Apple"* ]]; then
echo "Apple Processor is present..."
else
echo "Apple Processor is not present... rosetta not needed"
exit 0
fi
# Rosetta Status
checkRosettaStatus=$(/bin/launchctl list | /usr/bin/grep "com.apple.oahd-root-helper")
# Rosetta Folder location
# Condition to check to see if the Rosetta folder exists. This check was added because the
# Rosetta2 service is already running in macOS versions 11.5 and greater without Rosseta2 actually
# being instaslled.
RosettaFolder="/Library/Apple/usr/share/rosetta"
if [[ -e "${RosettaFolder}" && "${checkRosettaStatus}" != "" ]]; then
echo "Rosetta Folder exists and Rosetta Service is running... exiting"
exit 0
else
echo "Rosetta Folder does not exist or Rosetta service is not running... installing Rosetta"
fi
# Installs Rosetta
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
# Checks the outcome of the Rosetta install
if [[ $? -eq 0 ]]; then
echo "Rosetta installed... exiting"
exit 0
else
echo "Rosetta install failed..."
exit 1
fi
exit 0