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.
Kotlin airtagalprandroidandroid-autoanti-surveillancebluetooth-low-energybody-cameracounter-surveillancedrone-detectionflock-safetyimsi-catcher-detectorpolice-detectorpolice-scannerprivacyremote-idrtl-sdrsdrsurveillance-detectiontracker-detectionwifi
Detection list: a kind turned off still names the device
CIS-C010fa92d0de2c
diff --git a/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt b/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.ktindex dd4e887..3643260 100644--- a/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt+++ b/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt@@ -19,6 +19,13 @@ object DeviceIntel {val facts: List<Pair<String, String>>)+ /**+ * [identity] named by a match of a kind turned off in the detection list: the match's name as the+ * device's type, and what matched among the facts (no colour, no alert).+ */+ fun quietlyIdentified(identity: Identity, hit: Hit): Identity = Identity(hit.label,+ identity.facts + listOf("Identified as" to "${hit.label} · ${hit.category.title}", "Matched" to hit.evidence))+private const val CID_APPLE = 0x004Cprivate const val CID_MICROSOFT = 0x0006private const val CID_SAMSUNG = 0x0075diff --git a/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt b/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.ktindex 4c4ed2f..a6dd8f7 100644--- a/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt+++ b/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt@@ -934,10 +934,14 @@ class ScanForegroundService : Service() {val kept = DeviceIntel.dropTrainRouter(com.rfsentinel.app.detect.FlockNoise.filter(raw, a.name, OuiWatchlist.flockRegion), a)// Non-stop probing backs up a fixed-camera match that survived the noise filters (never alone).val sifted = kept + listOfNotNull(com.rfsentinel.app.detect.ProbeBehaviour.supportHit(a, kept))- val hits = EvidenceFusion.fuse(sifted.filter {- Prefs.categoryEnabled(this, it.category) && !(noAirTags && SignatureEngine.isAppleFindMy(it))- })- return Classified(now, hits, identity, vendor)+ val (on, off) = sifted.filter { !(noAirTags && SignatureEngine.isAppleFindMy(it)) }+ .partition { Prefs.categoryEnabled(this, it.category) }+ val hits = EvidenceFusion.fuse(on)+ // A kind turned off in the detection list still names the device (an Arlo base station with home+ // cameras off): listed like any other device, no colour, no alert, not logged.+ val quiet = if (hits.isEmpty()) EvidenceFusion.fuse(off).firstOrNull()?.takeIf { !it.listOnly } else null+ val named = quiet?.let { DeviceIntel.quietlyIdentified(identity, it) } ?: identity+ return Classified(now, hits, named, vendor)}private fun maybeLog(a: Advert, best: Hit, vendor: String?, loc: Location?, now: Long) {diff --git a/app/src/test/java/com/rfsentinel/app/detect/QuietIdentityTest.kt b/app/src/test/java/com/rfsentinel/app/detect/QuietIdentityTest.ktnew file mode 100644index 0000000..6af6469--- /dev/null+++ b/app/src/test/java/com/rfsentinel/app/detect/QuietIdentityTest.kt@@ -0,0 +1,20 @@+package com.rfsentinel.app.detect++import org.junit.Assert.assertEquals+import org.junit.Assert.assertTrue+import org.junit.Test++class QuietIdentityTest {++ @Test+ fun aKindTurnedOffStillNamesTheDevice() {+ val plain = DeviceIntel.Identity("Smart-home / camera device", listOf("Vendor" to "Arlo"))+ val hit = Hit(Category.NETWORK_CAMERA, "Arlo camera base station", 88, "WiFi network \"ARLO_VMB_1\"", "test")+ val named = DeviceIntel.quietlyIdentified(plain, hit)+ assertEquals("Arlo camera base station", named.type)+ assertTrue(named.facts.containsAll(plain.facts))+ assertTrue(named.facts.any { it.second == hit.evidence })+ // More facts than before, so the registry keeps it over the plain identity.+ assertTrue(named.facts.size > plain.facts.size)+ }+}