flutter run hangs at "Waiting for VM Service port to be available" on Pixel 6a with Android 17 (no hot reload or debugger)


After my Pixel 6a was updated from Android 16 to Android 17, flutter run builds, installs and launches the app normally and the UI works, but the terminal hangs forever. Hot reload, DevTools and breakpoints never connect. The same phone worked before the update.

Output of flutter run -v (it stops here, no error):

[ +183 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=com.example.myapp/.MainActivity (has extras) }  
[   +1 ms] Waiting for VM Service port to be available...  

Environment

  • Pixel 6a, Android 17 stable (build CP3A.260905.009, then CP3A.261005.002.A1 after the October patch)
  • Flutter 3.47.5 (stable), Dart 3.13.x, Windows 10, adb 37.0.1, VS Code
  • Reproduces on a brand-new flutter create project, not only on my app
  • A different phone running Android 13 works fine with the same PC, USB cable and project

What I observed

  • adb forward --list is empty, so the tool never gets a VM Service port to forward
  • adb logcat never shows a "Dart VM service listening" line
  • adb logcat --pid=<app pid> prints nothing at all while the app is running
  • The app does not crash and keeps running normally on the phone

What I already tried (no change)

  • a different USB cable and a different PC
  • flutter run --host-vmservice-port=50300 --device-vmservice-port=50300
  • --no-dds and --disable-service-origin-check
  • adb shell am compat disable RESTRICT_LOCAL_NETWORK <package>
  • targetSdk = 35, and adding ACCESS_LOCAL_NETWORK to the manifest
  • updating Android (QPR1 and the October security patch), Flutter and platform-tools
  • Advanced Protection off, default logger buffer size, removed a USB tethering app

I also commented on the related Flutter issue: https://github.com/flutter/flutter/issues/184859

Is there a known change in Android 17 that prevents the Dart VM Service URI from reaching flutter_tools (for example app logs not reaching logcat, or the VM Service port not being published)? Is there any workaround to get hot reload and debugging working on a physical Android 17 device?

0
Nov 6 at 10:49 AM
User Avatarأحمد القاضي
#android#flutter#dart#adb#hot-reload

No answer found for this question yet.