iTunes 12.7 Postinstall Action Script Issue

iTunes 12.7 Postinstall Action Script Issue


Inside the standard iTunes 12.7 installer is a postinstall action script called  that has some bugs that cause issues with tools like AutoDMG.

Incorrect Permissions
First, the script has incorrect permissions -rw-r--r-- . So, the group and other users, do not have execute permissions.

Syntax Error
And has a syntax error on line 123:

logger -p "sudo killall adid”

Note, the last quote is a smart quote in unicode. Smart Quotes are a special kind of quotation mark where the opening-quote and the closing-quote are visually different. Sometimes they are also known as “curly quotes”. In many typographic settings, this is preferred to the more mundane “straight quote”. Many times this will cause issues in scripts and code, you will get an error and the code won’t run.

The script is unable to run due to these issues and will get a syntax error once it has been ran.

If the script doesn’t run properly, it will not create the _fpsd  user, unload the  LaunchDaemon and properly kill the adid  and fpsd  processes.

This causes iTunes to hang and become unresponsive. Manually installing the package doesn’t cause iTunes to hang, but using open-source tools like AutoDMG to create an image will cause iTunes to hang. Fixing the permissions and the syntax error will make iTunes work properly using tools like AutoDMG, etc.

OS Code Names
Note, of interest is the following comments in the postinstall action script:

# for Syrah or higher unload and load fpsd if it exists

“Syrah” is the code name for Mac OSX Yosemite 10.10.

And, other code name, “Lobo” for macOS High Sierra 10.13:

# remove adid daemon if < Lobo

# For Lobo or higher unload and load adid if it exists

Workaround & Fix
We fixed the script, removed the smart quote…

logger -p "sudo killall adid"

And changed permissions to -rwxr-xr-x , giving group and other users execute permisions.

So, now we get the following output with the script properly running:

And created a package installer of the fixed script which fixes the issue in AutoDMG.

We want to give credit to our own Topher Nadauld, for the great detective work tracking this issue down. Great job!!!

Bug Report
This issue has be filed in Apple’s Bug Reporter system, radar number: 34719508 .
And this has been added to the community open radar here.

For reference, here is the entire  iTunes 12.7 postinstall action script:


No Comments

Leave a Reply