development

Android 에뮬레이터 -5554 오프라인

big-blog 2020. 7. 20. 07:07
반응형

Android 에뮬레이터 -5554 오프라인


에뮬레이터 -5554에 문제가 있으며 오프라인 상태임을 계속 알려줍니다.

내가 adb devices명령 줄에서 할 때

emulator-5554 offline

새로 시작한 후에도 해당 명령을 시도해도 여전히 오프라인 상태입니다.

문제는 abd install <path>명령 프롬프트에서 .apk 파일을 에뮬레이터에 설치하려고 할 때 오프라인 상태임을 알려줍니다. 다른 장치를 만들어서 실행하면 .apk 파일을 설치하려고하면 너무 많은 장치가 연결되어 있습니다. 즉, .apk 파일을 설치할 수 없습니다.

세상에서 어떻게 그 빌어 먹을 에뮬레이터 -5554를 제거 할 수 있습니까? 다시 시작하면 모든 장치가 지워 져야하지만 작동하지 않는 것 같습니다. 컴퓨터가 시작될 때 초기화되는 것과 같습니다. 누구 든지이 문제에 부딪 쳤습니까?

감사


이 경우 에뮬레이터가 다시 작동하기 시작하기 위해 다음을 모두 수행 할 수 있습니다.

  1. cmd로 이동하여 다음을 입력하십시오. adb kill-server
  2. 작업 관리자로 이동하여 adb프로세스를 찾으십시오 . 하나를 찾으면 마우스 오른쪽 버튼으로 클릭하고 프로세스 트리 종료를 클릭하십시오.
  3. 일식에서 Window> Android Virtual Device Manager 로 이동하여 시작하려는 AVD를 클릭하고 시작 을 클릭하고 " Snapshot 에서 시작"을 선택 취소 한 다음 시작을 클릭하십시오.

그게 다야! 시간이 걸리며 문제를 해결해야합니다.


1 . 이 문제를 해결하려면 "데이터 삭제"만하면됩니다.

여기에 이미지 설명을 입력하십시오

2. 작동하지 않으면 에뮬레이트 된 장치로 이동하여 개발자 옵션 활성화> USB 디버깅 활성화


Android가 에뮬레이터를 감지하는 방법은 포트 5555에서 시작하는 포트를 스캔하는 것입니다.

adb devices목록에 표시되는 숫자 (귀하의 경우 5554)는 adb가 열려있는 포트보다 하나 적습니다.

포트 5555에서 수신 대기중인 프로세스가있을 수 있습니다. "오프라인"장치를 제거하려면 해당 응용 프로그램을 찾아서 닫거나 다른 포트를 청취하도록 재구성해야합니다.


이 솔루션은 Windows 용입니다.

( Mac / Linux@Chris Knight 솔루션 참조 )

  1. Windows Powershell을 시작하십시오.

    시작-> 'powershell'을 입력하십시오-> ENTER를 누르십시오

  2. 다음 명령을 실행하십시오. adb devices


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

이 경우 12b80FF443은 실제 장치이며 에뮬레이터 * 항목은 가비지입니다.

  1. @Brigham , "안드로이드 에뮬레이터를 감지하는 방식은 포트 5555에서 시작 포트를 스캔하는 것입니다." 포트 번호는 에뮬레이터 이름 뒤에 표시됩니다 (이 경우 5656 및 5652). 확인할 포트 번호는 에뮬레이터 포트 번호에 1을 더한 값입니다. 따라서이 경우 :-

    5656 + 1 = 5657

    5652 + 1 = 5653

    어떤 포트가이 프로그램을 사용하고 있는지 확인해 봅시다. 이 경우, 모두 검사 할 포트는 "565"로 시작합니다. 565부터 사용중인 포트를 검색하겠습니다.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. 이 출력의 마지막 필드는 PID (프로세스 ID)입니다.이 경우 두 포트 모두에 대해 PID 5944입니다. 이 프로세스 ID가 무엇인지 봅시다. 실행 : tasklist /v | Select-String 5944. 5944를 이전 명령의 출력으로 바꾸십시오.

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

놀랐는 걸. ADB입니다. 다른 답변에서 언급했듯이 다른 프로그램 일 수도 있습니다.

  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.


If you are on Linux or Mac, and assuming the offline device is 'emulator-5554', you can run the following:

netstat -tulpn|grep 5554

Which yields the following output:

tcp        0      0 127.0.0.1:5554          0.0.0.0:*               LISTEN      4848/emulator64-x86
tcp        0      0 127.0.0.1:5555          0.0.0.0:*               LISTEN      4848/emulator64-x86

This tells me that the process id 4848 (yours will likely be different) is still listening on port 5554. You can now kill that process with:

sudo kill -9 4848

and the ghost offline-device is no more!


In my case, I found some process that makes adb not work well.
You can try to kill some strange process and run "adb devices" to test.

It worked for me:
kill the process name MONyog.exe


I solved this by opening my commandprompt:

adb kill-server

adb devices

After starting up, ADB now detects the device/emulator.


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


From the AVD Manager try the "Cold Boot Now" option in the drop-down. It worked for me!


I finally solved this problem, I had to go to the Developer options from the Settings in the Emulator, then scrolled down a little, turned on the USB debugging. Instantly my device was recognized online, and I no longer faced that issue. I tried restarting android studio and emulator, killing adb process, but those did not work.


From AVD manager list at the actions dropdown: Cold Boot Now

restarts it without all pain above.


The "wipe user data" option finally solved my problem. just wipe user data every time you start the emulator. This always works for me! I use windows 8 x64 , eclipse


Just write

adb -e reboot

and be happy with adb))


Enable USB Debugging into your emulator

  1. Settings > About Phone > Build number > Tap it 7 times to become developer;
  2. Settings > Developer Options > USB Debugging.

That's it enjoy


Go to windows task manager and end process "adb.exe". There might be more than 1 instances of the same process, make sure to end all of them.


Do you have bluestacks installed? If you do, the background processes that it runs creates the offline device "emulator-5554".

Go to the task manager and end all the processes with the description of "Bluestacks"


In my case, the emulator was working with Oreo and lower, but not with Pie, and everything I tried seemed to have no effect. What finally worked was updating the emulator to latest (version 28).


In my case, I started in 'Cold Boot Now' and clicked on Message to allow the connection.


Did you try deleting and recreating your AVD? You can manually delete the AVD files by going to the directory they're stored in (in your user's /.android/avd subdirectory).


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.


Try this ...

  1. Close emulator if it Running.

  2. Start Emulator again and wait for its online.

  3. enter Command in commandprompt and press ENTER key : adb tcpip 5555

(Make sure that only One emulator running at a time.)

  1. adb -s emulator-5555 emu kill

  2. Press Enter Key....

  3. Done.

  4. check devices by command "adb devices" in cmd.


If the emulator is already open or executing it will tell you is offline. You can double check on the Command Line (Ubuntu) and execute:

 adb devices

You must see your emulator offline, you have to close the running instance of the emulator (since the port will show as busy) and after that you can run your application. Hope this helps someone.


I tried everything but only this one works for my case: Use SDK manager, and reinstall the system image. Android Studio, click Configure, SDK Manager, Launch Standalone SDK Manager, Check all "Google APIs Intel x86* System Image", "Intel x86 Atom*System Image" and install. Then re-start Android studio.

You might have to reconfigure and wipe the virtual device with AVD Manager, make sure you choose x86 version.


Ensure that your enable ADB integration is marked; go to Tools>Android>Enable ADB integration .

if doesn't checked , check this option and close your virtual device and re-open it . this worked for me.. good luck!!


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


open your emulator,

setting --> about emulated device --> click Build number repeatedly-->open developer options --> open USB debuggin


Simply delete and created gear avd again.It will work.


In my case the cause was that I had resumed a VM with android-x86 inside. Rebooting the VM with Android-x86 and restarting the adb server fixed the problem.


컴퓨터에 다른 가상 장치가 설치되어 있기 때문입니다. 비슷한 문제에 직면 했을 때 BlueStacks 일 수 있습니다 . Bluestacks를 제거한 다음 제대로 adb devices실행되고 있는지 확인했습니다 .


내 경우에는 "GPU 호스트"를 선택 해제하고 작동했습니다. :)

참고 URL : https://stackoverflow.com/questions/3152681/android-emulator-5554-offline

반응형