I solved this by using "wipe user data" option everytime i start the emulator. It always works . I could not find any other promising solution.
Android emulator-5554 offline , 2 processes with same name and id running on different ports?
-
25-09-2022 - |
質問
My emulator always appears offline. I know similar questions have already been asked, but I think this problem is more specific. I'm running android adt on 64 bit kali linux. I ran this command:
netstat -tulpn
and got this output
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN 5022/adb tcp 0 0 127.0.0.1:5554 0.0.0.0:* LISTEN 4952/emulator64-arm tcp 0 0 127.0.0.1:5555 0.0.0.0:* LISTEN 4952/emulator64-arm tcp6 0 0 127.0.0.1:8700 :::* LISTEN 5037/java udp 0 0 0.0.0.0:68 0.0.0.0:* 3971/dhclient udp 0 0 0.0.0.0:59731 0.0.0.0:* 3971/dhclient udp6 0 0 :::49275 :::* 3971/dhclient
Note that there are two processes with same name running on port 5554 and 5555. As mentioned in other thread, the port 5555 should be available for emulator. So, I'm clueless about what I should do? If i kill the process with PID 4952, the emulator goes off.
解決 3
他のヒント
Use lsof to find out which processes are accessing the ports.
lsof -i:5554
lsof -i:5555
lsof -P 4952
If only process 4952 accessing these ports, then you need check if any config in that application (4952), maybe you need do the adjusts.
The status of the port is correct in your emulator. Port 5555 is for the adb server to connect and port 5554 is for the console to connect.
Typically, you can try:
adb kill-server
sudo adb devices
These commands will restart the adb server in su. Usually the problem will be solved. However, there are thousands of ways causing your emulator offline. You did not provide enough useful information.