blacktop / go-apfs Goto Github PK
View Code? Open in Web Editor NEWAPFS parser written in pure Go
License: Apache License 2.0
APFS parser written in pure Go
License: Apache License 2.0
Basically identical to cat(1)
just so that I can see the contents of a file without having to run apfs cp
.
The new iOS 16.0 ipsws contain cryptexes
for divided updates that are in raw APFS dmgs (I think).
iOS/ipsw/dmgs
➜ file 078-37456-031.dmg
078-37456-031.dmg: Apple File System (APFS), blocksize 4096
iOS/ipsw/dmgs
➜ apfs ls 078-37456-031.dmg
Error: found unexpected UDIFResourceFile signure: , expected: koly
> tar -xf iPhone14,5_15.4.1_19E258_Restore.ipsw 078-29017-016.dmg
> file 078-29017-016.dmg
078-29017-016.dmg: IM4P, ramdisk
> ipsw img4 extract 078-29017-016.dmg
• Parsing Im4p
• Exracting payload to file 078-29017-016.dmg.payload
> apfs ls 078-29017-016.dmg.payload
Error: found unexpected UDIFResourceFile signure: , expected: koly
As you can see from that, the dmgs extracted from an IM4P can be mounted by hdiutil but not parsed by go-apfs
.
Trying to extract small files from an iOS rootfs dmg gives this error:
$ apfs cp /data/038-44862-252.dmg /System/Library/FeatureFlags/Domain/Sharing.plist
⨯ unknown compression type: CMP_ATTR_UNCOMPRESSED
(This dmg is from iPhone_4.7_14.5_18E199_Restore.ipsw but any should work to reproduce the issue)
I speculate that it fails for the exact same set of files that also fail with apfs-fuse (giving "input/output error"), but I haven't done enough testing to be sure.
Hi.
Thanks a lot for all of your work here !
Are you going to add support to the new compression method (LZBITMAP) ?
I'm failing extracting /root/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.28.dyldlinkedit
..
Trying to install this alongside with ipsw from the debs results in the following dpkg error,
Building dependency tree
Reading state information... Done
Note, selecting 'go-apfs' instead of './go-apfs_1.0.16_linux_x86_64.deb'
The following NEW packages will be installed:
go-apfs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2954 kB of archives.
After this operation, 6962 kB of additional disk space will be used.
Get:1 /home/haow6/go-apfs_1.0.16_linux_x86_64.deb go-apfs amd64 1.0.16 [2954 kB]
(Reading database ... 42651 files and directories currently installed.)
Preparing to unpack .../go-apfs_1.0.16_linux_x86_64.deb ...
Unpacking go-apfs (1.0.16) ...
dpkg: error processing archive /home/haow6/go-apfs_1.0.16_linux_x86_64.deb (--unpack):
trying to overwrite '/usr/share/doc/ipsw/copyright', which is also in package ipsw 3.1.107
Errors were encountered while processing:
/home/haow6/go-apfs_1.0.16_linux_x86_64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I would like to get the entire filesystem tree of an APFS dmg. Currently apfs ls
only shows a single directory, and running repeated apfs ls foo.dmg /some/directory
for every subdirectory found on previous commands is extremely slow. It would be useful if ls
had a recursive option. Or maybe a new sub-command...
When extracting /System/Library/FeatureFlags/Global.plist
from iPhone_4.7_14.5_18E199_Restore.ipsw
rootfs (038-44862-252.dmg
), I get an "unexpected EOF" error:
$ apfs cp 038-44862-252.dmg /System/Library/FeatureFlags/Global.plist
⨯ unexpected EOF
Running with -V gives confusing log messages, like it was traversing an unrelated directory when the error happened...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.