Hi,

I would like to forward automatically Text messages.

A couples of years before, I was doing it easily with some FLOSS apps

But none of those apps (I keep the apk ;) ) works anymore on "recent" AOSP[^1] phone 🤨 ( Thanks to g**gle, to not take care of retro-compatibility )..

So, I lost time to dig for new apps (FLOSS and not)

I'm willing to write a "Shell" script to run under Android, to just do that (I've never developed for Android, so if you have any advice I'm all ears )

or any other solution like

  • Linux phone ROM ( without systemd )
  • or maybe a simcard dongle, to allow my Linux computer to receive/send text ?

[^1]: a ROM that use AOSP is generally gapps free 😍

you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 1 year ago

Should be doable with Termux:

  1. https://f-droid.org/packages/com.termux (the terminal emulator itself);
  2. https://f-droid.org/packages/com.termux.api (for termux-sms-list and termux-sms-send commands);
  3. https://f-droid.org/packages/com.termux.boot (to make the script launch automatically after reboots; don't forget a wake lock to keep the process alive).

termux-sms-list returns messages in JSON, which is easy enough to handle with, say, jq in bash or json in python. The script itself can be a simple loop that fetches the latest messages every few minutes, filters for unprocessed ones from whitelisted numbers and calls termux-sms-send.

Maybe it'd make sense to daemonise the script and launch it via sv.

But the Termux app weighs quite a bit itself.

  • source