PhoneGuard is a professional-grade Android security application built with Flutter and native Kotlin. It protects your device against theft and gives you complete remote control over it via SMS β even when the app is closed, the phone is restarting, or the thief has turned off GPS.
- Core Features
- SMS Remote Control
- Smart Location Tracking
- Native Background Security
- Trusted Number Management
- Protection & Subscription System
- Stealth Mode
- Device Security
- Dashboard & Activity Logs
- Architecture
- Setup & Installation
| Feature | Description |
|---|---|
| π© SMS Remote Control | Trigger recovery actions from any phone via secret keyword |
| π 3-Tier GPS Fallback | Location works even with GPS turned off |
| π Remote Alarm | Bypass-silent loud alarm triggered via SMS |
| π°οΈ Live Tracking | Continuous real-time GPS updates via SMS |
| π Remote Lock | Lock device via SMS using Device Admin API |
| π Boot Sync | Auto-syncs device state to cloud on every power-on |
| π Shutdown Sync | Captures final location and IP before power-off |
| π Dashboard | Real-time cloud dashboard showing device status |
| π₯ Trusted Contacts | Whitelist contacts from phonebook or manual entry |
| π― SIM Change Alert | Instant SMS alert when SIM card is swapped |
| π Activity Logs | Full log of all remote commands received |
PhoneGuard listens for SMS commands silently in the background without any visible notification. All commands use a customizable trigger keyword.
<trigger_keyword> [pin] [action]
| SMS Sent | Result |
|---|---|
miss you phone |
Executes all default actions (location + alarm + tracking + lock) |
miss you phone location |
Sends current GPS location link |
miss you phone alarm |
Starts loud bypass-silent alarm |
miss you phone stop |
Stops alarm and tracking |
miss you phone lock |
Remotely locks the device |
miss you phone tracking |
Starts live location tracking |
miss you phone 1234 location |
PIN-protected location request |
- β Only Trusted Numbers can trigger commands
- β Optional PIN code for extra verification
- β Protection eligibility check before every command (trial / ad / subscription)
- β Dual-layer SMS detection β works even when a messaging app is open and intercepts the broadcast
PhoneGuard uses two independent systems to detect incoming trigger messages:
SmsReceiver(Priority 1000) β Standard Android broadcast receiver registered at maximum priority, fires first before any other app.ContentObserveroncontent://sms/inboxβ Watches the SMS database directly at OS level. Cannot be blocked byabortBroadcast()from messaging apps. Activates automatically when the user has a chat open in their messaging app.
This is PhoneGuard's most important anti-theft feature. Most phone trackers fail when a thief turns off GPS. PhoneGuard does not.
When a location is requested (via SMS trigger, on startup, or on shutdown), PhoneGuard tries three methods in sequence:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tier 1: High-Accuracy GPS (10s timeout) β
β β’ Most precise (1β10 metre accuracy) β
β β’ Requires GPS to be ON β
β β’ Label: "π Location: <Google Maps link>" β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β GPS off or timed out?
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tier 2: Network Location / Cell Towers (8s timeout)β
β β’ Uses Wi-Fi networks + mobile cell towers β
β β’ Works WITHOUT GPS (50β200 metre accuracy) β
β β’ Label: "πApprox. Location (GPS off): <link>" β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β No network? Still failing?
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tier 3: Last Known Location (instant) β
β β’ Uses the last position cached by the Android OS β
β β’ Always available, may be minutes/hours old β
β β’ Label: "πApprox. Location (GPS off): <link>" β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β Nothing at all?
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Final: "π Location unavailable β GPS & Network β
β both off" β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- On SMS trigger β immediately when the trigger keyword is received
- On device startup β as soon as the phone boots and connects to internet
- On device shutdown β final snapshot captured before power-off
- During live tracking β periodic updates while tracking service is running
Every location update also pushes the following to the owner's Firestore dashboard:
lastLatitude/lastLongitudelocationUpdatedAtlastIpβ current network IP address (useful for tracing Wi-Fi router location)deviceModelβ e.g., "OnePlus CPH2693"osVersionβ e.g., "Android 14 (SDK 34)"isOnlineβ true/falselastActiveβ server timestamp
All critical security operations run natively in Kotlin, completely independent of the Flutter engine. This means they work even if:
- The app is closed
- The phone just restarted
- The Flutter engine hasn't loaded yet
- Triggered automatically on every
BOOT_COMPLETED/LOCKED_BOOT_COMPLETED - Pushes
isOnline=true,lastIp,deviceModel,osVersion, and location to Firestore - Uses
START_STICKYto survive system process restarts
- Intercepts
ACTION_SHUTDOWNandQUICKBOOT_POWEROFFbroadcasts - Uses
goAsync()to stay alive during the shutdown window - Pushes final location, IP, and
isOnline=falseto Firestore before power-off
- Detects when the SIM card is removed or replaced
- Sends an SMS alert to all trusted numbers with the new SIM information
- Add numbers directly from the phone's contact book (with contact picker)
- Add numbers manually via keyboard for numbers not in contacts
- Intelligent number matching β handles all real-world phone number formats:
9760638280β+919760638280β09165939300β+919165939300β- Local formats (e.g.
0XXXXXXXXXX) β International formats (+CC XXXXXXXXXX) β - Uses 4-strategy fuzzy matching: exact, suffix, adaptive-last-N, bidirectional suffix
| Plan | Duration | How |
|---|---|---|
| Free Trial | 3 days | Automatic on first login |
| Ad-Extended | +8 hours per ad | Watch rewarded ad |
| Premium (Monthly) | 30 days | In-app subscription |
| Premium (Yearly) | 365 days | In-app subscription |
- Live countdown timer on dashboard β shows
HH:MM:SSwhen less than 24 hours remain - Protection expiry is stored immediately to SharedPreferences so native background services always have the correct state
- On expiry, SMS commands return: "
β οΈ PhoneGuard: Protection Expired. Please watch an ad or buy a subscription in the app to re-enable remote commands."
- Remote Lock β Locks the screen via Android
DevicePolicyManager(requires Device Admin activation) - Loud Alarm β Plays maximum-volume alarm that bypasses silent/DND mode
- Stop Command β Remotely silences alarm and stops tracking via SMS
- Real-time device status β Online/offline, last seen, location, IP, model, OS
- Protection status card β Live countdown timer, current plan, extend protection button
- Activity logs β Full history of every remote command received, with sender, timestamp, command, and result
- Trusted Numbers list β View, add, and remove trusted contacts
lib/
βββ domain/ # Models, repository interfaces
βββ data/ # Firebase, Hive, SharedPreferences data sources
βββ presentation/ # Flutter UI (screens, providers, widgets)
βββ core/ # Theme, utilities
android/app/src/main/kotlin/com/kyvronix/phoneguard/
βββ MainApplication.kt # Firebase init before Flutter engine
βββ sms/
β βββ SmsReceiver.kt # Priority-1000 broadcast receiver
β βββ CommandParser.kt # Full command parsing, number matching, action execution
β βββ SmsSender.kt # Dual-SIM SMS sending
βββ location/
β βββ LocationManager.kt # 3-tier GPS fallback
βββ services/
β βββ RecoveryService.kt # Boot sync + ContentObserver SMS bypass
β βββ TrackingService.kt # Live location tracking
β βββ AlarmService.kt # Loud alarm
βββ receivers/
β βββ BootReceiver.kt # Boot detection
β βββ ShutdownReceiver.kt # Shutdown snapshot
β βββ SimChangeReceiver.kt # SIM swap detection
βββ security/
βββ DeviceAdminReceiver.kt # Remote lock
State Management: Provider pattern
Local Storage: Hive (structured) + SharedPreferences (native-Flutter bridge)
Cloud: Firebase Firestore (real-time sync) + Firebase Auth
Language: Flutter/Dart (UI) + Kotlin (native security layer)
- Flutter 3.x
- Android Studio / VS Code
- Firebase project with Firestore and Authentication enabled
- Android device (API 26+)
git clone <repo-url>
cd phoneguard
flutter pub get
flutter runRECEIVE_SMS/READ_SMS/SEND_SMSACCESS_FINE_LOCATION/ACCESS_BACKGROUND_LOCATIONREAD_CONTACTSREAD_PHONE_STATEFOREGROUND_SERVICE- Device Administrator (for remote lock)
This project is proprietary software developed by Kyvronix. All rights reserved.
PhoneGuard β Because your phone knows where it's been, even when you don't.