Android app stuck at "Launching on Devices" or 'device 'DEVICEID' not found' error
Asked Answered
K

4

5

The app can not be launched. It is stuck for a very long time in "Launching on Devices" (it seems to not stop).

Sometimes instead of beeing stuck it gives the error

'device 'DEVICEID' not found' error on device serial #DEVICEID executing service 'host-serial:DEVICEID:features'

after some time.

Also the dialog that asks for permission on the device sometimes does only appear after the error already happend (but not always).

The app is not started.

This log might be related to the long startup (it detects it).

2024-07-16 19:14:11,930 [  97057]   WARN - #com.android.ddmlib - TimeoutException getting properties for device RZCTB0V5AWP
java.lang.Throwable: TimeoutException getting properties for device DEVICEID
    at com.android.ddmlib.PropertyFetcher.handleException(PropertyFetcher.java:259)
    at com.android.ddmlib.PropertyFetcher.access$600(PropertyFetcher.java:31)
    at com.android.ddmlib.PropertyFetcher$1.run(PropertyFetcher.java:213)
Caused by: com.android.ddmlib.TimeoutException
    at com.android.ddmlib.AdbHelper.read(AdbHelper.java:882)
    at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:351)
    at com.android.ddmlib.internal.DeviceImpl.lambda$executeRemoteCommand$18(DeviceImpl.java:795)
    at com.android.ddmlib.internal.DeviceImpl.logRun1(DeviceImpl.java:1801)
    at com.android.ddmlib.internal.DeviceImpl.executeRemoteCommand(DeviceImpl.java:755)
    at com.android.ddmlib.internal.DeviceImpl.lambda$executeRemoteCommand$15(DeviceImpl.java:618)
    at com.android.ddmlib.internal.DeviceImpl.logRun1(DeviceImpl.java:1801)
    at com.android.ddmlib.internal.DeviceImpl.executeRemoteCommand(DeviceImpl.java:615)
    at com.android.ddmlib.internal.DeviceImpl.lambda$executeShellCommand$13(DeviceImpl.java:557)
    at com.android.ddmlib.internal.DeviceImpl.logRun1(DeviceImpl.java:1801)
    at com.android.ddmlib.internal.DeviceImpl.executeShellCommand(DeviceImpl.java:554)
    at com.android.ddmlib.PropertyFetcher$1.run(PropertyFetcher.java:209)

I was trying to troubleshot some other issue and now it does not even start. Previously it was working on a different commit but know not even there.

  • Restarting the adb-server did not help.
  • Someone said that deleting .idea-folder of AndroidStudio helps, did not
  • revoking USB-debugging authorisation did not help
  • disabling and enabling usb-debugging did not help
  • adb devices shows an entry with the id
  • it was the error most of the time until I clear the cache of AndroidStudio, then both
  • the phone also was rebooted in the mean time
  • it launches properly on the AVD

The OS of the host is Ubuntu 24.04. The phone is running Android 14 (One UI 6.1).

Kleist answered 16/7 at 17:27 Comment(0)
D
5

I had this problem since updating to Android Studio Koala. Probably due to the adb USB backend default being changed from native to libusb.

ref. https://developer.android.com/tools/adb#backends

The default behavior varies among OS. Starting with ADB v34, the liubusb backend is used by default on all OS except Windows, where the native backend is used by default.

Workaround:

  1. Open Settings: Build, Execution, Deployment > Debugger
  2. Select native for the "ADB server USB backend".
Dine answered 1/10 at 8:35 Comment(0)
T
2

I had to change the ADB settings in AS (Linux Mint + Android 14 OneUI).

Toomin answered 25/9 at 10:10 Comment(1)
This worked for me on Ubuntu 24.04, Thanks:)Pansir
K
0

It seems like I found a (temporary) solution for the problem. For example I have to do it again, when I switch between certain branches.

  1. Disconnect the device if it was currently trying to install the app and reconnect it.
  2. Type adb devices in a terminal to ensure that your device is connected (also to see if it is the only one).
  3. Type adb install -r -t -d ANDROID_STUDIO_PROJECT_PATH/build/intermediates/apk/debug/app-debug.apk. At least -t seems to be required (for debug builds). The path is for the APK that is generated by AndroidStudio for a project. If it differs for you, you have to use the correct path.
  4. Wait for the message
Performing Streamed Install
Success

This is for a connection with USB. It might be that additionaly the command adb usb is required.

To see what the other options for adb are (including -r and -d switches), type adb --help.

After these steps, it should be possible use the AndroidStudio installation again (until it breaks and one has to do it again).

Kleist answered 22/7 at 14:28 Comment(0)
R
0

I had the exact same issue on Ubuntu 22.04 - and it seems to me that the adb version bundled with the Android SDK is buggy on Ubuntu. I installed adb over apt (package android-tools-adb) and removed the newer one from the platform-tools and the issue was resolved for me.

The none functional adb version from android-sdk platform tools:

Android Debug Bridge version 1.0.41 
Version 35.0.2-12147458

The one installed with apt install android-tools-adb:

Android Debug Bridge version 1.0.41
Version 28.0.2-debian
Ravishing answered 28/8 at 9:10 Comment(1)
I have a different version installed 34.0.4-debian (it seems to be that I already did the install via android-tools-adb), but I still sometimes this error however a little less often (I had to switch to KUbuntu after my Ubuntu System "got disappeared").Kleist

© 2022 - 2024 — McMap. All rights reserved.