Extract a DMG file.
undmg < ./Sublime\ Text\ Build\ 3103.dmg
This requires zlib, bzip2, glibc, a linker, and a c compiler to build.
git clone https://github.com/matthewbauer/undmg.git cd undmg make
Apple has never released official specs for the DMG file format. Most of it has been reverse engineered. The best source of documentation is at newosxbook.com and the wikipedia page. However, there are some DMG files that won't work correctly with this tool.
What won't work
- Apple Data Compression (haven't found any using this)
- Signed DMG files (support is there from XPWN, I just haven't added a command line option)
GPL3, most of this code is from the xpwn project.