Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blacktop/go-apfs
APFS parser written in pure Go
https://github.com/blacktop/go-apfs
apfs apfs-volumes dmg file-recovery golang parser
Last synced: about 1 month ago
JSON representation
APFS parser written in pure Go
- Host: GitHub
- URL: https://github.com/blacktop/go-apfs
- Owner: blacktop
- License: apache-2.0
- Created: 2021-09-10T00:16:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T08:46:51.000Z (about 1 year ago)
- Last Synced: 2024-08-05T10:19:43.115Z (5 months ago)
- Topics: apfs, apfs-volumes, dmg, file-recovery, golang, parser
- Language: Go
- Homepage:
- Size: 469 KB
- Stars: 66
- Watchers: 4
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [WIP] go-apfs 🚧
[![Go](https://github.com/blacktop/go-apfs/actions/workflows/go.yml/badge.svg)](https://github.com/blacktop/go-apfs/actions/workflows/go.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/blacktop/go-apfs.svg)](https://pkg.go.dev/github.com/blacktop/go-apfs) [![GitHub](https://img.shields.io/github/license/blacktop/go-apfs)](https://github.com/blacktop/go-apfs/blob/main/LICENSE)
> APFS parser written in pure Go
---
Originally from this [ipsw branch](https://github.com/blacktop/ipsw/tree/feature/apfs-parser)
## Install
```bash
go get github.com/blacktop/go-apfs
```### `apfs` *cli*
Install
```bash
go install github.com/blacktop/go-apfs/cmd/apfs@latest
```With [Homebrew](https://brew.sh)
```bash
brew install blacktop/tap/apfs
```> OR download from [Releases](https://github.com/blacktop/go-apfs/releases/latest)
Build
```bash
git clone https://github.com/blacktop/go-apfs.git
cd go-apfs
make build
```#### List files
Extract filesystem DMG from IPSW using [ipsw](https://github.com/blacktop/ipsw)
```bash
❯ ipsw extract --dmg IPSW
• Extracting File System DMG
• Created 018-62379-017.dmg
```List the `/` directory
```bash
❯ apfs ls 018-62379-017.dmgDT_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
```#### Cat files
```bash
❯ apfs cat APFS.dmg /System/Library/FeatureFlags/Global.plist
``````xml
SiriUI
Pym
Enabled
```#### Copy files
```bash
❯ apfs cp APFS.dmg /System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e
``````bash
❯ 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 **APFS** [specification](https://developer.apple.com/support/downloads/Apple-File-System-Reference.pdf)
## License
Apache 2.0 Copyright (c) 2020-2023 **blacktop**