Transforming an Old Phone’s GPS Module into a Web Server

Surprisingly, this is not a joke. It’s possible to repurpose the GPS and modem hardware inside an old phone to run a basic web server, demonstrating clever hardware reuse and hacking skills.

Surprisingly, this is not a joke. It’s possible to repurpose the GPS and modem hardware inside an old phone to run a basic web server, demonstrating clever hardware reuse and hacking skills.

While working with the PinePhone, I discovered an unusual message in the system logs: a reference to the phone’s modem, a Quectel EG25-G, which handles GPS and LTE connectivity. This hardware component is mostly closed-source, making it intriguing for hacking experiments. The message included a code linked to an article explaining how to unlock the modem using an ADB (Android Debug Bridge) utility, which is usually associated with Android device debugging.

Using the unlocker tool, I obtained commands to activate ADB on the modem. These commands could be sent via a terminal session with ‘screen,’ and once executed, the modem appeared as an ADB device on the PinePhone. I gained root access through ADB shell, revealing that the modem operates its own Linux-based OS, separate from the phone’s main system.

Next, I decided to run a simple web server on the modem to host a static site. Given the limited space (about 48MB) and memory, I selected darkhttpd, a lightweight server ideal for embedded systems. I cross-compiled it for ARMv7 architecture, static linked to musl, then transferred the binary and site files to the modem’s writable /usrdata directory using ADB.

To access the web server, I forwarded port 8080 from the phone to the local machine with ADB. To make it accessible externally, I configured network forwarding using iptables and sysctl commands. Now, I could browse the site at http://pine:8080/, hosted directly from the phone’s hardware.

I tested the connection speed with iperf over the ADB port, obtaining around 10 Mbps — decent for such a setup. The phone’s main network connection, via USB, delivered similar throughput when tested directly through a standard iperf test, confirming good local network performance.

This experiment highlights how hardware repurposing and hacking can give a new life to old devices, turning components like a phone’s GPS modem into a miniature web server that’s perfect for hosting simple static sites or IoT projects.

FAQ

Q: Can I do this with any old phone or GPS module?
A: Not all devices are suitable. The process depends on the hardware’s openness, the ability to unlock and access the modem via ADB or similar tools, and whether the device runs a compatible Linux OS.

Q: Is this safe or advisable?
A: This is a hacking project meant for educational and experimental purposes. It may void warranties and could disrupt device hardware if done improperly.

Q: What are potential uses for this setup?
A: You can host lightweight web applications, IoT dashboards, or small services directly from an old device, repurposing hardware that would otherwise be discarded.

Q: How practical is the network performance?
A: The reported speeds (~10 Mbps) are modest but sufficient for basic static sites or control interfaces. For more demanding applications, dedicated hardware is recommended.

More Reading

Post navigation

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

If you like this post you might also like these

back to top