Skip to content

I got an error when try iOS on Mac #3

@paradiseduo

Description

@paradiseduo

M1 Mac mini
macOS 11.6

> make
clang runner.c -o runner
# Replace this identity, find available certificates usign `security find-identity`
codesign -s "560DD5E3C43BCB88276E4A46407F87AF26997823" --entitlements entitlements.xml --force runner
runner: replacing existing signature
clang interpose.c -arch arm64 -o interpose.dylib -shared -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
# Can link against existing frameworks/libraries here by copying them onto ./Frameworks and adding `-F /Users/minim1/Desktop/Code/p0tools/iOSOnMac/Frameworks -framework AME_OF_FRAMEWORK -Wl,-rpath,/Users/minim1/Desktop/Code/p0tools/iOSOnMac/Frameworks
clang main.c -arch arm64 -o main -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk interpose.dylib

> ./runner main
[*] Preparing to execute iOS binary main
[+] Child process created with pid: 94407
[*] Patching child process to allow dyld interposing...
[*] _amfi_check_dyld_policy_self at offset 0x56874 in /usr/lib/dyld
task_for_pid failed. Is this binary signed and posesses the com.apple.security.cs.debugger entitlement?
[*] Sending SIGCONT to continue child
[*] Child exited with status 9


> codesign -d --entitlements - runner
Executable=/Users/minim1/Desktop/Code/p0tools/iOSOnMac/runner
��qq<?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>com.apple.security.cs.debugger</key>
        <true/>
</dict>
</plist>

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