Search code examples
androidadbandroid-studio-arctic-fox

Android Studio Arctic Fox (Adb) - Connected Devices are being disconnected after some time


I have 7 different Android phones which all have different Android OS. All of them are facing the same disconnection problem. Devices are being disconnected approx after an hour later. When it's disconnected, Allow USB debugging? pop-up appears twice and wants me to Allow the computer's RSA key fingerprint which was already approved. Also, under Connection Assistant, the connected device turns into disconnected state by Android Studio but adb reports it's in device state.

Sometimes I can re-connect the device only if I click different USB Preferences. But it disconnects after some time later again.

I tried so many solutions to fix the device connection problem. I used to fix it usually with one of the solutions below. Unfortunately, the problem keeps persisting. I've never faced something like this before.

What I tried:

  • Unplug and replug the USB cable. (tried different cables)
  • Disable then enable USB debugging in the device settings.
  • Tried different USB type-C ports
  • Rebooting Devices
  • Rebooting Android Studio and MacBook
  • open .android and delete file named as adbkey and adbkey.pub
  • adb kill-server then adb start-server
  • Revoking USB debugging authorizations
  • Removed Android/sdk/build-tools and Android/sdk/platform-tools and reinstalled again.
  • Updated bash_profile like in below:
export ANDROID_HOME=/Users/myMacBook/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

I really don't want to remove Android Studio and re-install it. I hope someone can help me. Thanks in advance!

Versions:

  • Android Debug Bridge version 1.0.41
  • Version 31.0.3-7562133
Android Studio Arctic Fox | 2020.3.1 Patch 3
Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
Runtime version: 11.0.10+0-b96-7281165 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin

Screenshots: enter image description here


Solution

  • It's fixed after I updated my macBook to macOS Monterey.

    EDIT:

    I found the real reason why devices are being disconnected. If you try to inspect a webView in Chrome (chrome://inspect/#devices), Studio disconnects the connection of your devices after sometime