A comprehensive SMS gateway system consisting of two Android applications: SMS-GATER-SERVER and SMS-GATER-CLIENT. This system allows for SMS forwarding, command execution, and remote SMS management through a modern, elegant user interface.
- Background Service: Runs continuously in the background, even after app closure and device restart
- Phone Number Selection: Choose which phone number receives and processes SMS messages
- SMS Forwarding: Automatically forward SMS messages based on configurable rules
- Command Processing: Execute commands via SMS with a specific format
- Modern UI: Beautiful Material Design 3 interface with tabs for different functions
- Statistics Dashboard: Real-time statistics of SMS processing
- Documentation: Built-in help and command reference
- User-Friendly Interface: Send commands and SMS without seeing the complex command format
- Quick Commands: Pre-built buttons for common operations
- Command Builder: Custom command creation with templates
- Message History: Track all sent messages and commands
- Settings Management: Configure default server numbers and preferences
All commands follow this specific format:
(command):{Server: [PHONE_NUMBER]}[COMMAND]
For SMS sending:
(command):{Server: [PHONE_NUMBER]}#Destination: [DESTINATION]#[Message: [MESSAGE]]
-
List All Phone Numbers
(command):{Server: +14242375122}[List All Phone Numbers]Returns all phone numbers that have sent SMS to the server
-
List Server Numbers
(command):{Server: +14242375122}[List Server Numbers]Returns all available server phone numbers
-
Get Server Status
(command):{Server: +14242375122}[Get Server Status]Returns current server status (Running/Stopped)
-
Get Statistics
(command):{Server: +14242375122}[Get Statistics]Returns SMS statistics (total, forwarded, commands executed, active rules)
-
Help
(command):{Server: +14242375122}[Help]Shows available commands and their descriptions
-
Send SMS
(command):{Server: +14242375122}#Destination: +14342375123#[Message: Hello World]Sends an SMS from the server number to the specified destination
- Android Studio Arctic Fox or later
- Android device with API level 24 (Android 7.0 Nougat) or higher
- SMS permissions on the device
-
Clone the repository
git clone <repository-url> cd SMS-GATER
-
Open SMS-GATER-SERVER in Android Studio
- Open Android Studio
- Select "Open an existing Android Studio project"
- Navigate to the
SMS-GATER-SERVERfolder - Click "OK"
-
Build and install the server app
- Connect your Android device
- Click "Run" (green play button)
- Select your device and click "OK"
-
Open SMS-GATER-CLIENT in Android Studio
- Open a new Android Studio window
- Select "Open an existing Android Studio project"
- Navigate to the
SMS-GATER-CLIENTfolder - Click "OK"
-
Build and install the client app
- Connect your Android device
- Click "Run" (green play button)
- Select your device and click "OK"
- Open the SMS Gateway Server app
- Grant all required permissions when prompted
- Select your phone number from the available options
- Configure forwarding rules if needed
- Start the server using the "Start Server" button
- Open the SMS Gateway Client app
- Grant SMS permissions when prompted
- Configure the default server number in Settings
- Start sending commands and SMS messages
RECEIVE_SMS- Receive incoming SMS messagesSEND_SMS- Send SMS messagesREAD_SMS- Read SMS messages from databaseREAD_PHONE_STATE- Access phone number informationREAD_PHONE_NUMBERS- Read phone numbersFOREGROUND_SERVICE- Run service in backgroundRECEIVE_BOOT_COMPLETED- Auto-start on device bootPOST_NOTIFICATIONS- Show notifications
SEND_SMS- Send SMS messagesREAD_PHONE_STATE- Access phone number informationREAD_PHONE_NUMBERS- Read phone numbers
- Real-time server status
- Statistics cards (Total SMS, Forwarded SMS, Commands Executed, Active Rules)
- Recent activity log
- Quick start/stop controls
- List all available phone numbers
- Select active phone number for SMS processing
- Automatic phone number detection
- Create custom forwarding rules
- Filter by sender number pattern
- Filter by message content
- Enable/disable rules individually
- Pattern matching support
- View all available commands
- See command examples
- Recent command history
- Command execution tracking
- Complete command reference
- Permission explanations
- Usage examples
- System overview
- Server phone number selection
- Destination number input
- Message composition
- Quick command buttons
- Form validation
- Custom command builder
- Command templates
- Template usage
- Command preview
- Message history tracking
- Command vs SMS distinction
- Timestamp information
- History management
- Permission management
- Default server configuration
- App information
- Settings persistence
The server app includes a robust background service that:
- Persistent Operation: Continues running even when the app is closed
- Auto-Start: Automatically starts on device boot
- Foreground Service: Shows a persistent notification
- SMS Interception: Captures all incoming SMS messages
- Command Processing: Parses and executes SMS commands
- Forwarding Engine: Applies forwarding rules automatically
Both applications feature:
- Material Design 3: Modern, elegant UI components
- Dark/Light Theme: Automatic theme switching
- Responsive Design: Adapts to different screen sizes
- Intuitive Navigation: Tab-based interface
- Visual Feedback: Status indicators and progress tracking
- Accessibility: Support for accessibility features
- Permission-Based: Only requests necessary permissions
- Local Storage: All data stored locally on device
- No Cloud Dependencies: Works completely offline
- SMS Encryption: Relies on carrier SMS encryption
- Privacy-Focused: No data collection or analytics
-
Permissions Denied
- Go to Settings > Apps > SMS Gateway Server/Client > Permissions
- Enable all required permissions manually
-
Service Not Starting
- Check if battery optimization is disabled for the app
- Ensure the app is not force-stopped
- Restart the device and try again
-
SMS Not Received
- Verify the server phone number is correct
- Check if the server is running (green status indicator)
- Ensure the device has network connectivity
-
Commands Not Working
- Verify the command format is exactly as specified
- Check that the server number in the command matches the actual server number
- Ensure the server app is running and has permissions
Enable debug logging by checking the Android logcat:
adb logcat | grep "SMSGateway"- Web Interface: Remote management through web browser
- Multiple Server Support: Manage multiple gateway servers
- Advanced Filtering: Regex-based message filtering
- Scheduled Commands: Time-based command execution
- Message Encryption: End-to-end message encryption
- API Integration: REST API for external integrations
- Cloud Backup: Optional cloud backup of settings and history
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For support and questions:
- Create an issue in the repository
- Check the documentation tab in the server app
- Review the troubleshooting section above
Note: This system is designed for educational and personal use. Ensure compliance with local laws and carrier policies regarding SMS automation and forwarding.