Error: 'zlib' is an invalid command

后端 未结 2 435
小蘑菇
小蘑菇 2020-12-12 20:55

How can I run this command in OSX?

dd if=mybackup.ab bs=24 skip=1|openssl zlib -d > mybackup.tar

When I run this I get the following errors <

2条回答
  •  -上瘾入骨i
    2020-12-12 21:17

    Openssl on mac is compiled without zlib support. Alternative method described in this article works on my Yosemite:

    dd if=backup.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf -
    

    Optionaly, if you just want to convert it into tar archive:

    dd if=backup.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" > backup.tar
    

    It skips first 24 bytes of Android header and then uncompresses zlib data.

提交回复
热议问题