How to repurpose your old phone's GPS modem into a web server

https://news.ycombinator.com/rss Hits: 3
Summary

No, really. Despite the timing of this article, this is not an April Fool's joke.While developing software on the PinePhone, I came across this peculiar message in dmesg:[ 25.476857] modem-power serial1-0: ADB KEY is '41618099' (you can use it to unlock ADB access to the modem) For context, the PinePhone has a Quectel EG25-G modem, which handles GPS and wireless connectivity for the PinePhone. This piece of hardware is one of the few components on the phone which is closed-source.When I saw that message and the mention of ADB, I immediately thought of Android Debug Bridge, the software commonly used to communicate with Android devices. "Surely," I thought, "it can't be talking about that ADB". Well, turns out it is.The message links to an article which details the modem in question. It also links to an unlocker utility which, when used, prints out AT commands to enable adbd on the modem.$ ./qadbkey-unlock 41618099 AT+QADBKEY="WUkkFzFSXLsuRM8t" AT+QCFG="usbcfg",0x2C7C,0x125,1,1,1,1,1,1,0 These can be sent to the modem using screen:# screen /dev/ttyUSB2 115200 For whatever reason, my input wasn't being echoed back, but the screen session printed out "OK" twice, indicating it had executed the commands fine.After setting up proper udev rules and adb on my "host machine", which is the PinePhone, the modem popped up in the output for adb devices, and I could drop into a shell:$ adb devices List of devices attached (no serial number) device $ adb shell / # Because adbd was running in root mode, I dropped into a root shell. Neat.It turns out the modem runs its own OS totally separate from the rest of the PinePhone OS. With the latest updates, it runs Linux 3.18.44.For whatever reason, I thought it'd be fun to run my blog on this thing. Since we were working with limited resources (around 48M of space and the same amount of memory), and the fact that my blog is just a bunch of static files, I decided that something like nginx (as lightweight as it is) would be a bit overkill...

First seen: 2025-11-25 21:26

Last seen: 2025-11-25 23:27