Android emulator-5554 offline

后端 未结 30 1537
旧时难觅i
旧时难觅i 2020-11-28 21:58

I\'m having a problem with emulator-5554, it keeps telling me it is offline.

When I do a adb devices from the command line it says

相关标签:
30条回答
  • 2020-11-28 22:36

    I also had the same issue. I've tried all described here solutions but they didn't help me. Then I've removed all emulators in the Android Virtual Device Manager and created new ones. The problem was in CPU/ABI system image configuration of the Android Virtual Device Manager. On my Windows10 machine emulator with system image x86 always is offline where emulator with system image x86_64 is working fine as expected. Just be aware of this

    0 讨论(0)
  • 2020-11-28 22:36

    I had the same issue with my virtual device. The problem is due to the Oreo image of the virtual devices that have the Play Store integrated. To solve this problem I installed a new device without the Play Store integrated and all it was fine.

    Hope it helps, Bye

    0 讨论(0)
  • 2020-11-28 22:37

    1 . Simply "Wipe data" to fix this issue.

    2 . If it doesn't work, go to emulated device and enable developer options > enable usb debugging

    0 讨论(0)
  • I found that the emulation environment comes up as "offline" when the adb revision I am using was not recent. I properly updated my paths (and deleted the old adb version) and upon "adb kill-server", "adb devices", the emulation environment no longer came up as "offline".

    I was immediately able to use "adb shell" after that point.

    0 讨论(0)
  • 2020-11-28 22:40

    This solution is for Windows.

    (See @Chris Knight's solution for Mac/Linux)

    1. Start Windows Powershell:

      Start -> type 'powershell' -> Press ENTER

    2. Run the following command: adb devices


    PS C:\Users\CJBS>adb devices
    List of devices attached
    emulator-5656   host
    emulator-5652   host
    12b80FF443      device
    

    In this case, 12b80FF443 is my physical device, and the emulator-* entries are garbage.

    1. Per @Brigham, "The way that Android detects emulators is by scanning ports starting at port 5555.". The port number is indicated after the emulator name (in this case 5656 and 5652). The port number to check is the emulator port number plus 1. So in this case:-

      5656 + 1 = 5657

      5652 + 1 = 5653

      So let's see which program is using these ports. In this case, the ports to check both start with "565". So I'll search for ports in use starting with 565. Execute: netstat -a -n -o | Select-String ":565"


    PS C:\Users\CJBS> netstat -a -n -o |  Select-String ":565"
    
      TCP    127.0.0.1:5653         127.0.0.1:5653         ESTABLISHED     5944
      TCP    127.0.0.1:5657         127.0.0.1:5657         ESTABLISHED     5944
    
    1. The final field in this output is the PID (Process ID) - in this case it's PID 5944 for both of these two ports. So let's see what this process ID is. Execute: tasklist /v | Select-String 5944. Replace 5944 with the output of the previous command:

    PS C:\Users\CJBS> tasklist /v | Select-String 5944
    
    adb.exe                       5944 Console                    1      6,800 K Running         MyPCName\CJBS          0:06:03 ADB Power Notification Window
    

    What a surprise. It's ADB. As noted by other answers, it could be other programs, too.

    1. Now, just kill this process ID. Execute kill 5944, replacing 5944 with the PID in the previous command.

    PS C:\Users\CJBS> kill 5944
    
    1. To confirm that the spurious emulator is gone, re-run the following command: adb devices

    PS C:\Users\CJBS>adb devices
    List of devices attached
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    12b80FF443      device
    

    ADB re-starts (as it was previously killed), and it detects no more fake emulators.

    0 讨论(0)
  • 2020-11-28 22:42

    In such a case, you can do all of the following in order to be assured that your emulator starts working again :

    1. Go to cmd and type adb kill-server
    2. Go to task manager and find adb in processes. If you find one, right click on it and click on end process tree.
    3. In eclipse, go to Window>Android Virtual Device Manager, click on the AVD you want to launch, click on start and uncheck "Launch From Snapshot" and then click on launch.

    That's it! It will take a while and it should resolve your problem.

    0 讨论(0)
提交回复
热议问题