Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions big-sur-micropatcher.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
3 changes: 2 additions & 1 deletion micropatcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ touch "$APPPATH"
# USB stick is booted.
echo 'Copying shell scripts...'
cp -f payloads/*.sh "$VOLUME"
cp -f payloads/*.md "$VOLUME"

# Copy Hax dylibs into place
echo "Adding Hax dylibs..."
Expand All @@ -196,7 +197,7 @@ echo 'Adding kexts and other binaries...'
cp -rf payloads/kexts payloads/bin "$VOLUME"

# Let's play it safe and ensure the shell scripts, dylibs, etc. are executable.
chmod -R u+x "$VOLUME"/*.sh "$VOLUME"/Hax*.dylib "$VOLUME"/bin
chmod -R u+x "$VOLUME"/*.sh "$VOLUME"/*.md "$VOLUME"/Hax*.dylib "$VOLUME"/bin

# Save a file onto the USB stick that says what patcher & version was used,
# so it can be identified later (e.g. for troubleshooting purposes).
Expand Down
Binary file added payloads/.DS_Store
Binary file not shown.
Binary file added payloads/bin/AppIcon.icns
Binary file not shown.
Binary file added payloads/bin/Assets.car
Binary file not shown.
Binary file added payloads/bin/micro
Binary file not shown.
Binary file added payloads/bin/pbzx
Binary file not shown.
6 changes: 6 additions & 0 deletions payloads/patch-kexts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,12 @@ else

# Also, remove kmutil.old (if it exists, it was installed by patch-kexts.sh)
rm -f "$VOLUME/usr/bin/kmutil.old"

# patching Music Icon
echo 'Patching music icon'
cp -v "/Image\ \Volume/bin/AppIcon.icns" "$VOLUME/System/Applications/Music.app/Contents/Resources"
cp -v "/Image\ \Volume/bin/Assets.car" "$VOLUME/System/Applications/Music.app/Contents/Resources"

fi

# The way you control kcditto's *destination* is by choosing which volume
Expand Down
4 changes: 4 additions & 0 deletions payloads/snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -r com.apple.bless.837AED20-8AB1-405E-A344-77414C9CFC0D -v /Volumes/Sh1t
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -s R.W -v /Volumes/Sh1t
sudo mount -uw /
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -v /Volumes/Sh1t -r ""
12 changes: 9 additions & 3 deletions payloads/zap-snapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ then
fi
fi

for XID in `diskutil apfs listSnapshots "$VOLUME"|fgrep XID|awk '{print $3}'`
#Snapshot deletion code by StarPlayrX 2020
snapshots=$(diskutil apfs listsnapshots "$VOLUME" | grep +-- | sed 's/^.\{4\}//')

for uuid in $snapshots
do
echo $XID
diskutil apfs deleteSnapshot "$VOLUME" -xid $XID
printf '📸 Attempting to delete snapshot => '
echo $uuid
echo ''

diskutil apfs deletesnapshot "$VOLUME" -uuid $uuid
done
2 changes: 1 addition & 1 deletion unpatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ rm -f "$VOLUME"/patch.*
# For v0.5.0 and later
rm -rf "$VOLUME"/bin
# For all versions
rm -f "$VOLUME"/*.sh "$VOLUME/Patch-Version.txt"
rm -f "$VOLUME"/*.sh "$VOLUME"/*.md "$VOLUME/Patch-Version.txt"

echo 'Remvoing Hax dylibs...'
rm -f "$VOLUME"/Hax*.dylib
Expand Down