thatmarcel / beepserv-rewrite

A small service that generates iMessage registration data on a jailbroken iPhone, now with an app and local state notifications
GNU Affero General Public License v3.0
57 stars 5 forks source link

App crashes on startup #1

Closed Limekiller closed 7 months ago

Limekiller commented 7 months ago

I'm using the latest release on an iPhone 5S with iOS 12.5.7, jailbroken via chimera (rootful jailbreak). When opening the app from the home screen, the screen darkens for a second or two and then the app crashes. It appears that the beepserv process is crashing consistently as well. I've attached the latest crash log I have for the beepserv application as well as beepservd, along with the output of oslog | grep beeper while opening the app. Let me know if you need anything else.

logs.zip

thatmarcel commented 7 months ago

Thanks for the report.

From what I can tell by looking at the oslog, it seems like the system is denying the application the read from /private/var/mobile/beepserv.log which could be the reason for the crash since the app doesn't really have error handling for that right now.

I'm not really sure why the OS seems to be sandboxing the application in this case, maybe the app is missing an entitlement that is necessary on the iOS version or on Chimera.

The crash logs themselves don't seem to contain much other helpful information sadly, so it's hard to say why beepservd is crashing.

If it's not too much of a hassle, maybe running beepservd by hand could help with that? To do that, first run launchctl unload /Library/LaunchDaemons/com.beeper.beepservd.plist on the device to make sure the process is stopped. Then, run oslog | grep beepservd in a separate tab or watch the logs through the macOS Console.app connected to the device, so we can see what's happening when beepservd is launched. Next, run /usr/libexec/beepservd. Hopefully, the output of those two may point to the reason for the crashes.

NotTheEnclave commented 7 months ago

Im in the same boat and tried by best to get what you were looking for. I really would love this to work on my old 5s and not need to buy another old one. Hope the formatting isnt too horrible and i didn't include too much extra stuff.


iPhone:~ root# /usr/libexec/beepservd 2024-01-13 14:02:10.365 beepservd[26987:448740] [Beepserv] Shared: Trying to restore state 2024-01-13 14:02:10.384 beepservd[26987:448740] [Beepserv] Shared: Found state file 2024-01-13 14:02:10.388 beepservd[26987:448740] [Beepserv] Controll er: Starting connection dyld: lazy symbol binding failed: Symbol not found: _objc_opt_respo ndsToSelector Referenced from: /usr/libexec/beepservd (which was built for iOS 13.7) Expected in: dyld shared cache

dyld: Symbol not found: _objc_opt_respondsToSelector Referenced from: /usr/libexec/beepservd (which was built for iOS 13.7) Expected in: dyld shared cache

Abort trap: 6


default 17:06:52.360681-0500 mediaserverd <<<< TimeSyncClock >>>> figTimeSyncClock_Monitor: nowMonClock: 34776.660930; lastMonClock: 34766.938996; nowMonNet: 34776.661 (0xb54bd262050f0005); lastMonNet: 34766.939 (0xb54bd262050f0005); nowMonRef: 34776.661; lasMontRef: 34766.939; lastSynthAnchor: 34776.661; lastGM: 0xb54bd262050f0005; offset 0.000; lastRefTimelineAnchor: 34776.661 default 17:06:52.452660-0500 dasd PowerLog Update: Using UUID based reporting default 17:06:52.453094-0500 dasd PowerLog Update: received consumption report: default 17:06:52.455167-0500 dasd PowerLog Update: Discretionary energy consumed since last read: 0.00 default 17:06:52.457918-0500 dasd Reporting events to Powerlog default 17:06:53.308726-0500 beepservd [Beepserv] Shared: Trying to restore state default 17:06:53.327092-0500 beepservd [Beepserv] Shared: Found state file default 17:06:53.331710-0500 beepservd [Beepserv] Controller: Starting connection default 17:06:53.332035-0500 distnoted register name: com.beeper.beepserv/requestStateUpdate object: kCFNotificationAnyObject token: f4249 pid: 27007 default 17:06:53.333774-0500 distnoted register name: com.beeper.beepserv/springBoardRestarted object: kCFNotificationAnyObject token: f424a pid: 27007 default 17:06:53.334006-0500 distnoted register name: com.beeper.beepserv/requestNewRegistrationCode object: kCFNotificationAnyObject token: f424b pid: 27007 default 17:06:53.387727-0500 ReportCrash Trying to create CR directory structure as root default 17:06:53.405035-0500 ReportCrash cr_update: default 17:06:53.405191-0500 ReportCrash cr_update: default 17:06:53.540666-0500 ReportCrash Formulating report for corpse[27007] beepservd default 17:06:53.567549-0500 ReportCrash Report of type '109()' not saved because the limit of 25 logs has been reached default 17:06:53.574920-0500 ReportCrash Notice: This report is abbreviated for syslog inclusion because it could not be saved to disk. Symbolication may be possible by manually cleaning up and including the Binary Image section of a full report from this same device -- good luck! default 17:06:53.575431-0500 ReportCrash Process: beepservd [27007] Path: /usr/libexec/beepservd OS Version: iPhone OS 12.5.7 (16H81) default 17:06:53.576165-0500 ReportCrash Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Symbol not found: _objc_opt_respondsToSelector | Referenced from: /usr/libexec/beepservd (which was built for iOS 13.7) | Expected in: dyld shared cache Triggered by Thread: 1 default 17:06:53.579514-0500 ReportCrash Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libsystem_kernel.dylib 0x00000001dec4bc04 0x1dec28000 + 146436 1 SystemConfiguration 0x00000001dfe0a3e4 0x1dfdfc000 + 58340 2 SystemConfiguration 0x00000001dfe0a224 0x1dfdfc000 + 57892 3 SystemConfiguration 0x00000001dfe21d48 0x1dfdfc000 + 154952 4 CFNetwork 0x00000001df6fccf8 0x1df654000 + 691448 5 beepservd 0x0000000100cd9d4c 0x100ccc000 + 56652 6 beepservd 0x0000000100cd4890 0x100ccc000 + 34960 7 beepservd 0x0000000100cd14cc 0x100ccc000 + 21708 8 beepservd 0x0000000100cd2f28 0x100ccc000 + 28456 9 libdyld.dylib 0x00000001deafe8e0 0x1deafd000 + 6368 default 17:06:53.580316-0500 ReportCrash Thread 1 name: Dispatch queue: com.facebook.socketrocket.delegate.access Thread 1 Crashed: 0 dyld 0x0000000100f82418 0x100f40000 + 271384 1 dyld 0x0000000100f81a58 0x100f40000 + 268888 2 dyld 0x0000000100f81a88 0x100f40000 + 268936 3 dyld 0x0000000100f448f8 0x100f40000 + 18680 4 dyld 0x0000000100f44a14 0x100f40000 + 18964 5 libdyld.dylib 0x00000001deb00848 0x1deafd000 + 14408 6 beepservd 0x0000000100cdbbd0 0x100ccc000 + 64464 7 libdispatch.dylib 0x00000001deaeca38 0x1dea8d000 + 391736 8 libdispatch.dylib 0x00000001deaed7d4 0x1dea8d000 + 395220 9 libdispatch.dylib 0x00000001dea9cff8 0x1dea8d000 + 65528 10 libdispatch.dylib 0x00000001dea96ec4 0x1dea8d000 + 40644 11 libdispatch.dylib 0x00000001dea9e030 0x1dea8d000 + 69680 12 libdispatch.dylib <…> default 17:06:53.580522-0500 ReportCrash Thread 2: 0 libsystem_pthread.dylib 0x00000001decd0cd0 0x1decc2000 + 60624 default 17:06:53.580965-0500 ReportCrash Thread 1 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016f1ba3d0 x3: 0x000000000000005a x4: 0x000000016f1b9fd0 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x000000016f1ba970 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x64203a6e69206465 x11: 0x7261687320646c79 x12: 0x6465746365707845 x13: 0x6c7964203a6e6920 x14: 0x6465726168732064 x15: 0x000a656863616320 x16: 0x0000000000000209 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016f1b9fd0 x21: 0x000000000000005a x22: 0x000000016f1ba3d0 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x0000000000000116 x26: 0x0000000000000000 x27: 0x0000000100e20958 x28: 0x0000000100e20920 fp: 0x000000016f1b9fa0 lr: 0x0000000100f81a58 sp: 0x000000016f1b9f60 pc: 0x0000000100f82418 cpsr: 0x00000000 default 17:06:53.961700-0500 symptomsd L2 Metrics on ifname en0: rssi: -64 (txFrames/txReTx/txFail) 8/0/0 -> (was/is) 0/0 default 17:06:59.999872-0500 symptomsd L2 Metrics on ifname en0: rssi: -65 (txFrames/txReTx/txFail) 0/0/0 -> (was/is) 0/0 default 17:06:59.333522-0500 UserEventAgent Enable check timer fired default 17:07:00.025815-0500 networkserviceproxy Enable check timer fired default 17:07:00.048979-0500 UserEventAgent Got enable check date default 17:07:02.372016-0500 mediaserverd <<<< TimeSyncClock >>>> figTimeSyncClock_Monitor: nowMonClock: 34786.672002; lastMonClock: 34776.660930; nowMonNet: 34786.672 (0xb54bd262050f0005); lastMonNet: 34776.661 (0xb54bd262050f0005); nowMonRef: 34786.672; lasMontRef: 34776.661; lastSynthAnchor: 34786.672; lastGM: 0xb54bd262050f0005; offset 0.000; lastRefTimelineAnchor: 34786.672 default 17:07:03.571939-0500 nsurlsessiond Triggering periodic update to powerlog for client default 17:07:04.036817-0500 symptomsd L2 Metrics on ifname en0: rssi: -62 (txFrames/txReTx/txFail) 0/0/0 -> (was/is) 0/0 default 17:07:04.181499-0500 contextstored {"msg":"CLLocationManager", "event":"activity", "_cmd":"stopUpdatingLocation", "self":"0x100a8cae0"} default 17:07:04.182370-0500 contextstored {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x100a8cae0", "property":"updatingLocation", "old":0, "new":0} default 17:07:04.186378-0500 contextstored {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x100a8cae0"} default 17:07:04.187992-0500 locationd {"msg":"Incoming message", "event":"activity", "name":"kCLConnectionMessageLocation", "this":"0x139dd0080", "registrationReceived":1} default 17:07:04.189026-0500 locationd Client /System/Library/LocationBundles/TimeZone.bundle (0x139dd0080) is unsubscribing to notification kCLConnectionMessageLocation default 17:07:04.195843-0500 locationd {"msg":"client getting effective client name", "bundleId":"", "bundlePath":"\/System\/Library\/LocationBundles\/TimeZone.bundle"} default 17:07:04.201842-0500 locationd Client /System/Library/LocationBundles/TimeZone.bundle (0x139dd0080) is unsubscribing to notification kCLConnectionMessageLocationUnavailable default 17:07:04.212629-0500 locationd client '/System/Library/LocationBundles/TimeZone.bundle' unsubscribing from location default 17:07:04.212892-0500 locationd @ClxClient, unsubscribe, /System/Library/LocationBundles/TimeZone.bundle default 17:07:04.213634-0500 locationd #Warning Denying process assertion to default 17:07:04.218419-0500 locationd location disabled system-wide, denying executable /System/Library/LocationBundles/TimeZone.bundle default 17:07:04.218832-0500 locationd #Spi, GetLocation rejected for '': insufficient effective authorization default 17:07:04.221506-0500 contextstored Location unknown default 17:07:04.221816-0500 contextstored Not requesting location (2, ) default 17:07:04.222109-0500 contextstored Saving new values:

thatmarcel commented 7 months ago

Thanks for the logs @NotTheEnclave.

I can see that it crashes because it does not find _objc_opt_respondsToSelector.

This points to the deployment target (iOS version) being to high, which does totally make sense.

I've now pushed a change that sets the deployment target to iOS 10 and makes some changes to the code because a few method calls were iOS 11+ and in the app, one even was iOS 13+.

Can you check if commit 707f8a4 and the corresponding release fix this on your device?

NotTheEnclave commented 7 months ago

@thatmarcel Your the Best i got it working!! Thank you so much for your help, just have to test it with beeper now and hopefully wont get it banned....... Also love the mspaint profile picture man

thatmarcel commented 7 months ago

Awesome! :)

How are things looking on your side, @Limekiller?

NotTheEnclave commented 7 months ago

@thatmarcel Sorry to bug you again, is it true that we just skip the appleid login part? I saw it on here but dont know if its right. Figured I'd just ask. Again thank you for your work!!! https://www.reddit.com/r/beeper/comments/194dusw/the_update_you_all_really_want_guide_corrections/

thatmarcel commented 7 months ago

I think that currently is the consensus, yes, but those things I also just know through the recommendations from the Reddit thread you linked and the Matrix chat.

NotTheEnclave commented 7 months ago

@thatmarcel Ah shoot, I tried like 7 times skipping the login, by toggling the imessage toggle and reinstalling with no luck...........

Limekiller commented 7 months ago

Yes, looks like it's working now. Thanks for the quick reply and fix -- super appreciate the work you've done on this!

tmcelroy2202 commented 7 months ago

I am having a very similar problem on 16.2 with Roothide Boostrap and Serotonin. When i launch the app it does the little blur effect and then closes. I tried to install oslog from sileo and it gave me this : image

Here are the logs i do have: image

image

image

and here is a video of whats happening: https://streamable.com/57ezgk ( will expire in 2 days, can upload somewhere more permanant if needed ).

Any other logs i could send to help ? Or is 16.2 / roothide bootstrap with serotonin just not supported ? If this needs a seperate issue I can make one.