Automatically start Shizuku on Android 14/15 via USB ADB whenever your phone is connected — enabling Skvalex Call Recorder (and other Shizuku-dependent apps) to work after every reboot, without manual steps.
On Android 14/15 (Pixel 8 and similar), call recording requires apps to capture protected audio sources (VOICE_CALL, VOICE_DOWNLINK). Google locked these behind the CAPTURE_AUDIO_OUTPUT permission — only root or ADB shell can grant it.
Shizuku solves this by running a privileged service via ADB, but it has one major friction point:
- Shizuku dies on every reboot — it must be restarted each time
- Restarting Shizuku requires USB debugging to be active
- The Shizuku starter binary path changes with every app update (Android uses random hashes in APK paths)
- Doing this manually every time is tedious
This script eliminates that friction entirely.
Phone plugged in via USB
│
▼
shizuku-watch detects device (by serial number)
│
▼
Resolves current Shizuku lib path dynamically via:
adb shell pm path moe.shizuku.privileged.api
│
▼
Executes: adb shell /data/app/~~/moe.shizuku.../lib/arm64/libshizuku.so
│
▼
Verifies shizuku_server process is running (ps -A)
│
▼
Shizuku is live — Skvalex can record calls
The script resolves the Shizuku binary path dynamically using pm path, so it never breaks after Shizuku updates (the random hash in the path changes on every reinstall/update).
| Requirement | Notes |
|---|---|
| Windows PC | PowerShell 5.1+ |
| Android Platform Tools | adb.exe must be in PATH — download |
| Android phone | Android 14/15, tested on Pixel 8 |
| USB cable | Data cable (not charging-only) |
| Shizuku app | Installed on the phone — GitHub |
| Skvalex Call Recorder | Or any other Shizuku-dependent app |
| USB debugging | Enabled in Developer Options on the phone |
| ADB RSA key | Must be pre-authorized on the phone (accept the "Allow USB debugging?" dialog once) |
git clone https://github.com/YOUR_USERNAME/shizuku-watch.git
cd shizuku-watchOpen shizuku-watch.ps1 and update the $DeviceSerial parameter:
param(
[int]$PollingIntervalSec = 3,
[int]$CooldownSec = 60,
[string]$DeviceSerial = "YOUR_DEVICE_SERIAL_HERE"
)Find your serial:
adb devices
Connect your phone, enable USB debugging in Developer Options, and accept the RSA fingerprint dialog on the phone when prompted. This only needs to be done once.
$action = New-ScheduledTaskAction -Execute "powershell.exe" `
-Argument "-WindowStyle Hidden -ExecutionPolicy Bypass -File `"$PWD\shizuku-watch.ps1`""
$trigger = New-ScheduledTaskTrigger -AtLogOn
$settings = New-ScheduledTaskSettingsSet -ExecutionTimeLimit (New-TimeSpan -Hours 0)
Register-ScheduledTask -TaskName "ShizukuWatch" -Action $action `
-Trigger $trigger -Settings $settings -RunLevel Highest -ForceThe script will now start silently in the background every time you log into Windows.
$wdAction = New-ScheduledTaskAction -Execute "powershell.exe" `
-Argument "-WindowStyle Hidden -ExecutionPolicy Bypass -Command `"if (-not (Get-WmiObject Win32_Process | Where-Object { `$_.CommandLine -match 'shizuku-watch' })) { Start-Process powershell -ArgumentList '-WindowStyle Hidden -ExecutionPolicy Bypass -File \`"$PWD\shizuku-watch.ps1\`"' }`""
$wdTrigger = New-ScheduledTaskTrigger -RepetitionInterval (New-TimeSpan -Minutes 3) -Once -At (Get-Date)
Register-ScheduledTask -TaskName "ShizukuWatchdog" -Action $wdAction `
-Trigger $wdTrigger -Settings $settings -RunLevel Highest -Force- On the phone: tap your Developer Options shortcut → enable USB debugging
- Connect USB cable to PC
- Wait ~5 seconds — shizuku-watch detects the phone and starts Shizuku automatically
- Disconnect the cable — Shizuku stays alive (adbd keeps running as long as USB debugging is ON)
- Make/receive calls — Skvalex records normally
- Disable USB debugging (Developer Options → USB debugging → OFF)
- If you use MDM-managed work apps (Intune, etc.): open Company Portal → sync to restore compliance
Tip: Create a home screen shortcut to Developer Options using Activity Launcher for one-tap access.
If your phone has a work profile managed by Intune or similar MDM:
- MDM reads
adb_enabledand may mark your device as non-compliant while USB debugging is ON - MDM on BYOD (Android Enterprise Work Profile) cannot force-disable USB debugging — it can only block work app access
- Disabling USB debugging kills Shizuku (Shizuku monitors adbd and exits when it dies — by design, for security)
- Shizuku survives cable disconnection as long as USB debugging remains ON
Practical trade-off: work apps (Teams, Outlook) are blocked while USB debugging is active. Since you typically don't need Teams during a phone call, this is acceptable for most use cases. Disable USB debugging after the call and work apps resume within minutes.
Google's Phone app recorder is only available in select countries and cannot be used with third-party dialer apps. It also lacks the advanced features of Skvalex (per-contact rules, automatic recording, cloud sync, etc.).
| Symptom | Cause | Fix |
|---|---|---|
| Script doesn't detect phone | USB debugging is OFF or cable is charging-only | Enable USB debugging; use a data cable |
pm path returns nothing |
Shizuku not installed | Install Shizuku from Play Store or GitHub |
| Shizuku starts but Skvalex doesn't record | Skvalex needs Shizuku permission | Open Skvalex → it will prompt for Shizuku authorization |
| Developer Options disappeared | development_settings_enabled was set to 0 |
Go to Settings → About Phone → tap Build Number 7 times |
| Shizuku dies after a few seconds | USB debugging was disabled (by script or manually) | Do NOT disable adb_enabled — Shizuku will exit |
| ADB sees phone as "unauthorized" | RSA key not accepted | Reconnect cable and accept the dialog on the phone |
-
Dynamic path resolution: Android installs APKs under paths with random hashes (e.g.,
/data/app/~~GV2dRNL7.../moe.shizuku.privileged.api-.../base.apk). These change on every reinstall or update. The script usespm path moe.shizuku.privileged.apito always find the current path. -
Why Shizuku dies when ADB is disabled: Shizuku server (version 13+) monitors the
adbdprocess and intentionally exits when adbd is killed. This is a security feature to prevent an elevated daemon from running indefinitely. -
Why you can't auto-enable USB debugging: On Android 14+,
adb_enabledis managed byAdbManagerService. Enabling it requires system-level permissions (MANAGE_USB) — not evenWRITE_SECURE_SETTINGSis sufficient. This is an OS-enforced security boundary.
Issues and PRs welcome. Especially interested in:
- Wireless ADB (Wi-Fi) support as an alternative to USB
- macOS/Linux port (bash equivalent)
- Auto-disable USB debugging after call ends (Shizuku-based, phone-side automation)
MIT — see LICENSE
- Shizuku — the privileged service this script activates
- Skvalex Call Recorder — the call recorder that requires Shizuku on Android 14+
- Android Platform Tools — ADB