ADB Disconnected

Former Member
Former Member
When i try to connect with adb i get this message: http://prntscr.com/eiyafx
1. Start Connect IQ Simulator
2. Start Android Emulator
3. Run adb command "adb forward tcp:7381 tcp:7381" from (android/sdk/platform-tools)
4. Start connection (Ctrl + F1)
  • I have exactly the same issue. I have checked in ADB with ADB device -l and ADB forward --list and the emulator is set up to connect via port 7381 however when I start the Connect IQ Device Simulator it still fails to connect via the Connect | Start menu with the same "ADB Disconnected" warning.

    Is there some port we should reboot ADB to listen on ? or some way of checking which port it is trying to connect via ?
    Thanks


    [FONT=courier new]>adb forward --list
    emulator-5554 tcp:7381 tcp:7381


    >adb devices -l
    List of devices attached
    emulator-5554 device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:1[/FONT]
  • We are tracking and trying to reproduce this. I'll let you know when I know more.

    Thanks,
    -Coleman
  • Let me know if you need more details on what versions, environment etc. I have tried quite a few options but just seems like the Garmin Device sim will not connect to adb. Thanks
  • I have the same issue. I use macOS. I configured ADB according to the documentation, but got "ADB Disconnected." alert, when I was trying to connect.

    Here is output of my ADB configuration:

    [FONT=courier new]>./adb devices -l
    List of devices attached
    1adcb1ca device usb:338690048X product:bacon model:A0001 device:A0001 transport_id:1

    >./adb forward --list
    1adcb1ca tcp:7381 tcp:7381[/FONT]
  • Okay,

    I have some news here. It looks like there have to be a couple of changes for this to work correctly. The sample provided by our companion app is set up for communication over an active connection to a physical device over Bluetooth. In order to use ADB tethered connections you need to do the following:

    In MainActivity.java for the comm sample app the IQConnectType should be used as TETHERED, for it to connect to the simulator through adb

    mConnectIQ = ConnectIQ.getInstance(this, IQConnectType.TETHERED);

    Once those changes are made you can try again and it should work. I've got a ticket made to update the Mobile SDK Docs to reflect this.

    Thanks,
    -Coleman
  • Sensational! Thanks Coleman works perfectly now!
  • Is there a way to detect automatically if it's running in simulator or real device? Like source-simulator/Foo.mc vs source/Foo.mc for example. Or an sdk call?

  • BTW this doesn't really answer the question, since in the question (or in my case) there's no app in the simulator: you can start an "empty" simulator, and then click on "adb Connection" > "Start" and you'll get the "ADB disconnected" error message.