Skip to content

Instantly share code, notes, and snippets.

@romdim
Created September 26, 2020 08:44
Show Gist options
  • Save romdim/58b4ce14ef0517241abab4b9d8a33d32 to your computer and use it in GitHub Desktop.
Save romdim/58b4ce14ef0517241abab4b9d8a33d32 to your computer and use it in GitHub Desktop.
Install apfs-fuse in Ubuntu 20.04 LTS
sudo apt update
sudo apt install fuse libfuse-dev libicu-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev g++
sudo snap install cmake --classic
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
mkdir build
cd build
cmake ..
ccmake .
# Choose fuse3 off -> c -> g -> q
make
sudo ./apfs-fuse /path/to/device /path/to/destination
@romdim
Copy link
Author

romdim commented Sep 26, 2020

For my damaged apfs ssd that returned on some files the following error:
rsync: readlink_stat("/file/path") failed: Input/output error (5)

I reran the above with apfs-fuse -d 124 -l ...

And then following the advice from this issue:
sgan81/apfs-fuse#117

Changed line 112 of ~/apfs-fuse/ApfsLib/ApfsContainer.app to if (sb->nx_o.o_xid == 0x1a06f8) which made everything magically work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment