🚧
[WIP] go-apfs
APFS parser written in pure Go
Originally from this ipsw branch
Install
go get github.com/blacktop/go-apfs
apfs
cli
Install
go install github.com/blacktop/go-apfs/cmd/apfs
OR download from Releases (coming soon)
Build
git clone https://github.com/blacktop/go-apfs.git
cd go-apfs
make build
List files
Extract filesystem DMG from IPSW
❯ unzip -l IPSW | grep dmg
❯ unzip -p IPSW APFS.dmg > APFS.dmg
List the /
directory
❯ apfs ls APFS.dmg
DT_DIR - 06Jun21 02:54:21 - .ba
DT_DIR - 06Jun21 02:54:22 - .mb
DT_DIR - 06Jun21 02:54:22 - Applications
DT_DIR - 06Jun21 02:54:54 - Developer
DT_DIR - 06Jun21 02:54:54 - Library
DT_DIR - 06Jun21 02:55:03 - System
DT_DIR - 06Jun21 03:01:39 - bin
DT_DIR - 06Jun21 03:01:39 - cores
DT_DIR - 06Jun21 03:01:39 - dev
DT_DIR - 06Jun21 03:01:39 - private
DT_DIR - 06Jun21 03:01:39 - sbin
DT_DIR - 06Jun21 03:01:39 - usr
DT_LNK - 06Jun21 03:01:39 - etc
DT_LNK - 06Jun21 03:01:39 - tmp
DT_LNK - 06Jun21 03:01:53 - var
DT_REG - 06Jun21 02:54:21 - .file
Copy files
❯ apfs cp APFS.dmg /System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e
❯ ls -lah dyld_shared_cache_arm64e
-rwxr-xr-x 1 blacktop staff 1.4G Sep 9 23:56 dyld_shared_cache_arm64e
Spec
Supports up to version 2020-06-22 of the specification
License
Apache 2.0 Copyright (c) 2021 blacktop