done
This commit is contained in:
18
tools/capture_ethernet_tethering_log.bat
Normal file
18
tools/capture_ethernet_tethering_log.bat
Normal file
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
setlocal
|
||||
where adb >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo ERROR: adb.exe was not found. Use Android Studio Terminal or install Android platform-tools.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
adb start-server
|
||||
echo Confirm the phone is connected and authorized:
|
||||
adb devices
|
||||
echo.
|
||||
echo Clearing old Logcat entries. After the command starts, press Start Sharing in the app.
|
||||
echo Press Ctrl+C after the error appears; the log will be saved to ethernet-tethering-log.txt.
|
||||
adb logcat -c
|
||||
adb logcat -v time SystemTetheringManager:I TetheringCapabilityChecker:I MainViewModel:I EthernetMonitor:I AndroidRuntime:E '*:S' > "%~dp0ethernet-tethering-log.txt"
|
||||
echo Log saved to %~dp0ethernet-tethering-log.txt
|
||||
pause
|
||||
34
tools/grant_write_settings.bat
Normal file
34
tools/grant_write_settings.bat
Normal file
@@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
setlocal
|
||||
set "PACKAGE=com.ecohub.locksolved"
|
||||
|
||||
echo Ethernet Tethering one-time permission setup
|
||||
echo -------------------------------------------
|
||||
echo This uses Android Debug Bridge (ADB) on your own development device.
|
||||
echo USB debugging must be enabled and this PC must be authorized on the phone.
|
||||
echo The app must already be installed. This does not root the phone.
|
||||
echo.
|
||||
where adb >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo ERROR: adb.exe was not found. Open Android Studio Terminal or add platform-tools to PATH.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
adb start-server
|
||||
echo Connected devices:
|
||||
adb devices
|
||||
echo.
|
||||
echo Applying the WRITE_SETTINGS app-op to %PACKAGE% ...
|
||||
adb shell appops set %PACKAGE% WRITE_SETTINGS allow
|
||||
if errorlevel 1 (
|
||||
echo ERROR: ADB could not set the app-op. Confirm the device is authorized and the package is installed.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo.
|
||||
echo Verifying WRITE_SETTINGS:
|
||||
adb shell appops get %PACKAGE% WRITE_SETTINGS
|
||||
echo.
|
||||
echo If the output says WRITE_SETTINGS: allow, close and reopen the app, then tap Start Sharing.
|
||||
echo If tethering still fails, save the exact in-app error and Logcat output. Hardware and OEM tethering support are still required.
|
||||
pause
|
||||
12
tools/grant_write_settings.sh
Normal file
12
tools/grant_write_settings.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
PACKAGE="com.ecohub.locksolved"
|
||||
command -v adb >/dev/null 2>&1 || { echo "adb not found; install Android platform-tools." >&2; exit 1; }
|
||||
adb start-server
|
||||
echo "Connected devices:"
|
||||
adb devices
|
||||
echo "Applying WRITE_SETTINGS app-op to ${PACKAGE} on the authorized device…"
|
||||
adb shell appops set "${PACKAGE}" WRITE_SETTINGS allow
|
||||
echo "Current app-op:"
|
||||
adb shell appops get "${PACKAGE}" WRITE_SETTINGS
|
||||
echo "Close and reopen the app, then retry Start Sharing. If Android reports unsupported tethering or an unavailable interface, use that exact result for further diagnosis."
|
||||
Reference in New Issue
Block a user