Creating my own SMS server relay

I’m working on a new project to create an SMS relay between my flip phone and my server, and I could really use some advice to get it off the ground.

My current plan is to grab a cheap, factory-unlocked Motorola phone running Android 11 to act as the middleman. To handle the networking, I’d like to put Tailscale on the phone so my server can communicate with it without needing a static IP. For the actual messaging, I found an open-source SMS API app on GitHub that I’m hoping to use.

My main question is about permissions and system access. I feel like I might need to root the phone to make this setup work reliably, but to be honest, I really don’t have much experience in the Android ecosystem.


To be absolutely clear, I really have never worked with Android before. Something that’s really important to me about this project is that I don’t want the phone to be functional as a phone and boot up looking like a phone. I want to strip out everything that isn’t directly necessary to contact the server. Maybe leave termux or something like that. I don’t really know what that requires to make everything work.

As long as the app has the proper SMS app permissions, you shouldn’t need root.

Get something with a damaged screen, it will be cheaper and more annoying to use as a phone.

You absolutely do not need a rooted phone, and your app does not even have to be the default message app. Don’t use logcat or anything hacky, just use webhooks and adb port fowarding to wrap each received sms in a json token and pass it to the host computer. Or, avoid adb altogether, and pass it to a public webhook on your server by calling http post. Sending an sms to your device is a little more complex if there is no wired connection, you can use tailscale like you mentioned, or a cloudflare tunnel. but honestly, a dedicated pc/adb connection (and it can even be adb over wifi) is much simpler to set up.

in terms of not functioning as a phone, you can write an MDM that forces your phone into “kiosk” mode, allowing only one single app to run. it should be a very simple app, consisting of just an mdm receiver and a couple lines of code (unless you decide to build a release mechanism… depends how far you want to go).

By the way, textbee basically does what you want - and they have a free basic tier. You can host the server (its opensource) and do everything for free. May save you some work!

Yeah, I checked it out, and the free tier wasn’t large enough for me. Not comfortable hosting either. Too much work on my server (I’m still new to server stuff).

Yeah I think I’m gonna be doing that while also debloating and stripping out whatever I can. I kinda also want it to be that I can’t use it as a regular phone without doing a lot of work
Thanks so much for the help