Skip to content

wangchauyan/GoodMorning

Repository files navigation

Device Test Tool

SSH-resilient remote device testing via daemon architecture.

Quick Start

# 1. Start daemon on Linux host
python3 daemon/daemon.py

# 2. Start GUI client
python3 client/main.py --local          # Local testing
python3 client/main.py                   # SSH mode (production)
python3 client/main.py --mock            # UI testing (no network)

Architecture

Windows/Mac Client          Linux Host
┌─────────────────┐        ┌─────────────────┐
│  GUI (Tkinter)  │──SSH──▶│     Daemon      │──▶ ADB/UART
│                 │◀───────│   (persistent)  │
└─────────────────┘        └─────────────────┘
                                   │
                           SQLite (jobs.db)

Key benefit: SSH disconnect ≠ job lost. Reconnect anytime to retrieve results.

Configuration

Edit config.yaml:

app:
  title: "My Tool"
  host: "192.168.1.100"
  user: "admin"

actions:
  remount:
    label: "Remount"
    group: "Device"
    command: "adb remount"

  full_test:
    label: "Full Test"
    group: "Test"
    style: "primary"
    steps: [remount, logcat]  # Composite action

Action Properties

Property Description
label Button text
group Category for grouping
command Shell command
steps List of actions (composite)
timeout Max seconds (default: 120)
confirm Show confirmation dialog
input Prompt for user input
style "primary" for highlight

Files

├── config.yaml             # Action definitions
├── daemon/daemon.py        # Linux daemon (run on host)
├── client/main.py          # GUI entry point (Tkinter)
├── vscode-extension/       # VS Code extension (alternative UI)
└── tools/yaml_helper.py    # Interactive config generator

VS Code Extension

Alternative UI as VS Code sidebar panel. See vscode-extension/README.md.

cd vscode-extension
npm install && npm run compile
# Press F5 in VS Code to launch

Testing Steps

  1. Start Daemon (on Linux Host)

    python3 daemon/daemon.py
  2. Start Client (on Windows/Mac)

    python3 client/main.py --local   # or --mock for UI-only testing
  3. Test Connection - Click "Test Connection" button, should show green status

  4. Run Actions - Click any action button, note the Job ID in output

  5. Test Disconnect Recovery

    • Start a long job (e.g., "Long Task 5s")
    • Close the GUI immediately
    • Reopen GUI, enter Job ID → click "Get Job by ID"
    • Result should be retrieved

Troubleshooting

Problem Solution
Connection failed Is daemon running? Check python3 daemon/daemon.py
Port in use pkill -f daemon.py then restart
SSH error Check host/user in config.yaml
nc not found apt install netcat

License

Unlicense - Public domain, no restrictions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors