On-device Android watchdog that keeps wireless ADB enabled. When ColorOS (or any aggressive OEM ROM) silently turns wireless debugging back off, ADB Watchdog flips it on again automatically.
AndroidKotlinWireless ADB WRITE_SECURE_SETTINGSAccessibilityServiceColorOS
View the source on GitHub →It polls Settings.Global.adb_wifi_enabled. When that flag goes to 0, it restores it to 1 through two recovery paths:
WRITE_SECURE_SETTINGS. Instant and silent once granted.WRITE_SECURE_SETTINGS can't be requested at runtime — grant it once over USB ADB:
adb shell pm grant com.luffy.adbwatchdog android.permission.WRITE_SECURE_SETTINGS
This persists across reboots. After that, recovery is instant.
./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk
Requires JDK 17 and Android SDK 34, or just open it in Android Studio.
Anyone running a phone (originally a Realme Narzo 50 on ColorOS) as a headless or always-on ADB target, where the OS keeps disabling wireless debugging. Full setup, the ColorOS keepalive checklist, and limitations are documented in the README on GitHub.