ADB + hotspot routing session library for Windows
Project description
phoneproxy
phoneproxy is a Windows ADB + hotspot routing tool available as both:
- an importable Python package for other programs, and
- a CLI wrapper for manual operation.
Requirements
- Windows 10/11
- Run in an elevated PowerShell/cmd window (Administrator)
- ADB available via
ADB_PATHor defaultC:\Program Files\platform-tools\adb.exe - USB debugging enabled and device authorized
- Phone hotspot already ON before startup
Configuration
Create .env from .env.example:
ADB_PATH=
LAN_ADAPTER_NAME=
HOTSPOT_SSID=
ADB_DEVICE_SERIAL=
TWINE_USERNAME=__token__
TWINE_PASSWORD=
TWINE_TEST_PASSWORD=
Notes:
LAN_ADAPTER_NAMEfallback defaults to이더넷, thenEthernet.HOTSPOT_SSIDis optional. If empty, SSID is detected fromadb shell dumpsys tethering.- Windows must already have a saved Wi-Fi profile matching the hotspot SSID.
Install (package)
pip install .
Library Usage
from phoneproxy import PhoneProxySession, runtime_config_from_env
config = runtime_config_from_env(verbose=True)
session = PhoneProxySession(config)
state = session.start() # non-interactive start, returns immediately
session.reset_ip() # callable at any time
session.disable_proxy() # after start(): LTE/data OFF, restore LAN default route
session.enable_proxy() # after start(): LTE/data ON, remove LAN default route
session.stop() # idempotent, restores LAN routes
CLI Usage
With local wrapper (existing workflow):
.\run_phoneproxy.bat
Direct CLI after install:
phoneproxy run # interactive q/r/d/e mode
phoneproxy run --headless # no q/r, Ctrl+C to stop
phoneproxy start # alias of headless run
phoneproxy reset-ip
Publish Workflow
Use the hf-storage-style publishing script:
.\publish.bat testpypi
.\publish.bat pypi
publish.bat will:
- read
TWINE_USERNAME,TWINE_PASSWORD,TWINE_TEST_PASSWORDfrom.env(unless already set in shell), - run unit tests,
- build wheel/sdist,
- run
twine check, - upload to TestPyPI or PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
phoneproxy-0.1.0.tar.gz
(13.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phoneproxy-0.1.0.tar.gz.
File metadata
- Download URL: phoneproxy-0.1.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
141dd00041e6de5379e15895e4cb9d3ce3c3d3a24a84eb4e91ec9ff8a9213a6d
|
|
| MD5 |
12832d32c566c6e9215da290dc3963d7
|
|
| BLAKE2b-256 |
e25fbebf25cb2ef1f18611fec498504688ec9ec6e9a4d6c6b811a8da5c005cb7
|
File details
Details for the file phoneproxy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: phoneproxy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd50fcf885d7323d476170b89bff6b4ae00b67f55d0d9dfa951c4ac8128d0d34
|
|
| MD5 |
108ff00fa20362965591d3e3311cad93
|
|
| BLAKE2b-256 |
1b2c0f61403d7a536cad54c9cd68d4e493fea444c9b972a0e3256ab7de3eb9fd
|