AWS Builder Center
Breathing New Life into Old Hardware: How We Built 'Half Life'

Breathing New Life into Old Hardware: How We Built 'Half Life'

How We Built a Phone Doctor in a Weekend (and Nearly Lost It at Hour 40) A weekend hackathon journey building Half Life a zero-install, serverless diagnostic tool that uses WebUSB and AWS to rescue aging smartphones from the e-waste bin . || I still need a Coffee !!

Every year, millions of perfectly good budget Androids end up in a drawer. Someone upgrades because their phone feels "too slow," or because the battery is dead by lunchtime. And most of the time, the hardware is fine. The real culprit is usually a rogue background app, thermal throttling, or a worn-out battery that costs twenty bucks to replace.
If you're an Android developer, finding this out takes about two seconds. You plug the phone in, open a terminal, and run adb shell dumpsys batterystats. But you can't ask a normal person to install developer tools, run command-line scripts, and wade through twenty thousand lines of raw system telemetry. Someone's mom is not going to do that. And she shouldn't have to.
So we asked ourselves: what if we killed the terminal entirely? What if anyone could plug in their phone, click one button, and get a plain-English answer to the question "is my phone actually dying, or does it just need a little help?"
That's how Half Life started.
The Idea
Half Life is a web app that reads your Android's health straight from the cable and tells you, in human language, what's wrong and whether it's worth saving. No installs, no terminal, no jargon.
Here's the stack we landed on:
WebUSB API to let the browser talk directly to the phone and pull the dumpsys logs over USB, no desktop software needed Amazon API Gateway as the front door for incoming log data AWS Lambda (Python) to parse the massive log files and calculate battery wear deterministically Amazon DynamoDB to store the finished health reports Render to host the frontend AWS SAM CLI + LocalStack to build and test the serverless backend locally
Whiteboarding it was the easy part. Building it was a different story.
The Grind
For the first stretch, we were flying. SAM CLI and LocalStack let us emulate the entire serverless backend on our own machines, and everything worked beautifully. We felt invincible.
Then we tried connecting our Render-hosted frontend to the live AWS infrastructure, and everything fell apart.
API Gateway and Render got locked in a CORS standoff that wouldn't resolve no matter what headers we threw at it. Worse, our Lambda functions, which had run flawlessly in LocalStack, started crashing in production because of missing IAM permissions. That's the classic trap of local emulation: it forgives things the real cloud never will.
We jumped on a Discord call to fix it. That call lasted eleven hours.
By hour 40 of the hackathon, we were running on fumes and stubbornness. Eleven hours of staring at red console errors, muting and unmuting, reading each other the same stack traces in different tones of despair. Somewhere in there, the conversation stopped being about code and turned into quiet, tired jokes just to keep each other going. We started asking the question nobody wants to ask: do we even have a demo?
The Miracle
And then, right when we were about to accept defeat and submit something half-broken, a notification lit up: an email from the organizers announcing a deadline extension.
We still talk about that moment. It felt like a miracle. We're not exaggerating when we say that email is the reason Half Life exists in a working form. The pressure lifted, and that thick, heavy exhaustion just evaporated. We weren't racing the clock anymore. We had room to breathe, and room to think.
The Second Wind
With clearer heads, we went back in and took the problems apart one at a time instead of thrashing at all of them at once:
We locked down the API Gateway routing and finally put the CORS issue to rest. We fixed the IAM roles, giving our Lambda functions exactly the permissions they needed. We got the Python Lambda logic reliably calculating true battery wear from the raw telemetry. We watched clean health reports land in DynamoDB, and that was the first moment it felt real.
For the final test, we pushed our last commit to Render and plugged in an old, heavily abused test phone. We clicked Connect. The browser grabbed the USB connection without a hitch, the raw data flew to our serverless backend, and half a second later, the dashboard rendered a clear, accurate diagnostic report.
We just stared at the screen. Then we screamed a little.
What We Took Away
We submitted with barely any time left on the extended clock. But Half Life turned out to be about more than proving that WebUSB and serverless could work together.
It taught us that local success isn't production success, that CORS and IAM will humble anyone, and that a good team can survive an eleven-hour debugging call if they keep showing up for each other. It also reminded us that sometimes you get lucky, and when you do, you should be grateful and make the most of it.
Most of all, we built something we believe in. If even a few thousand phones stay out of drawers and landfills because someone learned their battery just needed replacing, all those sleepless hours were worth it.
Built for the AWS Hackathon. Powered by WebUSB, API Gateway, Lambda, DynamoDB, and a lot of caffeine.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article