Skip to content

RF Sentinel (RFSentinel): free, open-source police detector app for Android. Spots police body cams, Flock ALPR cameras, AirTag trackers, Remote ID drones, smart glasses and fake cell towers from Bluetooth LE and WiFi. No root.

Start / Stop button fits beside the new Tools button; optional alert when the serving cell tower changes

CIS-C0b48c36d4f067
diff --git a/README.md b/README.md
index 0838a0e..ed6fdfc 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,7 @@ Every match shows its evidence, its source and a confidence tier: **weak** (< 50
- **Address-rotation linking:** keeps following a device when its Bluetooth address changes
- **Follower alerts:** a tracker or flagged device that stays with you (default 10 min and 800 m, adjustable) raises *may be following you*
- **Remote ID drones** decoded live, with a *drone overhead* alert within 200 m
+- Optional **cell tower change alert**: says so each time the phone moves to another serving tower (Settings; a change while parked is a classic fake-tower sign)
- **Fake cell tower signs** checked every 15 s, with persistence, call and border suppression (modelled on [EFF's Rayhunter](https://github.com/EFForg/rayhunter) as far as Android allows without root)
- **Hidden WiFi networks** identified from WPS data, Cisco AP names and vendor elements, and linked to the visible network on the same router
- Ordinary devices named precisely: exact AirPods / Beats model, device class, IEEE registrant; decoded Apple Continuity, iBeacon, Eddystone, Fast Pair
@@ -162,7 +163,7 @@ Requires **Android 8.0 or newer**.
3. Open the downloaded file from the notification, or from **Files → Downloads**.
4. If Android blocks it, tap **Settings**, enable **Allow from this source**, go back and tap **Install**.
5. Open **RF Sentinel**. The setup wizard walks you through theme, region, alerts, camera radius and permissions.
-6. Tap **Start scanning** and grant location and *Nearby devices*.
+6. Tap **Start** and grant location and *Nearby devices*.
<p align="center"><img src="docs/screenshots/setup-theme.jpg" width="260" alt="Setup wizard: pick a theme" /></p>
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
index 61ceb72..da11a32 100644
--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
@@ -245,7 +245,8 @@ class MainActivity : AppCompatActivity() {
// Start: theme highlight with a play icon; Stop: red with a stop icon.
val (accent, onAccent) = com.rfsentinel.app.ui.ChipStyle.accent(this)
val red = com.rfsentinel.app.ui.ThemeManager.ink(this, 0xFFB3261E.toInt())
- binding.startStopButton.text = if (running) "Stop scanning" else "Start scanning"
+ binding.startStopButton.text = if (running) "Stop" else "Start"
+ binding.startStopButton.contentDescription = if (running) "Stop scanning" else "Start scanning"
binding.startStopButton.setIconResource(if (running) R.drawable.ic_car_stop else R.drawable.ic_car_play)
binding.startStopButton.backgroundTintList = android.content.res.ColorStateList.valueOf(if (running) red else accent)
val fg = if (running) 0xFFFFFFFF.toInt() else onAccent
diff --git a/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt b/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt
index d9ed7d4..b115918 100644
--- a/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt
+++ b/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt
@@ -775,11 +775,46 @@ class ScanForegroundService : Service() {
cellJob = serviceScope.launch {
while (isActive) {
runCatching { monitor.check() }.getOrNull().orEmpty().forEach { onCellAnomaly(it) }
+ checkServingCellChange()
delay(CELL_CHECK_MS)
}
}
}
+ /** Serving cell of the previous check, for the optional "cell tower changed" alert. */
+ private var lastServing: com.rfsentinel.app.detect.CellAnalyzer.Cell? = null
+
+ /**
+ * Optional (Settings): says so each time the phone moves to another serving cell.
+ * A switch while you stand still is the classic sign of a fake tower pulling phones in.
+ */
+ private fun checkServingCellChange() {
+ val serving = CellTowerStore.current.firstOrNull { it.registered && it.cellId != null } ?: return
+ val prev = lastServing
+ lastServing = serving
+ if (prev == null || prev.key == serving.key || !Prefs.cellChangeAlerts(this)) return
+ val now = System.currentTimeMillis()
+ val detail = "Your phone moved from ${prev.rat.label} cell ${prev.cellId} (area ${prev.area ?: "?"}) to " +
+ "${serving.rat.label} cell ${serving.cellId} (area ${serving.area ?: "?"})" +
+ (serving.operator?.let { " on $it" } ?: "") + (serving.dbm?.let { ", $it dBm" } ?: "") +
+ ". Normal while moving; a change while you're parked is worth a look."
+ val hit = Hit(Category.CELL_ANOMALY, "Cell tower changed", 30, detail, "Android cell info")
+ NotificationHelper.sendMapAlert(this, "cellchange", hit, com.rfsentinel.app.ui.CellTowersActivity::class.java)
+ AlertPlayer.play(this, hit.tier, "Cell tower changed")
+ val loc = lastLocation
+ val tag = Prefs.gpsTaggingEnabled(this)
+ serviceScope.launch {
+ AppDatabase.getInstance(this@ScanForegroundService).detectionDao().insert(
+ DetectionEntity(
+ mac = "CELL " + serving.key, label = hit.label, source = "CELL", rssi = serving.dbm ?: 0,
+ timestamp = now,
+ latitude = if (tag) loc?.latitude else null, longitude = if (tag) loc?.longitude else null,
+ category = Category.CELL_ANOMALY.name, confidence = hit.confidence, evidence = detail
+ )
+ )
+ }
+ }
+
private fun onCellAnomaly(a: com.rfsentinel.app.detect.CellAnalyzer.Anomaly) {
val now = System.currentTimeMillis()
if (now - (lastCellAlert[a.key] ?: 0L) < CELL_REPEAT_MS) return
diff --git a/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt b/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt
index 1977db2..9644e8b 100644
--- a/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/settings/SettingsActivity.kt
@@ -422,6 +422,7 @@ class SettingsActivity : AppCompatActivity() {
Prefs.ScreenMode.NORMAL -> R.id.screenNormal
})
binding.knownAlprSwitch.isChecked = Prefs.knownAlprAlerts(this)
+ binding.cellChangeSwitch.isChecked = Prefs.cellChangeAlerts(this)
binding.speedCameraSwitch.isChecked = Prefs.speedCameraAlerts(this)
binding.autoCamerasSwitch.isChecked = Prefs.autoCameras(this)
fun showRadius(km: Int) {
@@ -605,6 +606,7 @@ class SettingsActivity : AppCompatActivity() {
})
com.rfsentinel.app.ui.ScreenAwake.apply(this)
Prefs.setKnownAlprAlerts(this, binding.knownAlprSwitch.isChecked)
+ Prefs.setCellChangeAlerts(this, binding.cellChangeSwitch.isChecked)
Prefs.setSpeedCameraAlerts(this, binding.speedCameraSwitch.isChecked)
Prefs.setAutoCameras(this, binding.autoCamerasSwitch.isChecked)
diff --git a/app/src/main/java/com/rfsentinel/app/util/Prefs.kt b/app/src/main/java/com/rfsentinel/app/util/Prefs.kt
index 937f40d..9d859c5 100644
--- a/app/src/main/java/com/rfsentinel/app/util/Prefs.kt
+++ b/app/src/main/java/com/rfsentinel/app/util/Prefs.kt
@@ -145,6 +145,9 @@ object Prefs {
fun setDeflockUpdated(context: Context, time: Long) = sp(context).edit { putLong("deflock_updated", time) }
fun ouiSpyRelayAll(context: Context): Boolean = bool(context, "ouispy_relay_all", true)
fun setOuiSpyRelayAll(context: Context, value: Boolean) = setBool(context, "ouispy_relay_all", value)
+ /** Alert each time the phone switches to another serving cell tower (off by default: frequent while driving). */
+ fun cellChangeAlerts(context: Context): Boolean = bool(context, "cell_change_alerts", false)
+ fun setCellChangeAlerts(context: Context, value: Boolean) = setBool(context, "cell_change_alerts", value)
fun showCellTowers(context: Context): Boolean = bool(context, "show_cell_towers", false)
fun setShowCellTowers(context: Context, value: Boolean) = setBool(context, "show_cell_towers", value)
fun showKnownAlpr(context: Context): Boolean = bool(context, "show_known_alpr", true)
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 40f0d26..1009380 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -70,7 +70,11 @@
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:minHeight="52dp"
- android:text="Start scanning"
+ android:maxLines="1"
+ android:paddingStart="12dp"
+ android:paddingEnd="12dp"
+ android:text="Start"
+ android:contentDescription="Start scanning"
app:icon="@drawable/ic_car_play"
app:iconGravity="textStart" />
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index e3cc8a9..25808dc 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -172,6 +172,12 @@
style="@style/SettingsLabel"
android:text="Android 15 and later (e.g. Pixel 8+) can also warn you themselves when a network asks for your SIM's identity or turns encryption off - signalling apps can't see. Turn on &quot;Network notifications&quot; under Security &amp; privacy &gt; More security &amp; privacy &gt; Cellular security." />
+ <com.google.android.material.switchmaterial.SwitchMaterial
+ android:id="@+id/cellChangeSwitch"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Alert when the serving cell tower changes (frequent while driving; useful when parked)" />
+
<Button
android:id="@+id/cellSecurityButton"
style="@style/Widget.MaterialComponents.Button.TextButton"