-
-
Notifications
You must be signed in to change notification settings - Fork 0
Grant Mirror Permission via ADB
chih-en_liu edited this page Jul 15, 2026
·
7 revisions
Other languages: 繁體中文 | Português (Brasil) | Español | Deutsch
By default, Android displays a permission dialog every time ScreenOnAuto starts screen mirroring. You can pre-grant the Screen Capture (MediaProjection) permission with ADB so the dialog never appears again.
- ADB (Android Debug Bridge) installed on your computer
- USB debugging enabled on your phone (Settings → Developer options → USB debugging)
- Phone connected via USB (or ADB over Wi-Fi)
-
Open a terminal (Command Prompt / PowerShell on Windows).
-
Verify ADB can see your device:
adb devicesYour device should appear as
device(notunauthorized). -
Grant the permission:
adb shell appops set idv.lzn.screenonauto android:project_media allow -
Launch ScreenOnAuto and start mirroring — the permission dialog should no longer appear.
To restore the default behavior (dialog shown each time):
adb shell appops set idv.lzn.screenonauto android:project_media default
-
error: device unauthorized— Look for the "Allow USB debugging?" dialog on your phone and tap Allow. - Dialog still appears — Force-stop ScreenOnAuto and relaunch. If it persists, revoke and re-grant using the commands above.
- Reinstalled the app (or switched between the Play and sideload channels) — uninstalling clears the grant; re-run the grant command after reinstalling.
-
Permission resets after reboot — On some ROMs (e.g. MIUI/HyperOS),
appopsgrants don't survive reboots. Re-run the command after each restart, or use ADB over Wi-Fi.