Android (the implementation may be different for different versions) smart phones use the Sqlite database to save text messages. The text messages is generally stored in: /data/data/com.android.providers.telephony/databases/mmssms.db database file.
When your SMS is inexplicably missing or deleted, in the Sqlite file, Sqlite will modify the header information of the CellPayload that saves the SMS content in the CellContent area, and modify the index number of this CellPayload in the corresponding index (so the index is actually The above is still there, but the index number is already -1), so that the program can no longer read the content of this information.
When this process just happened, the content of your SMS still exists, but the CellPayload Header and the corresponding CellPayload Index area of that message have been modified. At this time, you can use the recovery program to traverse the SMS (this is what I did) to get the index of the deleted SMS, then relocate it, and finally manually restore the content of the SMS.
However, if this process occurs for a period of time, Sqlite will offset the data to organize the data. At this time, your text messages are almost hopeless.
Suggestions: 1. Immediately copy out your mmssms.db file backup, and don’t let the mobile phone system operate this db file. This has ensured that Sqlite will no longer perform data offset processing on this file.
Suggestions: 2. Search for professional Sqlite recovery software to recover.