Problem description
termux-sms-list just says
{
"error": "Reading SMS is no longer permitted by Google"
}
However, this is not relevant to me. Indeed, I installed termux and termux-api from F-Droid, and have it running on Lineage OS. So I'm not subject to Google's whims and only lost that functionality because you bowed to Google too quickly.
Couldn't you leave the SMS functionality in the app version on F-Droid? Or maybe have an additional termux-api-restricted app that gives that functionality, and which is only available on F-Droid? Or maybe, if such a second termux-api-restricted app is already available (and I missed it), include a pointer to it in that error message?
Steps to reproduce
Make sure termux and termux-api are installed (preferably, from F-Droid)
Launch termux
Type termux-sms-list
Expected behavior
It should show me the SMSes that I received recently
Additional information
Post output of command termux-info.
Updatable packages:
apt/stable 1.4.9-7 aarch64 [upgradable from: 1.4.9-6]
bash/stable 5.0.11 aarch64 [upgradable from: 5.0.9]
ca-certificates/stable 20190828 all [upgradable from: 20190515]
clang/stable 8.0.1-2 aarch64 [upgradable from: 8.0.1]
coreutils/stable 8.31-4 aarch64 [upgradable from: 8.31-3]
curl/stable 7.66.0-1 aarch64 [upgradable from: 7.65.3-2]
dnsutils/stable 9.14.6 aarch64 [upgradable from: 9.14.4-1]
dos2unix/stable 7.4.1 aarch64 [upgradable from: 7.4.0-1]
findutils/stable 4.7.0 aarch64 [upgradable from: 4.6.0-4]
libandroid-support/stable 24-5 aarch64 [upgradable from: 24-4]
libc++/stable 20-2 aarch64 [upgradable from: 20-1]
libcurl/stable 7.66.0-1 aarch64 [upgradable from: 7.65.3-2]
libgcrypt/stable 1.8.5 aarch64 [upgradable from: 1.8.4-1]
libllvm/stable 8.0.1-2 aarch64 [upgradable from: 8.0.1]
libsqlite/stable 3.30.0 aarch64 [upgradable from: 3.29.0-1]
m4/stable 1.4.18-3 aarch64 [upgradable from: 1.4.18-1]
ndk-sysroot/stable 20-2 aarch64 [upgradable from: 20-1]
openssh/stable 8.1p1 aarch64 [upgradable from: 8.0p1-3]
openssl/stable 1.1.1d-1 aarch64 [upgradable from: 1.1.1c-2]
strace/stable 5.3 aarch64 [upgradable from: 5.2]
termux-api/stable 0.47 aarch64 [upgradable from: 0.46]
termux-tools/stable 0.71 all [upgradable from: 0.69]
vim/stable 8.1.2100 aarch64 [upgradable from: 8.1.1850]
vim-runtime/stable 8.1.2100 all [upgradable from: 8.1.1850]
Subscribed repositories:
https://dl.bintray.com/grimler/science-packages-21 science/stable
https://dl.bintray.com/grimler/game-packages-21 games/stable
https://termux.net stable/main
https://termux.net stable/main
System information:
Linux localhost 4.9.191-perf+ #1 SMP PREEMPT Mon Oct 21 16:09:31 UTC 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
9
Device manufacturer:
bq
Device model:
Aquaris X Pro
If you are rooted or have access to adb then capture a logcat with logcat -d "*:W", from a adb or root shell.
Nothing shown (i.e. logcat doesn't change after executing termux-sms-list)
API support is removed from application and is no longer supported.
Duplicate of https://github.com/termux/termux-api/issues/257.
You could always compile termux-api yourself with the working versions of:
SmsInboxAPI.java
SmsSendAPI.java
TelephonyAPI.java
I did something similar (I took the relevant smali files from a previous version and replaced the current versions' smali files with them. Unfortunately, it wouldn't install the normal way, so I had to use root, and pm install it. I assume you wouldn't have this problem if you compiled from source, but you'd also have to compile termux from source as well as all the other add ons you're using, as far as I'm aware).
EDIT: Disregard what I said about it not working, just needed to add the SMS permissions to manifest (I had tested call, and assumed that sms also worked. Installs fine now)
Thanks for the hint. Somebody already else has pointed me to an old version (0.31) of termux-api, which does the trick (... and still works with current termux).