I use adb wireless tcpip connection but every time I connect my device to my router it assigns a new IP address to my android device which requires me to plug my phone again and restart adb in tcpip with the IP address provided, I dont want this to happen every time, I just want to enter the same IP address and put adb connect <ipaddress>:<tcpip_port>
and connect to my device.
i tried to use static IP for the network using the mobile but due to some reason this restricted me to use internet(it was connected to the modem but not able to use internet).
More info:
Android 10 MIUI 12 redmi note 7s
i use scrcpy and have created a bat file(.cmd file) which when clicked runs a series of commands to connect to my phone wirelessly using adb and mirror the screen and control it remotely but because my router assigns a different IP ever time i connect my phone i have to edit the bat file.
Even if I type the commands manually without connecting the device with USB cable (adb connect <ipaddress>:<tcpip_port>
) it says: unable to connect to <ip addr>:5555: cannot connect to <ip addr>:5555: No connection could be made because the target machine actively refused it. (10061)
, then i have to connect it with USB cable and again start the adb in tcpip.
What is the use of adb wireless connection if I have to connect it to pc by USB every time (at the beggining) to make it wireless for that specific time.