u/lastdiggmigrant

[FIX] Pixel 6 Pro boot-looping on Android 17 Beta (CP21.260330.011)? It's a Wi-Fi bug — here's how to recover WITHOUT losing data

My Pixel 6 Pro went into an endless boot loop after the latest Android 17 Beta update (build CP21.260330.011.A1). It would get to the lock screen (sometimes), then reboot, forever. Safe mode didn't help. I almost factory reset — glad I didn't, because your data is fine and you can fix this over ADB.

Root cause (from logcat): every time Wi-Fi finishes a background scan, a new security service (AdvancedProtectionService) throws IllegalArgumentException: Invalid feature ID: 5, which kills system_server and reboots the OS. So the phone crash-loops as long as Wi-Fi is on. It crashes even in safe mode, and even with Advanced Protection turned off — the buggy query runs regardless.

The fix: turn Wi-Fi off before the first scan completes. The catch is the boot window is only seconds long, so you have to out-race it. The trick that finally worked: run the disable loop on the phone itself in one persistent adb shell — the adb daemon survives the crashes, so the loop keeps firing straight through them (single host-side commands kept losing the race for me):

adb shell 'while true; do svc wifi disable 2>/dev/null; settings put global wifi_scan_always_enabled 0 2>/dev/null; sleep 0.1; done'

Start that with the phone plugged in and let the phone keep crash-looping. Within a few cycles the disable lands early enough to stick. When the phone boots fully and stays up for a minute or two, Ctrl+C the loop. Done — phone works normally on cellular, data intact.

Requirements:

  • adb installed (brew install android-platform-tools on Mac, apt install android-tools-adb on Linux, platform-tools zip on Windows)
  • USB debugging must have already been authorized on your computer before the loop started. If you never enabled/authorized it, this won't work — there's no window to tap "Allow" on a crashing phone. (You may be able to catch the prompt mid-boot if you're fast — worth a shot.)

After you're stable:

  • DO NOT turn Wi-Fi back on. Any Wi-Fi scan re-triggers the loop (ask me how I know lol). Same for the "Wi-Fi scanning" toggle in Location settings.
  • Cellular/mobile data is completely unaffected.
  • Check for new beta builds (Settings → System → Software updates) and Google Play system updates over mobile data — the real fix has to come from Google.
  • DO NOT use the official "leave beta program" opt-out — it factory resets. If you want off the beta with your data, wait for a stable build newer than your current one and sideload it via recovery.
  • There's no deeper workaround that keeps Wi-Fi usable — I tried disabling Advanced Protection mode (doesn't help) and overriding the feature flags via device_config (blocked by the aconfig allowlist on production builds). It needs a fixed build from Google.

Filing this on the Google Issue Tracker with full logs. If this is hitting you too, star/comment on the issue so it gets prioritized — will drop the link in the comments once it's up.

Hope this saves someone a factory reset.

reddit.com
u/lastdiggmigrant — 2 days ago