this post was submitted on 26 Sep 2026
690 points (99.0% liked)

Selfhosted

62846 readers
752 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

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.

top 50 comments
sorted by: hot top controversial new old
[–] 0485919158191@lemmy.world 64 points 1 week ago (3 children)

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

[–] tradicije@lemmy.zip 96 points 1 week 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.

[–] ryannathans@aussie.zone 58 points 1 week ago (3 children)

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

[–] tradicije@lemmy.zip 31 points 1 week ago (4 children)

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

load more comments (4 replies)
load more comments (2 replies)
[–] frongt@lemmy.zip 6 points 1 week ago

It's something about how the charging circuitry is constructed. I've asked a handful of electrical engineers about it but they've never given me a good answer. My guess is that it's easier/cheaper to design and build a circuit that only powers the phone off the battery, and only uses DC to charge the battery.

[–] vext01@feddit.uk 52 points 1 week ago (3 children)

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

[–] Cyber@feddit.uk 8 points 1 week 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)

[–] WhoIzDisIz@lemmy.today 7 points 1 week ago

Still have my LG Optimus on Android 2.x somewhere. With 512MB RAM I dunno what to do with it outside of a clock display, but I have it (and a spare battery).

load more comments (1 replies)
[–] oaoaoe@thebrainbin.org 36 points 1 week ago (6 children)

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

[–] foggy@lemmy.world 33 points 1 week ago (2 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.

[–] Mouselemming@sh.itjust.works 10 points 1 week ago (9 children)

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

load more comments (9 replies)
load more comments (1 replies)
[–] JustEnoughDucks@feddit.nl 18 points 1 week ago (1 children)

I just got a fairphone 6. Removable battery!

load more comments (1 replies)
[–] undefinedTruth@lemmy.zip 11 points 1 week ago* (last edited 1 week ago) (5 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.

load more comments (5 replies)
load more comments (3 replies)
[–] neidu4@piefed.social 25 points 1 week ago* (last edited 1 week ago) (1 children)

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

[–] ShortN0te@lemmy.ml 6 points 1 week 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.

[–] dual_sport_dork@lemmy.world 23 points 1 week ago (1 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!

[–] tradicije@lemmy.zip 16 points 1 week ago (1 children)

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. 😂

[–] Bansh33@lemmy.ml 1 points 5 days ago* (last edited 5 days 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! :-)

[–] gagootron@feddit.org 21 points 1 week ago

When the battery in my wall mounted android tablet swelled i had to add a 10k resistor to the sense line, inject the 5V directly into the battery port and add a few capacitors to get it to work. But at least it won't cause a fire now.

[–] NotMyOldRedditName@lemmy.world 20 points 1 week ago* (last edited 1 week ago) (1 children)

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

[–] tradicije@lemmy.zip 54 points 1 week ago (2 children)

This is obviously ridiculous.

So I’ll do it.

[–] NotMyOldRedditName@lemmy.world 9 points 1 week ago* (last edited 1 week ago) (1 children)

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

[–] tradicije@lemmy.zip 7 points 1 week ago (1 children)

Your contribution is noted and landed you a new position at Pettyl Industries!

Read Here

load more comments (1 replies)
load more comments (1 replies)
[–] non_burglar@lemmy.world 16 points 1 week ago (1 children)

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?

[–] ThePantser@sh.itjust.works 11 points 1 week ago

Here I was thinking you should add a capacitor so there is some juice if the phone draws more than the USB can supply. Maybe even a super cap so you get a more robust drain discharge cycles.

[–] tradicije@lemmy.zip 15 points 1 week ago (1 children)

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

I’ll keep you posted!

[–] Axolotl_cpp@feddit.it 11 points 1 week ago* (last edited 1 week ago) (1 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 b~~e~~attery

Edit: spelling

[–] WhoIzDisIz@lemmy.today 8 points 1 week ago (1 children)

Any idea what ohm value would be best?

[–] Axolotl_cpp@feddit.it 8 points 1 week ago

Nope, i think the ideal one changes with the phone manufacter, you should try to test the battery ohm value and use that one

[–] viertesauge@feddit.org 11 points 1 week ago (1 children)

What did you put in place of the battery? nothing or a cap? i tried this with a moto g6 but there is not enough power delivered through its own usb port so i have to use a 5volt source+capacitor connected to the bms i saved from the battery.

[–] tradicije@lemmy.zip 30 points 1 week ago (2 children)

I did not need to fake battery presence, just needed the battery as a starter, once the phone is booted just removed the battery.

Although the real test is yet to come, I have to leave it like this for a day or two, to see if it powers off when CPU spikes…

[–] surewhynotlem@lemmy.world 8 points 1 week ago (1 children)

Awww... I remember back when batteries were removable. Good times.

load more comments (1 replies)
[–] fox2263@lemmy.world 11 points 1 week ago (1 children)

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

[–] tradicije@lemmy.zip 6 points 1 week ago* (last edited 1 week ago) (2 children)

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

But I really appreciate the feedback!

[–] fox2263@lemmy.world 8 points 1 week 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 😂

load more comments (5 replies)
load more comments (1 replies)
[–] ayyy@sh.itjust.works 10 points 1 week ago

DO NOT skip step 5. It is VERY IMPORTANT.

[–] Asetru@feddit.org 10 points 1 week ago (3 children)

Well... I was obviously wrong. Sorry.

Don't know if my knowledge was just outdated or plain wrong from the start, but good on you for still trying and respect for pulling that off.

[–] tradicije@lemmy.zip 8 points 1 week ago

You are absolutely fine!

People here, including you, have been very respectful and thoughtful, and I am all for feedback.

I don’t have the knowledge of the whole universe, do I? So please, by all means, I want to hear your critiques, it makes the project better and I learn along the way!

load more comments (2 replies)
[–] zzffyfajzkzhnsweqm@sh.itjust.works 9 points 1 week ago (1 children)
load more comments (1 replies)
[–] affiliate@lemmy.world 6 points 1 week ago

Well you better go catch it!

[–] 4grams@awful.systems 6 points 1 week ago (1 children)

I just have to say, I really enjoy your writing style. Fun project, great post!

load more comments (1 replies)
load more comments
view more: next ›