dwaan / homebridge-adb

Homebridge script to control remote ADB enabled Android device
MIT License
76 stars 15 forks source link

Cant get information - please check ADB connection #20

Closed korgoth closed 3 years ago

korgoth commented 3 years ago

I am trying this with the new Google Chromecast with Android TV. Adb installed, home bridge authorized for adb

In the log i see only this:

[22/12/2020, 14:37:00] [HomebridgeADB] 10.0.0.15 - Connected [22/12/2020, 14:37:00] [HomebridgeADB] -------------------------------------------------------------- [22/12/2020, 14:37:00] [HomebridgeADB] 10.0.0.15 - Can't get information from Chromecast [22/12/2020, 14:37:00] [HomebridgeADB] 10.0.0.15 - Please check you ADB connection [22/12/2020, 14:37:00] [HomebridgeADB] -------------------------------------------------------------- [22/12/2020, 14:37:05] [HomebridgeADB] 10.0.0.15 - Chromecast power is true

Any ideas?

dwaan commented 3 years ago

Hey. Can you run this command manually from your computer? And share the result.

My guess is the device is reachable but the adb command can’t be executed.

adb -s your-device-ip shell "getprop ro.product.manufacturer"

adb -s your-device-ip shell ”dumpsys power | grep mHoldingDisplay | cut -d = -f 2”

korgoth commented 3 years ago

@dwaan I have tried what you suggested and here is the log of what happened.

pi@homebridge:~ $ adb -s 10.0.0.15 shell "getprop ro.product.manufacturer" Google pi@homebridge:~ $ adb -s 10.0.0.15 shell ”dumpsys power | grep mHoldingDisplay | cut -d = -f 2” cut: invalid field value '\342\200\235' Try 'cut --help' for more information. /system/bin/sh: ”dumpsys: inaccessible or not found pi@homebridge:~ $ adb shell sabrina:/ $ dumpsys power | grep mHoldingDisplay
mHoldingDisplaySuspendBlocker=true sabrina:/ $ dumpsys power | grep mHoldingDisplay | cut -d = -f 2
true

For some reason dumpsys power is not accessible via adb, but is accessible with shell. I don't know if that helps

dwaan commented 3 years ago

@dwaan I have tried what you suggested and here is the log of what happened.

pi@homebridge:~ $ adb -s 10.0.0.15 shell "getprop ro.product.manufacturer" Google pi@homebridge:~ $ adb -s 10.0.0.15 shell ”dumpsys power | grep mHoldingDisplay | cut -d = -f 2” cut: invalid field value '\342\200\235' Try 'cut --help' for more information. /system/bin/sh: ”dumpsys: inaccessible or not found pi@homebridge:~ $ adb shell sabrina:/ $ dumpsys power | grep mHoldingDisplay mHoldingDisplaySuspendBlocker=true sabrina:/ $ dumpsys power | grep mHoldingDisplay | cut -d = -f 2 true

For some reason dumpsys power is not accessible via adb, but is accessible with shell. I don't know if that helps

Thank you. That’s help a lot. There was similar problem like your. Still looking out a way to fix it.

dwaan commented 3 years ago

Do you mind to check if the new version fix this bugs?

korgoth commented 3 years ago

Just installed. I can confirm it is working ok now with the new Chromecast with Google TV.

Thanks