Closed brendonjkding closed 1 year ago
haven't test it on simulator yet, so 12.4 simulator works fine, 13.5 simulator crashed?
Right, 12.4 works fine, but 13.5 and 14.4 crashed.
it's not dobby fault.
as you set breakpoint at SpringBoard`SBReduceMotion
- tips: x86 software breakpoint implementation is wrote int3 at address.
Oh, ashamed of my lack of knowledge.
But it still crashed even if i haven't set a breakpoint at SBReduceMotion
.
The jump destination(0x145a9005e) seems not correct. It should be symbol stub for: UIAccessibilityIsReduceMotionEnabled
?
(lldb) p/x _logos_orig$_ungrouped$SBReduceMotion
(BOOL (*)(...)) $0 = 0x00000001077a5000 (0x00000001077a5000)
(lldb) dis -s 0x00000001077a5000 -e 0x00000001077a5000+0x30
0x1077a5000: push rbp
0x1077a5001: mov rbp, rsp
0x1077a5004: pop rbp
0x1077a5005: jmp 0x145a9005e
0x1077a500a: jmp qword ptr [rip]
0x1077a5010: movabs eax, dword ptr [0x7fff4594ad]
0x1077a5019: add byte ptr [rax], al
0x1077a501b: add byte ptr [rax], al
0x1077a501d: add byte ptr [rax], al
0x1077a501f: add byte ptr [rax], al
0x1077a5021: add byte ptr [rax], al
0x1077a5023: add byte ptr [rax], al
0x1077a5025: add byte ptr [rax], al
0x1077a5027: add byte ptr [rax], al
0x1077a5029: add byte ptr [rax], al
0x1077a502b: add byte ptr [rax], al
0x1077a502d: add byte ptr [rax], al
(lldb) c
Process 2587 resuming
Process 2587 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x145a9005e)
frame #0: 0x0000000145a9005e
error: memory read failed for 0x145a90000
Target 0: (SpringBoard) stopped.
have you try again ? with the latest commit
Before I post the results, I want to say sorry first. It seems I wasn't using latest commit somehow when I open this issue.
With the real latest commit, it no longer crashes at orig_SBReduceMotion
. However, I meet with some extra weird crashes.
First, on 12.4, the ptr in the jmp instruction of the replaced function(Sorry, I don't know the term for it) was somehow replaced.
Second, on 13.5, it crashes at orig__AXSReduceMotionReduceSlideTransitionsEnabled
which should work after #149 was fixed.
I think these crashes are beyond this issue. In addition, instead of continuously bothering you, maybe I should do some research myself. So I'm closing this issue. But please let me know if you need any additional infos or the full original project(CustomReduceMotion) that meets with these crashes. Thank you very much for your help!
if you could send CustomReduceMotion
, i'l try to reproduce the crash and fix it.
Thank you, I have sent you an invite link.
could you send me a message with telegram https://t.me/IOFramebuffer ?
Sure, I'm https://t.me/brendonjkding
Environment: macOS 10.15.7 (x64) and Simulator in Xcode 12.4
I am using the lastest commit.
I have noticed the target address(0x10d8533ce) on 12.4 is similar to a real device, whereas on 13.5 (and 14.4) it(0x7fff5d9e24f8) is not. Is this difference the culprit?
Infos might be useful
On iOS(Simulator) 12.4
It works without problems
Before hook
After hook
orig
On iOS(Simulator) 13.5
Before hook
After hook
orig
Result
Demo code snippet(iOS 13.5)