Adobe CC Shared Device install fails

samuellarsson
New Contributor III

Hi,

I'm attempting to deploy an Adobe CC Shared Device package through a Jamf policy. The .pkg installer fails however, and /var/log/install.log tells me that the CCP Package Installer (which is invoked in the preinstall script) fails with exit code 81 and the following log messages:

2019-11-18 11:16:51+01 C02N61WZG3QJ installd[1100]: ./preinstall: CCP Package Installer : InstallLanguage specified in Info.plist in preinstall...()
2019-11-18 11:16:51+01 C02N61WZG3QJ installd[1100]: ./preinstall: CCP Package Installer : Launching AdobeDeploymentManager...
2019-11-18 11:16:56+01 C02N61WZG3QJ installd[1100]: ./preinstall: CCP Package Installer : Exit code of AdobeDeploymentManager is (81)
2019-11-18 11:16:56+01 C02N61WZG3QJ installd[1100]: ./preinstall: CCP Package Installer : Exit ...

The package works when downloaded and installed manually. I have also tried to manually compress the .pkg (as both .zip and tarball) before uploading to Jamf Admin, but no success. Adobe's documentation doesn't seem to cover these exit codes and the script itself doesn't tell me anything either. So I'm wondering if anyone else has tried to deploy this type of package and failed that could give me a clue as to what is going wrong?

2 ACCEPTED SOLUTIONS

samuellarsson
New Contributor III

It turned out that there were some permission issue for when Jamf ran the preinstall script. It's not entirely clear what where the fault was, but according to the error code in PDApp.log and the Adobe support, the installer didn't have the sufficient permissions in the folder where the pkg was unpacked:

11/18/19 16:10:58:601 | [FATAL] |  | ASU | DeploymentManager | DeploymentManager |  |  | 366388 | The Bootstrapper Process return code is (41).Stopping the installation process.

So, my solution was to put the .pkg in a .dmg image and upload with Jamf Admin, add the .dmg to the policy as a cached file and then run a script that mounts the .dmg and runs the package installer. I used the following script created by Nick Amundsen and edited by my colleague @marcusbjerknes to run with Jamf v9.8+:

#!/bin/sh
####################################################################################################
#
# Copyright (c) 2011, JAMF Software, LLC.  All rights reserved.
#
#       Redistribution and use in source and binary forms, with or without
#       modification, are permitted provided that the following conditions are met:
#               * Redistributions of source code must retain the above copyright
#                 notice, this list of conditions and the following disclaimer.
#               * Redistributions in binary form must reproduce the above copyright
#                 notice, this list of conditions and the following disclaimer in the
#                 documentation and/or other materials provided with the distribution.
#               * Neither the name of the JAMF Software, LLC nor the
#                 names of its contributors may be used to endorse or promote products
#                 derived from this software without specific prior written permission.
#
#       THIS SOFTWARE IS PROVIDED BY JAMF SOFTWARE, LLC "AS IS" AND ANY
#       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
#       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#       DISCLAIMED. IN NO EVENT SHALL JAMF SOFTWARE, LLC BE LIABLE FOR ANY
#       DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
#       (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
#       LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#       ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
#       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#####################################################################################################
#
# SUPPORT FOR THIS PROGRAM
#
#       This program is distributed "as is" by JAMF Software, LLC's Resource Kit team. For more
#       information or support for the Resource Kit, please utilize the following resources:
#
#               http://list.jamfsoftware.com/mailman/listinfo/resourcekit
#
#               http://www.jamfsoftware.com/support/resource-kit
#
#       Please reference our SLA for information regarding support of this application:
#
#               http://www.jamfsoftware.com/support/resource-kit-sla
#
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
#   installPKGfromDMG.sh -- Install a PKG wrapped inside a DMG
#
# SYNOPSIS
#   sudo installPKGfromDMG.sh
#
# DESCRIPTION
#   This script will mount a DMG and install a PKG file wrapped inside.  The script assumes that
#   the DMG has been previously cached to the machine to:
#
#       /Library/Application Support/JAMF/Waiting Room/
#
#   This is the default location that a package will be cached to when selecting the "Cache"
#   option within a policy or Casper Remote.
#
#   To use this script, please follow the following workflow:
#
#   Step 1: Wrap a PKG inside a DMG
#       1.  Open Disk Utility.
#       2.  Navigate to File > New > Disk Image from Folder.
#       3.  Select the PKG and click the Image button.
#       4.  Name the package after the original PKG.
#       5.  Choose a location for the package and then click Save.
#
#   Step 2: Upload the DMG and installPKGfromDMG.sh script to Casper Admin:
#       1.  Open Casper Admin and authenticate.
#       2.  Drag the DMG you created in the previous procedure to the Package pane in Casper Admin.
#       3.  Drag the installPKGfromDMG.sh script to the Package pane in Casper Admin.
#       4.  Save your changes and quit the application.
#
#   Step 3: Create a policy to install the DMG:
#       1.  Log in to the JSS with a web browser.
#       2.  Click the Management tab.
#       3.  Click the Policies link.
#       4.  Click the Create Policy button.
#       5.  Select the Create policy manually option and click Continue.
#       6.  Configure the options on the General and Scope panes as needed.
#       7.  Click the Packages button, and then click the Add Package link.
#       8.  Across from DMG, choose “Cache” from the Action pop-up menu and then click the 
#           "Add Packages" button.
#       9.  Click the Scripts button, and then click the Add Script link.
#       10. Across from the installPKGfromDMG.sh script, choose “Run After” from the Action pop-up menu.
#       11. Enter the name of the original PKG in the Parameter 4 field.
#           Note: You must enter the exact name of the PKG in the Parameter 4 field. If you need 
#           to verify the name of the PKG, you can mount the DMG that it is wrapped inside.
#       12. Click Save.

#
####################################################################################################
#
# HISTORY
#
#   Version: 1.0b
#
#   - Originally Created by Nick Amundsen on July 22, 2011
#
#   - Edited by Marcus Bjerknes (marcus.bjerknes@kau.se) on March 16, 2016
#
#   Changes: Line 201 - changed the path to jamf executable to correspond with Jamf version 9.8 or later.
#
#
#
####################################################################################################
#
# DEFINE VARIABLES & READ IN PARAMETERS
#
#####################################################################################################
#
# HARDCODED VALUES SET HERE
#
# Variables set by Casper - To manually override, remove the comment for the given variable
# targetDrive=""  # Casper will pass this parameter as "Target Drive" if left commented out
# computerName=""  # Casper will pass this parameter as "Computer Name" if left commented out
# userName=""  # Casper will pass this parameter as "User Name" if left commented out. Usernames
#                  can only be passed if the script is triggered at login, logout, or by Self Service

# Variables used for logging
logFile="/private/var/log/installPKGfromDMG.log"

# Variables used by this script.
dmgName=""


# CHECK TO SEE IF A VALUE WERE PASSED IN FOR PARAMETERS AND ASSIGN THEM
if [ "$1" != "" ] && [ "$targetDrive" == "" ]; then
    targetDrive="$1"
fi

if [ "$2" != "" ] && [ "$computerName" == "" ]; then
    computerName="$2"
fi

if [ "$3" != "" ] && [ "$userName" == "" ]; then
    userName="$3"
fi

if [ "$4" != "" ] && [ "$dmgName" == "" ]; then
    dmgName="$4"
fi


####################################################################################################
# 
# LOGGING FUNCTION
#
####################################################################################################

log () {
    echo $1
    echo $(date "+%Y-%m-%d %H:%M:%S: ") $1 >> $logFile  
}

####################################################################################################
# 
# VARIABLE VERIFICATION FUNCTION
#
####################################################################################################

verifyVariable () {
eval variableValue=$$1
if [ "$variableValue" != "" ]; then
    echo "Variable "$1" value is set to: $variableValue"
else
    echo "Variable "$1" is blank.  Please assign a value to the variable."
    exit 1
fi
}

####################################################################################################
# 
# SCRIPT CONTENTS - DO NOT MODIFY BELOW THIS LINE
#
####################################################################################################

# Verify Variables
verifyVariable dmgName

# Mount the DMG
log "Mounting the DMG $dmgName..."
mountResult=`/usr/bin/hdiutil attach -noautoopen -noverify -nobrowse /Library/Application Support/JAMF/Waiting Room/$dmgName`
mountVolume=`echo "$mountResult" | grep Volumes | awk '{print $3}'`
mountDevice=`echo "$mountResult" | grep disk | head -1 | awk '{print $1}'`

if [ $? == 0 ]; then
    log "DMG mounted successfully as volume $mountVolume on device $mountDevice."
else
    log "There was an error mounting the DMG. Exit Code: $?"
fi

# Find the PKG in the DMG
packageName=`ls $mountVolume | grep "pkg"`
log "Found pkg: $packageName"

# Install the PKG wrapped inside the DMG
log "Installing Package $packageName from mount path $mountVolume..."
/usr/local/bin/jamf install -path $mountVolume -package $packageName

if [ $? == 0 ]; then
    log "Package successfully installed."
else
    log "There was an error installing the package. Exit Code: $?"
fi

# Unmount the DMG
echo "Unmounting disk $mountDevice..."
hdiutil detach "$mountDevice" -force

# Delete the DMG
/bin/rm /Library/Application Support/JAMF/Waiting Room/$dmgName

View solution in original post

samuellarsson
New Contributor III

I actually ran into some more problems when the Jamf installer binary copied a PKG file to /Library/Application Support/JAMF/Downloads, where the permissions are tighter which resulted in an install failure. I'm not exactly sure what is happening behind the scenes of the Adobe installer package, but I could completely bypass that permission ordeal by using the native macOS installer binary which doesn't copy the PKG before installing. I replaced my script above with this modified script and the "useinstallerapp" flag raised, and that solved my problems completely.

View solution in original post

5 REPLIES 5

PaulHazelden
Valued Contributor

Giving you a clue as to what is going on, no can do.
However, I have been testing Catalina on four test Macs. I sent the latest version of Adobe to them...
Worked fine on one, and the others all failed. The working one had an earlier version installed.
I used one of the failing ones to test an install, and straight after all of the other apps dropped in by the policies set that had failed before.
Then I erased and reinstalled the other two Macs, and one of them happily installed the Adobe apps, the other one did not. Until I manually installed one of the Adobe apps, then everything installed.
Not got any further because I have run out of test Macs, I need to erase them all again and start again.
My guess is, there is something that Catalina stops for "Security reasons", and when you manually install an app it is then happy with whatever it is and lets the installs continue.
My next step is to try an install of just the CreativCloud Desktop App, set to go as soon as possible during enrolment. See if that works and is good enough to allow the rest to install later. But first I need to erase a test Mac.

samuellarsson
New Contributor III

@PaulHazelden it's worth mentioning that I get fails on both Mojave and Catalina machines. I think you and me might be having different issues here, because it is not working from Jamf even when I have had a previous manual Adobe installation on the same computer. But concerning your problem, I remember seeing somewhere that multiple Shared Device installations on the same machine are not possible, so a two-step Shared Device installation might not work at all. From my understanding, the Shared Device package must include all of the desired apps in that single install package. I'm not 100% sure though so maybe it is worth a shot.

PaulHazelden
Valued Contributor

@samuellarsson I have had multiple shared device installs working just fine on Mojave, and when they install as one of the test Macs did, it works just fine on Catalina. Tomorrows plan is to erase the Test Macs and start from fresh. Not sure I could create the required packages as bundles, staff here often change their minds about what they require. But thanks for that I will raise it with our Adobe rep, see what they say.

samuellarsson
New Contributor III

It turned out that there were some permission issue for when Jamf ran the preinstall script. It's not entirely clear what where the fault was, but according to the error code in PDApp.log and the Adobe support, the installer didn't have the sufficient permissions in the folder where the pkg was unpacked:

11/18/19 16:10:58:601 | [FATAL] |  | ASU | DeploymentManager | DeploymentManager |  |  | 366388 | The Bootstrapper Process return code is (41).Stopping the installation process.

So, my solution was to put the .pkg in a .dmg image and upload with Jamf Admin, add the .dmg to the policy as a cached file and then run a script that mounts the .dmg and runs the package installer. I used the following script created by Nick Amundsen and edited by my colleague @marcusbjerknes to run with Jamf v9.8+:

#!/bin/sh
####################################################################################################
#
# Copyright (c) 2011, JAMF Software, LLC.  All rights reserved.
#
#       Redistribution and use in source and binary forms, with or without
#       modification, are permitted provided that the following conditions are met:
#               * Redistributions of source code must retain the above copyright
#                 notice, this list of conditions and the following disclaimer.
#               * Redistributions in binary form must reproduce the above copyright
#                 notice, this list of conditions and the following disclaimer in the
#                 documentation and/or other materials provided with the distribution.
#               * Neither the name of the JAMF Software, LLC nor the
#                 names of its contributors may be used to endorse or promote products
#                 derived from this software without specific prior written permission.
#
#       THIS SOFTWARE IS PROVIDED BY JAMF SOFTWARE, LLC "AS IS" AND ANY
#       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
#       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#       DISCLAIMED. IN NO EVENT SHALL JAMF SOFTWARE, LLC BE LIABLE FOR ANY
#       DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
#       (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
#       LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#       ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
#       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#####################################################################################################
#
# SUPPORT FOR THIS PROGRAM
#
#       This program is distributed "as is" by JAMF Software, LLC's Resource Kit team. For more
#       information or support for the Resource Kit, please utilize the following resources:
#
#               http://list.jamfsoftware.com/mailman/listinfo/resourcekit
#
#               http://www.jamfsoftware.com/support/resource-kit
#
#       Please reference our SLA for information regarding support of this application:
#
#               http://www.jamfsoftware.com/support/resource-kit-sla
#
#####################################################################################################
#
# ABOUT THIS PROGRAM
#
# NAME
#   installPKGfromDMG.sh -- Install a PKG wrapped inside a DMG
#
# SYNOPSIS
#   sudo installPKGfromDMG.sh
#
# DESCRIPTION
#   This script will mount a DMG and install a PKG file wrapped inside.  The script assumes that
#   the DMG has been previously cached to the machine to:
#
#       /Library/Application Support/JAMF/Waiting Room/
#
#   This is the default location that a package will be cached to when selecting the "Cache"
#   option within a policy or Casper Remote.
#
#   To use this script, please follow the following workflow:
#
#   Step 1: Wrap a PKG inside a DMG
#       1.  Open Disk Utility.
#       2.  Navigate to File > New > Disk Image from Folder.
#       3.  Select the PKG and click the Image button.
#       4.  Name the package after the original PKG.
#       5.  Choose a location for the package and then click Save.
#
#   Step 2: Upload the DMG and installPKGfromDMG.sh script to Casper Admin:
#       1.  Open Casper Admin and authenticate.
#       2.  Drag the DMG you created in the previous procedure to the Package pane in Casper Admin.
#       3.  Drag the installPKGfromDMG.sh script to the Package pane in Casper Admin.
#       4.  Save your changes and quit the application.
#
#   Step 3: Create a policy to install the DMG:
#       1.  Log in to the JSS with a web browser.
#       2.  Click the Management tab.
#       3.  Click the Policies link.
#       4.  Click the Create Policy button.
#       5.  Select the Create policy manually option and click Continue.
#       6.  Configure the options on the General and Scope panes as needed.
#       7.  Click the Packages button, and then click the Add Package link.
#       8.  Across from DMG, choose “Cache” from the Action pop-up menu and then click the 
#           "Add Packages" button.
#       9.  Click the Scripts button, and then click the Add Script link.
#       10. Across from the installPKGfromDMG.sh script, choose “Run After” from the Action pop-up menu.
#       11. Enter the name of the original PKG in the Parameter 4 field.
#           Note: You must enter the exact name of the PKG in the Parameter 4 field. If you need 
#           to verify the name of the PKG, you can mount the DMG that it is wrapped inside.
#       12. Click Save.

#
####################################################################################################
#
# HISTORY
#
#   Version: 1.0b
#
#   - Originally Created by Nick Amundsen on July 22, 2011
#
#   - Edited by Marcus Bjerknes (marcus.bjerknes@kau.se) on March 16, 2016
#
#   Changes: Line 201 - changed the path to jamf executable to correspond with Jamf version 9.8 or later.
#
#
#
####################################################################################################
#
# DEFINE VARIABLES & READ IN PARAMETERS
#
#####################################################################################################
#
# HARDCODED VALUES SET HERE
#
# Variables set by Casper - To manually override, remove the comment for the given variable
# targetDrive=""  # Casper will pass this parameter as "Target Drive" if left commented out
# computerName=""  # Casper will pass this parameter as "Computer Name" if left commented out
# userName=""  # Casper will pass this parameter as "User Name" if left commented out. Usernames
#                  can only be passed if the script is triggered at login, logout, or by Self Service

# Variables used for logging
logFile="/private/var/log/installPKGfromDMG.log"

# Variables used by this script.
dmgName=""


# CHECK TO SEE IF A VALUE WERE PASSED IN FOR PARAMETERS AND ASSIGN THEM
if [ "$1" != "" ] && [ "$targetDrive" == "" ]; then
    targetDrive="$1"
fi

if [ "$2" != "" ] && [ "$computerName" == "" ]; then
    computerName="$2"
fi

if [ "$3" != "" ] && [ "$userName" == "" ]; then
    userName="$3"
fi

if [ "$4" != "" ] && [ "$dmgName" == "" ]; then
    dmgName="$4"
fi


####################################################################################################
# 
# LOGGING FUNCTION
#
####################################################################################################

log () {
    echo $1
    echo $(date "+%Y-%m-%d %H:%M:%S: ") $1 >> $logFile  
}

####################################################################################################
# 
# VARIABLE VERIFICATION FUNCTION
#
####################################################################################################

verifyVariable () {
eval variableValue=$$1
if [ "$variableValue" != "" ]; then
    echo "Variable "$1" value is set to: $variableValue"
else
    echo "Variable "$1" is blank.  Please assign a value to the variable."
    exit 1
fi
}

####################################################################################################
# 
# SCRIPT CONTENTS - DO NOT MODIFY BELOW THIS LINE
#
####################################################################################################

# Verify Variables
verifyVariable dmgName

# Mount the DMG
log "Mounting the DMG $dmgName..."
mountResult=`/usr/bin/hdiutil attach -noautoopen -noverify -nobrowse /Library/Application Support/JAMF/Waiting Room/$dmgName`
mountVolume=`echo "$mountResult" | grep Volumes | awk '{print $3}'`
mountDevice=`echo "$mountResult" | grep disk | head -1 | awk '{print $1}'`

if [ $? == 0 ]; then
    log "DMG mounted successfully as volume $mountVolume on device $mountDevice."
else
    log "There was an error mounting the DMG. Exit Code: $?"
fi

# Find the PKG in the DMG
packageName=`ls $mountVolume | grep "pkg"`
log "Found pkg: $packageName"

# Install the PKG wrapped inside the DMG
log "Installing Package $packageName from mount path $mountVolume..."
/usr/local/bin/jamf install -path $mountVolume -package $packageName

if [ $? == 0 ]; then
    log "Package successfully installed."
else
    log "There was an error installing the package. Exit Code: $?"
fi

# Unmount the DMG
echo "Unmounting disk $mountDevice..."
hdiutil detach "$mountDevice" -force

# Delete the DMG
/bin/rm /Library/Application Support/JAMF/Waiting Room/$dmgName

samuellarsson
New Contributor III

I actually ran into some more problems when the Jamf installer binary copied a PKG file to /Library/Application Support/JAMF/Downloads, where the permissions are tighter which resulted in an install failure. I'm not exactly sure what is happening behind the scenes of the Adobe installer package, but I could completely bypass that permission ordeal by using the native macOS installer binary which doesn't copy the PKG before installing. I replaced my script above with this modified script and the "useinstallerapp" flag raised, and that solved my problems completely.