GameBar is a comprehensive real-time performance monitoring overlay for Android devices. It provides detailed system metrics including FPS, CPU/GPU usage, temperatures, and memory statistics with a customizable floating overlay.
- Real-time FPS Monitoring - Track frame rates with multiple measurement methods
- CPU Metrics - Usage percentage, per-core frequencies, and temperature
- GPU Metrics - Usage, clock speed, and temperature
- Memory Stats - RAM usage, speed, and temperature
- Battery Temperature - Monitor device thermal status
- Customizable Overlay - Adjustable position, size, colors, and transparency
- Per-App Configuration - Auto-enable GameBar for specific applications
- Logging & Analytics - Record and analyze performance data
- Gesture Controls - Double-tap screenshot, long-press actions
- Device-Specific Overlays - Easy hardware path configuration per device
- Android 13 (API 33) or higher
- System-level permissions (privileged app)
- LineageOS or AOSP-based ROM
- AOSP/LineageOS build environment
- Android SDK Platform 33+
- Soong build system
-
Clone the repository into your ROM source:
git clone https://github.com/kenway214/packages_apps_GameBar.git /packages/apps/GameBar -b main
-
Include in device makefile:
Add to your
device.mk:# GameBar Performance Overlay $(call inherit-product, packages/apps/GameBar/gamebar.mk) -
Create device-specific overlay (IMPORTANT):
Create the overlay directory structure:
mkdir -p device/<vendor>/<device>/overlay/packages/apps/GameBar/res/values
Create
device/<vendor>/<device>/overlay/packages/apps/GameBar/res/values/config.xml:Example overlay configuration: View config.xml example
-
Configure hardware paths:
Edit your device overlay
config.xml:<resources> <!-- Find your device's thermal zones --> <!-- Run: adb shell "ls /sys/class/thermal/thermal_zone*/type" --> <!-- GPU temperature path --> <string name="config_gpu_temp_path">/sys/class/kgsl/kgsl-3d0/temp</string> <!-- RAM temperature path --> <string name="config_ram_temp_path">/sys/class/thermal/thermal_zone78/temp</string> <!-- Adjust dividers if needed (usually 1000 for millidegrees, 10 for decidegrees) --> <integer name="config_cpu_temp_divider">1000</integer> </resources>
-
Customize init.rc (if needed):
Edit
packages/apps/GameBar/init/init.gamebar.rcto match your device's hardware paths. Ensure permissions are set for all sysfs nodes used by GameBar. -
Build:
# Clean build (recommended for first build) m clean m GameBar # Or build entire ROM brunch <device>
Use these ADB commands to find the correct paths for your device:
# Find CPU thermal zones
adb shell "for i in /sys/class/thermal/thermal_zone*/type; do echo \$i: \$(cat \$i); done" | grep -i cpu
# Find GPU thermal zones
adb shell "for i in /sys/class/thermal/thermal_zone*/type; do echo \$i: \$(cat \$i); done" | grep -i gpu
# Find RAM/DDR thermal zones
adb shell "for i in /sys/class/thermal/thermal_zone*/type; do echo \$i: \$(cat \$i); done" | grep -i ddr
# Check GPU paths
adb shell "ls -la /sys/class/kgsl/kgsl-3d0/"
# Check FPS path
adb shell "cat /sys/class/drm/sde-crtc-0/measured_fps"
# Check RAM frequency path
adb shell "cat /sys/devices/system/cpu/bus_dcvs/DDR/cur_freq"GameBar supports runtime customization through Settings:
- Display Options: Toggle individual metrics (FPS, CPU, GPU, RAM, temperatures)
- Visual Style: Adjust text size, colors, background transparency, corner radius
- Position: Choose from 9 predefined positions or enable draggable mode
- Update Interval: Set refresh rate (500ms - 5000ms)
- FPS Method: Choose between new (SurfaceFlinger) or legacy (sysfs) measurement
Configure GameBar to automatically activate for specific apps:
- Open GameBar Settings
- Navigate to "Per-App GameBar" → "Configure Apps"
- Select apps from the list
- GameBar will auto-enable when those apps are in foreground
- Add GameBar tile to Quick Settings
- Tap to toggle overlay on/off
- Long-press tile to open settings
- Double-tap overlay: Capture screenshot
- Single-tap: Toggle visibility
- Long-press: Configurable action (hide, screenshot, or settings)
- Drag: Move overlay (when draggable mode enabled)
GameBar includes comprehensive logging features:
- Global Logging: Record all system metrics continuously
- Per-App Logging: Separate logs for each configured app
- Analytics: View FPS distribution, frame time graphs, temperature charts
- Export: Share logs as CSV files
GameBar includes SELinux policies for:
- Access to sysfs nodes (thermal, kgsl, drm)
- Overlay window permissions
- System service interactions
- File provider for log sharing
Policies are automatically included via sepolicy/SEPolicy.mk.
Required permissions (granted automatically as system app):
SYSTEM_ALERT_WINDOW- Overlay displayPACKAGE_USAGE_STATS- Foreground app detectionWRITE_EXTERNAL_STORAGE- Log file storageACCESS_SURFACE_FLINGER- FPS measurementWRITE_SECURE_SETTINGS- Configuration persistence
- Check overlay permission in Settings → Apps → GameBar
- Verify SELinux is not blocking (check
adb logcat | grep avc) - Ensure init.rc permissions are applied (
adb shell ls -l /sys/class/...)
- Verify sysfs paths in overlay config.xml match your device
- Check file permissions:
adb shell cat /sys/class/thermal/thermal_zone*/temp - Review logcat for file access errors
- Adjust divider values in config.xml
- Most devices use 1000 (millidegrees) or 10 (decidegrees)
- Test:
adb shell cat <temp_path>and divide manually
- Ensure
org.lineageos.settings.resourcesis available in your ROM - Check SettingsLib is included in build
- Verify all resource files are present in res/ directory
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test on your device
- Submit a pull request
Copyright (C) 2025 kenway214
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Original concept inspired by various gaming overlays
- Built for LineageOS and AOSP-based ROMs
- Community contributions welcome
- ColorPicker
- Issues: GitHub Issues
- XDA Thread: Coming soon
- Telegram: Pandemonium
Note: This is a system application that requires privileged access. It must be built as part of your ROM and cannot be installed as a regular APK.






















