LoginSignup
2
1

More than 5 years have passed since last update.

AppStoreからダウンロードしたipaファイルを解凍する

Posted at

AndroidのapkやJavaのjarは普通にunzipで解凍することができるが、同じくzip形式であるipa(iOS App)は、単にunzipしようとしても、一部のファイルがunsupported compression method 99と言われて出来ない。
実はipaファイルにはlzfseという別のアルゴリズムも使われているので、それに対応したdecompressorが必要になる。

@sskajeさんがunzip 6.0をベースにlzfse対応したものがあるので、これを使わせていただく。

1.lzfseをインストール

$ git clone https://github.com/lzfse/lzfse.git
$ cd lzfse
$ make
$ sudo make install

2.unzip-lzfseをbuild

$ git clone https://github.com/sskaje/unzip-lzfse
$ git checkout lzfse
fatal: Not a git repository (or any of the parent directories): .git
#あれ、怒られた…けど放置でおk

$ cd unzip-lzfse
$ export LZFSE_PATH=/usr/local
$ make -f unix/Makefile all

多分ここ何かしら失敗します。でも問題なかったのでスルー。

3.unzip

公式の方法とは違うが、unzip-lzfse/unzipを普段のunzipと同じように使う。
もちろん/usr/binにcpしてもいいが、それは自己責任で。

これでmethod 99エラー(?)は解決すると思う。

.app中のバイナリファイルは、この時点ではまだcipheredなのでMach-Oとか見れないと思うが、それはまた探すとして、この記事はこの辺で。

2
1
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1