ATV 9.0 pangu conundrum

Questions and Answers about all things *OS (macOS, iOS, tvOS, watchOS)

ATV 9.0 pangu conundrum

Postby lechium » Thu Mar 24, 2016 10:36 pm

https://twitter.com/nitoTV/status/713038650120900609

followup related to that tweet:

Booted/reboot normally for a full day and a half after jailbreaking yesterday, no apparent issues, was hearing reports of this issue which can be summarized as follows

1. device sleeping or going to screensaver and not coming back or booting up with a black screen that occassionally changes to a white screen
2. SSH still works, but no GUI visible, almost applications running and a bunch of daemons aren't running either (that normally are running, more on that below)

while i was trying to figure out what was different between my system and one that was exhibiting these issues, it happened all of a sudden. i didnt load or unload anything, was just poking around with syslog/dmesg/ps awwx output.

here are some before and after logs / ps awwx outputs for when the system was running normally, to not being able to run. no matter what SSH still works and the system is still "booted" just no visible display and a bunch of things that are supposed to be running, arent.

https://dl.dropboxusercontent.com/u/161 ... ostics.zip
lechium
 
Posts: 11
Joined: Thu Mar 24, 2016 10:33 pm

Re: ATV 9.0 pangu conundrum

Postby morpheus » Thu Mar 24, 2016 11:43 pm

These are good logs, and actually help me understand the system better, so thanks.

As for the main diff - Pineboard is running on both. What isn't, is HeadBoard - /Applications/HeadBoard.app/HeadBoard and then all the apps you're missing. PineBoard's PBAppLaunch mechanism doesn't work. There is a crashreport for HeadBoard in the good syslog, and I'm wondering if it keeps crashing. We can work this out - I just need more details.

A) reboot
B) Give it a bit of time
C) Check for any crashed application logs
D) do a ps aux
E) run procexp all all > output.txt

And we'll pick up from there.
morpheus
Site Admin
 
Posts: 531
Joined: Thu Apr 11, 2013 6:24 pm

Re: ATV 9.0 pangu conundrum

Postby lechium » Fri Mar 25, 2016 12:54 am

Heres more files, i cant do a tar/zip of the whole list of logs because scp isnt working and neither is AFC. basically the only thing that works at all is SSH. so i gotta cat the files, copy and paste the output to get the output of a file. i did make include a full recursive listing of files, if theres any other files u would like to see the contents of let me know.

thanks!

https://www.dropbox.com/s/9meiemdl4fz1x ... s.zip?dl=0
lechium
 
Posts: 11
Joined: Thu Mar 24, 2016 10:33 pm

Re: ATV 9.0 pangu conundrum

Postby morpheus » Fri Mar 25, 2016 1:48 am

So , if ssh works so can scp. You just need to make sure you have /usr/bin/scp installed. That's in my binpack, so no problem.

Second, you can always start AFC. If you have root shell and unsandboxed, there is nothing you can't do.

Third, I'll look at those logs. Looks big. :?


Btw, there is a "script" binary which records whatever you do to a file.
morpheus
Site Admin
 
Posts: 531
Joined: Thu Apr 11, 2013 6:24 pm

Re: ATV 9.0 pangu conundrum

Postby lechium » Fri Mar 25, 2016 2:18 am

i cant get any of the normal launchdaemons that are missing between the before and after logs to start again after it "died", whether it be afc or anything else. thats one of the other very strange things. the AppleTV is essentially dead to USB unless i put it in DFU or recovery, unloading and reloading any necessary launchdaemons for lockdownd services like crash reporter relay or syslog relay or afc just flat out do nothing. its really bizarre. also if i try to scp i get this error back

/usr/bin/dbclient: No such file or directory
lost connection
lechium
 
Posts: 11
Joined: Thu Mar 24, 2016 10:33 pm

Re: ATV 9.0 pangu conundrum

Postby morpheus » Fri Mar 25, 2016 4:12 pm

The dbclient error you can fix easily, by copying /usr/local/bin/dbclient to /usr/bin/dbclient.

That it is "dead" to USB - it isn't, if you get SSH, unless you 're SSHing over the network interface(s). If you don't get SSH over USB, that's because lockdownd needs to started.

More to follow when I have it.
morpheus
Site Admin
 
Posts: 531
Joined: Thu Apr 11, 2013 6:24 pm

Re: ATV 9.0 pangu conundrum

Postby lechium » Fri Mar 25, 2016 5:48 pm

i am SSHing over the network interface, the ATV4 in question is plugged in to my router with an ethernet cable. thanks for the scp tip, ill try that out now :) But when its plugged in via USB and not in DFU/recovery mode NOTHING sees it as connected. not Xcode, not iTunes, no AFC clients, pretty sure even system profiler ignores it (will have to double check on that)

EDIT: that fixed scp, thank you!!!

Here is the entire crashlog folder tgz: https://www.dropbox.com/s/heblrzk685ky2 ... h.tgz?dl=0

i don't know if they will help any more then the ones i've already supplied. if you need anything else, let me know.

also thanks again for the help and looking into it! flying blind here.
lechium
 
Posts: 11
Joined: Thu Mar 24, 2016 10:33 pm

Re: ATV 9.0 pangu conundrum

Postby morpheus » Fri Mar 25, 2016 11:41 pm

I'm seeing lots of weird things there- like crashlogs for HeadBoard with a parent process of the shell? Did you try to spawn that directly? It can't be started. PineBoard has to do that.

Right now your focus should be on getting lockdownd up - that's why you're not seeing USB. Nuke all those logs, and then try using launchctl to load the plists in /Library/LaunchDaemons. All of them, even, but primarily lockdownd, manually - keeping an eye on the syslog.

And don't worry - I reaffirm that with SSH open , you needn't worry. The WORST, act of last resort, can be to update back to 9.0 using my OTA method, *very* *Very* carefully. But I'm not suggesting you do that yet. So don't.

Btw - I just realized you're nitoTV - saw your preview for the settings app - I like! But that begs the question - are you SURE you didnt try a failed tweak which you got you to this predicament? Failed injection/modding is very likely to kill daemons in this way.

J
morpheus
Site Admin
 
Posts: 531
Joined: Thu Apr 11, 2013 6:24 pm

Re: ATV 9.0 pangu conundrum

Postby lechium » Sat Mar 26, 2016 12:00 am

oh yeh i havent installed anything yet cuz no dpkg or apt in 64 bit form yet. someone else reported this problem to me the day before yesterday (when it happened to me) the weird thing is i wasnt doing ANYTHING expect poking around with syslog / dmesg and ps awwx, the all of a sudden i go back in my room (tv is in a different room then my office) i go back in not 10 minutes after everything was working normally and i had a black screen of death.

The ONLY thing i tried the day before was trying to add another dyld cache (i didnt replace or do anything to the original one, just added a second one) to try and get 32 bit binaries loading as a stopgap to test out my installer. But it didnt crash or do anything right after messing around with that so i dont think it could have anything to do with the issue. and all i tried to do with it is some old chicanery dustin howett did back in the day to get the AppleTV.app from 4.2.1 on the AppleTV running on his iPod touch by adding a bootstrap shell script to nano (i know we have a 64bit one, was just a simple one to try) with a little script like this

export DYLD_SHARED_REGION=private
export DYLD_SHARED_CACHE_DONT_VALIDATE=1
export DYLD_SHARED_CACHE_DIR=/var/root/
exec /var/root/nano_

i digress, i know that had nothing to do with this thing "dying", but i really have no explanation to anything extra i tweaked or installed. this is literally all i did besides jailbreaking it and turning off updates and blocking update nags in /etc/hosts

by adding these lines

127.0.0.1 mesu.apple.com
127.0.0.1 appldnld.apple.com
127.0.0.1 appldnld.apple.com.edgesuite.net

those are literally the only two things i did, otherwise i was just looking at logs. i didnt modify / run anything else. thats what makes it so mind boggling. i think it went to sleep or onto a screensaver (which it had done before without issue)

Thanks on the compliments :) the settings project is just a little side thing to help refactor my installer for the atv which is pretty much "done" once i get 64 bit dpkg and apt-get and related dependencies. Its amazing how little working on AppleTV's since 2007 helped in tvOS haha.

EDIT: forgot to mention this re launchdaemons loading

i did try loading all the launchdaemons, it says they are already loaded and the syslogs dont change unless i unload and reload individual ones. that never appears to make any difference. tried to reload the syslog relay ones and afcd one to no avail when i was trying to get USB back.
lechium
 
Posts: 11
Joined: Thu Mar 24, 2016 10:33 pm

Re: ATV 9.0 pangu conundrum

Postby lechium » Sat Mar 26, 2016 12:09 am

got it back!! unloading and reloading com.apple.mobile.lockdown.plist seemed to fix it. i also deleted the pangu app folder manually im not sure if that played into anything.

so baffling... kinda want to just shut it down to keep it safe. haha

oh i also did this, but also have no idea if it had any influence or bearing on things.

added this plist to /var/root/Library/Preferences to try to "sedate" watchdog, don't know if it even still works.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WatchdogEnabled</key>
<false/>
</dict>
</plist>
lechium
 
Posts: 11
Joined: Thu Mar 24, 2016 10:33 pm

Next

Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 4 guests