Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
113.19k stars 10.8k forks source link

Unable to access to Android TV & Unauthorized device #5349

Open Yokpo opened 1 month ago

Yokpo commented 1 month ago

Please read the prerequisites to run scrcpy._

Also read the FAQ and check if your issue already exists.

Environment

Hi Everyone !

So I'm struggling from days to fix an issue that I cause on my Android TV - Xiaomi Mi Box 4. I broke the original remote some days ago and I used the remote controler app on my phone. I activated the USB debugging some weeks ago to play around it over WiFi on my laptop - MX Linux

I just changed my WiFi password...

So, I can't do any direct input to the box - no more remote app connection, no access with a mouse+keyborad physically connect to the usb - it's reserved by USB debbuging, and my laptop isn't authorized by adb.

I tried to use scrcpy as a distant keyboard with adb debugging USB.

See tries after :

$ lsusb
[...] 
Bus 001 Device 014: ID 2717:4e40 Xiaomi Inc. oneday

$ adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
18554284019522  unauthorized

$ scrcpy
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
ERROR: Device is unauthorized:
ERROR:     -->   (usb)  18554284019522            unauthorized  
ERROR: A popup should open on the device to request authorization.
ERROR: Check the FAQ: <https://github.com/Genymobile/scrcpy/blob/master/FAQ.md>
ERROR: Server connection failed

#I tried to use OTG as it doesn't required USB debugging - that restart my Android box
$ scrcpy --otg
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: USB device found:
INFO:     --> 18554284019522     (2717:4e40)  xiaomi oneday
ERROR: REGISTER_HID: libusb error: Operation timed out
WARN: Could not open AOA device: 1
ERROR: AOA open error
ERROR: REGISTER_HID: libusb error: Operation timed out
WARN: Could not open AOA device: 2

I know there is no way to overpass this authorization request (thanks god), tis there a way to revoke from adb the USB debugging option that I can use otg option or a physical keyboard ?

Thanks for the support and the great work !

rom1v commented 1 month ago

It seems your box does not support AOA (so OTG does not work). I guess this is the same if you connect a USB keyboard via an OTG cable?

Yokpo commented 1 month ago

It seems your box does not support AOA (so OTG does not work). I guess this is the same if you connect a USB keyboard via an OTG cable?

Hi rom1v,

you're right, when I connect a physical keyboard or mouse, it "work" (turn on light) as the box is starting, once the screensplash is gone, USB do not work anymore.

Tested with cabled mouse, Logitech dongle and iPhone (turn on charge for 2sec)