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.

Tools button next to the map, cell towers in the live list, unambiguous match-history dates, Realtek driver notice; version 2.11.0

CIS-C02765418584a3
diff --git a/README.md b/README.md
index 7e7f160..0838a0e 100644
--- a/README.md
+++ b/README.md
@@ -141,7 +141,8 @@ Every match shows its evidence, its source and a confidence tier: **weak** (< 50
**Interface**
- Live list and radar view, filter chips with live counts (flagged, trackers, drones, new, ESP32, favorites, Bluetooth, WiFi), search
-- **Tools** (menu ⋮): **Cell towers** (serving and neighbour cells with network, IDs, channel and signal, plus every tower seen while scanning), **WiFi channels** and **WiFi spectrum** analyzers for 2.4 / 5 / 6 GHz
+- **Tools** (button next to the map button): **Cell towers** (serving and neighbour cells with network, IDs, channel and signal, plus every tower seen while scanning), **WiFi channels** and **WiFi spectrum** analyzers for 2.4 / 5 / 6 GHz
+- **Cell towers in the live list:** the serving cell and its neighbours appear under *All*, after the devices
- **Scan watchdog:** a scanner that goes silent is restarted on its own
- Device details: evidence, identity, decoded data, signal graph, **Locate** mode, history, raw advertisement
- Setup wizard (theme, region, alerts, camera radius, screen, permissions)
@@ -557,7 +558,9 @@ Some feature ideas come from SØPHIA and BLE Radar (MetaRadar). No code from
those projects is included. The USB WiFi monitor-mode driver for RTL8811AU /
RTL8821AU adapters (`app/src/main/java/com/rfsentinel/app/usb/`) is ported from
[Wardrive Go](https://github.com/RocketGod-git/wardrive-go) by RocketGod (GPL-3.0),
-whose register tables come from the Realtek 88xxau Linux driver; its handshake /
+whose register tables come from Realtek's 88xxau Linux driver
+([aircrack-ng/rtl8812au](https://github.com/aircrack-ng/rtl8812au), GPL-2.0; see
+`usb/NOTICE.md`); its handshake /
PMKID capture was left out. The map's anchored point layer follows Wardrive Go's
approach - thank you.
@@ -591,7 +594,9 @@ Software Foundation. It is distributed in the hope that it will be useful, but
Any modified version you distribute must also be released under GPL-3.0 with
its source code. Bundled third-party material keeps its own license: the Share
-Tech Mono font (SIL Open Font License 1.1, `app/src/main/assets/licenses/`), and
+Tech Mono font (SIL Open Font License 1.1, `app/src/main/assets/licenses/`), the
+Realtek 88xxau register tables in the USB WiFi driver (from Realtek's GPL-2.0 Linux
+driver, via Wardrive Go; see `app/src/main/java/com/rfsentinel/app/usb/NOTICE.md`), and
the signature and Remote ID references credited above (Apache-2.0).
## Disclaimer
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 496c931..ce86a94 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -6,8 +6,8 @@ plugins {
}
// Bump both for every release. versionName ends up in the APK file name.
-val appVersionCode = 28
-val appVersionName = "2.10.6"
+val appVersionCode = 29
+val appVersionName = "2.11.0"
// Release signing credentials live in keystore.properties (git-ignored).
// Without that file, release builds are produced unsigned.
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
index 2d5d761..61ceb72 100644
--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
@@ -43,6 +43,8 @@ import kotlinx.coroutines.launch
class MainActivity : AppCompatActivity() {
companion object {
+ /** Row id prefix of the live cell tower rows (not devices). */
+ private const val CELL_ROW = "cell:"
/** A flagged row flashes while its device was heard within this window. */
private const val FLASH_WINDOW_MS = 60_000L
private const val REFRESH_MS = 1_000L
@@ -79,8 +81,11 @@ class MainActivity : AppCompatActivity() {
applyThemeHeader()
adapter = DeviceAdapter(
- onClick = { DeviceActions.openDetails(this, it.mac) },
- onLongPress = { DeviceActions.showQuickActions(this, it.mac) }
+ onClick = {
+ if (it.mac.startsWith(CELL_ROW)) startActivity(Intent(this, com.rfsentinel.app.ui.CellTowersActivity::class.java))
+ else DeviceActions.openDetails(this, it.mac)
+ },
+ onLongPress = { if (!it.mac.startsWith(CELL_ROW)) DeviceActions.showQuickActions(this, it.mac) }
)
binding.recyclerView.layoutManager = LinearLayoutManager(this)
binding.recyclerView.adapter = adapter
@@ -99,6 +104,22 @@ class MainActivity : AppCompatActivity() {
Prefs.setRadarView(this, id == R.id.viewRadarButton)
applyViewMode()
}
+ binding.toolsButton.setOnClickListener { v ->
+ androidx.appcompat.widget.PopupMenu(this, v).apply {
+ menu.add(0, 1, 0, "Cell towers")
+ menu.add(0, 2, 1, "WiFi channels")
+ menu.add(0, 3, 2, "WiFi spectrum")
+ setOnMenuItemClickListener { item ->
+ when (item.itemId) {
+ 1 -> startActivity(Intent(this@MainActivity, com.rfsentinel.app.ui.CellTowersActivity::class.java))
+ 2 -> startActivity(Intent(this@MainActivity, com.rfsentinel.app.ui.WifiAnalyzerActivity::class.java))
+ else -> startActivity(Intent(this@MainActivity, com.rfsentinel.app.ui.WifiAnalyzerActivity::class.java)
+ .putExtra(com.rfsentinel.app.ui.WifiAnalyzerActivity.EXTRA_SPECTRUM, true))
+ }
+ true
+ }
+ }.show()
+ }
binding.mapButton.setOnClickListener {
startActivity(Intent(this, com.rfsentinel.app.ui.MapActivity::class.java))
}
@@ -211,6 +232,8 @@ class MainActivity : AppCompatActivity() {
}
binding.mapButton.iconTint = android.content.res.ColorStateList.valueOf(accent)
binding.mapButton.strokeColor = android.content.res.ColorStateList.valueOf(accent)
+ binding.toolsButton.iconTint = android.content.res.ColorStateList.valueOf(accent)
+ binding.toolsButton.strokeColor = android.content.res.ColorStateList.valueOf(accent)
}
private var shownRunning: Boolean? = null
@@ -300,9 +323,11 @@ class MainActivity : AppCompatActivity() {
)
})
} else {
- adapter.submitList(visible.map { toRow(it, now, threshold) })
+ val cells = cellRows(now)
+ adapter.submitList(visible.map { toRow(it, now, threshold) } + cells)
+ shownCells = cells.size
}
- binding.emptyText.visibility = if (visible.isEmpty()) View.VISIBLE else View.GONE
+ binding.emptyText.visibility = if (visible.isEmpty() && (binding.radarView.visibility == View.VISIBLE || shownCells == 0)) View.VISIBLE else View.GONE
binding.emptyText.text = when {
all.isEmpty() && !ScanForegroundService.isRunning -> "Not scanning.\nTap Start scanning to begin."
all.isEmpty() -> "Listening... no devices heard yet."
@@ -310,6 +335,41 @@ class MainActivity : AppCompatActivity() {
}
}
+ /**
+ * The cell towers the phone sees right now (serving first), listed after the devices
+ * under the All filter. Read every 15 s while scanning; tap opens Tools > Cell towers.
+ */
+ private var shownCells = 0
+
+ private fun cellRows(now: Long): List<DeviceRow> {
+ if (filter != com.rfsentinel.app.ui.DeviceFilter.ALL || !ScanForegroundService.isRunning) return emptyList()
+ val at = com.rfsentinel.app.service.CellTowerStore.currentAt
+ if (now - at > 60_000L) return emptyList()
+ val ageSec = (now - at) / 1000
+ return com.rfsentinel.app.service.CellTowerStore.current
+ .sortedWith(compareByDescending<com.rfsentinel.app.detect.CellAnalyzer.Cell> { it.registered }.thenByDescending { it.dbm ?: -999 })
+ .filter { c ->
+ query.isBlank() || listOfNotNull(c.operator, c.rat.label, c.cellId?.toString(), "${c.mcc}-${c.mnc}")
+ .any { it.contains(query.trim(), ignoreCase = true) }
+ }
+ .mapIndexed { i, c ->
+ val area = if (c.rat == com.rfsentinel.app.detect.CellAnalyzer.Rat.LTE || c.rat == com.rfsentinel.app.detect.CellAnalyzer.Rat.NR) "TAC" else "LAC"
+ DeviceRow(
+ mac = CELL_ROW + i + ":" + c.key,
+ title = "Cell tower · ${c.rat.label}" + (c.operator?.let { " · $it" } ?: ""),
+ subtitle = listOfNotNull(
+ if (c.mcc != null || c.mnc != null) "${c.mcc ?: "?"}-${c.mnc ?: "?"}" else null,
+ c.area?.let { "$area $it" }, c.cellId?.let { "Cell $it" }, c.pci?.let { "PCI $it" }
+ ).joinToString(" · ").ifEmpty { "No IDs reported" },
+ meta = (if (c.registered) "Serving your phone" else "Neighbour cell") +
+ (c.dbm?.let { " · $it dBm" } ?: "") + " · " + (if (ageSec < 2) "now" else "${ageSec}s ago"),
+ tag = if (c.registered) "CELL · serving" else "CELL",
+ tagColor = 0xFF5E35B1.toInt(),
+ highlight = null, flashing = false, bold = c.registered
+ )
+ }
+ }
+
private fun matchesQuery(s: DeviceRegistry.Snapshot): Boolean {
if (query.isBlank()) return true
val q = query.trim()
@@ -457,12 +517,6 @@ class MainActivity : AppCompatActivity() {
R.id.action_traces -> { startActivity(Intent(this, com.rfsentinel.app.ui.TripsActivity::class.java)); true }
R.id.action_history -> { startActivity(Intent(this, com.rfsentinel.app.ui.HistoryActivity::class.java)); true }
R.id.action_about -> { AboutDialog.show(this); true }
- R.id.action_cell_towers -> { startActivity(Intent(this, com.rfsentinel.app.ui.CellTowersActivity::class.java)); true }
- R.id.action_wifi_channels -> { startActivity(Intent(this, com.rfsentinel.app.ui.WifiAnalyzerActivity::class.java)); true }
- R.id.action_wifi_spectrum -> {
- startActivity(Intent(this, com.rfsentinel.app.ui.WifiAnalyzerActivity::class.java)
- .putExtra(com.rfsentinel.app.ui.WifiAnalyzerActivity.EXTRA_SPECTRUM, true)); true
- }
R.id.action_mute -> {
val muted = !Prefs.alertsMuted(this)
Prefs.setAlertsMuted(this, muted)
diff --git a/app/src/main/java/com/rfsentinel/app/ui/CellTowersActivity.kt b/app/src/main/java/com/rfsentinel/app/ui/CellTowersActivity.kt
index 1c6d18c..0c06dcd 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/CellTowersActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/CellTowersActivity.kt
@@ -35,7 +35,7 @@ import java.util.Date
class CellTowersActivity : AppCompatActivity() {
private lateinit var binding: ActivityLogBinding
- private val fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT)
+ private val fmt get() = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT)
private var reader: CellMonitor? = null
private sealed interface Row {
diff --git a/app/src/main/java/com/rfsentinel/app/ui/DetectionAdapter.kt b/app/src/main/java/com/rfsentinel/app/ui/DetectionAdapter.kt
index 71c64a5..a19e9f5 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/DetectionAdapter.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/DetectionAdapter.kt
@@ -18,7 +18,8 @@ class DetectionAdapter(
) : RecyclerView.Adapter<DetectionAdapter.VH>() {
private var items: List<DetectionEntity> = emptyList()
- private val fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM)
+ /** "Oct 3, 2026, 10:21:05 AM": a numeric date like 10/3/26 is read as 10 March in much of the world. */
+ private val fmt get() = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM)
fun submitList(newItems: List<DetectionEntity>) {
val diff = DiffUtil.calculateDiff(object : DiffUtil.Callback() {
diff --git a/app/src/main/java/com/rfsentinel/app/usb/NOTICE.md b/app/src/main/java/com/rfsentinel/app/usb/NOTICE.md
new file mode 100644
index 0000000..f8e90dc
--- /dev/null
+++ b/app/src/main/java/com/rfsentinel/app/usb/NOTICE.md
@@ -0,0 +1,15 @@
+# USB WiFi monitor-mode driver: sources and licenses
+
+`Rtl8821auMonitor.kt` and `Rtl8821auTables.kt` drive Realtek RTL8811AU / RTL8821AU
+USB WiFi adapters (e.g. ALFA AWUS036ACS) in receive-only monitor mode from userspace.
+
+| Part | Origin | License |
+|---|---|---|
+| Register tables (power-on sequence, MAC / BB / AGC / RF tables, channel tuning) | Realtek 88xxau Linux driver, as maintained in [aircrack-ng/rtl8812au](https://github.com/aircrack-ng/rtl8812au) | GPL-2.0 |
+| Userspace USB driver and 802.11 frame parsing | [Wardrive Go](https://github.com/RocketGod-git/wardrive-go) by RocketGod | GPL-3.0 |
+| Integration into RF Sentinel, removal of handshake / PMKID capture | RF Sentinel (CIS-C0) | GPL-3.0 |
+
+RF Sentinel is distributed under the GNU GPL v3.0 (see `LICENSE`). The register
+values are hardware configuration data taken from Realtek's GPL driver; credit
+and thanks to Realtek and the aircrack-ng rtl8812au maintainers, and to RocketGod
+for Wardrive Go.
diff --git a/app/src/main/res/drawable/ic_tools.xml b/app/src/main/res/drawable/ic_tools.xml
new file mode 100644
index 0000000..dff9032
--- /dev/null
+++ b/app/src/main/res/drawable/ic_tools.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Material Design icon "build" (Apache-2.0). -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
+</vector>
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 6dd536d..40f0d26 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -117,6 +117,19 @@
android:minHeight="52dp"
app:icon="@drawable/ic_map"
app:iconPadding="0dp" />
+
+ <!-- Tools: cell towers, WiFi channels and spectrum. -->
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/toolsButton"
+ style="@style/Widget.MaterialComponents.Button.OutlinedButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:contentDescription="Tools: cell towers, WiFi channels and WiFi spectrum"
+ android:minWidth="56dp"
+ android:minHeight="52dp"
+ app:icon="@drawable/ic_tools"
+ app:iconPadding="0dp" />
</LinearLayout>
<!-- Device filters (built in code from DeviceFilter, with live counts). -->
diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml
index 7fae3fb..fe9a9b5 100644
--- a/app/src/main/res/menu/menu_main.xml
+++ b/app/src/main/res/menu/menu_main.xml
@@ -15,13 +15,6 @@
<item android:id="@+id/action_match_log" android:title="Match history" app:showAsAction="never" />
<item android:id="@+id/action_traces" android:title="Recorded traces" app:showAsAction="never" />
<item android:id="@+id/action_history" android:title="History map &amp; timeline" app:showAsAction="never" />
- <item android:id="@+id/action_tools" android:title="Tools" app:showAsAction="never">
- <menu>
- <item android:id="@+id/action_cell_towers" android:title="Cell towers" />
- <item android:id="@+id/action_wifi_channels" android:title="WiFi channels" />
- <item android:id="@+id/action_wifi_spectrum" android:title="WiFi spectrum" />
- </menu>
- </item>
<item android:id="@+id/action_oui_list" android:title="Watchlist &amp; rules" app:showAsAction="never" />
<item android:id="@+id/action_whitelist" android:title="Whitelist (trusted devices)" app:showAsAction="never" />
<item android:id="@+id/action_settings" android:title="Settings" app:showAsAction="never" />