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), or have a reachable
sudopipeserver (sudopipe pingsucceeds) - 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=
SUDOPIPE_PATH=
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.SUDOPIPE_PATHis optional. If empty,phoneproxyresolvessudopipefromPATH.- Windows must already have a saved Wi-Fi profile matching the hotspot SSID.
- For non-elevated runs,
phoneproxycheckssudopipe pingand uses SudoPipe for privileged route cmdlets when available.
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.1.tar.gz
(14.3 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.1.tar.gz.
File metadata
- Download URL: phoneproxy-0.1.1.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf66c1fff58250c0b7ef7a907168c3128c06e6c701bfc373978ed3603e0a475d
|
|
| MD5 |
9d5d3ef62d834bf46bcfbdda80b88ffa
|
|
| BLAKE2b-256 |
bc4786a7ba9d1c23e99edabd5d30300f3925ca61bb17ae6ed9738648ca9beea3
|
File details
Details for the file phoneproxy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: phoneproxy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.5 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 |
e448e8123634978d66c457496b9b9fb272bdf1e87d4afd325ba96e744c69006b
|
|
| MD5 |
8aa87a726b746b87e204472df7ec563c
|
|
| BLAKE2b-256 |
57f4e1a86fe2eda427c07eeaedb8fe3666ec51a96fb869304290ba4a9564a5c2
|