dwaan / homebridge-adb

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

Cannot Find Device on M1 macOS Big Sur 11.4 #54

Closed coledeb closed 3 years ago

coledeb commented 3 years ago

Hey there. I have installed HomebridgeADB and tried setting up my Firestick 4k with the plugin. I am able to see and connect to my Firestick in ADB on my M1 Mac Mini, and I added the correct information regarding the device to the config of HomebridgeADB, however, the plugin will not see it within Homebridge. I tried downloading and using ADB manually from Google's site, as well as installing it via Homebrew, and both exhibited the same issue. I am on the M1 (Late 2020) Mac Mini and am running macOS Big Sur 11.4

Here is the log (with extra logging enabled) from the HomebridgeADB plugin when I try to start my Homebridge.

[6/6/2021, 9:54:17 PM] [HomebridgeADB] Firestick 4k - Device disconnected? Trying to reconnect. [6/6/2021, 9:54:17 PM] [HomebridgeADB] Firestick 4k - connect - disconnect - /bin/sh: adb: command not found [6/6/2021, 9:54:17 PM] [HomebridgeADB] Firestick 4k - Device disconnected? Trying to reconnect. [6/6/2021, 9:54:17 PM] [HomebridgeADB] Firestick 4k - connect - connect -/bin/sh: adb: command not found

Could it be that the plugin/Homebridge is not using the correct pathing of ADB as it is installed on my Mac? I know that my Mac utilizes zsh rather than bash within Terminal windows, and I had to manually add Path lines to my .zshrc file to get ADB working at first (at least before I learned better and removed my manual download of ADB then added it via Homebrew. At that point it worked as expected without modification.)

Please let me know if any further information is needed.

dwaan commented 3 years ago

Hello, the plugins relied on global environment path. If you put path to .zshrc it means the path is only available in your own profile only. You need to make sure that the ADB itself can be called anywhere in your system by either setting correct global environment path or install it to common bin folder inside your system. I manage to install and run everything in my MBP M1, but what I did is installing the ADB using Brew, which takes care all the necessary configuration.

coledeb commented 3 years ago

Ahh, I understand. I fully uninstalled (to the best of my knowledge) and reinstalled via brew this time, but it is still exhibiting the same behavior. I must have done something along the way to cause this to happen. Tomorrow I will nuke everything and start from scratch. Appreciate the reply!!

coledeb commented 3 years ago

Update: I actually installed platform tools via npm and it is working now! Thanks again for the help.