News for hackers. Stuff that matters.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by dividuum on Saturday August 12, 2023 @05:59PM (#37104615)
Probably terrible data point, but running "nc -l -p 80" within the iSH shell app on iOS opens port 80 and is reachable from a desktop machine in the local network. iSH has requested the "Local network" permission at some point.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by jeroenhd on Saturday August 12, 2023 @06:01PM (#37104627)
That's interesting, thanks for the information! Refreshing to see Apple provide to be the less restrictive app platform!
Re:Every Phone Should Be Able to Run Personal Website – Roha... by LeoNatan25 on Saturday August 12, 2023 @06:17PM (#37104719)
Even if you run the server, it will die if the app goes to background or the screen turns off. Hardly practical. Just because a port is open does not mean it’s “less restrictive”.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by NavinF on Saturday August 12, 2023 @06:33PM (#37104818)
There are workarounds for that: https://developer.apple.com/documentation/xcode/configuring-...

Eg if that terminal app is capable of playing audio, it can play silence to keep the app alive forever in the background.

I don't mean to imply that this is practical. Any solution would still destroy battery life.

Re:Every Phone Should Be Able to Run Personal Website – Roha... by mcny on Saturday August 12, 2023 @07:13PM (#37105073)
What I would like to see is devices being able to run at least to some extent purely off of the wall.

My use case: I plug in an old phone into the wall, a 65W Thinkpad charger to be precise. The input for the Thinkpad is USB type C which is the same as my ZTE phone. I connect the USB C cable, attach my spicy pillow of a battery (it is removable), wait until the device powers up, and remove the spicy pillow from the phone. The phone stays on.

What I would like to see instead is some way for phones and laptops to work directly off of the wall, not charging or using the battery at all once it is done charging, without me having to physically remove the battery. I thought this is how laptops used to work but I am not an expert. Phones I am positive do not work like this for some reason. I believe one reason is the camera flash. The camera flash requires more oomph (very technical term) than the wall can deliver. I'm guessing that based on a single anecdote that I once tried to use the flash without a battery and the phone rebooted.

I guess the main gist of this comment is to say I'd like to see better thought go into making battery more durable so you can use a phone, connected to the wall for ten years if you wanted to. I am positive that if we could use the phone off the wall without constantly charging and discharging the battery, we would be able to eliminate most cases of spicy pillow.

Re:Every Phone Should Be Able to Run Personal Website – Roha... by NavinF on Sunday August 13, 2023 @04:15AM (#37107758)
> not charging or using the battery at all once it is done charging, without me having to physically remove the battery

Most flagship devices already do this. They automatically enter kiosk mode after being plugged in for a few days which eliminates the spicy pillow problem by keeping battery voltage significantly lower than normal. Eg https://support.apple.com/en-gu/HT208710

> I thought this is how laptops used to work

Transients are a problem for laptops and desktops too. Eg:

- Macbooks go into limp mode by asserting PROCHOT when the battery is <10% (or disconnected or high internal resistance) regardless of whether the laptop is plugged in. If they didn't, a sudden increase in power usage would cause enough voltage sag to reset the machine or cause data corruption. See https://apple.stackexchange.com/questions/380493/cpu-throttl...

- An RTX 3090 draws only 350W, but transients are often double that. A lotta people with weak PSUs and aggressive OCP had random reboots and bluescreens until they upgraded their PSU. The newer RTX 4090 has a better VRM which causes smaller transients so it can work with a smaller PSU despite having a 450W TDP.

Re:Every Phone Should Be Able to Run Personal Website – Roha... by LeoNatan25 on Sunday August 13, 2023 @12:52PM (#37111657)
That's not allowed on the app store (Apple will reject apps that abuse this without a legitimate reason, and a terminal app has no business playing background audio or abusing location services). Also, the audio background mode is particularly bad for user experience, as it does not allow you to play real audio, because in toyOS land, only one process can play audio. Yes, this is the state of iOS in 2023. Garbage.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by urbandw311er on Sunday August 13, 2023 @05:17PM (#37114613)
Not true if I recall correctly, since around iOS 4 multiple processes can play audio simultaneously- it is only if a process requests exclusivity that playback from other backgrounded apps is stopped.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by LeoNatan25 on Monday August 14, 2023 @08:57AM (#37120497)
A foreground app can play additional audio if it does not require system support (such as controlling the playback from a Bluetooth headset and appearing in the now playing widget/dynamic island). But only one process can play continuous audio in the background. You cannot have Safari play a video and also listen to an audiobook.

“wHy WoULd YoU wAnT tO Do tHaT aNyWaY¿” -typical Apple fanboy response

Re:Every Phone Should Be Able to Run Personal Website – Roha... by dividuum on Saturday August 12, 2023 @06:30PM (#37104800)
I apologize in advance: 'cat /dev/location > /dev/null & python -m SimpleHTTPServer 80'. Totally crude but works, even when turning off the display.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by LeoNatan25 on Sunday August 13, 2023 @12:50PM (#37111626)
This just slightly extends the background runtime, not allow indefinite background execution. I don't think ish has the navigation background mode (or audio for that matter) enabled, as it won't be allowed by Apple.
Re:Every Phone Should Be Able to Run Personal Website – Roha... by Spooky23 on Saturday August 12, 2023 @10:19PM (#37106043)
You can also use it with Tailscale (or other VPN) to make it reachable to other hosts in the tailnet.