libSupport icon indicating copy to clipboard operation
libSupport copied to clipboard

Crash when inject dylibs

Open HaidarPhantom opened this issue 3 years ago • 8 comments

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?

HaidarPhantom avatar Sep 06 '22 01:09 HaidarPhantom

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

Rednick16 avatar Sep 06 '22 01:09 Rednick16

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

HaidarPhantom avatar Sep 06 '22 02:09 HaidarPhantom

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

Rednick16 avatar Jan 22 '23 20:01 Rednick16

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 :)

HaidarPhantom avatar Jan 23 '23 04:01 HaidarPhantom

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)

Rednick16 avatar Jan 23 '23 06:01 Rednick16

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

HaidarPhantom avatar Jan 23 '23 08:01 HaidarPhantom

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 .

itsmylife44 avatar Jan 23 '23 14:01 itsmylife44

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

Rednick16 avatar Aug 09 '23 04:08 Rednick16