Extrapolated from a combination of:
- https://gist.github.com/hanvari/5c0d9ffd061e89020b4b8a489eff8344
- https://gitlab.com/BenjaminDobell/Heimdall/-/merge_requests/470/diffs
Open Terminal
### CLONE THE REPO ###
git clone https://gitlab.com/BenjaminDobell/Heimdall.git
cd Heimdall
### PATCH THE CMakeLists.txt ###
curl https://gist.githubusercontent.com/pjobson/1e04674e5b30d664b58bc7ec6130824e/raw/f1bc6d3959593c528c209275cd81abda3be2ff59/heimdall-frontend.CMakeLists.txt -o heimdall-frontend/CMakeLists.txt
curl https://gist.githubusercontent.com/pjobson/1e04674e5b30d664b58bc7ec6130824e/raw/f1bc6d3959593c528c209275cd81abda3be2ff59/heimdall.CMakeLists.txt -o heimdall/CMakeLists.txt
curl https://gist.githubusercontent.com/pjobson/1e04674e5b30d664b58bc7ec6130824e/raw/f1bc6d3959593c528c209275cd81abda3be2ff59/libpit.CMakeLists.txt -o libpit/CMakeLists.txt
### INSTALL THE KEXT ###
OSX/install-kext.sh
# Maybe Reboot #
### DO THE BUILD ###
mkdir build
cd build
cmake -DDISABLE_FRONTEND=ON -DCMAKE_BUILD_TYPE=Release ..
LIBRARY_PATH=/usr/local/lib make
make install
### DO STUFF ###
which heimdall
heimdall info
heimdall version
heimdall download-pit --output pit.pit
heimdall flash --RECOVERY recovery.img
# Flashing a Phone Example:
heimdall flash --APNHLOS NON-HLOS.bin \
--ABOOT aboot.mbn \
--BOOT boot.img \
--CACHE cache.img.ext4 \
--HIDDEN hidden.img.ext4 \
--MODEM modem.bin \
--RPM rpm.mbn \
--SBL1 sbl1.mbn \
--DBI sdi.mbn \
--SYSTEM system.img.ext4 \
--TZ tz.mbn \
--no-reboot
That's it. Some guides show to run heimdall
as root, I'm not sure if that is necessary.