Common setup, build, runtime, and training issues for AimBuddy with step-by-step resolution.
Symptoms:
- Gradle native build fails with CMake errors
- Linking errors or missing symbols
Fix:
- Install Android NDK
29.0.13113456 rc1through SDK Manager. - Install CMake
3.22.1through SDK Manager. - Clean and rebuild:
./gradlew.bat clean assembleDebugSymptoms:
- Native linker errors referencing NCNN symbols
Fix:
- Verify NCNN prebuilt libraries exist under
app/src/main/cpp/ncnn/. - Check that
CMakeLists.txtreferences the correct NCNN path for your ABI (arm64-v8a). - Rebuild after syncing.
Symptoms:
- Undefined symbol
__libcpp_verbose_abortduring native link
This is caused by an NCNN library built against a different NDK libc++ version. The fix is already in esp_jni.cpp which defines the missing symbol. If you see this after updating NCNN, verify the compatibility shim is still present.
flowchart TD
A[Overlay not showing?] --> B{Overlay permission granted?}
B -->|No| C[Grant overlay permission in Settings]
B -->|Yes| D{MediaProjection accepted?}
D -->|No| E[Tap Start and accept the screen capture prompt]
D -->|Yes| F{Screen recording prompt accepted?}
F -->|No| G[Re-accept the recording prompt for this session]
F -->|Yes| H[Check logcat for init errors]
Possible causes:
- Model files missing from
app/src/main/assets/models/. Needyolo26n-opt.paramandyolo26n-opt.bin. - Vulkan not supported on the device. Check
adb logcat -s AimBuddy_Native:Efor GPU initialization errors. - Incorrect ABI. AimBuddy only supports
arm64-v8a.
- Verify model files are present in
app/src/main/assets/models/. - Check
confidenceThresholdis not set too high (try lowering to 0.3). - Verify the game is in landscape orientation (capture is 1280x720 landscape).
- Check logcat for inference errors:
adb logcat -s AimBuddy_Native:E- Check pipeline stats in logcat:
adb logcat -s AimBuddy_Native:I | findstr "Pipeline stats"- If
avg inferis high (> 15ms), the GPU may be slow. The adaptive crop will automatically shrink to compensate. - If
dropped_pushis high, the ring buffer is filling up. This should not happen with triple buffering (3 ImageReader buffers). - Ensure no other GPU-heavy apps are running.
Root is required for assisted input. Without root:
- ESP overlays work normally.
- The "Enable Aim Assist" toggle is grayed out.
- The app shows "Root not granted (ESP mode)" in the menu.
To enable aim assist:
- Install a root manager (Magisk or KernelSU).
- Grant root when prompted on app start.
- If root was denied, tap Start again to retry.
- Verify
/dev/uinputexists and is accessible:
adb shell su -c "ls -la /dev/uinput"- The app sets permissions automatically (
chmod 666 /dev/uinput), but some ROMs may block this. - SELinux enforcement is temporarily disabled (
setenforce 0). If your ROM re-enables it, touch injection will fail. - Check logcat:
adb logcat -s TouchHelper:ECause: Detector jitter passing through the aim filter.
Fixes:
- Select the EMA or Kalman stabilization filter (Aim tab > Stabilization filter).
- Lower
EMA alpha(try 0.20 to 0.30). Lower values smooth more. - Use a preset like "Balanced" or "Precision" which have stronger smoothing.
Cause: Velocity lead is too low or disabled.
Fixes:
- Increase
Velocity leadslider (try 0.20 to 0.30). - Increase
Lead clampslider (try 16 to 20 px). - Use the "Competitive" preset which has the highest lead values.
Cause: Ghost tracks lingering in the tracker.
Fixes:
- Reduce
Miss graceslider (try 1 to 2). - This controls how many frames the locked target survives without a detection match.
- The zero-detection fast-release should handle this automatically. If it does not, check logcat for tracker anomalies.
Cause: Overshoot from aggressive settings.
Fixes:
- Enable "Anti overshoot" checkbox.
- Increase "Damp radius" (try 30 to 50 px).
- Reduce "Aim speed" (try 0.40 to 0.55).
- Increase "Derivative damping" (try 0.04 to 0.06).
- Use the "Balanced" or "Precision" preset.
- Settings are saved to
/data/local/tmp/settings.bin. - Verify the app has write access:
adb shell ls -la /data/local/tmp/settings.bin- If the file does not exist, tap "Save now" in the menu.
- If settings load but values seem wrong, tap a preset button to reset to known-good values.
- Use Python 3.10 to 3.12 (3.11 recommended).
- Re-run setup:
cd training
scripts\01_setup_environment.bat- Review the preflight report:
training/outputs/reports/preflight_report.json.
If strict preflight fails on scripts 04 or 05, run the full pipeline with non-strict preflight:
cd training
scripts\07_run_full_pipeline.bat --non-strict-preflightSymptoms:
- NVIDIA GPU detected but training runs CPU-only
Fix:
- Confirm Python version is 3.10 to 3.12.
- Install CUDA 12.1 and the matching torch wheel.
- Verify with:
python -c "import torch; print(torch.cuda.is_available())"
Review: training/outputs/reports/dataset_report.json
Common fixes:
- Fix malformed YOLO label rows (format:
class_id x_center y_center width height). - Ensure all coordinates are normalized to [0, 1].
- Remove duplicate images across train/valid/test splits.
- Include background-only images to reduce false positives.
- Verify exported files are copied to
app/src/main/assets/models/. - File names must match
settings.h:yolo26n-opt.paramandyolo26n-opt.bin. - Rebuild and reinstall the app.
Symptoms:
check_model_contract.pyreports class-count or shape mismatch.
Fix:
- Verify
training/dataset/data.yamluses exactly one class (nc: 1, class id0). - Retrain and re-run contract check:
cd training
python src\check_model_contract.py --weights outputs\runs\detect\train\weights\best.pt# Build
./gradlew.bat clean assembleDebug
# Install
./gradlew.bat installDebug
# View runtime logs
adb logcat -s AimBuddy_Native:I
# View errors only
adb logcat -s AimBuddy_Native:E
# Check touch device
adb shell su -c "ls -la /dev/uinput"
# Full training pipeline
cd training
scripts\07_run_full_pipeline.bat