Last active
March 6, 2022 21:25
-
-
Save noperator/6f2633dc952d5ae851eda3c12a608aeb to your computer and use it in GitHub Desktop.
Decrypt and mount an encrypted sparse bundle disk image using https://github.com/jief666/sparsebundlefs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create mount points for decrypted sparse bundle disk image and full Apple disk image. | |
sudo mkdir /mnt/bundle /mnt/dmg | |
# Ensure loopback kernel module is loaded. | |
lsmod | grep ^loop || sudo modprobe loop | |
# Decrypt and FUSE-mount sparse bundle disk image. Trailing options help with debugging. | |
sudo sparsebundlefs <ENCRYPTED_SPARSE_BUNDLE_DISK_IMAGE> /mnt/bundle -s -f -D | |
# Note partition 2's "Start" and "Size" values. | |
sudo parted /mnt/bundle/sparsebundle.dmg unit B print | |
Number Start End Size File system Name Flags | |
1 20480B 209735679B 209715200B fat32 EFI System Partition boot, esp | |
2 210763776B 4095737855B 3884974080B fat32 disk image msftdata | |
# Using values noted above, associate loop device with decrypted sparse bundle disk image. | |
sudo losetup -f /mnt/bundle/sparsebundle.dmg --offset 210763776 --sizelimit 3884974080 --show | |
# Mount loop device as full Apple disk image. | |
sudo mount /dev/loop0 /mnt/dmg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment