In more current versions like macOS Big Sur, macOS Monterey, and macOS Ventura, we may use an InstallAssistant file directly from the Apple server. The InstallAssistant file is packaged as a ".pkg" file. On a Mac, extracting a pkg file is rather simple. Simply opening the file will cause the decompressor to create a ".app" file in the Applications folder. If you don't have a Mac, it will be more challenging to convert this file on your Windows PC. This article will demonstrate how to convert pkg files into app files on any device by using the Recovery Mode. The approach we'll use to convert the pkg files works on both Windows and Mac, making it a great backup plan in case something happens to your Mac.
You may restore and reinstall macOS by using recovery mode. However, since this is a Mac-only function, we will learn how to activate the Recovery mode on Windows and utilize it to convert the installer in this article. Recovery mode on Windows may often be launched in a few different methods, but in this case, we'll be utilizing VirtualBox and OpenCore.
What precisely is the InstallAssistant.pkg file? Each macOS version is saved as a ".pkg" image, which, after downloaded to the Mac, is extracted into an "Install macOS.app" in the Applications folder. There will be a matching InstallAssistant file for each version, depending on the version.
How to convert InstallAssistant.pkg to Mac Installer App
1. Enter Recovery Mode
On a Mac, you may access recovery mode by holding down Commands (Windows) + R keys then you can follow step 5 to convert InstallAssistant.pkg to app. If you do not have a Mac or are unable to enter Recovery mode for any other reason, you may run Recovery mode on Windows by following these steps.
To download and convert the macOS installer, we must first install certain applications. We will need Python, OpenCore, dmg2img, and VirtualBox. Python is a programming language that will be used to perform commands that will assist us in downloading BaseSystem files (recovery mode) to OpenCore.
OpenCore, which we refer to as a "boot loader," is a sophisticated piece of software that we use to set up our systems for macOS and has several tools to assist with the installation process.
VirtualBox is a cross-platform virtualization tool that will enable us to run the Mac operating system on a virtual machine, and the software dmg2img will assist us in converting DMG files to IMG.
Type CMD in Windows Search to Open Command Prompt, then use this commands to download basesystem file:
Go to OpenCore in Downloads folder:
Download Basesystem image:
macrecovery.py -b Mac-2BD1B31983FE1663 -m 00000000000000000 download
macrecovery.py -b Mac-E43C1C25D4880AD6 -m 00000000000000000 download
Convert DMG to IMG (Move Basesystem file to Desktop before run this command)
dmg2img %USERPROFILE%\Desktop\BaseSystem.dmg %USERPROFILE%\Desktop\BaseSystem.img
Convert IMG to VDI image with VirtualBox
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage convertfromraw --format VDI %USERPROFILE%\Desktop\BaseSystem.img %USERPROFILE%\Desktop\BaseSystem.vdi
2. Create a Virtual Machine
You may look at more of our guides on installing macOS on VirtualBox here if you'd like. In this article, however, we'll go through a quick technique for building a virtual machine that can operate in Recovery mode.
We must first install Extension Pack and VirtualBox. Open VirtualBox after that to start creating a new virtual machine. Your virtual machine should use between 50 and 60 percent of your CPU and RAM. Remember to go to the Storage tab after building the macOS virtual machine and add it to the BaseSystem.vdi file you made in step 1.
Click on New button to create a new virtual machine with Guest OS is Mac OS X and 3-4 GB of RAM. Then click Next button to create a Virtual Disk: Create a virtual hard disk now > VDI > Dynamically allocated, and you need 50 GB of Virtual Disk.
Next step, go to Storage tab and click on "Add" and Open Basesystem.vdi image.
And you need to enable USB 3.0 Controller in USB tab to enable Mouse and keyboard in Virtual Machine.
4. Change SMC for Virtual Machine
We will use 'Command Prompt' to change SMC on VirtualBox. To open Command Prompt, type CMD in the Windows search box, right-click on CMD, and select "Run as Admin". Before change the SMC with CMD, we need to close VirtualBox and then run the following code:
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "Monterey" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "Monterey" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "Monterey" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Monterey" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663"
VBoxManage setextradata "Monterey" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "CK1156I6DB6"
VBoxManage setextradata "Monterey" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Monterey" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 0
5. Convert InstallAssistant.pkg file to App file in Recovery mode
As soon as you turn on the virtual computer, Recovery mode will be instantly accessed. If you don't have a macOS Virtual Disk on mac, you can open Disk Utility and format it with named "macOS".
Because we need to merge both installers to generate a full version of macOS, keep in mind that the version of macOS in Recovery mode should match the version of macOS in the InstallAssistant file. For instance, you need to obtain the most recent Big Sur InstallAssistant if you download the Big Sur BaseSystem file. This is necessary in order for your installer to work.
To change the InstallAsisatant.pkg file into a ".app" file, click Utilities, then choose Terminal and run the commands below.
mkdir -p private/tmp
cp -R "/Install macOS Big Sur.app" private/tmp
cd "private/tmp/Install macOS Big Sur.app"
curl -L -o Contents/SharedSupport/SharedSupport.dmg https://swcdn.apple...this is install assistant link
If you want to use Monterey or Ventura, you can replace "Big Sur" with your version and change InstallAssistant link. You can open Safari in Recovery mode to copy this block of text after selecting it and Paste it to Terminal. macOS is now downloading on your Mac.
After converting to an "Install macOS.app," you may create a macOS USB Installer or reinstall your macOS. You may create a macOS USB Bootable Installer in Recovery mode or use the the command below to open InstallAssistant springboard file to install your macOS.
If your Mac is encountering problems, you may now use any macOS installer in Recovery mode and download it directly using InstallAssistant files. If there are any problems during installation, kindly leave a comment, and we will help you to fix them.