This post is an update of the second part of my Moto server series: https://lemmy.zip/post/72142441

Rumor has it that keeping an 8-year-old phone permanently plugged in with its equally ancient Li-ion battery might not be the greatest idea ever conceived.

Some even claimed that a phone needs a battery to work.

Very negative people.

Anyway, I removed it.

Pettyl did not care.

nginx: UP PHP-FPM: UP MariaDB: UP WordPress: UP cloudflared: UP sshd: UP

The battery is currently sitting next to the phone, contributing absolutely nothing to the project.

Pettyl is now running entirely from USB power, at around 37°C, while continuing to serve the website like this is completely normal.

There is, however, one tiny detail the haters may enjoy:

It can’t boot without the battery.

So the official Pettyl disaster recovery procedure is now:

  1. Insert battery
  2. Boot Pettyl
  3. Connect USB power
  4. Remove battery
  5. Pretend this is enterprise infrastructure

The battery is no longer a battery.

It is the starter motor.

I see no problems with this architecture.

Anyway, Part 3 is going great.

all 93 comments

sorted by: hot top controversial new old
[–] 51 points 1 month ago (3 children)

Remember the days when hou could just pop the back off and take the battery out?

  • source
  • hideshow 3 child comments
  • [–] 8 points 1 month ago

    That's where I am today with my Fairphone.

    I honestly held on to my old Nokia, replacing batteries and cases until Fairphone came along and then I jumped from 90's tech to modern day.

    0-->100% in 10 seconds (with a 2nd battery)

  • source
  • parent
  • [–] 5 points 1 month ago

    And it would still run when you had it plugged in. I could remove the battery from my old Galaxy S2, plug it in and it would work. And if I remember correctly, the same thing went for most of the phones I had before that.

  • source
  • parent
  • [–] 36 points 1 month ago (20 children)

    Damn, I wish they still made phones with a removable battery

  • source
  • hideshow 20 child comments
  • [–] 33 points 1 month ago (10 children)

    I used to keep a charged spare on me. And this was back when a phones battery life was like 3-7 days.

    Stop making phones thinner God dammit. I don't want a thinner phone. I want longer battery life and a removable battery so I can fucking double the shitty longer battery life I get.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 10 points 1 month ago (8 children)

    And a big enough pocket to hold it securely, no matter what gender clothing you wear!

  • source
  • parent
  • hideshow 8 child comments
  • [–] 5 points 1 month ago (2 children)

    That's kinda hard when women's pants often have no pockets, fake pockets, or pockets so small they're functionally useless.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 1 month ago* (last edited 1 month ago) (1 child)

    That's why it's a response to "I want.."!

    An add-on to the wishlist, as it were. I'm just an old non-tech cis woman but I firmly believe generous pockets could and should be designed/engineered/built into every twirly skirt, every thigh-high (but down near the ankle bc gravity) every booty pant and even red-carpet gala gowns. At least someone finally realized workout leggings can have a pocket down on the leg if it's so god-damned important not to interrupt the "line" elsewhere.

    And everyone should feel free to wear whatever styles they feel suit them, with neither social stigma nor pocket-neglectful construction holding them back.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 1 month ago

    Hell yeah sister! I'm 100% for this. I'm a cis guy but the clear disparity of pants pockets between gendered clothing (and clothing being gendered at all) has always irked me. Everyone should have equal access to pockets!! (Silly but serious)

  • source
  • parent
  • [–] 6 points 1 month ago (4 children)
  • [–] 15 points 1 month ago (3 children)
  • [–] 5 points 1 month ago

    I used to keep a charged spare on me.

    There's at least one Chinese brand that has smartphone with hot-swappable battery: https://rugone.net/products/xever-8

    Removable battery. Swap within 2 minutes for zero interruption. After 2 minutes, the device enters a 60-second safety lock-out to protect your data.

    Unfortunately, software from these brands tends to be shit. I feel like they just outsource it to the cheapest company. Especially following this recent thing:

    As of March 4, Sophos X-Intercept telemetry listed over 500 unique compromised Android devices across nearly 50 models. The devices were mostly low-cost models produced by the following manufacturers: Allview, BLU, Dcode, DOOGEE, Gigaset, Gionee, Lava, and Ulefone. The list did not include Alldocube devices, despite Kaspersky reportedly observing Keenadu affect that manufacturer as well.

    Source - Sophos
    Report from Kaspersky

  • source
  • parent
  • [–] 11 points 1 month ago* (4 children)

    Didn't EU pass a regulation regarding that? If I recall correctly all portable devices sold in the EU after February will will need to have a user replaceable battery.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 1 month ago (2 children)

    i'm curious to see how apple will workaround the regulation

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 1 month ago (1 child)

    They already did I believe. They enhanced their battery glue so it should be easier to remove; reduced the amount of different screwdriver types required to access the battery to one or two; and put a small repair tool set up for sale, for the low price of $700. Thats already impressive for Apple standards

  • source
  • parent
  • hideshow 1 child comment
  • [–] 26 points 1 month ago* (last edited 1 month ago) (1 child)

    Anything made to be run from battery can work fine without one. Worst case scenario requires you to spoof some I²C communication to properly emulate a battery, but most devices and batteries are far dumber than that. DC is DC, and sometimes you just need to graft something on top for the other pins.

    Source: My old laptops charging circuit failed, so I soldered the charger onto the battery pins instead. Then I replaced the actual battery with an Adafruit Itsybitsy 32u4 (because that what I happened to have available) that emulated the battery status of "Charging, nothing to see here, move along" and sent it via I²C

  • source
  • hideshow 1 child comment
  • [–] 6 points 1 month ago

    The charging cirtuit that also tries to guess the battery percentage can be the problem. The 'guessed percentage' will depending on the chip and programming go down even if you solder in a dc power supply. When it hits the 0% it will shutdown.

    Thats the case for some smart phones.

  • source
  • parent
  • [–] 22 points 1 month ago (2 children)

    My old Galaxy S5 would work without the battery, including bootup. So it's not entirely unexpected that other phones could also do so. I would say I can't imagine who would take the time out out of their day to just talk out their ass and claim something like this wouldn't work without trying it first. Except then I remember this is the internet, and people do that all the time.

    Regardless, good on you for making this all work!

  • source
  • hideshow 2 child comments
  • [–] [S] 16 points 1 month ago (1 child)

    Hahaha, thank you for defending me! 😄

    Just to clarify though, the “they said it couldn’t be done” part was mostly me being ironic and unnecessarily dramatic for the post lol. The comments on this whole project have actually been overwhelmingly positive and helpful.

    People here are the reason I even tried some of this stuff in the first place.

    But I genuinely appreciate you having my back. And the S5 being able to cold boot without a battery is really interesting — Pettyl unfortunately needs its battery as a starter motor. 😂

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 1 month ago* (last edited 1 month ago)

    The HTC Aria at least could also cold boot from USB power. The first method developed for bootloader unlocking on it required an SD card with the unlocking software be inserted at a particular time during the boot process. And the SD card slot was under the battery!

    Edit: now I have to double check myself; signing back into some old posts maybe I'm not remembering the process correctly. It was maybe 16 years ago, and I'm getting old! :-)

  • source
  • parent
  • [–] 58 points 1 month ago (9 children)

    Since when does a phone need a battery to run? It needs power, doesn’t matter where the power comes from.

  • source
  • hideshow 9 child comments
  • [–] [S] 91 points 1 month ago

    well ACKSHUALLY 🤓☝️

    Unfortunately Pettyl is stupid enough to need the battery to boot, but smart enough to forget about it immediately afterwards.

    I don’t make the rules, I just host WordPress on an 8-year-old Motorola.

  • source
  • parent
  • [–] 55 points 1 month ago (7 children)

    Since their burst power consumption started using more current than a capacitor in the charging circuitry could provide

  • source
  • parent
  • hideshow 7 child comments
  • [–] [S] 28 points 1 month ago (4 children)

    Yeah, what he said. I was just about to say the exact same thing…

  • source
  • parent
  • hideshow 4 child comments
  • [–] 5 points 1 month ago* (3 children)

    I once soldered a usb wire into the terminals where the battery of my moto g4 used to be, and it kept crashing on boot. So I added a large capacitor right across the terminals, and even with that and being at 5V (on a 5 amp supply), some apps still overloaded it and got it to crash.

    Would love if there was some package that just attached like a battery with a usb wire coming out the bottom, that could supply any spikes if the usb provided enough average power.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 1 month ago* (2 children)

    It's not just the spike, but the battery is supplying more power than the adapter for sometime extended periods of time. It would take an expensive, or very large, capacitor bank to hold enough power to accomplish that for very power intensive apps. Capacitors are good at charging and discharging quickly and lasting many more cycles than a battery, but no where near the capacity.

    What you really need to know is exactly how much power the battery can provide and adjust the power supply to be able to supply that on demand and just enough capacitor capacity to smooth out the initial spike until the power supply gets the power up. I haven't done the research to know the exact amounts, but I have a lot of experience with electrical and electronics in general, both professionally and amateur. So I could probably build it if o knew the exact specs.

    That or adjust the phone firmware to limit the processor and GPU speeds, but that's only possible on some phones that have code available and a way to root it without some hardware switch killing the phone permanently.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 18 points 1 month ago* (last edited 1 month ago) (4 children)

    Now plug the phone into a UPS so if the power goes out you're good for awhile.

  • source
  • hideshow 4 child comments
  • [–] [S] 51 points 1 month ago (3 children)

    This is obviously ridiculous.

    So I’ll do it.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 8 points 1 month ago* (2 children)

    I'm honoured to have my idea contributed to this project!

  • source
  • parent
  • hideshow 2 child comments
  • [–] 16 points 1 month ago (1 child)

    Nice.

    There is often a check for battery that is effectively a check of resistance between sense and ground. Looks like that battery is labelled, you might be able to bodge a resistor between sense and ground on the phone and get it to boot without the battery?

  • source
  • hideshow 1 child comment
  • [–] [S] 14 points 1 month ago (3 children)

    Update! Apparently removing the battery also removes half the CPU lol.

    I’ll keep you posted!

  • source
  • hideshow 3 child comments
  • [–] 11 points 1 month ago* (2 children)

    Usually phones have 3 pins on the back for the battery, one of them - usually the one at the center - reads the battery resistance, so if you add a resistor between that pin and another pin, it will fool the phone to belive it has a beattery

    Edit: spelling

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 1 month ago (8 children)

    Perhaps replace its aging battery with a new one. Then you have a built in UPS for ideal disaster recovery

  • source
  • hideshow 8 child comments
  • [–] [S] 5 points 1 month ago* (7 children)

    Nah, an actual UPS with 7kg batteries is way cooler.

    But I really appreciate the feedback!

  • source
  • parent
  • hideshow 7 child comments
  • [–] 7 points 1 month ago (5 children)

    Perhaps then some solar power as well. I think those ecoflow battery + solar can act as UPS too. Could power that server indefinitely 😂

  • source
  • parent
  • hideshow 5 child comments
  • [–] [S] 4 points 1 month ago (4 children)

    Now we're speaking the same language!

  • source
  • parent
  • hideshow 4 child comments
  • [–] 5 points 1 month ago (3 children)

    Can you get a second identical phone. Or a third? I’m thinking perhaps load balancing and failover

  • source
  • parent
  • hideshow 3 child comments
  • [–] [S] 5 points 1 month ago (2 children)

    Maybe not an identical one, but I did find an interesting Note 9 for around $40...

    I guess this is foreshadowing...

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 1 month ago

    DO NOT skip step 5. It is VERY IMPORTANT.

  • source
  • [–] 9 points 1 month ago (1 child)
  • [–] 6 points 1 month ago (4 children)

    I have a simillar setup but i kept the battery it acts like a ups

  • source
  • hideshow 4 child comments
  • [–] 5 points 1 month ago (3 children)

    in my experience phone batteries plugged 24/7 will increase in size

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 1 month ago

    Well you better go catch it!

  • source
  • [–] 5 points 1 month ago

    I'm currently reading this on my nearly 8 year old phone. I guess when I finally get round to replacing it I'll have a new server! Sweet

  • source
  • [–] 3 points 1 month ago*

    About the not booting issue: What if you soldered a fitting power supply directly to the phones battery pins? Is this a horrible idea? I don't know. Or 3d-print a power supply to dummy battery adapter...

  • source
  • [–] 4 points 1 month ago

    put one lead from the battery on a transistor so you can disconnect it with a little ESP or something when you go to power cycle it. Or even just hold down a button to connect it while you plug the phone back in.

  • source
  • [–] 4 points 1 month ago (1 child)
  • [–] 3 points 1 month ago

    Why not connecting the battery with a cable and put a switch in it?

  • source
  • [–] 3 points 1 month ago

    nice phone! all of my phones i tested (with replacable battery) refuse to work without battery attached and almost instantly turns off if i ever detach it while running, even with power connected.

  • source
  • [–] 3 points 1 month ago

    How do I sign up for the pateron?

  • source
  • [–] 3 points 1 month ago

    I should test this with my old s8

    Had to toss the spicy pillow and had no clue what to do with it since

  • source
  • [–] 3 points 1 month ago
    [–] 3 points 1 month ago

    I wonder if my pixel 7 pro that dies suddenly can do the same. I suspect the battery just packed up

  • source
  • [–] 3 points 1 month ago (4 children)

    I’ve run laptops without a battery, constantly plugged in. I assume this is not a fire hazard.

  • source
  • hideshow 4 child comments
  • [–] 7 points 1 month ago (2 children)

    No more than any other electrical device.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    Can you wire the USB power to the battery contacts...?

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 1 month ago

    It sounds like a good idea until you remember that USB provides 5V and the battery contacts are designed for a Li-ion battery and its management circuitry.

    Wiring USB directly to the battery contacts would basically be like noticing your car runs on petrol and pouring it directly into the engine instead of the fuel tank. The general concept of “engine needs fuel” is technically correct. The implementation leaves something to be desired.

    The USB port and the phone's power-management circuitry exist for a reason, and bypassing them could damage the phone or make it behave in exciting new ways.

    A properly regulated dummy battery, however, might actually work. Unfortunately, that means I now have another terrible idea to investigate.

  • source
  • parent
  • [–] 2 points 1 month ago

    Awesome! I will try it too!

  • source
  • [+] 2 points 1 month ago* (last edited 1 month ago) (2 children)
  • [–] [S] 2 points 1 month ago (1 child)

    Lol, indeed. The music is stored on the Motorola, and it's being served by the Motorola.
    And thanks for the compliment about my music! The mix is shit, but on the other hand, it was made by my own two hands — no AI involved.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (-1 replies)
  • [–] 1 point 1 month ago

    This is so cool you've actually inspired me to try out the same thing. Ive just finished setting up port forwarding and got the nginx page, but this has been fun as my first time hosting a website

  • source