Open SuperSandro2000 opened 1 year ago
Hi, great job. And then how to connect to device without using ip:port? Connect via _adb-tls-connect hostname
@SuperSandro2000 does this adb pair not doing that?
Can you share more context ?
does this adb pair not doing that?
no, you need to run adb connect IP:PORT
afterwards otherwise it does not appear under `´adb devices`` but the qr code is currently not working for me. The spinner on my device just spins indefinitely
Can I express my thoughts?
The function called connect (which calls exec adb pair) should be renamed to pair. And a new function called connect should be added (which calls exec adb connect).
And then in function startDiscover:
pair(item)
connect(item)
But you have to use the connection port to connect, not the pairing port.
Maybe we can do this:
const portscanner = require('portscanner')
const {exec} = require("child_process");
portscanner.findAPortInUse(36000, 49999, '192.7.1.1', (error, port) => {
console.log('AVAILABLE PORT AT: ' + port)
exec(`adb connect 192.7.1.1:${port}`, (error, stdout, stderr) => {
if(!error) {
console.log("connected")
} else {
console.log("oopsie")
}
});
})
But it can be slow. Or entering first 2 digits of the port?
why not use the port from the android device? it is displayed right next to the qr code button.
function main() {
console.log(
"[Developer options]->[Wireless debugging]->[Pair device with QR code]"
);
if (process.argv.length < 3) {
console.log("Usage: adb-wifi <port>");
return;
}
showQR();
startDiscover();
}
ess debugging]->[Pai
did you solved it same for me... spinner is not stopping
@bibek-magar https://github.com/fiurthorn/adb-wifi
You can try checking if the same issue occurs with this project to fix it: https://www.npmjs.com/package/adb-qc
After pairing the adb devices daemon is started but the device is not appearing there. I still need to run
adb connect 10.20.30.40:37890
. Could this be automated?PS Thanks for this! wireless adb stops the pairing process so fast that it was a real hazzle to type in the port and code fast enough.