- Launch Terminal on your Mac from Launchpad or Applications list.
- Type in the following command:
sudo nano /etc/hosts
- Provide the System Password (if required). The hosts file is now open in editable mode within the Terminal window. Append the following line to the end of the file: “127.0.0.1 osxapps.itunes.apple.com”. Press control + X (^X), then Y and hit return to save the file and return to Terminal prompt. Now, whenever any request is generated from your computer to the root domain (osxapps.itunes.apple.com), it will point to your localhost.
Note:
Sometimes, you might need to flush the DNS cache for the changes to take effect. To flush DNS cache, type the following in the command line and hit return:
sudo killall -HUP mDNSResponder
- Place the downloaded packages (.pkg and .pfpkg files) in a certain relative path (directory structure) on your Mac, as indicated by the structure of their respective download URLs. In this example, we will create a folder named “macos_local” on Desktop, and replicate the directory structure of the two package URLs under the same. Once the relative path has been created, we’ll configure the localhost server to point to the macos_local directory on Desktop and run it. Follow the steps below to achieve the same:
cd Desktop
mkdir macos_local
cd macos_local
sudo mkdir -p ./apple-assets-us-std-000001/Purple69/v4/a6/b2/66/a6b26643-7d56-d42f-1b0f-e605e094c8fa/
Password:
sudo mkdir -p ./apple-assets-us-std-000001/Purple49/v4/a5/ef/b4/a5efb468-7f48-1395-d8e4-2194ba4d688a/
sudo python -m http.server 80
Password:
Serving HTTP on :: port 80 (http://[::]:80/) ...
- Copy the raw files from the MAS with Jdownloader or another download manager:
- pfpkg in the folder:
~/Desktop/macos_local/apple-assets-us-std-000001/Purple69/v4/a6/b2/66/a6b26643-7d56-d42f-1b0f-e605e094c8fa
curl -L -o "~/Desktop/macos_local/apple-assets-us-std-000001/Purple69/v4/a6/b2/66/a6b26643-7d56-d42f-1b0f-e605e094c8fa/encrypted1094904501970168333.pfpkg" "
http://osxapps.itunes.apple.com/app...05e094c8fa/encrypted1094904501970168333.pfpkg"
- And the pkg file in the folder:
~/Desktop/macos_local/apple-assets-us-std-000001/Purple49/v4/a5/ef/b4/a5efb468-7f48-1395-d8e4-2194ba4d688a
Or with Curl:
curl -L -o "~/Desktop/macos_local/apple-assets-us-std-000001/Purple49/v4/a5/ef/b4/a5efb468-7f48-1395-d8e4-2194ba4d688a/encrypted5063122388219779779.pkg" "
http://osxapps.itunes.apple.com/app...2194ba4d688a/encrypted5063122388219779779.pkg"
- Open the macOS Mavericks MAS link: