Giter Club home page Giter Club logo

simject's People

Contributors

akemin-dayo avatar aydenp avatar poomsmart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simject's Issues

Issue setting up simject with 'make setup'

While building module 'Foundation' imported from /Users/Chris/theos/Prefix.pch:11:
While building module 'ObjectiveC' imported from /Users/Chris/theos/sdks/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from :2:
In file included from /Users/Chris/theos/sdks/MacOSX10.13.sdk/usr/include/objc/./Protocol.h:51:
/Users/Chris/theos/sdks/MacOSX10.13.sdk/usr/include/objc/Object.h:141:28: error:
expected a type

  • (id)forward: (SEL)sel : (marg_list)args;
    ^
    /Users/Chris/theos/sdks/MacOSX10.13.sdk/usr/include/objc/Object.h:142:29: error:
    expected a type
  • (id)performv: (SEL)sel : (marg_list)args;
    ^
    While building module 'Foundation' imported from /Users/Chris/theos/Prefix.pch:11:
    In file included from :2:
    In file included from /Users/Chris/theos/sdks/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
    /Users/Chris/theos/sdks/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:10: fatal error:
    could not build module 'ObjectiveC'
    #include <objc/NSObjCRuntime.h>
In file included from <built-in>:1:
/Users/Chris/theos/Prefix.pch:11:11: fatal error: could not build module
     'Foundation'
               #import <Foundation/Foundation.h>
                ~~~~~~~^
4 errors generated.
make[4]: *** [/Users/Chris/simject/respring_simulator/.theos/obj/macosx/debug/i386/respring_simulator.mm.ea9b506d.o] Error 1
make[3]: *** [/Users/Chris/simject/respring_simulator/.theos/obj/macosx/debug/i386/respring_simulator] Error 2
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [respring_simulator.all.tool.variables] Error 2
make: *** [all] Error 2

unable to make simject

Thank you for making this wonderful library!

When I try to make simject, I get the following:

$ make setup
bin/respring_simulator
bin
==> Cleaning…
==> Cleaning…
==> Cleaning…
> Making all for tool respring_simulator…
==> Compiling respring_simulator.mm (x86_64)…
==> Compiling ../simjectCore.mm (x86_64)…
==> Linking tool respring_simulator (x86_64)…
==> Stripping respring_simulator (x86_64)…
==> Compiling respring_simulator.mm (i386)…
==> Compiling ../simjectCore.mm (i386)…
==> Linking tool respring_simulator (i386)…
==> Stripping respring_simulator (i386)…
==> Merging tool respring_simulator…
Copying binaries...
> Making all for tweak simject…
==> Preprocessing simject.xm…
==> Compiling simject.xm (x86_64)…
==> Compiling ../simjectCore.mm (x86_64)…
==> Linking tweak simject (x86_64)…
==> Stripping simject (x86_64)…
==> Preprocessing simject.xm…
==> Compiling simject.xm (i386)…
==> Compiling ../simjectCore.mm (i386)…
==> Linking tweak simject (i386)…
==> Stripping simject (i386)…
==> Merging tweak simject…
==> Signing simject…
bash: ldid: command not found
make[3]: *** [/Users/Arnaud/Desktop/simject/simject/.theos/obj/iphone_simulator/simject.dylib] Error 127
rm /Users/Arnaud/Desktop/simject/simject/.theos/obj/iphone_simulator/simject.dylib.47ba6b93.unsigned
make[2]: *** [internal-library-all_] Error 2
make[1]: *** [simject.all.tweak.variables] Error 2
make: *** [all] Error 2

When I try make update-theos I get the following:

$ make update-theos
make: *** No rule to make target `update-theos'.  Stop.

Any help would be greatly appreciated. Thank you!

iPhone Developer: no identity found

[bin/resim
bin
==> Cleaning…
==> Cleaning…

Making all for tool resim…
==> Compiling resim.mm (x86_64)…
==> Linking tool resim (x86_64)…
==> Generating debug symbols for resim…
==> Merging tool resim…
==> Signing resim…
Copying binaries...
/Users/XXXX/github/simject/resim/.theos/obj/macosx/debug/resim -> ../bin/resim
Making all for tweak simject…
==> Preprocessing simject.xm…
==> Compiling simject.xm (x86_64)…
==> Linking tweak simject (x86_64)…
ld: warning: OS version (7.0.0) too small, changing to 8.0.0
==> Generating debug symbols for simject…
rm /Users/XXXX/github/simject/simject/.theos/obj/iphone_simulator/debug/x86_64/simject.xm.mm
==> Merging tweak simject…
==> Signing simject…
iPhone Developer: no identity found
make[3]: *** [/Users/XXXX/github/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib] Error 1
rm /Users/XXXX/github/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib.7876ddb4.unsigned
make[2]: *** [internal-library-all_] Error 2
make[1]: *** [simject.all.tweak.variables] Error 2
make: *** [all] Error 2](url)

I am using Xcode 11.2 on macOS Catalina 10.15.1. I am suspecting the problem could be new certificate Apple introduces in Xcode 11 which replaces old iOS development certificates.

I've tried reinstalling Xcode but no luck. Anyone seeing this problem? I'll appreciate someone could help.

Required code signature missing for '/opt/simject/simject.dylib'

When using respring_simulator bin, simulator does respring, but I am also getting this output, and any dylibs in /opt/simject are not being included:

dyld: warning: could not load inserted library '/opt/simject/simject.dylib' because no suitable image found.  Did find:
        /opt/simject/simject.dylib: required code signature missing for '/opt/simject/simject.dylib'

I should also note that I am hoping to use simject to throw myself into a tweak development process.. (My experience is mostly front-end web dev thus far). I am yet to start a project using either iOSOpenDev or strictly theos. Right now, I am just dpkg-deb-ing some of my favorite tweaks to test injecting into the simulator.

clang: error: using sysroot for 'iPhoneOS' but targeting 'MacOSX'

I am trying to install simject for the first time. So i followed the instructions on the README:

git clone https://github.com/angelXwind/simject.git
cd simject/
make setup

This fails with the following log:

Mevins-MacBook-Pro:simject foxfort$ make setup messages=1
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 6 "Cleaning"); set -o pipefail; (rm -rf "/Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx")
==> Cleaning…
set -o pipefail; (rm "/Users/foxfort/Documents/workspace/simject/resim/.theos/build_session")
set -o pipefail; (touch "/Users/foxfort/Documents/workspace/simject/resim/.theos/build_session")
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 6 "Cleaning"); set -o pipefail; (rm -rf "/Users/foxfort/Documents/workspace/simject/simject/.theos/obj/iphone_simulator")
==> Cleaning…
> Making all for tool resim…
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-keep-going COLOR=1 \
		internal-tool-compile \
		_THEOS_CURRENT_TYPE=tool THEOS_CURRENT_INSTANCE=resim _THEOS_CURRENT_OPERATION=compile \
		THEOS_BUILD_DIR="." _THEOS_MAKE_PARALLEL=yes
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-print-directory --no-keep-going internal-tool-compile _THEOS_CURRENT_TYPE="tool" THEOS_CURRENT_INSTANCE="resim" _THEOS_CURRENT_OPERATION="compile" THEOS_BUILD_DIR="." THEOS_CURRENT_ARCH="x86_64"
set -o pipefail; (mkdir -p /Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx/debug/x86_64/)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 2 "Compiling resim.mm (x86_64)"); set -o pipefail; (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -x objective-c++ -c -I/Users/foxfort/theos/include -I/Users/foxfort/theos/vendor/include -I/Users/foxfort/theos/include/_fallback -include /Users/foxfort/theos/Prefix.pch -MT /Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx/debug/x86_64/resim.mm.11d5628d.o -MMD -MP -MF "/Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx/debug/x86_64/resim.mm.11d5628d.Td" -fcolor-diagnostics -DTARGET_MACOSX=1 -O0 -Wall -ggdb -Werror -isysroot "/Users/foxfort/theos/sdks/iPhoneOS11.2.sdk" -mmacosx-version-min=10.9 -fmodules -fcxx-modules -fmodule-name=resim -fbuild-session-file=/Users/foxfort/Documents/workspace/simject/resim/.theos/build_session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -fmodules-validate-once-per-build-session   -Wno-deprecated-declarations -DDEBUG -O0  -DTHEOS_INSTANCE_NAME="\"resim\"" -fmodules -fcxx-modules -fmodule-name=resim -fbuild-session-file=/Users/foxfort/Documents/workspace/simject/resim/.theos/build_session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -fmodules-validate-once-per-build-session  -arch x86_64               resim.mm -o /Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx/debug/x86_64/resim.mm.11d5628d.o)
==> Compiling resim.mm (x86_64)…
clang: error: using sysroot for 'iPhoneOS' but targeting 'MacOSX' [-Werror,-Wincompatible-sysroot]
make[4]: *** [/Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx/debug/x86_64/resim.mm.11d5628d.o] Error 1
make[3]: *** [/Users/foxfort/Documents/workspace/simject/resim/.theos/obj/macosx/debug/x86_64/resim] Error 2
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [resim.all.tool.variables] Error 2
make: *** [all] Error 2

I have both Xcode 10 and 11 installed on my mac running Mac OS 10.14. I want to run it on my ios 13 simulator. My ~/.theosrc contains the following:

SDKVERSION = 11.2
SYSROOT = $(THEOS)/sdks/iPhoneOS11.2.sdk

I have also a paid developer account and i can build and run apps from xcode on my devices. How do i fix this?

Another error signing simject during make setup

here's what I keep getting

iPhone Developer: ambiguous (matches "iPhone Developer: #this is where my email is (68BJHHWDL9)" and "iPhone Developer: #this is where my second email is (6P645ATJN8)" in /Users/tnns_beast22/Library/Keychains/login.keychain-db)
make[3]: *** [/Users/tnns_beast22/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib] Error 1
rm /Users/tnns_beast22/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib.7876ddb4.unsigned
make[2]: *** [internal-library-all_] Error 2
make[1]: *** [simject.all.tweak.variables] Error 2
make: *** [all] Error 2

Bad CPU type

Hi man, respring_simulator gives me this error: Bad CPU type in executable

iMac macOS Sierra 10.12.2

Building simject for OSX gives errors

When trying to install simject, I get these error messages. How do I fix them please. :3

ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libobjc.dylib) built for iOS. Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks//Foundation.framework/Foundation) built for iOS. Note: This will be an error in the future.
ld: warning: ignoring file /opt/theos/lib/libsubstrate.dylib, missing required architecture x86_64 in file /opt/theos/lib/libsubstrate.dylib (3 slices)
ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation) built for iOS. Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libstdc++.dylib) built for iOS. Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libSystem.dylib) built for iOS. Note: This will be an error in the future.
Undefined symbols for architecture x86_64:
  "_MSHookMessageEx", referenced from:
      _logosLocalInit() in simject.xm.4662ce3f.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/iphone_simulator/simject.dylib] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [simject.all.tweak.variables] Error 2

Can't get Sample tweak to fire

Hi Karen,

I can't seem to get your sample tweak to fire. Below are the steps I have taken.

macOS Sierra: 10.12.2
Xcode: Version 8.2.1 (8C1002)
Simulator: Version 10.0 (SimulatorApp-726.7

  1. I have compiled simject, without any errors.
  2. Launched simulator running iPhone6s
  3. Ran the command-line respring_simulator tool and it resprings.
  4. Compile the sample and copy the dylib and plist into /opt/simject/
  5. Run respring_simulator
  6. Wait for alert message box to appear when the springboard launches
  7. :( it never shows up
  8. Checked Console didn't notice any obvious errors related to this.

Is there something in the logs I can look for to see what might be causing some issues?

Thanks in advance,
Stephen

Issues signing simject.

After running make setup and both respring_simulator/simject, simject runs into the error:

error: The specified item could not be found in the keychain.

I added my account to XCode but with no luck.

Dylib not loading into the simulator with arm64 (and it doesn't compile with x86_64)

Okay so I have the same error as #46 and #35 however neither solutions seems to work. When I compile with ARCHS = arm64 it does compile, but it won't load into the simulator. It says:

�[1;31m[simject] �[m�[0;31msimject.xm:102�[m �[0;30;41mERROR:�[m Couldn't inject /opt/simject/Snapper2.dylib into com.apple.springboard:
dlopen(/opt/simject/Snapper2.dylib, 9): no suitable image found.  Did find:
	/opt/simject/Snapper2.dylib: no matching architecture in universal wrapper.

When I look at the dyblib itself it has, predictably, this:

Snapper2.dylib: Mach-O universal binary with 1 architecture: [arm64:Mach-O 64-bit dynamically linked shared library arm64]
Snapper2.dylib (for architecture arm64):	Mach-O 64-bit dynamically linked shared library arm64

While the simject.dylib has:

simject.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [i386:Mach-O dynamically linked shared library i386]
simject.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
simject.dylib (for architecture i386):	Mach-O dynamically linked shared library i386

My guess was that I definitely need x86_64 to make it work, but since #35 said he got it to work with arm64 I am not sure what else I can try.

Thanks

Makefile:4: /makefiles/common.mk: No such file or directory Catalina

When I try to install Simject on macOS Catalina, it says this:

Makefile:4: /makefiles/common.mk: No such file or directory
Makefile:10: /tool.mk: No such file or directory
make[1]: *** No rule to make target `/tool.mk'.  Stop.
make: *** [clean] Error 2

I'm not sure if this is a problem caused by running Xcode 10 instead of 11, but that wouldn't make very much sense. Thanks

Can't "make setup"

Here is the log:

mapincs-Mac:simject mapinc$ make setup
==> Cleaning…
xcrun: error: SDK "iphonesimulator" cannot be located
==> Cleaning…
mkdir: /opt/simject/respring_simulator/.theos: Permission denied
make[1]: *** [/opt/simject/respring_simulator/.theos/build_session] Error 1
make: *** [all] Error 2
mapincs-Mac:simject mapinc$ sudo make setup
Password:
Makefile:3: /makefiles/common.mk: No such file or directory
Makefile:9: /tool.mk: No such file or directory
make[1]: *** No rule to make target /tool.mk'. Stop. make: *** [clean] Error 2 mapincs-Mac:simject mapinc$ sudo make setup Makefile:3: /makefiles/common.mk: No such file or directory Makefile:9: /tool.mk: No such file or directory make[1]: *** No rule to make target /tool.mk'. Stop.
make: *** [clean] Error 2

Issue when trying to MAKE SETUP

When I try to 'make setup' it says :

ld: building for iOS Simulator, but linking in .tbd built for macOS/Mac Catalyst, file '/Library/Developer/CommandLineTools/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks//Foundation.framework/Foundation.tbd' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [build] Error 1
make: *** [all] Error 2

PreferenceLoader via simject?

Hi there!
So far Simject is working great, but is there a way to include Preference bundles?
I tried compiling preferenceloader but that is failing for me (you had more luck). Even if it was working, I have no idea how/ where to to place the .bundle files in the simulator device.
Can you guide me in the right direction?
Thanks!

Unknown clang parameter when running make setup on 10.13.6

I followed all the instructions (clone the repo, cd into directory, and execute make setup).
However it seems the Makefile tries to pass the parameter -print-target-triple to clang which apparently doesn't exist in my clang version. I'm on macOS 10.13.6 High Sierra, using latest xcode for that version (10.1)

Output of make setup:

iMac:simject d0gg3r$ make setup
clang: error: unknown argument: '-print-target-triple'
clang: error: no input files
>> Compiling resim for 
>>> Target directory is /opt/simject
ld: warning: text-based stub file /System/Library/Frameworks//Foundation.framework/Foundation.tbd and library file /System/Library/Frameworks//Foundation.framework/Foundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation are out of sync. Falling back to library file for linking.
>>> Signing...
>>> Copying library...
clang: error: unknown argument: '-print-target-triple'
clang: error: no input files
clang: error: unknown argument: '-print-target-triple'
clang: error: no input files
>> Compiling simject for 
>>> Using SDK at /Library/Developer/CommandLineTools/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
>>> Target directory is /opt/simject
error: unknown target triple '-DDYLIB_DIR=@"/opt/simject"', please use -triple
      or -arch
make[1]: *** [build] Error 1
make: *** [all] Error 2

Output of clang --version

iMac:simject d0gg3r$ clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I have xcode tools and all installed as seen above.

Permission denied when trying compile any tweak.

i got this error:
`
hMBPslAriel2:simjectExampleTweak gavrielov$ make setup
==> Cleaning…

Making all for tweak simjectExampleTweak…
==> Preprocessing simjectExampleTweak.xm…
==> Compiling simjectExampleTweak.xm (x86_64)…
==> Linking tweak simjectExampleTweak (x86_64)…
==> Generating debug symbols for simjectExampleTweak…
==> Stripping simjectExampleTweak (x86_64)…
rm /Users/gavrielov/simject/simjectExampleTweak/.theos/obj/iphone_simulator/x86_64/simjectExampleTweak.xm.mm
==> Preprocessing simjectExampleTweak.xm…
==> Compiling simjectExampleTweak.xm (i386)…
==> Linking tweak simjectExampleTweak (i386)…
==> Generating debug symbols for simjectExampleTweak…
==> Stripping simjectExampleTweak (i386)…
rm /Users/gavrielov/simject/simjectExampleTweak/.theos/obj/iphone_simulator/i386/simjectExampleTweak.xm.mm
==> Merging tweak simjectExampleTweak…
==> Signing simjectExampleTweak…
rm: /opt/simject/simjectExampleTweak.dylib: Permission denied
make: *** [setup] Error 1
`

and if i try with sudo:
hMBPslAriel2:simjectExampleTweak gavrielov$ sudo make setup Makefile:10: /makefiles/common.mk: No such file or directory Makefile:16: /tweak.mk: No such file or directory make: *** No rule to make target /tweak.mk. Stop.

any solves?

issues when installing substrate on 2010 macbook air running macos 11 and xcode 12... safe to proceed?

so i essentially can't get any of the sdks to work even though i've run the simulator before... i was able to get make setup to work by copying the iPhoneSimulator.platform folder to the directory simject was pointing to, but now when running ./configure --xcode-sdk=iphonesimulator --xcode-archs=x86_64 && make i get the error that the iphone sdk can't be found... here's the full error statement from terminal:
Found cpp for 'host': /usr/bin/xcrun --sdk iphonesimulator cc -E
>>> /usr/bin/xcrun --sdk iphonesimulator cc -E -dM /Users/andrewgordnier/simject* Xcode SDK 'macosx' not found
* Xcode SDK 'macosx' not found
* Xcode SDK 'iphoneos' not found
* Xcode SDK 'iphoneos' not found
Found cc for 'host': /usr/bin/cc
Found dsymutil for 'host': /usr/bin/dsymutil
** Failed to locate cc
note: detected cross compilation, so searched for x86_64-apple-darwin10-cc
** Failed to locate cc
note: detected cross compilation, so searched for i386-apple-darwin10-cc
** Failed to locate cc
note: detected cross compilation, so searched for arm-apple-darwin10-cc
** Failed to locate cc
note: detected cross compilation, so searched for arm64-apple-darwin10-cc
(1 failure.)
`

[User Error] Can't do `make setup`

Makefile:3: /makefiles/common.mk: No such file or directory
Makefile:9: /tool.mk: No such file or directory
make[1]: *** No rule to make target `/tool.mk'.  Stop.
make: *** [clean] Error 2

not really sure what to do here lol

error running resim

`dyld: could not load inserted library '/opt/simject/simject.dylib' because no suitable image found. Did find:
/opt/simject/simject.dylib: mach-o, but wrong architecture

Child process terminated with signal 6: Abort trap
Error executing command, exiting.

`
on an arm64 Mac with the latest Xcode and Theos

`make setup` fails with a "No such file or directory" error

Trying to run make setup on Sierra 10.12.5 gives

Makefile:6: /makefiles/common.mk: No such file or directory
Makefile:12: /tool.mk: No such file or directory
make[1]: *** No rule to make target `/tool.mk'.  Stop.
make: *** [clean] Error 2`
```
Please help

No devices booted

I'm having a problem - for some reason whenever I try loading up the simulator with the example provided I keep getting this output:

respring_simulator (C) 2016 Karen Tsai (angelXwind)
Injecting appropriate dynamic libraries from /opt/simject...
No devices are booted.
Respringing...
No devices are booted.

I have both the .dylib and .plist file in /opt/simject already...

I'm not sure what's wrong - can someone help?

Making respring Sim

Appears to be an error when making the setup

==> Cleaning… ==> Cleaning…
> Making all for tool respring_simulator… ==> Compiling respring_simulator.mm (i386)… respring_simulator.mm:8:10: fatal error: 'array' file not found #include <array> ^~~~~~~ 1 error generated.

Making Setup with XCode 9 GM

Doing so provides this error:

clang: error: invalid iOS deployment version '-mios-simulator-version-min=11.0', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]

I had to set it up with xcode 8 for it to go through.

Make setup problem with xcode 9.3

ekran resmi 2018-05-08 15 40 05

trying to fix this problem since yesterday

high sierra 10.13.4
using xcode 9.3 with commandline tools installed
brew, ldid, openssl etc. installed
( sdk & heades are installed in theos )

iostream file not found

well, here's what i get when i run make setup command:
respring_simulator.mm:6:10: fatal error: 'iostream' file not found #include <iostream>

invalid iOS development version

This could be a theos issue (sucuessfulling installed theos). But I was install simject on a new laptop and got the following error when running make setup

Making all for tool respring_simulator…
make[3]: Nothing to be done for 'internal-tool-compile'.
Copying binaries...
Making all for tweak simject…
==> Preprocessing simject.xm…
==> Compiling simject.xm (i386)…
clang: error: invalid iOS deployment version '-mios-simulator-version-min=11.2', iOS 10 is the maximum deployment target for 32-bit targets [-Winvalid-ios-deployment-target]
make[4]: *** [/Users/USERNAME/simject/simject/.theos/obj/iphone_simulator/i386/simject.xm.b3a58ea8.o] Error 1
make[3]: *** [/Users/USERNAME/simject/simject/.theos/obj/iphone_simulator/i386/simject.dylib] Error 2
make[2]: *** [internal-library-all_] Error 2
make[1]: *** [simject.all.tweak.variables] Error 2
make: *** [all] Error 2

I am trying to get simject working with iOS 11.

resim.dylib not built for iOS simulator - doesn't inject

So I've followed the setup for the readme, and when I boot up an simulator, i go to ~/simject/bin and run the resim tool. The simulator resprings but shortly after the script quits, dyld comes on and gives an error in the sense of no suitable image of simject.dylib found, did find one but that's not for simulator.

Precise output:

iMac:bin d0gg3r$ ./resim
resim (C) 2016-2020 Karen/あけみ (angelXwind)
Injecting appropriate dynamic libraries from /opt/simject...
Respringing a booted device ...
iMac:bin d0gg3r$ dyld: warning: could not load inserted library '/opt/simject/simject.dylib' into hardened process because no suitable image found.  Did find:
	/opt/simject/simject.dylib: mach-o, but not built for iOS simulator
dyld: warning: could not load inserted library '/opt/simject/simject.dylib' into hardened process because no suitable image found.  Did find:
	/opt/simject/simject.dylib: mach-o, but not built for iOS simulator

macOS 10.13.6 (High Sierra), Xcode 10.1, tried with simulator iPhone X (iOS 12.1).

Error when building with PrivateFramework

In Makefile I set:

ARCHS = x86_64
TARGET = simulator:clang:13.6:13.0
...
$(TWEAK_NAME)_PRIVATE_FRAMEWORKS = Preferences

Then make throws error

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/PrivateFrameworks'
ld: framework not found Preference

I understand that the sdk it's using doesn't have PrivateFramework.

I can get patched sdk from https://github.com/xybp888/iOS-SDKs and built successfully with TARGET = iphone:clang:13.6:13.0. But it's only for iPhoneOS, not iPhoneSimulator

Any workaround for this?

Ambiguous iPhone developer certificate

Related to #44, but this is not a duplicate certificate.

Copying binaries...
/Users/ahk/Dropbox/Developer/iOS/simject/respring_simulator/.theos/obj/macosx/debug/respring_simulator -> ../bin/respring_simulator
> Making all for tweak simject…
==> Merging tweak simject…
==> Signing simject…
iPhone Developer: ambiguous (matches "iPhone Developer: [email protected] (XXXXXXXXXX)" and "iPhone Developer: Corporate name (YYYYYYYYYY)" in /Users/ahk/Library/Keychains/login.keychain-db)
make[3]: *** [/Users/ahk/Dropbox/Developer/iOS/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib] Error 1
rm /Users/ahk/Dropbox/Developer/iOS/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib.7876ddb4.unsigned
make[2]: *** [internal-library-all_] Error 2
make[1]: *** [simject.all.tweak.variables] Error 2
make: *** [all] Error 2

I could probably solve this by removing one of them, but I really don't want to do that. Any workarounds?

simject not working on macOS Sierra

I went through the steps of setting up simject and also compiled and copied over the example tweak into the folder. However, when I load up the iOS 9.3 simulator the message doesn't appear. I tried making a new tweak with THEOS and it created it without any errors, so I'm pretty sure that THEOS is set up correctly.

Trying to run the respring_simject command gives me these errors

dyld: mach-o, but built for simulator (not macOS)
Abort trap: 6

I have tried to reinstall simject multiple times but it still doesn't work.

generator does not implement Method::initializers

I'm getting this when running make setup..any idea what causes this? Thinking it can't find theos.

==> Cleaning…

Making all for tweak simject…
==> Preprocessing simject.xm…
simject.xm: error: generator does not implement Method::initializers
make[3]: *** [/Users/john/simject/.theos/obj/iphone_simulator/x86_64/simject.xm.793f0766.o] Error 2
make[2]: *** [/Users/john/simject/.theos/obj/iphone_simulator/x86_64/simject.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [simject.all.tweak.variables] Error 2

run installsubstrate.sh Error

run ./configure --xcode-sdk=iphonesimulator --xcode-archs=x86_64

get log....

Will build iOS bootstrap.
Traceback (most recent call last):
  File "./configure", line 250, in <module>
    mconfig.finish_and_emit()
  File "./script/mconfig.py", line 1137, in finish_and_emit
    settings_root.emitter.emit()
  File "./script/mconfig.py", line 1027, in emit
    self.add_command_raw([makefile], list_mconfig_scripts(self.settings), cs_argvs)
  File "./script/mconfig.py", line 878, in list_mconfig_scripts
    if hasattr(mod, '__file__') and relpath_if_within(real_src, os.path.realpath(mod.__file__)):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py", line 394, in realpath
    filename = os.fspath(filename)
TypeError: expected str, bytes or os.PathLike object, not NoneType

macOS: 11.5.2
Xcode: 12.4
python 3.7.9

Segmentation Fault on "MSFindSymbol"

I wanted to hook the MGCopyAnswer_internal function on the simulator to log its calls so I modified code from https://github.com/Tonyk7/MGSpoof to hook the function:

%ctor {
	// get image
    NSLog(@"SimHooker: Before get image.");
	MSImageRef libGestalt = MSGetImageByName("/usr/lib/libMobileGestalt.dylib");

	// Get "_MGCopyAnswer" symbol
    NSLog(@"SimHooker: Before get symbol.");
    void * Symbol=MSFindSymbol(libGestalt, "_MGCopyAnswer");
	/*
	 * get address of MGCopyAnswer_internal by doing symbol + offset (should be 8 bytes)
	 * note: hex implementation of MGCopyAnswer: 01 00 80 d2 01 00 00 14 (from iOS 9+)
	 * so address of MGCopyAnswer + offset = MGCopyAnswer_internal. MGCopyAnswer_internal *always follows MGCopyAnswer (*from what I've checked)
	 */
    NSLog(@"SimHooker: Before pointer.");
	const uint8_t *MGCopyAnswer_ptr = (const uint8_t *)MGCopyAnswer;
    NSLog(@"SimHooker: Before find branch.");
	addr_t branch = find_branch64(MGCopyAnswer_ptr, 0, 8);
    NSLog(@"SimHooker: Before follow branch.");
	addr_t branch_offset = follow_branch64(MGCopyAnswer_ptr, branch);
    NSLog(@"SimHooker: Before hook.");
	MSHookFunction(((void *)((const uint8_t *)Symbol + branch_offset)), (void *)new_MGCopyAnswer_internal, (void **)&orig_MGCopyAnswer_internal);
    NSLog(@"SimHooker: After hook.");
}

It works fine on my device, but on the simulator Springboard crashes on startup:

https://pastebin.com/SL0WAwAR

It seems to happen on the void * Symbol=MSFindSymbol(libGestalt, "_MGCopyAnswer"); line. To get it to compile, I had to copy /opt/simject/Frameworks/CydiaSubstrate.framework to /Users/christopherh/theos/lib/CydiaSubstrate.framework and add "SimHooker_EXTRA_FRAMEWORKS = CydiaSubstrate" to my Makefile.

Does MSFindSymbol not work on the simulator?

Make Setup - Error: "could not build module 'ObjectiveC'" / "expected a type"

To be clear, i am running macOS High Sierra 10.13.5, Xcode 9.4.1, theos up to date and working.

After cloning and chdir to the simject folder, at the "make setup" step, the following error occurried:

machine:~ nonroot$ cd /Users/nonroot/Documents/Dev/IOS/simject
`machine:simject nonroot$ make setup` `==> Cleaning…` `==> Cleaning…` `> Making all for tool respring_simulator…` `==> Compiling respring_simulator.mm (i386)…` `While building module 'Foundation' imported from /opt/Theos/Prefix.pch:11:` `While building module 'ObjectiveC' imported from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:` `In file included from <module-includes>:2:` `In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/./Protocol.h:51:` `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/Object.h:141:28: error:` ` expected a type` `- (id)forward: (SEL)sel : (marg_list)args;` ` ^` `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/Object.h:142:29: error:` ` expected a type` `- (id)performv: (SEL)sel : (marg_list)args;` ` ^` `While building module 'Foundation' imported from /opt/Theos/Prefix.pch:11:` `In file included from <module-includes>:2:` `In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:` `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:10: fatal error:` ` could not build module 'ObjectiveC'e` `#include <objc/NSObjCRuntime.h>` ` ~~~~~~~~^` `In file included from <built-in>:1:` `/opt/Theos/Prefix.pch:11:11: fatal error: could not build module 'Foundation'` ` #import <Foundation/Foundation.h>` ` ~~~~~~~^` `4 errors generated.` `make[4]: *** [/Users/nonroot/Documents/Dev/IOS/simject/respring_simulator/.theos/obj/macosx/debug/i386/respring_simulator.mm.8fc275f7.o] Error 1` `make[3]: *** [/Users/nonroot/Documents/Dev/IOS/simject/respring_simulator/.theos/obj/macosx/debug/i386/respring_simulator] Error 2` `make[2]: *** [internal-tool-all_] Error 2` `make[1]: *** [respring_simulator.all.tool.variables] Error 2` `make: *** [all] Error 2`
machine:simject nonroot$
``

the error is also at pastebin: https://pastebin.com/4bqcL14e

I tried from installing the IOS simulators (in xcode) to reinstalling THEOS, but the error persists.
At the moment, i'm kind lost without knowing if i am doing something wrong or is there a problem in the instructions or the project itself.
How do i solve it?

You do not have any SDKs

When i run make setup command to install simject he give me this error:
==> Error: You do not have any SDKs in /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs or /opt/theos/sdks. make[1]: *** [before-all] Error 1 make: *** [all] Error 2

but i have sdks in /opt/theos/sdks
so what is the problem ??

Issue signing simject

everything works during the make setup until I get this:

Signing simject…
error: The specified item could not be found in the keychain.
make[3]: *** [/Users/neilchulani/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib] Error 1
rm /Users/neilchulani/simject/simject/.theos/obj/iphone_simulator/debug/simject.dylib.7876ddb4.unsigned
make[2]: *** [internal-library-all_] Error 2
make[1]: *** [simject.all.tweak.variables] Error 2
make: *** [all] Error 2

(I have theos installed)

Issue when running 'make setup'

MacBook:simject jan$ make setup
Makefile:4: /makefiles/common.mk: No such file or directory
Makefile:10: /tool.mk: No such file or directory
make[1]: *** No rule to make target `/tool.mk'. Stop.
make: *** [clean] Error 2

Error: You do not have an SDK

Getting this error upon make

==> Error: You do not have an SDK in /Applications/untitled folder/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs.

Here are the contents of /Applications/untitled folder/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs.

iPhoneSimulator.sdk	iPhoneSimulator11.2.sdk

There are two sdk's there. However, my simulator is on 11.0, not the 11.2 sdk above.

Where do I get these sdks, and why are the ones already there not sufficient?

Using Xcode 9.2 (9C40b) with a iPhone 8 Plus 11.2 Simulator

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.