GitHub - yjeanrenaud/yj_nearbyglasses: attempting to detect smart glasses nearby and warn you · GitHub

Source: original

yj_nearbyglasses

attempting to detect smart glasses nearby and warn you.

⚠ WARNING! ⚠

nearby-glasses-alert.pages.dev is NOT RELATED TO MY PROJECT. They seem to hijack the name and try to make a quick profit from it. I do not endorse this.

Screenshot Nearby Glasses classic

Screenshot Nearby Glasses canary mode

⚠ WARNING! ⚠

HARASSING someone because you think they are wearing a covert surveillance device can be a criminal offence. It may even be a more serious offence than using such a device. Please seek legal advice regarding your local laws on this matter.

⚠ DO NOT HARASS ANYONE AT ALL ⚠

Nearby Glasses

The app, called Nearby Glasses , has one sole purpose: Look for smart glasses nearby and warn you.

Get It On Google Play Get it at IzzyOnDroid Get it on Obtainium Download on the App Store

Table of contents

This app notifies you when smart glasses are nearby. It uses company identificators in the Bluetooth data sent out by these. Therefore, there likely are false positives (e.g. from VR headsets). Hence, please proceed with caution when approaching a person nearby wearing glasses. They might just be regular glasses, despite this app’s warning.

The app’s author Yves Jeanrenaud takes no liability whatsoever for this app nor it’s functionality. Use at your own risk. By technical design, detecting Bluetooth LE devices might sometimes just not work as expected. I am no graduated developer. This is all written in my free time and with knowledge I taught myself. False positives are likely. This means, the app Nearby Glasses may notify you of smart glasses nearby when there might be in fact a VR headset of the same manufacturer or another product of that company’s breed. It may also miss smart glasses nearby. Again: I am no pro developer. However, this app is free and open source , you may review the code, change it and re-use it (under the license). The app Nearby Glasses does not store any details about you or collects any information about you or your phone. There are no telemetry, no ads, and no other nuisance. If you install the app via Play Store, Google may know something about you and collect some stats. But the app itself does not. If you choose to store (export) the logfile, that is completely up to you and your liability where this data go to. The logs are recorded only locally and not automatically shared with anyone. They do contain little sensitive data; in fact, only the manufacturer ID codes of BLE devices encountered.

Use with extreme caution! As stated before: There is no guarantee that detected smart glasses are really nearby. It might be another device looking technically (on the BLE adv level) similar to smart glasses. Please do not act rashly. Think before you act upon any messages (not only from this app).

Why?

How?

Frame 1: Advertising (ADV_IND) Time: 0.591232 s Address: C4:7C:8D:1E:2B:3F (Random Static) RSSI: -58 dBm

Flags: 02 01 06 Flags: LE General Discoverable Mode, BR/EDR Not Supported

Manufacturer Specific Data: Length: 0x1A Type: Manufacturer Specific Data (0xFF) Company ID: 0x058E (Meta Platforms Technologies, LLC) Data: 4D 45 54 41 5F 52 42 5F 47 4C 41 53 53

Service UUIDs: Complete List of 16-bit Service UUIDs 0xFEAA

They are immutable and mandatory. Of course, Meta and other manufacturers also have other products that come with Bluetooth and therefore their ID, e.g. VR Headsets. Therefore, using these company ID codes for the app's scanning process is prone to false positives. But if you can't see someone wearing an Occulus Rift around you and there are no buildings where they could hide, chances are good that it's smart glasses instead.

Features

What's RSSI?

iOS and Android

Usage

Screenshot Nearby Glasses: Settings

Get It On Google Play Download on the App Store

  1. Install the app (from Releases or from Google Play, for now) or from Apple App Store, and open it
  2. Hit the Start Scanning button
  3. Grant permissions to activate Bluetooth (if not already enabled) and to access devices nearby. Some versions of Android also need you to grant permissions to access your location (before Version 13, mostly). Nearby Glasses does nothing with your location info. If you don't believe me, please look at the code
  4. if you don't see the scan starting, you might need to enable Foreground Service on your particular phone in the Settings menu (see below)
  5. You're all set! When smart glasses are detected nearby, a notification will appear. It does so until you hit Stop Scanning or terminate the app for good
  6. In the menu (top right, the cogwheel), you may make some Settings :
  7. Enable Foreground Service : By this, you prevent Android from pausing the app thus preventing it from alerting you. I recommend leaving this enabled
  8. RSSI threshold : This negative number specifies how far away a device might be to be a reason for an alert by Nearby Glasses. Technically, it referes to how strong the signal is received. Closer to zero means better signal, hence fewer distance between your phone and the smart glasses. See RSSI above for explanations and guidance. I recommend leaving it on -75
  9. Enable Notifications : You would not want to disable that
  10. Canary Mode. This is the new default. With this, you will not get system notifications altering you of smart glasses nearby, but instead you will see a canary that indicates no smart glasses around. iOS app only has a canary mode due to technical constrains. Drawing of a canary
  11. Notification/Canary Cooldown : Here, you specify, how many notifications about found smart glasses nearby you want to get or how long the canary should hide. I chose 10 seconds (10000 ms) as default value. Like this, you won't miss the notification while at the same time won't be bothered by it too much or drain your battery too fast
  12. Enable Log Display : Disabling this might spare you some battery. This is disabled in canary mode.
  13. Debug : Is needed to see more than just the matching BLE frames in the log display frame. It's useful to see if things are working. This is disabled in canary mode.
  14. Max log lines : How long the log may get. 200 seems to be a good balance between battery life and usability of the log (for nerds like me). This is disabled in canary mode.
  15. BLE ADV only : This excludes other Bluetooth LE frames from the log for better readability. This is disabled in canary mode.
  16. Override Company IDs : If you want, you can let Nearby Glasses alert you of other devices than specified above. Useful for debugging, at least for me. Leave it empty if you don't need it or don't know what to do with it
  17. Every setting is saved and effective immediately. To go back, use your back button or gesture
  18. The export function enables you to share a text-file of the app's log. For nerds like me
  19. You may also copy&paste the log by tapping on the log display frame

ToDos

Tech-Solutionism?

I know, this might be an odd place to do so, but just hear me out on this. I am aware this is a technical solution to a social problem, which is itsself amplified by tech. I do not want to promote techsolutionism nor do I want people to feel falsely secure. It's still an imperfect approach and propably always will be. It's not all good only because this app exists now. We need better solutions to curb on surveilance tech and privacy intrution.

Build from Source

As Nearby Glasses is open source, you may also build the app yourself from the source code. This makes sure there are no other libraries included in the APK and you get what you want.

Please Note This app builds upon:

Requirements

Building APK step-by-step

Verify Java version:

$java -version

It must report Java 17.

Get the source code

$git clone https://github.com/yjeanrenaud/yj_nearbyglasses $cd yj_nearbyglasses

Build Debug

$./gradlew clean assembleDebug

Build Release (with your own signature cert)

$./gradlew clean assembleRelease

Build unsigned Release for IzzyOnDroid / F-Droid

$./gradlew clean izziFdroid

Run and Test

$./gradlew test lint

Shoutouts

License and Credits

App Icon : The icon is based on Eyeglass icons created by Freepik - Flaticon License : This app Nearby Glasses is licensed under the AGPL-3.0 license. Canary : The canary drawings are made by me and licensed under CC BY-SA 4.0. I provided them as raw svg files (done in InkScape) and converted to xml, obviously, for the app's resources