From fe83ce8bb5d05fc38b2c4fa4cb48034077d0af7d Mon Sep 17 00:00:00 2001 From: "Barry K. Nathan" Date: Mon, 21 Sep 2020 06:11:24 -0700 Subject: [PATCH] micropatcher/unpatch: Add/remove trampoline The trampoline itself needs further changes before it will actually function. --- micropatcher.sh | 11 +++++++++++ unpatch.sh | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/micropatcher.sh b/micropatcher.sh index 87193ea..4d3396a 100755 --- a/micropatcher.sh +++ b/micropatcher.sh @@ -163,6 +163,17 @@ then fi cat payloads/com.apple.Boot.plist > "$VOLUME/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" +# Add the trampoline. +echo 'Installing trampoline...' +TEMPAPP="$VOLUME/tmp.app" +mv -f "$APPPATH" "$TEMPAPP" +cp -r payloads/trampoline.app "$APPPATH" +mv -f "$TEMPAPP" "$APPPATH/Contents/MacOS/InstallAssistant.app" +cp "$APPPATH/Contents/MacOS/InstallAssistant.app/Contents/Resources/InstallAssistant.icns" "$APPPATH/Contents/Resources/InstallAssistant.icns" +cp "$APPPATH/Contents/MacOS/InstallAssistant" "$APPPATH/Contents/MacOS/InstallAssistant_plain" +cp "$APPPATH/Contents/MacOS/InstallAssistant" "$APPPATH/Contents/MacOS/InstallAssistant_springboard" +touch "$APPPATH" + # Copy the shell scripts into place so that they may be used once the # USB stick is booted. echo 'Adding shell scripts...' diff --git a/unpatch.sh b/unpatch.sh index 64f29f0..0053e6e 100755 --- a/unpatch.sh +++ b/unpatch.sh @@ -85,6 +85,12 @@ else fi echo +echo 'Removing trampoline.' +TEMPAPP="$VOLUME/tmp.app" +mv -f "$APPPATH/Contents/MacOS/InstallAssistant.app" "$TEMPAPP" +rm -rf "$APPPATH" +mv -f "$TEMPAPP" "$APPPATH" + echo 'Removing kexts, shell scripts, and patcher version info.' # For v0.0.9 and earlier rm -rf "$VOLUME"/*.kext