Mac系统10.11(10.12)之后/usr/bin 不能拷贝进去class-dump该怎么办

来源:互联网 发布:dreamhost java 编辑:程序博客网 时间:2024/05/28 15:43

最近在研究class-dump 反编译软件,发现安装的时候有些问题.
/us/bin 没有权限 . 但文档说明需要把class-dump文件放进去

但是可以在~/.bash_profile 环境配置文件下添加 “指引”路径.

  1. 在终端下,新建一个文件夹把 class-dump 放进去
    如终端创建: $mkdir ~/bin

    2.打开~/.bash_profile文件,配置环境变量 (双击打开就可以) 把export PATH=HOME/bin/:PATH 放到第一行中

    3.在Terminal中执行source命令 $ source ~/.bash_profile

完成以上步骤,在terminal中执行class-dump实验一下,应该就可以了。

class-dump 3.5 (64 bit)Usage: class-dump [options] <mach-o-file>  where options are:        -a             show instance variable offsets        -A             show implementation addresses        --arch <arch>  choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64, armv6, armv7, armv7s, arm64)        -C <regex>     only display classes matching regular expression        -f <str>       find string in method name        -H             generate header files in current directory, or directory specified with -o        -I             sort classes, categories, and protocols by inheritance (overrides -s)        -o <dir>       output directory used for -H        -r             recursively expand frameworks and fixed VM shared libraries        -s             sort classes and categories by name        -S             sort methods by name        -t             suppress header in output, for testing        --list-arches  list the arches in the file, then exit        --sdk-ios      specify iOS SDK version (will look in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<version>.sdk        --sdk-mac      specify Mac OS X version (will look in /Developer/SDKs/MacOSX<version>.sdk        --sdk-root     specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)

使用 :
命令如下:class-dump -H /iPhone.app -o /Users/apple/Desktop/heads

解释:
/iPhone.app 是app的路径
/Users/apple/Desktop/heads 是存放dump出来头文件的文件夹路径

注意: 后缀不是ipa文件 是app(选择打开方式 解压 后有app文件)

阅读全文
0 0
原创粉丝点击