Paimon

Paimon

👀谢谢关注喵

Backup mobile phone SMS forwarding solution

1. Introduction#

Due to the increasing number of accounts that do not support registration with domestic mobile phones and Google Voice, I recently bought a free SIM card from abroad to use. However, when I have multiple cards, problems arise. I don't like to carry two phones when I go out, and they might fall out of my pocket. So I had to find a solution that allows me to only carry one phone when I go out.

2. Forwarding Solution for Android Backup Phone#

1. SmsForwarder + Telegram Bot#

SmsForwarder

SmsForwarder is an open-source library on Github that supports monitoring SMS, incoming calls, and app notifications on Android phones and forwarding them. It also includes functions such as remotely controlling sending messages, checking messages, checking calls, checking call logs, and checking battery level.

Here is a simple setup process based on the official documentation. If you don't want to use Telegram Bot, you can refer to the documentation for self-configuration.

General Settings

  • Open the overall switch of the forwarding function as needed, and the necessary permission authorization will pop up. If the authorization is not normal, please manually set the permissions in the "Settings" of the phone (grant all permissions without hesitation).
  • It is recommended to enable the first three settings for keeping the app alive.
  • In the personalized settings, click "Refresh" to automatically obtain the SIM card slot remarks. If the SIM card slot in the forwarded message is matched incorrectly, set the SIM card slot primary key according to the SubId.
  • If the device is in an unstable network environment, please set the retry mechanism for the request.

Sending Channel

I use Telegram as the forwarding tool, but you can also use SMS or email, etc.

  • Apply for a Telegram Bot
Chat with @BotFather and apply for a Bot.
After sending /newbot, enter the nickname of the bot.
Then enter the username of the bot.
Get the apiToken and enter the username of the bot mentioned above.
Obtain the apiToken, the format is like: 1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ
Copy the apiToken to the "Set Telegram Bot's ApiToken" field.
Chat with your bot and say something random, or create a group and add the bot to the group and say something random in the group.
Then open this link https://api.telegram.org/bot<apiToken>/getUpdates (PS. Replace <apiToken> with your own)
ChatID value is in result->message->chat->id (personal is pure numbers; group is negative numbers, type: group;)
Get your own (or group) ChatID and paste it into the "Set the ChatId of the recipient" field.
Click the "Test" button to verify.

Call Forwarding Rules

  • Select the Telegram Bot that was just added as the sending channel.
  • Execution logic -> Stop after success.
  • Match fields -> All.
  • Enable this forwarding rule.

Now you can send a message to test it. If there are any issues, refer to the documentation or search on Google.

2. Tasker + Telegram Bot#

Note: Tasker is a paid app.

  • Apply for a Telegram Bot
Chat with @BotFather and apply for a Bot.
After sending /newbot, enter the nickname of the bot.
Then enter the username of the bot.
Get the apiToken and enter the username of the bot mentioned above.
Obtain the apiToken, the format is like: 1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ
Copy the apiToken to the "Set Telegram Bot's ApiToken" field.
Chat with your bot and say something random, or create a group and add the bot to the group and say something random in the group.
Then open this link https://api.telegram.org/bot<apiToken>/getUpdates (PS. Replace <apiToken> with your own)
ChatID value is in result->message->chat->id (personal is pure numbers; group is negative numbers, type: group;)
Get your own (or group) ChatID and paste it into the "Set the ChatId of the recipient" field.
Click the "Test" button to verify.
  • Create a Task

Add an HTTP Request action:

Select Method as POST.
In the URL field, enter: https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage
In the Headers field, enter: Content-Type/json (you can click the magnifying glass to select quickly)
Enter the following content in the Body field (remember to replace chat_id with your own uid):

{
    "chat_id": <YOUR_CHAT_ID>,
    "parse_mode": "HTML",
    "text": "<b>%SMSRF(%SMSRN)</b> \n\n%SMSRB\n\n Time: %SMSRD"
}

Several Tasker built-in variables are used here:

%SMSRF: sender address
%SMSRN: sender name in the contacts or number
%SMSRB: body (SMS content)
%MMSRS: subject (usually only for MMS)
%SMSRD: receive date
%SMSRT: receive time

  • Create a Profile to call Tasker

Switch to the PROFILES tab in Tasker, add an Event type Profile: Phone > Received Text, and configure whether to filter types, senders, and content according to your needs.

After creating, select the Task you just created to link it.

3. Forwarding Solution for iPhone Backup Phone#

By default, iPhone applications do not have permission to read the content of SMS. Also, the Shortcuts automation requires specifying keywords or contacts, and I haven't found a way to forward to Android yet.

1. Forward to iPhone#

Launch Settings on iPhone.
Go to Messages.
Toggle iMessage.
Find and tap on Text Message Forwarding.
Find the iOS device you want to receive and send messages (only devices with the same Apple ID will be displayed).
A verification code will be sent to the requested device.

Since I don't have two iPhones to test, and some experts have reported synchronization issues under different Wi-Fi networks, I recommend using Android as the backup phone.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.