Closed Duclas closed 3 years ago
Hello, you're not supposed to run adb inside node command like that. Try creating a .js file contain this script:
let exec = require('child_process').exec; exec('adb -s IP-ADDRESS shell "getprop ro.product.model && getprop ro.product.manufacturer && getprop ro.serialno"', (err, stdout) => { console.log(stdout); });
then run node yourfile.js
, let me know how the output.
Hello and sorry for my bad english and lack of programming skills, I'm completely new to Homebridge. I use Homebridge on Windows 10 and have installed ADB according to the instructions. Via cmd I can also enter adb commands, even "adb -s 192.168.3.25 shell" input keyevent KEYCODE_HOME "" works (going to the home menu on my Fire TV).![image](https://user-images.githubusercontent.com/77907496/105619908-84b9b380-5df7-11eb-8d31-e52a7ca04048.png)
However, as soon as I try to enter any adb command in node.js (running as administrator), I just get adb version ^^^^^^^
Uncaught SyntaxError: Unexpected identifier![image](https://user-images.githubusercontent.com/77907496/105619894-5e941380-5df7-11eb-870f-9dddaf86b47a.png)
And on every startup the console just says that no device can be found: Can't connect to "AFTMM", with IP address: 192.168.3.25. Please check you ADB connection, or make sure your device is on and connected to the same network.![image](https://user-images.githubusercontent.com/77907496/105619919-9ac77400-5df7-11eb-83dd-aa8e1f33bba2.png)
My guess is that I need to somehow get Node.js to access the adb folder \platform-tools. Any suggestions on how to do this? Thank you!