【问题标题】:iOS - Is is possible to tell what Base SDK an app binary was compiled against?iOS - 是否可以判断应用程序二进制文件是针对什么 Base SDK 编译的?
【发布时间】:2013-11-24 21:53:00
【问题描述】:

我有一个应用程序二进制文件,我想知道它是针对 iOS 5.x、6.x 还是 7.0 SDK 编译的。有可能解决这个问题吗?

【问题讨论】:

    标签: ios reverse-engineering


    【解决方案1】:

    提取 IPA 并使用 MachOView 打开二进制文件 (Payload/appname.app/appname)。在左侧打开加载命令-> LC_VERSION_MIN_IPHONEOS

    右边应该有四个字段。

    来自 iPhone SDK 中的 usr/include/mach-o/loader.h,

    /*
     * The version_min_command contains the min OS version on which this 
     * binary was built to run.
     */
    struct version_min_command {
        uint32_t    cmd;            /* LC_VERSION_MIN_MACOSX or
                                       LC_VERSION_MIN_IPHONEOS  */
        uint32_t    cmdsize;        /* sizeof(struct min_version_command) */
        uint32_t    version;        /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
        uint32_t    sdk;            /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
    };
    

    此处的“版本”字段指定应用所需的最低 iOS 版本。 'Reserved' 字段指定编译应用程序所针对的 SDK。使用上述结构解码SDK版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-21
      • 2011-10-19
      • 1970-01-01
      • 2011-12-11
      • 2020-10-15
      • 2022-01-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多