ShizuStore

DroidPerf

fortifying

1.0.0 · GitHub

Download APK
Development utilities Android 8.0+ 1 day ago Proprietary
6 ShizuStore
11 GitHub
1 MB Size

More about this app

Real-time FPS and hardware telemetry overlay that measures true frame delivery from SurfaceFlinger; Shizuku is required for target FPS, frame times and shell-level app detection.

DroidPerf

A lightweight, real-time performance overlay for Android. It renders an on-screen HUD over apps and games to display live hardware telemetry: target FPS, frame times, CPU/GPU utilization, clock speeds, thermals, RAM, and battery draw.

Unlike typical overlays that measure their own frame render callbacks, DroidPerf hooks directly into Android's graphics compositor (SurfaceFlinger) to measure true frame delivery from the foreground app.

Features

  • Game FPS & Frame Times: Sub-millisecond latency tracking via SurfaceFlinger timestamps (requires Root or Shizuku).
  • CPU & GPU Metrics: Total/per-core usage, current frequencies, thermal zones, and vendor-specific GPU load (Adreno KGSL, devfreq).
  • Memory & System: Detailed RAM breakdown (active, cached, available) and foreground package detection.
  • Battery Telemetry: Real-time voltage, current, and wattage draw.
  • Multiple OSD Styles: Includes RTSS (RivaTuner style), Classic compact, and Minimal HUD modes.
  • Zero Fabrication: If a sensor or sysfs node is restricted by OEM firmware, it cleanly displays N/A rather than guessing or interpolating.

Access Modes

Telemetry depth depends on device privileges. DroidPerf automatically detects available methods and saves your choice:

Mode Requirements Capabilities
Standard None CPU usage/frequency, RAM, battery, network, basic thermals
Shizuku Shizuku running (Wireless ADB) Target FPS, frame times, shell-level app detection
Root Magisk, KernelSU, or APatch Full hardware sysfs access, dumpsys SurfaceFlinger, low-level thermals

Shizuku Setup

  1. Install and start Shizuku.
  2. In DroidPerf, select Shizuku as your access mode and approve the authorization prompt.

DroidPerf communicates with a standalone UserService binder running under UID 2000 (shell).

Root Setup

Open DroidPerf and grant superuser access when prompted by KernelSU, Magisk, or APatch. Shell commands are strictly filtered through a static whitelist (SafeCommands).

How FPS Measurement Works

Android apps cannot inspect another app's Choreographer render pipeline without platform signature permissions. To measure game FPS accurately without modifying the target:

  1. DroidPerf resolves the active SurfaceView or window layer from dumpsys SurfaceFlinger --list.
  2. It samples timestamps via dumpsys SurfaceFlinger --latency <layer> (or dumpsys gfxinfo fallback).
  3. Frame delta is calculated from hardware actual-present timestamps: FPS = (presentedFrames - 1) / (lastPresent - firstPresent)
  4. Sentinels and pending VSYNC timestamps (Long.MAX_VALUE) are discarded to avoid skew during scene loads.

Hardware & OEM Support

  • Qualcomm Adreno: Direct utilization reads via /sys/class/kgsl/kgsl-3d0/gpubusy.
  • ARM Mali / Samsung Xclipse: Polled via /sys/class/devfreq/*/load where exposed by the vendor kernel.
  • Thermals: Scans /sys/class/thermal/thermal_zone* and matches zone types (e.g., cpu-1-usr, gpu-thermal, battery) instead of relying on fragile index numbers.

Building

Requires JDK 17 and Android SDK Platform 35.

# Build debug APK
./gradlew :app:assembleDebug

# Run unit tests
./gradlew :app:testDebugUnitTest

# Build optimized release
./gradlew :app:assembleRelease

Built APKs are located in app/build/outputs/apk/.

Architecture

app/src/main/java/com/droidperf/
├── domain/        Metric data structures, snapshot models, access enums
├── system/        SysFs readers, hardware capability probing, shell wrappers
├── monitoring/    Isolated metric collectors (FPS, CPU, GPU, RAM, Battery, Thermal)
├── overlay/       Floating window lifecycle, Canvas renderer, RTSS layout engine
├── shizuku/       Shizuku IPC binder & UserService bridge
├── settings/      Preferences datastore, layout presets, position state
├── ui/            Configuration activities, setup wizard, access selector
└── di/            ServiceLocator

Every metric is isolated: if a specific sysfs interface or shell command fails, only that single gauge marks itself unavailable while the rest of the overlay continues updating.

License & Privacy

DroidPerf runs completely offline. It contains no tracking, telemetry SDKs, or network request endpoints. Network permissions are used solely to measure local Wi-Fi/cellular throughput and ping latency on user request.

Close

How Shizuku is used

Can measure live game FPS, detect the foreground app and read CPU, GPU and thermal sensors via `dumpsys` and `cat /sys` through Shizuku.

This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.

How this app uses Shizuku

Shizuku is used to run a fixed set of read-only system checks with shell privilege so the overlay can show live game and hardware stats.

  • Measure game FPS: shows the foreground game's real frame rate and frame time from SurfaceFlinger layer statistics using dumpsys SurfaceFlinger --list, dumpsys SurfaceFlinger --latency, dumpsys SurfaceFlinger --timestats and dumpsys gfxinfo framestats through Shizuku.
  • Detect foreground game: identifies which app is currently in the foreground for FPS targeting with the dumpsys activity activities shell command through Shizuku when usage access is not granted.
  • Read hardware telemetry: reads CPU usage and frequencies, GPU load and clocks, and temperature zones with cat /proc/stat, cat /sys sensor nodes and ls /sys listings through Shizuku when the app process is blocked from reading them directly.

Android APIs or commands used

  • dumpsys SurfaceFlinger --list
  • dumpsys SurfaceFlinger --latency
  • dumpsys SurfaceFlinger --timestats -enable
  • dumpsys SurfaceFlinger --timestats -dump
  • dumpsys SurfaceFlinger --timestats -clear
  • dumpsys SurfaceFlinger --timestats -disable
  • dumpsys gfxinfo framestats
  • dumpsys activity activities
  • cat /proc/stat
  • cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
  • cat /sys/class/devfreq/*/cur_freq
  • cat /sys/class/devfreq/*/load
  • cat /sys/class/kgsl/kgsl-3d0/gpubusy
  • cat /sys/class/kgsl/kgsl-3d0/gpuclk
  • cat /sys/*
  • ls /sys/*
  • cat /proc/*
  • ls /proc/*

Notable details

Without Shizuku, FPS and frame time stay unavailable and foreground detection depends on the Usage access permission, while some CPU, GPU and thermal readings may still appear when directly readable by the app.

Close

Changelog

What's new for version 1.0.0

DroidPerf v1.0.0

Features

  • Real-time FPS & Frame Times (SurfaceFlinger latency tracking)
  • Overlay Styles:
    • RTSS (RivaTuner-style grouped layout)
    • Classic (Detailed vertical list)
    • Minimal (Compact single-line HUD)
  • Hardware Telemetry:
    • CPU usage (total & per-core), frequencies, and temperatures
    • GPU usage, clock speeds, and thermals (Adreno KGSL & devfreq)
    • RAM usage and real-time battery draw (W / mA)
    • Foreground app detection
Close

Permissions

10 permissions requested

  • android.permission.SYSTEM_ALERT_WINDOW
  • android.permission.FOREGROUND_SERVICE
  • android.permission.FOREGROUND_SERVICE_SPECIAL_USE
  • android.permission.POST_NOTIFICATIONS
  • android.permission.INTERNET
  • android.permission.ACCESS_NETWORK_STATE
  • android.permission.PACKAGE_USAGE_STATS
  • android.permission.QUERY_ALL_PACKAGES
  • com.droidperf.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
  • moe.shizuku.manager.permission.API_V23
Close