Many of the comments are from the point of view treating the phone as a desktop to use directly with is not very nice experience.
I want to treat the "old" phone as a server: 8 cores , 6 GB Ram, UPS, plenty of storage(expandable), Low power consumption
, small form factor, redundant network 4/5G+Wifi, has built in screen and "keyboard" for time when you need to do debugging.
Does others experience with this kind of setup?
What services are you running ?
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?
I set up an old phone to run a torrent client (qbittorrent). It was a Debian 8 chroot [1] that I could ssh into.
In the end, it really wasn't worth the hassle. Networking ports would go unresponsive when the mobile CPU on the phone would go into "deep sleep". The battery began expanding after a few months.
CPU was more than capable to do the actual processing work. I/O with the SD card was passable.
I really wish someone would invent some sort of generic battery adapter that could transform any device requiring a battery into something that can run on direct power. I really adore that old Sony Ericsson Xperia android device.
Its possible to replace the battery with a DC/DC adapter, I did it with a Samsung tablet. It does require a "beefy" power supply at a an odd voltage (4.2V or so) since batteries can provide more current than most power supplies. Also required a resistor to fool the tablet into thinking the battery was not drained.
It might be because of brief spikes in power draw that a battery usually "smoothes out" but USB power can't handle. For the same reason, some laptops cannot run without a battery (most can).
You're likely right. Some stable power feeder does need to exist, but could it skip the chemical energy storage parts?
The charge-discharge cycles needlessly put a lifespan on that component when I'd like to have it left on 24x7.
Same for always-powered laptops. With WFH, for 1+ year I've used my Thinkpad as a desktop, not bothering to unplug when fully charged, and now the battery doesn't hold charge for 10+ mins.
The answer is that phones really need a user setting to enable a charge limit.
About 4 months after COVID hit and I started to WFH, the battery in my Pixel 3 started to swell because I had allowed it to basically live on the charger all day, constantly at 100% battery. Also, by that point, a 100% battery would only give me about 2 hours of screen time.
A few months ago, I got a Pixel 6 Pro, and I'm basically just charging it from a weak 500 mA USB port a couple hours each day, keeping the battery between 50-80%. I'd really like to set an 80% charge limit and just forget about it.
AccuBattery gives an audible alert when a configurable charge level is reached (default is 80%). Not as nice as having the phone stop charging by itself, but at least I'm not frying my battery.
I don't think that's normal. I have an old cheap Lenovo from 2012 that sees 4-12 hours of active use daily. It's almost always plugged in without any limits on the battery charge (which as a result is always at 100%). The battery still has around ¾ of the original capacity (it ran for ~4 hrs of light use back in 2012, and gives around 3 hours now).
I don't think it can. UPS's store energy too, and stop holding charge after a while. It would be nice to bring back easily replaceable batteries, since they're basically a consumable these days.
> I don't think it can. UPS's store energy too, and stop holding charge after a while. It would be nice to bring back easily replaceable batteries, since they're basically a consumable these days.
I don't know anything about how much "oomph" a dashcam needs as opposed to a smart phone or an uninterruptible power supply but I kno0w one of the bullet points in the marketing of the dashcam on my car was it uses a small capacitor as opposed to a battery and therefore it is safer to use it in a hot car.
I had a dash cam years ago that had a capacitor, and all it really was for was to make sure the camera could finish a write operation and close the video file gracefully to avoid corrupting the last segment. Cameras with batteries often can support recording even while the car is off without draining the car's battery.
IMO, the solution to the battery-in-a-hot-car problem is to have the battery be an in-line part of the power cable that can be placed in the glove box, outside the direct sunlight, rather than building it into the camera itself.
On my OG Motorola Droid, I once tethered my laptop to it and downloaded a torrent.
In 15 minutes, I drained 25% of the battery. IIRC, it had a ~2,000 mAh battery. That meant I was pulling 2 amps from it. This was back in 2010, when most phone chargers and USB ports were still only 500 mA.
If I had relied on USB power, it wouldn't have been able to power it.
Oh, and yes, the phone got incredibly hot during this time. I thought I was going to burn my hand when I picked it up.
Probably some phones do work on direct power without battery.
But anyways in the general case the user wants the battery to charge when they connect their phone. Not allowing the phone to run without a battery will show more clearly that there is an issue with battery connection or battery itself, than if the phone would run when connected to power without battery.
> Not allowing the phone to run without a battery will show more clearly that there is an issue with battery connection
This is a non-issue since battery status (or lack thereof) is clearly shown in the UI. A more likely issue is that the battery is commonly relied on to deal with peaks in power draw, beyond what can be supplied via the USB port. This can even be an issue in many laptops.
I recall some older android devices with replaceable batteries did. If your battery was almost dead, you could plug it into a charger and swap out the battery for a fresh one.
The correct answer is simple: there is no profit in it and therefore no reason to do it. Any work or addition to the BOM of a phone for this purpose is therefore a waste.
I had a small Ruby (Sinatra) website running on a Linux vm on a spare Android phone (Sony Xperia X Compact). Turns out the CPU is quite capable. It actually compiles Nginx faster than a low end Google Cloud vm.
It sounds nothing, but looking at Nginx logs scrolling on a tiny phone screen is so unbelievable.
PostmarketOS gets you pretty close to this: boot alpine Linux, with more or less everything working. Even if the screen and/or GPU acceleration do not work on that phone, that would be plenty to replace a Raspberrypi.
I've been thinking about this quite seriously, and for now I see a few pain points:
- Some phones (looking at my daily driver, a Galaxy S4) do seem to allow disconnecting the battery from the charging circuit, which could lead to issues in the long run
- Ideally, you'd want to connect a USB hub over USB OTG (wired Ethernet, USB storage, real keyboard). I have yet to try charging the phone at the same time, although I think some cables enable this.
This is basically my vision of how to bring self-hosting to the masses.
Upcycle an old Android phone. Install apps for Nextcloud, Jellyfin, etc. Do a quick OAuth2 flow with your domain name provider to tunnel a subdomain directly to the app, and you have an end-to-end encrypted private cloud.
For this to work we need:
* Simpler domain name providers targeted at consumers instead of IT professionals. You shouldn't need to understand DNS records to use a domain.
* An open protocol for setting up tunnels[0].
* Nextcloud et al need to implement the protocol on their end. For open source projects 3rd parties can make wrappers.
I ran an odroids ( https://www.hardkernel.com/ ) as my home server some years back. It worked nicely for what it was, but in the end the lack of good storage options (I ended up attaching USB harddrives) was what doomed it. For what it's worth, a RasPi is exactly what you're describing, minus the screen/keyboard (but with much better cooling, which is what would be the bottleneck otherwise).
For that you shouldn't need virtualization though. With termux you can run lot of programs. There are termux packages for few server software. You should be able to compile some more yourself.
I remember being able to run a rootless debian chroot (using utility called proot) on Android 9 device, but things might have changed in meantime and I don't know if it's still straightforward.
If you're looking for serious performance, though, it may not be practical.
It would be best to create a kubernetes cluster of phones (reliability, scalability,...).
To run containers on Android you currently need to build a custom kernel (1), I hope this feature removes this need.
In terms of performance my expectations is to be comparable to the vm/vps from cloud providers where IOs are also limited, and with plenty of RAM for many workloads this will not be a big issues.
The initial crop of USB-C adoption was mostly USB 2.0, but almost everyone has been USB 3+ for a long, long time now. All the Pixel phones except the 3a are USB 3 or higher, for example. And for comparison Samsung has been using 3.1 since the Galaxy S10e.
I just checked my Pixel 5 for example reports USB 3.2 (as in, that's what it's actually connecting as to a Linux host per bcdUSB)
And a bunch of sensors. Things like GPS, accelerator, microphone, camera, are pretty much standard even on inexpensive smartphones going back half a decade.
I want to treat the "old" phone as a server: 8 cores , 6 GB Ram, UPS, plenty of storage(expandable), Low power consumption , small form factor, redundant network 4/5G+Wifi, has built in screen and "keyboard" for time when you need to do debugging.
Does others experience with this kind of setup? What services are you running ?