-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Wireless not permanently enabled when turning on tcpip. #1548
Comments
Information from Terminal: INFO: scrcpy 1.14 https://github.com/Genymobile/scrcpy When connected via usb, it works fine. |
scrcpy has no "wireless option". It just uses How did you connect to your device wirelessly via |
Yes I connected via adb over tcpip. In a previous version I could enable it once, and never connect my phone to my computers USB again. Today, after turning on my computer, I am not able to connect to my device over tcpip, which I will refer to as wireless, wifi, or wirelessy going forward. I have to plug my phone into a USB port, after every reboot. |
After every reboot of the device or the computer? ( Anyway, it's related to |
If you are on windows. Try creating a batch file, and put the batch file inside scrcpy folder and open that batch file instead of scrcpy.exe. How to create and enable batch file in Windows Here is what I put in my batch file: @ECHO OFF
:: Batch file for scrcpy wireless
TITLE scrcpy wireless
ECHO >> Make sure you enabled adb debugging on your device.
ECHO >> Plug your device via usb for the 1st time or if it's failing to start.
ECHO >> Connect the device to the same Wi-Fi as your computer.
:: step 1: Enable adb over TCP/IP on your device: adb tcpip 5555
ECHO =======================================
ECHO Enabling adb over TCP/IP on your device
ECHO =======================================
adb tcpip 5555
ECHO >> Unplug your device
:: step 2: Connect to your device: adb connect DEVICE_IP:5555 (replace DEVICE_IP).
ECHO =======================================
ECHO Connecting wirelessly to your device
ECHO =======================================
adb connect DEVICE_IP:5555
:: step 3: Run scrcpy as usual.
ECHO =======================================
ECHO starting scrcpy wielessly.
ECHO =======================================
scrcpy --bit-rate 2M --max-size 800
:: It may be useful to decrease the bit-rate and the definition
PAUSE |
To permanently enable adb via wifi that will persist upon reboot, login as root in termux and issue command: No need to plug usb cable anymore afterwards. |
@fusionneur Do I enable root through ADB on my android phone? Or turn on Root in the ADB shello, on my windows computer? |
While usb cable is connected:
You can get wlan0 ip with: scrcpy you can unplug the usb cable. |
I wrote a script to assist wireless connections. https://github.com/fusionneur/ethernally I tested in various scenarios and looks fine. If you find any problem, please open an issue. Thank you |
@fusionneur any way to get this script to work on windows? I tried to follow your steps on my device using termux, and got my device rooted. Termux, tells me no su program found on this device. I also tried @mjjauhar batch file and that did not work either. So either I am doing something wrong, or wireless is just not for me. |
you can run the shell script in windows through cygwin or windows subsystem for linux or through a linux virtual machine installed in vmware/virtualbox - in windows Just one question.. you said "got my device rooted. Termux, tells me no su program found on this device. " but these 2 things contradict each other. Are you really rooted? You should have magisk installed if you're rooted and 'su' should work in termux in this case |
I do not have magisk installed. When Rooting my device it wiped everything and I did not know that would happen. So I am not sure if I want to proceed. How hard is it to get magisk installed? |
rooting itself shouldn't wipe, only unlocking bootloader wipes it - which is however a prerequisite step for first time rooting. What device do you have? Some devices are more tricky to root than others. Personally I follow xda guides that are device specific when rooting. |
I have the Pixel2 XL. And yeah this was my first time rooting it. I unlocked the bootloader. |
I somehow got the batch file working that another user posted. I am good on the wireless for now. Though I would at somepoint like to finish the root process. |
for rooting I suppose you could follow this guide: https://www.youtube.com/watch?v=aMPRRQu1hCk |
I created this tool to ease wireless connectivity. Check it out and let me know of your experience. |
Environment
Describe the bug
A clear and concise description of what the bug is.
On errors, please provide the output of the console (and
adb logcat
if relevant).Please do not post screenshots of your terminal, just post the content as text instead.
In a previous version of scrcpy, once wireless was enabled it would remain on. In version 1.14 I have to turn on the wireless option of scrcpy, or plug it in all the time to a USB connection.
I am on the latest version of android, and windows 10 Pro.
The text was updated successfully, but these errors were encountered: