Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when inject dylibs #1

Open
HaidarPhantom opened this issue Sep 6, 2022 · 8 comments
Open

Crash when inject dylibs #1

HaidarPhantom opened this issue Sep 6, 2022 · 8 comments
Labels
Theos mobile or Ubuntu linkage issue .dylib will be provided for mobile & Ubuntu(Windows) users

Comments

@HaidarPhantom
Copy link

i managed to inject dylibs via theos jailed project,
but the app crash when i open it
i injected the libsupport.dylib & jailed_example.dylib
is there any other thing to do or im missing something?

@Rednick16
Copy link
Owner

You don’t need to include libsupport.dylib into theos _jailed just extract the .ipa and add libsupport to frameworks folder or whatever

@HaidarPhantom
Copy link
Author

same thing but this time i copy/paste libsupport.dylib and injected jailed_example.dylib and still facing crash

@Rednick16
Copy link
Owner

I am not sure if your willing to try again but I will write some write ups and release an update

@Rednick16 Rednick16 reopened this Jan 22, 2023
@HaidarPhantom
Copy link
Author

I am not sure if your willing to try again but I will write some write ups and release an update

Of course, i will wait your update :)

@Rednick16
Copy link
Owner

Rednick16 commented Jan 23, 2023

I am not sure if your willing to try again but I will write some write ups and release an update

Of course, i will wait your update :)

I have just released libSupport 1.2 try it out and let me know if this fixes the crashes for you etc, if possible send the crash logs
you can compile it or inject this libSupport.dylib(https://github.com/Rednick16/libSupport/releases/tag/v1.2)

@HaidarPhantom
Copy link
Author

I am not sure if your willing to try again but I will write some write ups and release an update

Of course, i will wait your update :)

I have just released libSupport 1.2 try it out and let me know if this fixes the crashes for you etc, if possible send the crash logs you can compile it or inject this libSupport.dylib(https://github.com/Rednick16/libSupport/releases/tag/v1.2)

there are some issues
the first one that the libsupport.a file cannot run in theos and here is the terminal error
Undefined symbols for architecture arm64: "_objc_msgSend$UTF8String", referenced from: l005 in libsupport.a(dyld.m.0e83968f.o) _SupportGetDyldImageName in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$absoluteString", referenced from: l002 in libsupport.a(NSData.m.0e83968f.o) l004 in libsupport.a(NSData.m.0e83968f.o) l001 in libsupport.a(NSURL.m.0e83968f.o) l002 in libsupport.a(NSURL.m.0e83968f.o) l003 in libsupport.a(NSURL.m.0e83968f.o) l004 in libsupport.a(NSURL.m.0e83968f.o) l005 in libsupport.a(NSURL.m.0e83968f.o) ... "_objc_msgSend$addObject:", referenced from: _SupportInitilize in libsupport.a(support.m.0e83968f.o) l001 in libsupport.a(dyld.m.0e83968f.o) l006 in libsupport.a(dyld.m.0e83968f.o) l007 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$arrayWithObjects:count:", referenced from: _isURLRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$bundleIdentifier", referenced from: _SupportInitilize in libsupport.a(support.m.0e83968f.o) "_objc_msgSend$bundlePath", referenced from: l015 in libsupport.a(NSBundle.m.0e83968f.o) l016 in libsupport.a(NSBundle.m.0e83968f.o) l024 in libsupport.a(NSBundle.m.0e83968f.o) l025 in libsupport.a(NSBundle.m.0e83968f.o) "_objc_msgSend$characterAtIndex:", referenced from: _isPathRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$class", referenced from: _SupportDictionary in libsupport.a(private.m.0e83968f.o) l007 in libsupport.a(NSDictionary.m.0e83968f.o) l008 in libsupport.a(NSDictionary.m.0e83968f.o) l009 in libsupport.a(NSDictionary.m.0e83968f.o) "_objc_msgSend$containsObject:", referenced from: _isURLRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$copy", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l002 in libsupport.a(dyld.m.0e83968f.o) l006 in libsupport.a(dyld.m.0e83968f.o) l007 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$count", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l002 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$countByEnumeratingWithState:objects:count:", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l002 in libsupport.a(dyld.m.0e83968f.o) l003 in libsupport.a(dyld.m.0e83968f.o) l004 in libsupport.a(dyld.m.0e83968f.o) l006 in libsupport.a(dyld.m.0e83968f.o) _isPathRestricted in libsupport.a(private.m.0e83968f.o) l005 in libsupport.a(NSBundle.m.0e83968f.o) ... "_objc_msgSend$defaultManager", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l014 in libsupport.a(dyld.m.0e83968f.o) _isCPathRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$dictionaryWithObjects:forKeys:count:", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$errorWithDomain:code:userInfo:", referenced from: l004 in libsupport.a(NSArray.m.0e83968f.o) l005 in libsupport.a(NSArray.m.0e83968f.o) l003 in libsupport.a(NSData.m.0e83968f.o) l004 in libsupport.a(NSData.m.0e83968f.o) l003 in libsupport.a(NSDictionary.m.0e83968f.o) l006 in libsupport.a(NSDictionary.m.0e83968f.o) l001 in libsupport.a(NSURL.m.0e83968f.o)

and the file cannot be extracted, the same is the deb file in packages folder

@itsmylife44
Copy link

I am not sure if your willing to try again but I will write some write ups and release an update

Of course, i will wait your update :)

I have just released libSupport 1.2 try it out and let me know if this fixes the crashes for you etc, if possible send the crash logs you can compile it or inject this libSupport.dylib(https://github.com/Rednick16/libSupport/releases/tag/v1.2)

there are some issues the first one that the libsupport.a file cannot run in theos and here is the terminal error Undefined symbols for architecture arm64: "_objc_msgSend$UTF8String", referenced from: l005 in libsupport.a(dyld.m.0e83968f.o) _SupportGetDyldImageName in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$absoluteString", referenced from: l002 in libsupport.a(NSData.m.0e83968f.o) l004 in libsupport.a(NSData.m.0e83968f.o) l001 in libsupport.a(NSURL.m.0e83968f.o) l002 in libsupport.a(NSURL.m.0e83968f.o) l003 in libsupport.a(NSURL.m.0e83968f.o) l004 in libsupport.a(NSURL.m.0e83968f.o) l005 in libsupport.a(NSURL.m.0e83968f.o) ... "_objc_msgSend$addObject:", referenced from: _SupportInitilize in libsupport.a(support.m.0e83968f.o) l001 in libsupport.a(dyld.m.0e83968f.o) l006 in libsupport.a(dyld.m.0e83968f.o) l007 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$arrayWithObjects:count:", referenced from: _isURLRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$bundleIdentifier", referenced from: _SupportInitilize in libsupport.a(support.m.0e83968f.o) "_objc_msgSend$bundlePath", referenced from: l015 in libsupport.a(NSBundle.m.0e83968f.o) l016 in libsupport.a(NSBundle.m.0e83968f.o) l024 in libsupport.a(NSBundle.m.0e83968f.o) l025 in libsupport.a(NSBundle.m.0e83968f.o) "_objc_msgSend$characterAtIndex:", referenced from: _isPathRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$class", referenced from: _SupportDictionary in libsupport.a(private.m.0e83968f.o) l007 in libsupport.a(NSDictionary.m.0e83968f.o) l008 in libsupport.a(NSDictionary.m.0e83968f.o) l009 in libsupport.a(NSDictionary.m.0e83968f.o) "_objc_msgSend$containsObject:", referenced from: _isURLRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$copy", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l002 in libsupport.a(dyld.m.0e83968f.o) l006 in libsupport.a(dyld.m.0e83968f.o) l007 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$count", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l002 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$countByEnumeratingWithState:objects:count:", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l002 in libsupport.a(dyld.m.0e83968f.o) l003 in libsupport.a(dyld.m.0e83968f.o) l004 in libsupport.a(dyld.m.0e83968f.o) l006 in libsupport.a(dyld.m.0e83968f.o) _isPathRestricted in libsupport.a(private.m.0e83968f.o) l005 in libsupport.a(NSBundle.m.0e83968f.o) ... "_objc_msgSend$defaultManager", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) l014 in libsupport.a(dyld.m.0e83968f.o) _isCPathRestricted in libsupport.a(private.m.0e83968f.o) "_objc_msgSend$dictionaryWithObjects:forKeys:count:", referenced from: l001 in libsupport.a(dyld.m.0e83968f.o) "_objc_msgSend$errorWithDomain:code:userInfo:", referenced from: l004 in libsupport.a(NSArray.m.0e83968f.o) l005 in libsupport.a(NSArray.m.0e83968f.o) l003 in libsupport.a(NSData.m.0e83968f.o) l004 in libsupport.a(NSData.m.0e83968f.o) l003 in libsupport.a(NSDictionary.m.0e83968f.o) l006 in libsupport.a(NSDictionary.m.0e83968f.o) l001 in libsupport.a(NSURL.m.0e83968f.o)

and the file cannot be extracted, the same is the deb file in packages folder

remove the .theos folder .

rm -rf .theos

it can't be extracted cuz of the $(LIBRARY_NAME)_INSTALL_PATH = @executable_path/Frameworks

remove that in the make file and try to build it again .

@Rednick16 Rednick16 added the Theos mobile or Ubuntu linkage issue .dylib will be provided for mobile & Ubuntu(Windows) users label Aug 1, 2023
@Rednick16
Copy link
Owner

lets have you guys try 1.2.1 and see if these issues still persist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Theos mobile or Ubuntu linkage issue .dylib will be provided for mobile & Ubuntu(Windows) users
Projects
None yet
Development

No branches or pull requests

3 participants