I did this a while back with a Pixel 2. I decided it wasn't worth the trouble.
Phones are not designed for continuous power draw (and consequent heat dissipation) - contant-use power dissipation limits are very low. The performance dips dramatically, and the constant high temperature kills the onboard flash prematurely. Same thing applies to the radios - wifi and cellular. Sustained data transfer on either of those interfaces causes issues - dropouts/disconnects/thermal reboots.
This is in addition to the fact that phones just don't have great I/O.
The heat isn't too hard to deal with, there are solutions (including the weird ones like water cooling cases https://www.ebay.com/itm/175003613243 ). Simply adding airflow tends to get you pretty far by itself, even. Device test labs are a common-enough thing and handle running phones like servers at scale without too much difficulty.
But there's more nasty lurking problems in this area, like that phones aren't designed to be continuously powered. They will naively try to keep the battery at or near 100% charge, which will destroy it relatively quickly, and not uncommonly in the "it's bulging and increasingly likely to burst into flames" variety. 2 years is considered a "decent run" for things like device test labs as a result (see eg the FAQ on https://github.com/DeviceFarmer/stf )
It seems that putting a timer on the power source (set to say 30 minutes on, 30 minutes off if the load justified it) would be a fairly simple way to significantly extend the battery life. I've been thinking of putting together something like that for myself to charge a bank of test phones for 30 minutes twice a day.
I'm not sure it would. What would extend it is if the phone could just pull from the wall directly & not the battery, so the only charging / discharging the battery gets is from being unused & slowly re-topped back to 80-90%.
If you do your timer idea it seems like either you're going to be hitting it in the 80%+ recharge over & over & over again, which doesn't seem meaningfully different from leaving it plugged in? Or you'll be in the sub-80% quick-charge zone, which will destroy the battery even quicker.
Maybe a solution to the problem would be a case that would provide cooling and would hide cables and adapters. The result could still be somewhat smaller than a NUC. Then you would only replace the phone once in a while and would have to cut a new screen cover. For better cooling depending on the phone you could remove the back cover.
Yes, and that can improve the situation a bit, but it quickly becomes a tail-wagging-the-dog situation. A heatsink requires very good thermal contact with the main heat-dissipating elements - the SoC, the DRAM, the flash, and the radios to be effective. None of those are easily accessible on a phone unless you are willing to dissassemble it entirely. And even then the contact with the heat sink will be poor due to the package and the other components.
An external case can help to a very limited extent. I tried attaching a large PC heatsink, and it did help, but not to the extent that made the "server" any good. I just switched it out for a 50$ RPI4 and its vastly better in pretty much every way.
Which doesn't need any cooling. But to be fair I expect the screen to be worse than any component. Maybe not as much as the CPU at times which has a higher frequency than it should.
"Gaming" phones do this, actually. Most of them though have poor software support compared to "thin" flagship models with far more problematic thermals.
The Pixel 2 era 820s-830s especially seemed fairly throttle heavy. There's better APIs for sustained power modes now, although I'm not sure VM would use them.
> Phones are not designed for continuous power draw (and consequent heat dissipation) - contant-use power dissipation limits are very low.
Maybe someone here can help me understand how power draw works on Android.
I have a ZTE Z959, a Cricket device. I use the phone to take photos with Open Camera every few seconds and stitch them together to make a video with ffmpeg. (Someone told me that YouTube has no practical limit on storage and I wanted to prove that they will cap me at some point but that is a topic for another day. Basically, the tl;dr here is for my casual use, YouTube has unlimited storage).
But I digress. The point is at some point the phone's battery started swelling up which became a fire hazard. I wanted to power the phone without battery. I have a Thinkpad 65W USB type-C charger. The first challenge was easy to work around. The phone just goes on a boot loop but if I add the battery and plug in the charger, the phone boots up ok. After the phone boots, I can remove the battery and the phone stays on (provided I don't do things like use flash, my guess is flash needs more power than my charger can provide.
Can someone shed more light into this process? How does all of this work? Does all of this mean my phone is technically running from battery even when it is connected to the wall?
Phones are not designed for continuous power draw (and consequent heat dissipation) - contant-use power dissipation limits are very low. The performance dips dramatically, and the constant high temperature kills the onboard flash prematurely. Same thing applies to the radios - wifi and cellular. Sustained data transfer on either of those interfaces causes issues - dropouts/disconnects/thermal reboots.
This is in addition to the fact that phones just don't have great I/O.