Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux > #82797
| Path | csiph.com!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!border-3.nntp.ord.giganews.com!nntp.giganews.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news-out.netnews.com!s1-2.netnews.com!peer04.iad!feed-me.highwinds-media.com!news.highwinds-media.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail |
|---|---|
| From | Maria Sophia <mariasophia@comprehension.com> |
| Newsgroups | alt.os.linux, comp.mobile.android, alt.comp.os.windows-10 |
| Subject | Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing |
| Date | Thu, 11 Jun 2026 21:49:46 -0500 |
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <110fs49$lu4$1@nnrp.usenet.blueworldhosting.com> (permalink) |
| References | <110b60u$25n1$1@nnrp.usenet.blueworldhosting.com> |
| Reply-To | pusvul@getTjewytR4so+mqe2.invalid |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 12 Jun 2026 02:49:46 -0000 (UTC) |
| Injection-Info | nnrp.usenet.blueworldhosting.com; logging-data="22468"; mail-complaints-to="usenet@blueworldhosting.com" |
| User-Agent | telnet + stunnel + gVim on Windows |
| Cancel-Lock | sha1:O6VaVX9ctfxFS254dlMIiQL+yUE= sha256:JMY1TXGGzUAULkcqlRmHE1qNWufG0shLNLuBzwIynEY= sha1:aTsi3vW2peP4iuxIxVBXXfzjrzY= sha256:+gYBAjzw7jmilv2N8rZvZES86063I1CUoIoaqQYjsKo= |
| Content-Language | en-GB |
| X-Received-Bytes | 4351 |
| Lines | 104 |
| Xref | csiph.com alt.os.linux:82797 comp.mobile.android:154134 alt.comp.os.windows-10:193826 |
Cross-posted to 3 groups.
Show key headers only | View raw
Maria Sophia wrote:
> I've streamlined adb connections over Wi-Fi between the desktop & Android
> by eliminating the USB cable & by reducing the need for new cryptic ports.
If it takes two steps, we reduce it to one, so here's a reduction in steps.
I converted the vbs script into a batch script which...
a. Detects whether the phone is already connected to adb
b. If not, prompts for the pairing code & pairing port
c. But it avoids re-pairing unless absolutely necessary
d. Then using a static LAN IP address, it resets the device to TCP/IP 5555
e. Then launches scrcpy in a detached process (allowing the console to be re-used)
If people want, we can convert this to a Linux bash script also.
:: adbconnect.bat Wi-Fi adb/scrcpy static IP and static 5555 port connect
:: v1p0 20260611 converted adbconnect.vbs to adbconnect.bat
:: Connects desktop & phone over adb & mirrors phone on the monitor
:: Should work even if either the PC and/or the phone is rebooted
:: The script will ask only for the minimum amount of data needed
:: Change the phone static IP address to the local LAN IP address
@echo off
setlocal enabledelayedexpansion
set PHONE_IP=192.168.1.2
set SCRCPY_OPTS=--keyboard=sdk --always-on-top
echo.
echo === ADB Wireless Auto-Connect ===
echo Phone IP: %PHONE_IP%
echo.
REM 1. Find adb
for /f "delims=" %%A in ('where adb 2^>nul') do (
if not defined ADB set ADB=%%A
)
if not defined ADB (
echo [ERROR] adb.exe not found.
exit /b
)
REM Ensure .exe extension
if /i not "%ADB:~-4%"==".exe" set ADB=%ADB%.exe
echo Using ADB: %ADB%
echo.
REM 2. Check if already connected
echo Checking existing ADB devices...
for /f "skip=1 tokens=1" %%D in ('"%ADB%" devices') do (
echo %%D | findstr /i "%PHONE_IP%" >nul && (
echo Already connected on %%D
set DEVICE_ID=%%D
goto RUN_TCPIP
)
)
echo Not connected. Need to pair.
echo.
REM 3. Ask user for pairing info
set /p PAIR_PORT=Enter pairing port (shown on phone):
set /p PAIR_CODE=Enter pairing code:
set /p DEBUG_PORT=Enter debug port (usually 54321):
echo.
echo Pairing with: %PHONE_IP%:%PAIR_PORT%
"%ADB%" pair %PHONE_IP%:%PAIR_PORT% %PAIR_CODE%
echo.
echo Connecting to debug port: %PHONE_IP%:%DEBUG_PORT%
"%ADB%" connect %PHONE_IP%:%DEBUG_PORT%
echo.
echo Switching to TCP/IP 5555...
"%ADB%" -s %PHONE_IP%:%DEBUG_PORT% tcpip 5555
echo.
echo Connecting final port: %PHONE_IP%:5555
"%ADB%" connect %PHONE_IP%:5555
echo.
set DEVICE_ID=%PHONE_IP%:5555
goto RUN_SCRCPY
:RUN_TCPIP
echo Switching device !DEVICE_ID! to TCP/IP 5555...
"%ADB%" -s !DEVICE_ID! tcpip 5555
"%ADB%" connect %PHONE_IP%:5555
goto RUN_SCRCPY
:RUN_SCRCPY
:: Launch scrcpy in a detached process so the console can be killed
REM scrcpy.exe --tcpip=%PHONE_IP% %SCRCPY_OPTS%
echo Launching scrcpy...
start "" /B scrcpy.exe --tcpip=%PHONE_IP% %SCRCPY_OPTS% >nul 2>&1
echo(
exit /b
REM end of adbconnect.bat
--
Knowledge is best shared, like a fresh pizza & beer, among your friends.
Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-10 02:07 -0600
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-11 21:49 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-12 16:17 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Hank Rogers <Hank@nospam.invalid> - 2026-06-12 16:32 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Give It A Try <try.it@invalid.invalid> - 2026-06-12 23:20 +0100
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-13 11:31 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-15 11:08 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Paul <nospam@needed.invalid> - 2026-06-15 12:11 -0400
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-06-15 19:24 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-15 14:10 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-15 14:43 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing vallor <vallor@vallor.earth> - 2026-06-17 00:16 +0000
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 23:23 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-15 13:56 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Warpinator <invalid@invalid.invalid> - 2026-06-16 00:23 +0100
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-15 19:18 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing "Carlos E. R." <robin_listas@es.invalid> - 2026-06-16 12:15 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Chris <ithinkiam@gmail.com> - 2026-06-16 07:07 +0000
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 02:21 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing "Carlos E. R." <robin_listas@es.invalid> - 2026-06-16 12:30 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 12:07 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing "Carlos E. R." <robin_listas@es.invalid> - 2026-06-16 20:11 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 14:40 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing "Carlos E. R." <robin_listas@es.invalid> - 2026-06-16 22:47 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 15:51 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing "Carlos E. R." <robin_listas@es.invalid> - 2026-06-18 00:45 +0200
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Hank Rogers <Hank@nospam.invalid> - 2026-06-17 17:56 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing "....winston" <winstonmvp@gmail.com> - 2026-06-16 19:47 -0400
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 23:26 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Chris <ithinkiam@gmail.com> - 2026-06-16 12:10 +0000
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-16 12:09 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-26 06:38 -0400
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-20 02:22 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-20 02:31 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-21 00:53 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-27 08:58 -0400
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Nadia Jarvis <invalid@invalid.invalid> - 2026-06-27 19:38 +0100
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Hank Rogers <Hank@nospam.invalid> - 2026-06-27 19:53 -0500
Re: PSA: Streamlined persistent ADB port over Wi‑Fi without repeated pairing Maria Sophia <mariasophia@comprehension.com> - 2026-06-27 23:01 -0600
csiph-web