Skip to content

emericklaw/Bruce-Lock-Device-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

🔒 Lock Device

A password protection app for the Bruce JavaScript interpreter that when used as a startup app, this will password protect your device on boot, or it can be launched independently to lock your device.

Description

Secure your Bruce device with password protection featuring anti-brute force protection and configurable security settings. The app uses the built-in keyboard interface for password/PIN entry and implements exponentially increasing timeouts to prevent unauthorised access attempts.

Features

  • Password/PIN Protection: Authentication prompt using on-screen keyboard with automatic PIN/password detection
  • Configurable Timeout System: Customizable base timeout (5-120s) and maximum timeout (1-60 minutes)
  • Exponential Backoff: Optional doubling timeout penalties after failed attempts
  • Settings Menu: Built-in configuration interface for password changes and timeout settings
  • Status Display: Battery level indicator and clock display
  • Responsive Layout: Automatically adapts to different display sizes with scalable fonts

Configuration

Initial Setup

On first run, the app will prompt you to create a password. The app automatically detects if your password is numeric-only (PIN) and will present the appropriate keyboard interface for future logins.

Settings Access

Pres the Previous or Next button during the lock screen to access the settings menu (requires password authentication).

Available Settings:

  • Change Password: Update your current password/PIN
  • Timeout Settings:
    • Configure base timeout duration (5-120 seconds)
    • Set maximum timeout duration (1-60 minutes)
    • Enable/disable exponential backoff

Manual Configuration

Advanced users can also edit the configuration file directly:

  • SD Card: /scripts/Lock Device.json (if SD card is available)
  • LittleFS: /scripts/Lock Device.json (LittleFS fallback)

Usage

Set as Startup App

  1. Copy Lock Device.js to your Bruce device's /scripts/ directory
  2. Navigate to Config menu
  3. Select Startup App
  4. Select JS Interpreter
  5. Select Lock Device to set this as the startup app

Using the Lock Device App

  1. When Bruce starts, the Lock Device app will launch and display the lock screen
  2. The status bar shows battery level and current time (when available)
  3. Press the SELECT key to open the password entry prompt
  4. The app automatically selects numeric or full keyboard based on your password format
  5. Enter the correct password to unlock and exit

Settings Configuration

  1. From the lock screen, hold the Previous or Next button to access settings
  2. Enter your password when prompted
  3. Navigate settings with Previous/Next buttons
  4. Press SELECT to choose an option
  5. Press ESC to exit settings mode

Controls

  • SELECT: Open password input prompt
  • Previous/Next: Access settings menu (requires authentication) and navigate settings menu
  • ESC: Exit settings mode

About

A password protection app for the Bruce JavaScript interpreter that when used as a startup app, this will password protect your device on boot, or it can be launched independently to lock your device.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors