Files
project-iphone-unlock-app/tools/grant_write_settings.bat

35 lines
1.2 KiB
Batchfile
Raw Permalink Normal View History

2026-10-29 13:29:14 +06:00
@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