dwaan / homebridge-adb

Homebridge script to control remote ADB enabled Android device
MIT License
74 stars 14 forks source link

How to install in Homebridge official docker container? #104

Open SawkeeReemo opened 5 months ago

SawkeeReemo commented 5 months ago

I followed the instructions here, but I can't get this to work in the official Homebridge container. I was able to install this in the non-official homebridge container, but I want to stay on the official version. Anyone know how to do this?

Specifically trying to control an NVIDIA Shield Pro 2019.

dwaan commented 5 months ago

Can you give further explanation on which steps you’ve done? Or on which steps you unable to process, log output, or any other information. I can’t help without any further explanation.

I’ve been using HomeBridge official container as my main server, and everything works fine.

FYI, this is not a bug, more suitable for good first issue or help wanted label.

SawkeeReemo commented 4 months ago

Sorry for the lag in response, been insane over here for a few months. I just built a new Linux server running Ubuntu LTS 22.04 on a Beelink EQ12. But I moved my Homebridge docker container config folder over to it from my NAS. Then I pulled the official Homebridge image using the same docker compose file. Everything else works perfectly, but I still cannot get ADB to work for my NVIDIA Shield Pro.

I followed all of the instructions here, my Shield is in developer mode, and I followed the Debian based install instructions. The IP address for my Shield is correct in the config, I’ve been able to successfully add ADB to HomeKit (running on a child bridge). But it never asks me to pair it on the Shield, and the logs say it cannot connect.

logs: https://hastebin.com/share/jomafujuga.vbnet

I tried to run adb connect, but it says it can’t connect. No idea what else to do from here. Any ideas? And thanks!

SawkeeReemo commented 4 months ago

Weirdly… before when I ran ADB connect it said “failed to authenticate.” Now it says “already connected.” But the logs still say the same error you see in the logs I linked to above. “Unrecognized Accessory.” I even tried renaming the device just in case there was some sort of conflict. Still nothing.

dwaan commented 4 months ago

So right now in your Shield, there’s no popup confirmation to allow adb connection first time your run the plugin? If yes, try do disable developer mode, wait few seconds, and then reenable the developer mode. After that restart the plugin or the whole HomeBridge just to make sure. Most of the time it will popup again.

SawkeeReemo commented 4 months ago

Ok. I’ll even give the Shield a full power cycle before I re-enable. But also it’s 2:45am here, so I won’t be able to give it a shot until later this morning. I will report back what I find though.

One last thing: I just remembered that I’m running the Projectivy launcher instead of the stock launcher for my Shield. Not sure if that makes a difference, but I will try to disable that as well.

SawkeeReemo commented 3 months ago

Unfortunately, it still does not work. I disabled my custom launcher, turned off dev mode, did a full shut down on the shield to make sure it was fully off and cleared. I restarted the Shield, activated dev mode, restarted the adb plugin child bridge, and nothing happened. I tried deleting it from HomeKit and re-adding it. Restarting Homebridge itself. Pretty much everything I can think of.

Though a long time ago, I actually had this working for a short time. But I had to rebuild Homebridge due to a crash, ever since then, I could never get adb to work again. I'm going to try completely uninstalling the adb plugin, and see if I can hunt down the issue. ... did that... twice. Still doesn't work.

When I run adb devices inside the container, it shows the correct IP:port, but it says unauthorized. Can't figure out how to get the Shield to pop up the authorization.

Here's my ADB version info from inside the homebridge container:

Android Debug Bridge version 1.0.41
Version 28.0.2-debian
Installed as /usr/lib/android-sdk/platform-tools/adb
dwaan commented 3 months ago

When adb said unauthorized, it means that you haven’t give the adb permission to make a connection to the Android, the plugins won’t work if it still unauthorized. If the android didn’t show the adb debugging permission pop up, the only way to make it reappear is just to disable and enable the developer mode, until the pop up reappear, it will need several try. You don’t need to restart your android device, although you might need to restart the plugin every time you do that, and also it doesn’t matter if you use different launcher.

SawkeeReemo commented 3 months ago

Ok. I will try doing specifically that. Do I need to toggle the network debugging on and off as well?

Mr-Bridge-0 commented 3 months ago

I have the identical problem, any luck on getting this to work?

SawkeeReemo commented 3 months ago

I have the identical problem, any luck on getting this to work?

Not yet. I don’t have a lot of time to mess with this stuff when it becomes so problematic. Unfortunately other things have had to take precedence. …but it annoys me literally every single time I have to wait for that trash NVIDIA app to load on my iPhone just to pause a show. 😅 I asked about this in the Homebridge GitHub as well… no one has really been that helpful over there other than to say “try not running this is docker.” Which… fine… but then it’s so much more painful to manage. Docker makes things easier until you run into an obscure issue like this, and you’re not a programmer.