I'm not sure what's the generic answer.
Open a terminal, and type
xcode-select --install
xcode-select --install
- If you get an error "-bash: xcode-select: command not found", you need to install Xcode from the App store, then start again this command.
- If an alert windows popup asking if you want to install, click on "install" button.
- If it prints error "xcode-select: error: command line tools are already installed, [...]", you're all set.
- Following instruction on their website, type following in terminal:
Following instruction on their website, type following in terminal:
> /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- If you get an error about Xcode tools not being installed whereas you did install it, then change the path to Xcode:
If you get an error about Xcode tools not being installed whereas you did install it, then change the path to Xcode:
sudo xcode-select -switch /
sudo xcode-select -switch /
- Download ZIP (available in green button "Clone or Download" on the right)
Download ZIP (available in green button "Clone or Download" on the right)
- Extract ZIP content
Extract ZIP content
- Open terminal and change directory to the dislocker-master directory
Open terminal and change directory to the dislocker-master directory
- Compile and install dislocker:
Compile and install dislocker:
brew install src/dislocker.rb
If you get an error about Xcode tools not being installed whereas you did install it, then change the path like this:
sudo xcode-select -switch /
brew install src/dislocker.rb
- If you get an error about Xcode tools not being installed whereas you did install it, then change the path like this:
> sudo xcode-select -switch /
- Eject the USB drive for example from Disk Utility (Unmount button)
Eject the USB drive for example from Disk Utility (Unmount button)
- Create a directory for the decrypted file
Create a directory for the decrypted file
sudo mkdir /tmp/mydrive
Warning: this directory will have strange characteristics: it appears with "ls" but not with "ls -l" and not in the Finder wherever it is, moreover the content can't be listed, and trying to delete it often fails with strange error messages. That's why I put it in /tmp which is cleaned at every reboot.
Decrypt the USB stick with dislocker. If disk is "disk3s1" and the password is "MyPassword", the command will look like:
sudo dislocker-file -V /dev/disk3s1 -v -uMyPassword -r -- /tmp/mydrive
Add the disk image to Disk Utility and mount it
sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage /tmp/mydrive/dislocker-file
Note: Don't try to list "/tmp/mydrive/dislocker-file" by yourself. Just assume it is there and write the path as is.
sudo mkdir /tmp/mydrive
Warning: this directory will have strange characteristics: it appears with "ls" but not with "ls -l" and not in the Finder wherever it is, moreover the content can't be listed, and trying to delete it often fails with strange error messages. That's why I put it in /tmp which is cleaned at every reboot.
- Decrypt the USB stick with dislocker. If disk is "disk3s1" and the password is "MyPassword", the command will look like:
sudo dislocker-file -V /dev/disk3s1 -v -uMyPassword -r -- /tmp/mydrive
- Add the disk image to Disk Utility and mount it
sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage /tmp/mydrive/dislocker-file
Note: Don't try to list "/tmp/mydrive/dislocker-file" by yourself. Just assume it is there and write the path as is.
Hourray !!!, the new drive is there !
- Detach the fuse volume
Detach the fuse volume
sudo hdiutil detach /tmp/mydrive/
sudo hdiutil detach /tmp/mydrive/