Skip to content

Repository files navigation

SShot

Android screenshot utility optimized for AI agent consumption. Takes screenshots that are small enough to upload to LLMs without wasting tokens on unnecessary pixel data.

Why

Stock Android screenshots are 2-5MB PNGs at full resolution. AI agents don't need that — they need just enough visual context to understand what's on screen. SShot produces ~30-40KB WebP images (720px wide, lossy quality 65) that are perfectly readable by vision models while being 100x smaller.

Each filename includes the foreground app's package name and a timestamp, giving agents useful context without needing to parse the image:

sshot_com.brave.browser_2026-03-09_18-34-48.webp

Features

  • Optimized capture pipeline: Screenshot → downscale to 720px width → WebP lossy @ quality 65
  • Foreground app detection: Package name embedded in filename via UsageStatsManager
  • Multiple triggers:
    • ADB broadcast (primary dev workflow)
    • Floating overlay button (draggable, tap to capture, long-press to stop)
    • Quick Settings tile
  • Share sheet: Share screenshots directly from the capture preview
  • Local script: sshot.sh captures via ADB and saves optimized screenshots to your dev machine

Setup

Prerequisites

  • Android device running API 31+ (tested on Pixel 6 Pro, Android 15)
  • ADB connected
  • cwebp installed on your machine (for the local script): brew install webp

Install the app

./gradlew installDebug

Grant permissions

  1. Open the app and tap Start to grant screen capture permission
  2. Grant Usage Access in Settings → Apps → Special app access → Usage access → SShot
  3. Enable SShot Capture in Settings → Accessibility → Installed apps → SShot Capture

Usage

ADB (recommended for dev workflows)

# Take a screenshot (saved on device)
adb shell am broadcast -a com.sshot.CAPTURE -n com.sshot/.CaptureReceiver

# Take and immediately share
adb shell am broadcast -a com.sshot.CAPTURE_AND_SHARE -n com.sshot/.CaptureReceiver

# Stop the capture service
adb shell am broadcast -a com.sshot.STOP -n com.sshot/.CaptureReceiver

Local script (saves to your machine)

# Takes a screenshot and saves an optimized WebP to ./screenshots/
./sshot.sh

Floating overlay

Once the capture service is running and accessibility is enabled:

  • Tap the camera icon to capture
  • Drag to reposition
  • Long-press (1 second) to stop the service and hide the overlay

Quick Settings tile

Add the SShot tile to your Quick Settings panel for one-tap capture.

Output

Screenshots are saved to the device at:

/storage/emulated/0/Android/data/com.sshot/files/SShot/

Pull them to your machine:

adb shell ls /storage/emulated/0/Android/data/com.sshot/files/SShot/
adb pull /storage/emulated/0/Android/data/com.sshot/files/SShot/ ./screenshots/

Architecture

  • ScreenCaptureService: Foreground service holding the MediaProjection session. Captures frames via VirtualDisplay + ImageReader, downscales, and encodes to WebP.
  • ShotAccessibilityService: Runs in a separate process (:accessibility). Manages the floating overlay button and screenshot preview. Polls a flag file to sync with the capture service lifecycle.
  • CaptureReceiver: BroadcastReceiver handling ADB triggers and stop commands.
  • ShotTileService: Quick Settings tile integration.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages