e.g.
tns devices android
Gives me:
C:\Users\Matthew>tns devices android
Connected devices & emulators
Searching for devices...
[hangs here till I Ctrl+C]
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
Terminate batch job (Y/N)?
My device is visible in windows, a HTC One M9, and the drivers for it are installed. The device is in 'dev' mode and the USB debugging is switching on, and shows up as a warning notication.
SideKick shows no connected devices either. Although I suspect it's using the same back end that the tns command uses.
'tns doctor' says everything is good. I can build apps locally.
I had a number of active adb.exe processes. And it seems they were in a bad state somehow. Closing any one of them didn't result in progress but if I closed the whole process tree with Process Explorer then:
adb devices
Would actually list without hanging.
Related
It was really strange that adb wifi was disconnecting and debugging via cable is way more unreliable as well as uncomfortable.I did research on internet too. I did try many possible solutions, changing adb drivers, wifi mode and etc. But can't find the problem. It's just keeps disconnecting. I tried to make a loop to keep alive the adb connection.
:loop
adb connect 10.226.170.129:4444
goto loop
But, still didn't work. Even after running this loop infinitely it still disconnected.
WiFi adb is great tool to debug wirelessly. But, there can be many problems to face. So, try this guideline.
The procedure is below.
connect device to computer
execute this command : adb devices
You should see the device name.
if not then
Update adb drivers. click here...
else
execute this command : adb tcpip 4444
Here 4444 is a port number which can be replaced with any 4 digit number.
5. remove the device from usb port.
6. execute this command : adb connect IP of your device: port num
Ip can be anything. It can be found under about section of your device and port number is 4 digit number.
for example I will run
...
adb connect 10.226.170.129:4444
...
Done it should be connected now.
if your device is going offline often. That means there are some things to check.
run kill adb-server and then start adb-server. Then follow the procedure.
run adb shell setprop service.adb.tcp.port 4444 before adb tcpip 4444.
Check If networking options are enabled in developer mode. If any wifi related or tethering related options are enabled then disable it.
Some times some devices disconnects adb if screen is locked. So, try to keep display unlocked.
some devices only supports wifi adb in charge only mode. So, try to change it under usb configuration.
Some devices only supports adb in MTP protocol. So, after connecting cable choose MTP or file transfer.
try to run a loop mentioned above.
Hope this works.
REFERENCES
adb wifi often go offline, how to keep adb online?
Android ADB device offline, can't issue commands
Adb over wifi killed off after usb disconnect?
ADB over WiFi connection is lost after disconnecting USB
https://android.stackexchange.com/questions/116597/adb-wi-fi-connection-disconnects-when-device-goes-to-sleep-in-moto-g-2014
How can I connect to Android with ADB over TCP?
We have an old legacy application that uses Mac address for validating a license.
Sometimes this license trips up when attempting to start the app without a network cable connected.
Is it possible with a registry tweak to change (or some other way) the order of what windows reports is the first Mac address? Ie. The order of what windows prints when you run the getmac command from a console window.
If its tripping up when there is no cable plugged in, maybe installing the MS loopback adapter is an option and get your legacy program to look at this mac id, as this should be on and working all the time.
https://support.microsoft.com/en-us/help/2777200/installing-the-microsoft-loopback-adapter-in-windows-8-and-windows-ser
run C:\Windows\System32\hdwwiz.exe, and step through the wizard.
I was trying to debug over Bluetooth but I was getting the localhost:4444 offline issue...
So I went and erased all data from google play services. After that, my watch was forgotten by my handheld...
I have some important files on my watch that I NEED TO KEEP...
Is there any way of connecting the watch via adb WITHOU THE HANDHELD???
Allready tried tcpip connection but adb was unnable to connnect to the ip of my watch
ps: My watch is a Moto 360 sport (no cable connection)
No, for a watch without a cable connection, there's no way to connect adb without some sort of proxy through the handheld. It is possible to connect adb over Wifi, but you need another adb connection first to get that started (AFAIK) - which brings you back to the BT-via-handheld connection.
There's no reason why you should need to be clearing data from Play Services on a regular basis - but as you discovered, that's where Android Wear keeps its data about the phone-watch connection. So if you don't want to factory-reset your watch, don't do that.
The reality is that adb to Wear is just incredibly painful over Bluetooth, making a watch like the 360 a bad choice as a development device. I'd suggest doing as much debugging as you can using the emulators, and if you can afford it, get another watch with a hardwired connection. You can pick up a secondhand ZenWatch or G Watch R pretty cheap these days.
When developing for Android, I can connect to my Android Phone wirelessly with an app like Wifi ADB (or similar).
adb connect 192.168.1.100 + that (or similar) app = build/push to device/debug with a wireless connection / without the need to physically connect device to computer.
Does that capability exist on the iPhone for developers? If it is available, is it also available for Xamarin Mac Agent while developing from Windows?
yes you just have to configure it in Visual Studio Mac, follow the steps indicated here. But check the following note:
"Launching of application is still done through the USB cable, so the
initial launch will still require you to have the cable plugged. But
once started, you can safely unplug and continue your debugging
session over WiFi."
I'm trying to install some unsigned legacy drivers to my computer from command line. I have used dpinst.exe and installhinfsection functions which work fine, however everything I've tried is software first, meaning it installs the driver onto your computer and then doesn't actually show up in the device manager until you plug the device into your computer.
I'm wanting to install the driver and have it show up in the device manager without having to plug in any devices.
I can do this with adding legacy hardware from the device manager, but I want this to be an automated process so all from command line and not having to do it manually through device manager.
thanks in advance
EDIT
The drivers were written by me (UserModeDriverFramework), they are emulating real devices.