Giter Site home page Giter Site logo

planetbeing / libdmg-hfsplus Goto Github PK

View Code? Open in Web Editor NEW
157.0 157.0 103.0 30.59 MB

Portable libraries and utilities that manipulate HFS+ volumes and Apple's DMG images

License: GNU General Public License v3.0

CMake 0.63% C 99.07% Makefile 0.01% C++ 0.29%

libdmg-hfsplus's People

Contributors

planetbeing avatar theuni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libdmg-hfsplus's Issues

support reading DMG with standard disk layout.

HI,

Some dmg files doesn't contain the dmg 'koly' header at trailing 512 byes of the file (like those created with hdiutil).

when trying to extract such dmg file using libdmg I got : error: readUDIFResourceFile - signature incorrect

This format Is simply the disk layout, and it can be read from disk layout partition table (in my case, the partition is from GPT type)

does libdmg support this format ?

compilation error: bufferRead undeclared

I'm not sure how this escaped notice (except that this repository doesn't seem active), but the latest commit containing ADC support doesn't compile.

The 'bufferRead' variable needs to be declared in dmg/dmgfile.c and dmg/io.c, and it also looks like there should be an initialization statement (bufferRead = 0) in dmg/io.c, just like there is in dmg/dmgfile.c.

large file problems: uint32_t typo

There's an embarrassing typo in includes/dmg/dmg.h that prevents libdmg from reading large dmgs: the return value of readUInt64 should be uint64_t, not uint32_t.

A more cosmetic issue is that there's a line in hfs/hfslib.c that prints the total filesystem size, and it has some 32-bit values that need to be cast to 64-bit before multiplying.

After fixing those issues, libdmg seems to work fine at listing and extracting files from a 7 GB dmg.

large file problems on 32-bit linux

Large file problems again, this time on 32-bit Linux instead of 64-bit. Again, the solution is pretty simple:

CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"

I tried putting these defines in common.h, but of course it doesn't get included in the right order for that to work. So I set CFLAGS before calling cmake. Presumably the right way to do this would be to put it in CMakeLists.txt, but I don't know cmake very well.

Compilation error: field ‘hmacCTX’ has incomplete type

Complete build log:

matt@hp:~/libdmg-hfsplus$ mkdir build
matt@hp:~/libdmg-hfsplus$ cd build
matt@hp:~/libdmg-hfsplus/build$ cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0g") 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/matt/libdmg-hfsplus/build
matt@hp:~/libdmg-hfsplus/build$ make
Scanning dependencies of target common
[  3%] Building C object common/CMakeFiles/common.dir/abstractfile.c.o
[  6%] Linking C static library libcommon.a
[  6%] Built target common
Scanning dependencies of target hfs
[  9%] Building C object hfs/CMakeFiles/hfs.dir/btree.c.o
[ 12%] Building C object hfs/CMakeFiles/hfs.dir/catalog.c.o
[ 16%] Building C object hfs/CMakeFiles/hfs.dir/extents.c.o
[ 19%] Building C object hfs/CMakeFiles/hfs.dir/xattr.c.o
[ 22%] Building C object hfs/CMakeFiles/hfs.dir/fastunicodecompare.c.o
[ 25%] Building C object hfs/CMakeFiles/hfs.dir/flatfile.c.o
[ 29%] Building C object hfs/CMakeFiles/hfs.dir/hfslib.c.o
[ 32%] Building C object hfs/CMakeFiles/hfs.dir/rawfile.c.o
[ 35%] Building C object hfs/CMakeFiles/hfs.dir/utility.c.o
[ 38%] Building C object hfs/CMakeFiles/hfs.dir/volume.c.o
[ 41%] Building C object hfs/CMakeFiles/hfs.dir/hfscompress.c.o
[ 45%] Linking C static library libhfs.a
[ 45%] Built target hfs
Scanning dependencies of target dmg
[ 48%] Building C object dmg/CMakeFiles/dmg.dir/adc.c.o
[ 51%] Building C object dmg/CMakeFiles/dmg.dir/base64.c.o
[ 54%] Building C object dmg/CMakeFiles/dmg.dir/checksum.c.o
[ 58%] Building C object dmg/CMakeFiles/dmg.dir/dmgfile.c.o
[ 61%] Building C object dmg/CMakeFiles/dmg.dir/dmglib.c.o
[ 64%] Building C object dmg/CMakeFiles/dmg.dir/filevault.c.o
In file included from /home/matt/libdmg-hfsplus/dmg/filevault.c:6:0:
/home/matt/libdmg-hfsplus/includes/dmg/filevault.h:82:11: error: field ‘hmacCTX’ has incomplete type
  HMAC_CTX hmacCTX;
           ^~~~~~~
/home/matt/libdmg-hfsplus/dmg/filevault.c: In function ‘fvClose’:
/home/matt/libdmg-hfsplus/dmg/filevault.c:180:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’; did you mean ‘HMAC_CTX_get_md’? [-Wimplicit-function-declaration]
  HMAC_CTX_cleanup(&(info->hmacCTX));
  ^~~~~~~~~~~~~~~~
  HMAC_CTX_get_md
/home/matt/libdmg-hfsplus/dmg/filevault.c: In function ‘createAbstractFileFromFileVault’:
/home/matt/libdmg-hfsplus/dmg/filevault.c:237:2: warning: implicit declaration of function ‘HMAC_CTX_init’; did you mean ‘HMAC_CTX_new’? [-Wimplicit-function-declaration]
  HMAC_CTX_init(&(info->hmacCTX));
  ^~~~~~~~~~~~~
  HMAC_CTX_new
dmg/CMakeFiles/dmg.dir/build.make:182: recipe for target 'dmg/CMakeFiles/dmg.dir/filevault.c.o' failed
make[2]: *** [dmg/CMakeFiles/dmg.dir/filevault.c.o] Error 1
CMakeFiles/Makefile2:182: recipe for target 'dmg/CMakeFiles/dmg.dir/all' failed
make[1]: *** [dmg/CMakeFiles/dmg.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

System: Ubuntu 64-bit bionic beaver.

no ADC compression support

License-compatible (GPL) ADC support is in dmg2img; I copied it out and into dmglib and it works. I can give you a patch if you wish.

it

/storage/emulated/0/rar/Download/true%intentipns/git-2.30.0.tar.gz
Cannot create symbolic link /storage/emulated/0/rar/git-2.30.0/git-2.30.0/RelNotes
• Permission denied

/storage/emulated/0/rar/Download/true%intentipns/worktree.txt
Bad or unknown format /storage/emulated/0/rar/Download/true%intentipns/worktree.txt archive
https://cointelegraph.com/bitcoin-for-beginners/what-is-bitcoin-wallets

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.