limneos / classdump-dyld

Class-dump any Mach-o file without extracting it from dyld_shared_cache
586 stars 99 forks source link

fix for dumping arm64e dyld_shared_cache & permissions error #28

Closed CokePokes closed 2 years ago

CokePokes commented 4 years ago

^Title :P

dlevi309 commented 4 years ago

@CokePokes nice work, dumping dyld_shared_cache worked perfectly on my 11 Pro Max. Although to get it to build on modern a modern Theos setup required that I update the makefile, I thought if anyone else comes across this, I could insert the fix here in this thread;

DEBUG=0 GO_EASY_ON_ME=1

TARGET = simulator:clang:11.0

TARGET = macosx

TARGET = iphone:clang::6.0

export TARGET = iphone:clang:11.2:9.3 export ARCHS=armv7 arm64 arm64e

export ARCHS=x86_64

include $(THEOS)/makefiles/common.mk TOOL_NAME = classdump-dyld classdump-dyld_FILES = main.xm classdump-dyld_LDFLAGS = -Wl,-segalign,0x4000 classdump-dyld_CODESIGN_FLAGS = -Sent.plist include $(THEOS)/makefiles/tool.mk include $(THEOS)/makefiles/library.mk SUBPROJECTS += classdumpdyldlib include $(THEOS)/makefiles/aggregate.mk

Great work again!

demhademha commented 4 years ago

Hi, could you create a deb with this forked fix? Thanks very much

dlevi309 commented 4 years ago

@demhademha I just changed the identifier to daniel.classdump-dyld so it wouldn't keep telling me an update was available from limneos's repo, but it's completely identical other than that https://www.dropbox.com/s/b6r3pexnn0u5n07/daniel.classdump-dyld_1.1-2_iphoneos-arm.deb?dl=0

demhademha commented 4 years ago

@demhademha I just changed the identifier to daniel.classdump-dyld so it wouldn't keep telling me an update was available from limneos's repo, but it's completely identical other than that https://www.dropbox.com/s/b6r3pexnn0u5n07/daniel.classdump-dyld_1.1-2_iphoneos-arm.deb?dl=0

hi, when running classdump-dyld -o /var/headers -r / -c So dumping the dyld_cash, I get the following error: classdump-dyld(7259,0x1004e9840) malloc: can't allocate region : mach_vm_map(size=49152, flags: 100) failed (error code=3) classdump-dyld(7259,0x1004e9840) malloc: set a breakpoint in malloc_error_break to debug classdump-dyld(7259,0x1004e9840) malloc: can't allocate region : mach_vm_map(size=49152, flags: 100) failed (error code=3) classdump-dyld(7259,0x1004e9840) malloc: set a breakpoint in malloc_error_break to debug classdump-dyld(7259,0x1004e9840) malloc: can't allocate region : mach_vm_map(size=49152, flags: 100) failed (error code=3) classdump-dyld(7259,0x1004e9840) malloc: set a breakpoint in malloc_error_break to debug classdump-dyld(7259,0x1004e9840) malloc: can't allocate region : mach_vm_map(size=49152, flags: 100) failed (error code=3) classdump-dyld(7259,0x1004e9840) malloc: set a breakpoint in malloc_error_break to debug classdump-dyld(7259,0x1004e9840) malloc: can't allocate region : mach_vm_map(size=49152, flags: 100) failed (error code=3) classdump-dyld(7259,0x1004e9840) malloc: set a breakpoint in malloc_error_break to debug classdump-dyld(7259,0x1004e9840) malloc: can't allocate region : mach_vm_map(size=32768, flags: 100) failed (error code=3) classdump-dyld(7259,0x1004e9840) malloc: set a breakpoint in malloc_error_break to debug 2020-08-18 22:13:41.608 classdump-dyld[7259:507615] Terminating app due to uncaught exception 'NSMallocException', reason: 'Out of memory. We su ggest restarting the application. If you have an unsaved document, create a backup copy in Finder, then try to save.' First throw call stack: (0x1b2287794 0x1b1fa9bcc 0x1b22e3264 0x1b22df144 0x1b223d604 0x1b222aa84 0x1b255f5e4 0x10017860c 0x1b2589120 0x100171788 0x10016e7bc 0x1001751ac 0x1 0017774c 0x1b20878f0) Abort trap idk, if this is a problem with the deb, or with the fork itself.