DEV Community

Cover image for No Screen, No Problem: Turning a "Dead" S10 into a Headless Minecraft Server
Lahiru Sandaruwan
Lahiru Sandaruwan

Posted on

No Screen, No Problem: Turning a "Dead" S10 into a Headless Minecraft Server

The "Paperweight"
I had this decent hardware (Samsung S10 with 8GB RAM) sitting in a drawer doing nothing, just because the display died. I wanted to run a 24/7 Minecraft server without paying monthly fees for a VPS, but I faced a massive "Chicken and Egg" problem: How do you unlock a phone and enable USB Debugging if you can't see the screen?

The "Blind" Heist
For me, the "Ghost Finger" method worked. Blindly typed my password.

Once it unlocked, DeX let me see the screen on my monitor just enough to go into Settings and enable USB Debugging.

Note: If you are stuck on the lock screen and blind typing isn't working for you, check out this Reddit thread for help.

Once debugging was enabled, I could finally connect the phone to my PC and use scrcpy to remove the screen locks and fingerprints.

The Software Stack
I turned the phone into a Linux server,

  • Termux: The terminal emulator.
  • Proot-Distro: To run Ubuntu.
  • The Server: I installed Java and dropped the Minecraft server .jar file in.
  • Networking: I used playit.gg to tunnel out so my friends could join without me needing to mess with port forwarding.

Cutting the Cord (Going Headless)
The last hack I needed was a way to start the server without ever plugging the phone into a PC again.

The solution was Termux:Boot + sshd.

I installed the Termux:Boot app and created a script at ~/.termux/boot/start-sshd so it runs automatically every time the phone turns on.

#!/data/data/com.termux/files/usr/bin/sh
termux-wake-lock
sshd

The Result
Now, the workflow is seamless:

  1. Plug the phone into a wall charger.
  2. Wait 60 seconds for it to boot and the script to run.
  3. SSH into it from my PC.

It lives in the drawer permanently. The real pro here is that it uses barely any electricity (unlike a PC) and it's completely free. Plus, it was a great way to learn about ADB.

What ancient hardware do you have sitting in a drawer that deserves a second life?

Top comments (0)