@bogdyro : I was expecting a shorter flow. I don't use sms received trigger, but simply use Notification on Statusbar Displayed trigger. Then mirror all of necessary text and dismiss notif from messaging app. For the sqlite3, I copy the binary from Titanium Backup data files, directly to /system/xbin/. Most root users should have installed this app.
To test the database, I simply copy the mmssms.db to /sdcard/download and tried it the first there. Then to delete the corresponding message, I don't query the message anymore, but directly perfom delete/update to the database (thus need to be tested first). I have also made triple backup before, backup from TWRP, titanium backup the messaging app, and xml. I am thinking to use the time of the notification as the WHERE clause, or maybe the body text (retrieved from the notification) to match the deletion row. But I don't know if the time stamp will match the date, I am still logging the sms variable to confirm the finding.
The problem with the flow is what happen when multiple sms received in a very short time. I still haven't found out what will happen.
@akhileshg1988 : What SU management app do you use? SuperSU? Magisk? I use SuperSU, works properly with Automagic and MiXplorer. At my phone, the sms is stored at different place, it is at /data/data/com.android.mms/databases/mmssms.db It maybe in different places depends on the phone. You gotta to find it out by yourself. Check your messaging app package name, it should be in that package name data folder.
=======================
This is a very interesting project. I can make the sms become unread, by changing the read to 0. And we even craft the full message, to make it a perfectly legitimate sms. Most Fake sms out there can't craft a perfect message for dual sim phone or have problem dealing with some non AOSP phone. By editing directly to the database, create a full clone of notification, we can craft any kind of message real time. Put it on schedule/timer, and we can escape many awkward situation.
