A premium Android 15 app that lets you customize your physical mouse pointer (Bluetooth/OTG) system-wide using two methods: Accessibility Service overlay (no-root) and Shizuku/ADB privileged API.
com.customcursor.app/
├── MainActivity.kt ← Single-activity Compose host
├── model/CursorConfig.kt ← Data model (shape, size, colors, opacity)
├── viewmodel/CursorViewModel.kt ← State + DataStore persistence
├── ui/
│ ├── theme/ Color.kt, Theme.kt ← Material You dark theme
│ ├── screens/DashboardScreen.kt ← Main Compose dashboard UI
│ └── components/
│ ├── CursorPreviewCanvas.kt ← Animated live cursor preview
│ └── ColorPickerDialog.kt ← Color swatch + hex input picker
├── accessibility/
│ └── CursorAccessibilityService.kt ← METHOD 1: Overlay via AccessibilityService
├── service/
│ ├── CursorOverlayService.kt ← Foreground service (keeps overlay alive)
│ └── BootReceiver.kt ← Auto-start on reboot
└── shizuku/
└── ShizukuCursorHelper.kt ← METHOD 2: True PointerIcon via Shizuku
How it works:
CursorAccessibilityServiceregisters as an Android Accessibility Service- On connect it adds a
TYPE_ACCESSIBILITY_OVERLAYtransparent window viaWindowManager - The overlay window captures
MotionEventwithSOURCE_MOUSEto track raw cursor X/Y coordinates - On each mouse move it calls
invalidate()and redraws the custom cursor shape inonDraw() - Config updates are delivered via a local
BroadcastReceiver— no service restart needed
Permissions needed:
BIND_ACCESSIBILITY_SERVICE(granted by the user in Settings → Accessibility)SYSTEM_ALERT_WINDOW(for the overlay window)FOREGROUND_SERVICE(to keep service alive)
Limitation: The native system cursor is still visible underneath on some ROMs. On AOSP Android 15 the system cursor is hidden when an accessibility overlay covers it.
How it works:
- Shizuku runs a persistent binder service at shell UID (2000)
ShizukuCursorHelperuses reflection to reachIInputManager.setCustomPointerIcon()- This directly replaces the InputFlinger-level pointer icon — no overlay, no lag
- Change is system-wide and persists until reboot or explicit reset
Setup:
# 1. Enable Developer Options and Wireless Debugging on the device
# 2. Pair via ADB:
adb pair <ip>:<port>
adb connect <ip>:<debug-port>
# 3. Install Shizuku from Play Store, then start it:
adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/start.sh
# 4. Open Shizuku app → grant permission to Custom Cursor- Extract this ZIP
- Open the
CustomCursor/folder in Android Studio Hedgehog or newer - Copy
local.properties.template→local.propertiesand set your SDK path - Build → Make Project (
Ctrl+F9) - Run on device or emulator (
Shift+F10)
# ── Install prerequisites ──────────────────────────────────────────────────
pkg update && pkg upgrade -y
pkg install -y openjdk-17 wget unzip git
# ── Install Android SDK command-line tools ─────────────────────────────────
mkdir -p ~/android-sdk/cmdline-tools
cd ~/android-sdk/cmdline-tools
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip commandlinetools-linux-*.zip
mv cmdline-tools latest
rm commandlinetools-linux-*.zip
export ANDROID_HOME=~/android-sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
# ── Accept licenses & install SDK components ──────────────────────────────
yes | sdkmanager --licenses
sdkmanager "platforms;android-35" "build-tools;35.0.0" "platform-tools"
# ── Clone / extract project ───────────────────────────────────────────────
# (copy CustomCursor.zip to Termux storage first)
cp /sdcard/CustomCursor.zip ~/
cd ~
unzip CustomCursor.zip
# ── Write local.properties ────────────────────────────────────────────────
cd CustomCursor
echo "sdk.dir=$ANDROID_HOME" > local.properties
# ── Grant execute permission to gradlew ───────────────────────────────────
chmod +x gradlew
# ── Build debug APK ───────────────────────────────────────────────────────
./gradlew assembleDebug
# APK will be at:
# app/build/outputs/apk/debug/app-debug.apk
# ── Install directly to connected device ──────────────────────────────────
adb install app/build/outputs/apk/debug/app-debug.apkSee .github/workflows/build.yml template below if you want cloud builds.
- Open Custom Cursor app
- Tap the purple banner → goes to Settings → Accessibility
- Enable "Custom Cursor Overlay" accessibility service
- Back in the app — configure shape, size, colors
- Tap "Set Now" (feel the haptic!) — cursor is now active system-wide
- Connect a Bluetooth or USB-OTG mouse and move it — you'll see your custom cursor
| Feature | Status |
|---|---|
| 6 cursor shapes (Arrow, Hand, Crosshair, Circle, Diamond, Star) | ✅ |
| Size slider (16–80 dp) | ✅ |
| Fill color picker (palette + hex input) | ✅ |
| Border color picker | ✅ |
| Border thickness slider | ✅ |
| Opacity control | ✅ |
| Animated live preview | ✅ |
| Material You (Dynamic Color) dark theme | ✅ |
| Android 15 haptic feedback on Set Now | ✅ |
| DataStore persistence across app restarts | ✅ |
| Auto-start on device reboot | ✅ |
| Accessibility Service overlay (no root) | ✅ |
| Shizuku IInputManager override (privileged) | ✅ |
| Problem | Fix |
|---|---|
| Overlay not showing | Enable the Accessibility Service in Settings |
| Cursor position is offset | Rotate screen once to recalibrate overlay bounds |
| Shizuku permission denied | Re-run start.sh via ADB, then grant in Shizuku app |
Build fails: sdk.dir not set |
Copy local.properties.template → local.properties |
| Gradle download hangs in Termux | Use a VPN or set distributionUrl to a local cache |