Skip to content

获取设备 UDID 功能 #203

Closed
Closed

Description

@icyleaf

类似蒲公英通过安装一个 mobileconfig 证书可以获取设备的 UDID ,但需要 MDM 企业账号基本上没法实现。

Apple Mobile Device Management concepts to provide you information about your device. Profile you install tells your iPhone, iPad or iPod to send encrypted data (UDID) to your browser. This profile is temporary and exists on your device only for a few moments to send encrypted data. After this profile removed from your iOS device. We do not store or reuse any of your device information.

Activity

  1. icyleaf commented on May 20, 2020

    @icyleaf
    MemberAuthor

    .mobilfconfig 解析出来的核心内容,除此之外还有证书加密部分:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>PayloadContent</key>
            <dict>
                <key>URL</key>
                <string>http://example.com/retrieve</string>
                <key>DeviceAttributes</key>
                <array>
                    <string>UDID</string>
                    <string>IMEI</string>
                    <string>SERIAL</string>
                    <string>VERSION</string>
                    <string>PRODUCT</string>
                </array>
            </dict>
            <key>PayloadOrganization</key>
            <string>im.ews.zealot</string>
            <key>PayloadDisplayName</key>
            <string>获取设备UDID</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>PayloadUUID</key>
            <string>9CF421B3-9853-9999-BC8A-982CBD3C907C</string>
            <key>PayloadIdentifier</key>
            <string>im.ews.zealot.profile-service</string>
            <key>PayloadDescription</key>
            <string>本描述文件仅用来获取本机设备 UDID</string>
            <key>PayloadType</key>
            <string>Profile Service</string>
        </dict>
    </plist>
  2. icyleaf commented on May 20, 2020

    @icyleaf
    MemberAuthor

    找到一个方法,貌似不需要证书加密 mobileconfig 也行:https://github.com/shaojiankui/iOS-UDID-Safari

  3. icyleaf commented on May 20, 2020

    @icyleaf
    MemberAuthor

    签名 mobileconfig 命令:

    openssl smime -sign -nodetach -outform der \
                  -signer certificate.pem \                              # Root 证书
                  -inkey private_key.pem \                              # 服务器证书私钥
                  -certfile intermediate_certificates.pem  \   # 服务器 crt 公钥证书
                  -in profile.mobileconfig \                              # 未加密 mobileconfig 
                  -out profile_signed.mobileconfig                 # 已加密 mobileconfig 

    http://www.rootmanager.com/iphone-ota-configuration/iphone-ota-setup-with-signed-mobileconfig.html

  4. icyleaf commented on May 21, 2020

    @icyleaf
    MemberAuthor

    image

    不用加密也可以安装和获取 udid 等信息

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions