Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why there are two devices when I connect to my phone? #5738

Open
Septemberlemon opened this issue Jan 6, 2025 · 8 comments
Open

Why there are two devices when I connect to my phone? #5738

Septemberlemon opened this issue Jan 6, 2025 · 8 comments

Comments

@Septemberlemon
Copy link

Septemberlemon commented Jan 6, 2025

when I wanna connnect to my phone, I :

first: open wireless debugging on the phone like

image

second: connect to it with the command

image

then I saw to devices with adb

image

what r them or what's the second devices?

@rom1v
Copy link
Collaborator

rom1v commented Jan 7, 2025

I can't reproduce by enabling "Wireless debugging". But you don't need to enable "Wireless debugging" for the second command.

@Septemberlemon
Copy link
Author

I can't reproduce by enabling "Wireless debugging". But you don't need to enable "Wireless debugging" for the second command.

but if I don't enable "Wireless debugging", I had to connect my phone and pc via usb first, that's not convenient

@rom1v
Copy link
Collaborator

rom1v commented Jan 7, 2025

but if I don't enable "Wireless debugging", I had to connect my phone and pc via usb first, that's not convenient

Yes, but only once after each reboot of your Android device, while "wireless debugging" requires a manual action on every connection.

@Septemberlemon
Copy link
Author

Septemberlemon commented Jan 7, 2025

Yes, but only once after each reboot of your Android device, while "wireless debugging" requires a manual action on every connection.

I seldom reboot my phone but reboot my pc everyday because I will close it when I'm sleeping
so if I don't use wireless debugging , I have to use usb once everyday

@rom1v
Copy link
Collaborator

rom1v commented Jan 8, 2025

You don't have to use usb if you reboot your computer, only when you reboot your device.

Just scrcpy --tcpip=YOUR_DEVICE_IP.

@Septemberlemon
Copy link
Author

You don't have to use usb if you reboot your computer, only when you reboot your device.

Just scrcpy --tcpip=YOUR_DEVICE_IP.

But if I do that, I'll get this:
image
"由于目标计算机积极拒绝,无法连接。" means "the connection could not be made due to the target computer's positive rejection."

@rom1v
Copy link
Collaborator

rom1v commented Jan 9, 2025

#1319

@Septemberlemon
Copy link
Author

Septemberlemon commented Jan 9, 2025

#1319

I understand finally!
It's the issue of abd, most people do
1.connect phone and pc via usb
2."abd devices" to look if the connection is ok
3."adb tcpip 5555" to change the port of phone
4."adb connect phone-ip" to connect with tcpip
5.unplug the usb cable
to connect using abd for the first time (only for the first time)


but I prefer to use wireless way because using usb is very inconvenient!
so I've asked chatgpt and it told me things about "Auto-discovery Mechanism"
at the fist time I have this:
image
then I open(or restart if u have restart the adb) the "wireless debugging" on my phone, and do "adb devices" twice till I got this:
image
it found the my phone automatically
then I can connect to my phone with scrcpy finally
back to my original issue, the second device is one who was found by the adb itself,
emmm, I think so, and maybe I need a .bat file to do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants