Open wangdu1005 opened 6 years ago
Hi, i cannot figure out why your hooked method get called many times and seems that your new contentsOfFile function is correct as you said it get the information if IMServer runs well. but about the crash i cannot give you any advice . without understanding where did you call contentsOfFile and the type of it's return values and the file contents also crashs could happens for many reason ( wrong file contents it's not a correct formatted Dictionary etc )
Thank u so much verify my code with ur project. I will try more solution. And let u know the newest situation. At least you confirm my code is in correct logical.
Dear iMokhles, thanks you for your good new version of NoSandX. But I facing an issues which is when I add a customer method "contentsOfFile" it will crash the device (springboard, backboardd, assitivetouch...)
IMClient.m
IMDelegate.m
I hook a low-level method. If the daemon still not loading that the device will not crash, only show null return, which very make sense to me, because IMServer and Delegate still not running.
Acctually, I have question about why daemon keep busy calling my hook method. Because usually the device system only calling my hook method depend on special action, such as activate a app. But if daemon is running then the hook method will very frequently be called. Not like normal original usage scenario.
After I
launchctl load /Library/LaunchDaemons/com.imokhles.nosandxdlaunch.plist
, the daemon will successfully get the content of file, but device will start crazily keeping calling hook method, then become blue screen.Below is the crash error log, there are too many lines, so I only show few point, others log are attach here:
syslog.txt
What I observed the log is that after the daemon load, device will automatically respring, and the assistivetouchd, backboardd, springboard will try to wake up, but couldn't success, because the hook function keep be calling by the daemon. But the real reason I really can't find out. My - (NSDictionary )contentsOfFile:(NSString )file function are normaly declare a dictionary and release it after usage.
Could you give me some advise or solution?
Question1. Why daemon will so frequently calling my hook method?
Question2. Why daemon will crash my device after I add my custom method?