dtrx-py / dtrx

Do The Right Extraction
GNU General Public License v3.0
224 stars 10 forks source link

Handle dmg files #8

Closed mattl closed 3 years ago

mattl commented 3 years ago

7z can handle DMG files but dtrx doesn't know what they are.

https://twitter.com/garrett/status/1394330803346284546

noahp commented 3 years ago

nice, thanks for reporting! added it in #9

noahp commented 3 years ago

fwiw, I tested on a .dmg created on an actual mac osx machine; it contained an APFS partition after extracting:

❯ file *
0.MBR:                DOS/MBR boot sector, extended partition table (last)
1.Primary GPT Header: GPT data structure (nonstandard: at LBA 0), version 1.0, GUID: fc4701fc-ebeb-40d2-bd91-30ed459e1081, disk size: 20546 sectors (sector size unknown)
2.Primary GPT Table:  data
3.free:               data
4.Apple_APFS:         Apple File System (APFS), blocksize 4096
5.free:               data
6.Backup GPT Table:   data
7.Backup GPT Header:  GPT data structure (nonstandard: at LBA 0), version 1.0, GUID: fc4701fc-ebeb-40d2-bd91-30ed459e1081, disk size: 2 sectors (sector size unknown)

On ubuntu 20.10, this package allowed me to mount the partition:

sudo apt install libfsapfs-utils
# mount
mkdir apfs
fsapfsmount -f 1 4.Apple_APFS apfs
# unmount
fusermount -u apfs

Here's the .dmg I created on mac osx for the above test: test.real.zip