We should be able to do things like:
grep steve numbers_file | dialer
echo "process complete" >> sms -n 303-555-1212 -mms=0
-b, --baudrate baudrate to use for device (default: 38400)
-c, --concatenate ID for concatenated SMS messages
-C, --sca SMS service centre address
-d, --device sets the destination device to connect to
-h, --help prints this message
-I, --init device AT init sequence
-r, --requeststat request SMS status report
-t, --test convert text to GSM alphabet and vice
versa, no SMS message is sent
-v, --version prints version and exits
-X, --xonxoff switch on software handshake
phonenumber recipient's phone number
text optional text of the SMS message
if omitted: read from stdin
In both cases, access to the SIM is limited to processes that can speak to the telephony device's control channel, and the data side is firewalled with iptables like any other network interface. To further restrict access to telephony device capabilities you can break out ModemManager or oFono along with Polkit.
Things get a little wonky when you start to talk about voice calls, as there isn't a lot of standardization in how to get the audio channel in/out of linux on telephony devices yet, but ofono and telepathy seem to have made strides in that direction.
I'm hoping that efforts like https://soprani.ca/ work out - it would be great to not have to use the cellular network for simple communication with people that are only a few kilometres away from you.
My ideal phone would be iPhone 5 form factor with an e-ink display running FreeBSD with nothing but calling, SMS, a text based browser, and a terminal. Minimize absolutely everything and jam a 6000maH battery in there.
As for "your ideal phone" - something similar might just be my next year's project, though sourcing the parts will be hard, for sure =)
Burner phones should be cheap and off the shelf.
You can use a custom rom, with an open radio.
If Qualcomm, QXDM/QPST to modify radio rom settings including modifying ESN/MEID/IMEI/Bluetooth Serial, etc.
You pick a off the shelf model that's easy to unlock, and flash.
You customize your own rom, and flash it. You eliminate all possible vectors of "hacks" e.g. oem apps and downloaded APK'.
Then the telecom service itself is where it'd e most vulnerable, in fingerprinting your geophysical location and such.
You can modify the GPS, to throw it off, sure. That's already done with rooted devices and you can eve thrown in a few mile obscurity, but, the tower location will ultimately pinpoint you through triangulation.
And keep in mind that there's also the fact that you have to buy the phones somewhere - that can be tracked, whether it's a package from eBay with 10 similar phones or just a guy buying the cheapest prepaid phones in a supermarket.
Sending directly from a SIM can have undesired side effects, deliverability issues, mangled text, etc.. and the carrier probably won't be too happy with you "abusing" their service (you'd be surprised how fussy they can be about 160 bytes of data).
Could the baseband OS be toggled on and off by a command from userland running on the RPI?
50$ for parts and 5000$ for your time. Oh well.. I'm sure some nerds will be excited ;-)
Therefore while it's a great tinkering project I'm really sceptical about the actual value this could have for "end users" unless the value is the tinkering itself ;-)