Error: Failed to connect to remote target after update to 4.0.0.2 - samsung-mobile

I updated my gear sport several days ago. After updating to 4.0.0.2, I cannot connect to my watch anymore. Here is my command:
./sdb connect [IP]
It aways said:
error: failed to connect to remote target [IP]
How can I solve this issue?

On the device, go to Settings -> About watch -> Software, from there, tap repeatedly on Software version until Developer Mode is enabled. Then restart your device, and try to connect.

I can confirm the successful steps, it has to be ALL of those steps, and then restart the watch.
Bluetooth: Off, Wifi: On, Debugging: On, Developer Mode: On. Then restart watch.
It will connect after ALL of those settings are in those EXACT states.
No other combination worked, not even after a watch restart, additionally my pc is connect to the router via cat5 cable, but the watch is connected over wifi.
Windows 10, Tizen Studio 3.6 (2019-11-22), Galaxy Watch Active 2 (Tizen 4.0.0.7, One UI 1.5)

Here is the solution:
turn off BT
Restart Watch (OFF and ON)
Connect via Wifi with device manager.

I was having the same issue. I finally got my galaxy watch connected. Here are the config/status my watch had:
Developer mode:on,
Bluetooth:off,
Debugging:on,
Wifi:connected to my phone's AP,
laptop:connected to my phone's AP
After connecting both devices to the same AP, i was able to find and connect to my galaxy watch on tizen studio. So, connecting with a phone's AP worked for me.

You need to accept debugging rha fingerprint from your watch. That is, you need to check and press the tick on the watch.

Related

Android Studio: Unable to open connection to: localhost/127.0.0.7:5037, due to: java.net.ConnectException: Connection refused

I'm taking the first steps in android development. Started working through this guide https://developer.android.com/training/basics/firstapp/running-app and the error occurred when the program is run on the device.
First of all, my device is not in the list of connected in Android Studio:
adb devices doesnt see my device when Android Studio is running, but if I close Android Studio, adb devices shows my device
When Android Studio starts, it shows an error and logs all the time this error flashes:
I tryed this this solution but it didnt solve my problem:
I dont know, why Android Studio try to connect to weird address localhost/127.0.0.7:5037?
I forgot. I edited /etc/hosts and commented line
#127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
After uncommented the line and restarted the Android Studio, I've solved my problem.
in my case in /etc/hosts I had the following line that i removed
0.0.0.0 localhost
I've catched this error under:
Android Studio 3.1.4
Android Debug Bridge version 1.0.32, Revision eac51f2bb6a8-android
Also i'm working in the office with some active firewall, antiviruses, monitoring etc.
My local host in the "/etc/hosts" was commented.
I solved this issue, but it was only an adb connection problem.
First, you have to enable all features in a device's developer menu
(debug with USB, upload via USB, usb connection type - charge only),
security menu (allow unknown sources);
Second, you have to set an allowance on the device to accept commands
from a current PC. Some devices do not show a dialog. To force this,
open a terminal console in the Android Studio, type in a command
"adb logcat" (this push adb to connect with current device), you
should see a dialog on the device's screen. Choose "Allow". To exit
from logcat command, press ctrl+x/ctrl+c or ctrl+break;
After this, you should see the device in the Studio's logcat drop box as [disconnected];
Open the consloe again and type "adb wait-for-device", this should set a stable connection with device.
It helped me.
I had a similar issue with Android Studio 3.3.1 (MacOS) when I run my app, it could not detect any devices in the Select Deployment Target dialog window after initializing adb. It produced the following error:
Unable to open connection to: localhost/10.0.2.2:5037, due to: java.net.ConnectException: Connection refused
I checked in /etc/hosts, and found the following line:
10.0.2.2 localhost
Commenting out that line solved the issue.
In windows 10 I to need add path of ADB directory to environment PATH. And It helps.
The problem can be due to the fact that it is missing the adb driver for the specific phone, as you can verify from the device manager.
You have to donwload and install it from the manufacturer, if it is available.
In my case, this seems to be still an open issue, but I've finally found the correct driver and installed it, as suggested in the developer documentation, by following the appropriate links (in my case I landed in a xiaomi Chinese page, containing the link to the rar archive of the working driver).
Having done that first, I could finally see an unauthorized device from adb devices (before that, no device was found instead, since it was unrecognized at the operating system level in the device manager) and, eventually, the suggestion from Sergio, typing adb logcat in the terminal, finally prompted the authorization from the device.
Issue solved!
Check if the port is binded to any other connection in your computer. This may be the error which is caused de to ports inavailability.
This Error ConnectException is caused due to SocketException so i will start digging with the port's status.

APK does not install and device is unauthorized and offline

I have a device running Android 6.0.1 and I'm working with Android Studio 2.3.3 on a Mac. When I try to install/run my application (hello world) I get this message.
com.android.ddmlib.AdbCommandRejectedException: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
Error while Installing APK
I know questions like this have been asked all over this site and I have looked though most of them and followed these suggestions
Turn everything off and on a few times
Ensure USB debugging in enabled in developer settings
Stop and start the adb server
Try a different deployment target, virtual devices work fine
My current theory is that my device is not authorized either because my device is not a phone/tablet/watch, it is just a SOM and carrier board.
My only other thought is that this is caused by the device being offline.
When I am selecting a deployment target I can see my device but it says [OFFLINE] beside it and it is slightly greyed out. I don't fully understand what this means given my device is connected the same network as my Mac they can ping each other.
So my question comes down to this
What other troubleshooting can I try?
Is it relevant that my device is offline/ what does that mean/ how can I go online?
The issue was with the .img file I used when getting the OS running on my device. I reinstalled the OS and everything worked after that.

Android Studio - Device is connected but 'offline'

This is quite a common question, but none of the solutions appear to work for me. First time asker, so apologies if I get the conventions wrong.
I am trying to connect my Galaxy S5 to my computer running Ubuntu 14.04 so I can do some android development. I have recently downloaded and installed Android Studio and the SDK and my device is detected when it's connected via USB but the device either appears as 'unauthorized' or 'offline'. I know I should be expecting the RSA key prompt but this never appears.
I have tried:
Checking debugging was enabled
Running adb kill-server and adb devices
Restarting (the device, developer options, the machine)
Simple unplugging and replugging the USB cable
Checking my adb version (it is 1.0.31)
Trying different USB ports
Revoking USB debugging authorizations
Toggling enabling ADB Integration from within Android Studio
Connecting as PTP device and MTP device
I have tried it on a separate machine that runs fedora and this works fine with no issues, the promopt appears right away. Therefore I imagine it is not the USB cable that is faulty.
Any ideas?
Try these:
Unplug and replug the USB cable.
If it still doesn't work, unplug the USB cable, disable then enable USB debugging in the device settings.
If the above two methods fail, reboot the device.
If rebooting the device also fails, reboot Android Studio too.
If reboot Android Studio still fail, try adb kill-server then adb start-server.
Try killing adb adb kill-serverthen disable usb debugging and then start adb by adb start-server then enable usb debugging and plug phone again and huh don't let phone sleep between process
EDIT
There turned out to be a problem with my laptop's ADB RSA key. I'm assuming my G3 was rejecting a bad key and disallowing my laptop to connect to it via ADB.
ADB saves a key file in one of multiple places on a Windows computer, the first is in the location where adb.exe is (C:\android), the second is in the user's >profile (C:\Users*username*.android), the third place is in the Windows system files (C:\Windows\System32\config\systemprofile.android), the file is >simply named "adbkey" with no extension. If there is no key file when ADB runs, it will generate one automatically.
Mine was located in my user folder (C:\Users*username*.android). All I had to do was delete the adbkey file (there was also a file named "adbkey.pub" which >I deleted as well), restart the adb server in command prompt (adb start-server) and plug my phone in. I instantly received the RSA Fingerprint Key window on my >G3 allowing connection between the two devices. Then typing "adb devices" returned my phone's serial number followed by "device" showing it was available. >I went back to the C:\Users*username*.android\ folder and sure enought there were new "adbkey" and "adbkey.pub" files.
got from XDA
EDIT 2
TRY this steps too
Navigate to where .android is stored
open .android and delete file named as adbkey and adbkey.pub
Start ADB then typeadb kill-serverand adb start-server
My fix to this issue:
Android settings
Developer options
Revoke USB debugging authorizations
Replug in device and accept authorization as usual.
Profit
Step 1: Turn off USB DEBUGGING in Developer Options
Step 2: Remove USB Cable
Step 3: Turn on USB Debugging(This rests USB Configurations)
Step 4: on Command Prompt enter adb kill-server and then adb start-server
Step 5: Connect the USB Cable
Step 6: Check Devices connected in Run in Android Studio(you should be able to see your device listed)
Step 7: If you want to continue running using the cable this would be good enough
(If you want to do Wireless Debugging continue with below step)
Step 8: type adb tcpip 5555. If no error is displayed remove USB Cable
Step 9: Look up IP Address of your phone from About abd then type adb connect xxx.vvv.b.n(your phone's IP)
Step 10: Check in Devices in Android Studio again and you shud see you r device in List of devices. If yes,
If you are on windows and you encountered the same problem, try killing the adb.exe process from task manager and then rerun your app.
Change the USB cable !!!!
I can't explain this technically, however after a lot of trial and error, this what have worked for me.
Could not get Samsung Note II (N7100) to connect.
Step 1. Follow answer from user4847410 above. Next time you connect your phone it will come up with an authorisation message and you're in.
Step 2. I also swapped my cable.
Step 3. Check USB port as if you install on one particular port then another port may not be ok for you.
Note: made two batch files
adb-fix.bat
adb kill server
adb start server
pause
adb-devices.bat
adb devices
pause
-- voted for that correct answer but I don't have enough kudos so it was removed! --
To fix this, use USB2 instead of USB3
A shorter cable did the trick.
It turns out that the wire thickness used inside the cable impacts on the resistance of the cable assembly – this resistance causes energy loss inside the cable when an attached load draws a current, and causes a voltage drop which can reduce the voltage to the end device to a point where it is not possible to charge quickly or completely.
http://goughlui.com/2014/10/01/usb-cable-resistance-why-your-phonetablet-might-be-charging-slow/
Change your USB Preferences to File Transfer if you use your smartphone to debug.
There are several option :
File Transfer /* Choose this one */
USB Tethering
MIDI
PTP
No Data Transfer
I had a long white cable. Just wouldnt stay connected. Switched to another, shorter, black cable and it works 100% of the time.
Disabling and Enabling the Developer options and debug mode on the Android phone settings fixed the issue.
Earlier for almost 3hrs I did:
I tried everything given in several sites and my android device never came online.
when I was running adb kill-server and then adb-startserver the "Device File Explorer" on the right bottom of the android studio showed "Device is not online (DISCONNECTED)".
Here is how solve this:
Revoked all USB debugging authorization on the device under "Develop options"
And I added sudo to command "sudo adb kill-server" and then " sudo adb start-server".
After this the message in "Device File Explorer" in android studio changed to "device is pending authentication please accept debugging session on the device". But no message appeared on the device. Tried stopping-restarting adb, connect reconnet usb cable, stop-start usb debugging but nothing worked.
Went back to device and changed the device usb settings from usb charging to "PTP", and, restarted the Android studio. And, boom, the message appeared on the phone to accept the debugging session on device.
use this command
-> adb disconnect
-> adb connect <ip address for your mobile:port number>
Eg : adb connect 192.168.2.58:5555
You can try this:
Go to tools/enable adb integration and uncheck it.
now check it and run again. Next time, android studio will restart adb and it may find your device.
Restart adb by issuing these commands in cmd
adb kill-server to kill existing adb session followed by adb start-server to start a new adb session
Disable and re-enable USB debugging on the phone and accept RSA fingerprints if asked by phone
Rebooting the phone if it still doesn't work.
If all above don't solve your problem, you may try delete environment variable named "ANDROID_SDK_HOME".
It really solved my problem. Hope it Help you!
This fixed for me
uncheck launch in tool windo
Source
https://github.com/google/android-emulator-m1-preview/issues/76#issuecomment-1023563846
This problem is because you have used an old adb version and not support on your device. or you have more than one adb
The key is:
make sure you have a latest adb executable on your SDK
Make sure to run adb command from "SDK_DIR/platform-tools/" because this should be the latest version (type command "which adb" to check) if u have more than one adb file, you can rename another one.
in my case, on my Windows 7 i have one more adb on "C:\Windows\adb.exe" and its an old version, so my adb command always run from that file. I fixed the problem by running adb form my sdk directory "SDK_DIR/platform-tools/adb.exe"
On windows--> Launch your terminal from the platform-tools folder inside android sdk.
Then use the following commands
adb kill server
adb start server
it should work
Try upgrade your Android SDK Platform as below steps:
Run the SDK Manager
Execute "Install packages…"
Restart the SDK Manager
I tried and it's ok for me.
ref: link
You maybe having an older version of the ADB, Update the tools package and that should bring down the latest ADB.
I also recently had this problem and I solved it by rebooting Android Studio. But my friend had to have the original cable for his device, no other cables worked.
In my case (same problem - that Nexus 5 is connected but with "offline" status) the problem was solved by "Invalidate caches and Restart" in Android Studio.
Suppose that problem was in adb and restarting Android Studio causes to adb restart.
Download and Install your device driver manually through visiting manufacturer website like :Samsung,micromax,intex etc.
In my case the problem was that I used a USB extension cable. As soon as I plug the microUSB cable right into the PC the device has detected.
In my case, turned out that you need to be logged as owner of device to properly accept the USB debugging.
Tried the "Disable and re-enable USB debugging on the phone" step but didn't get the RSA prompt on "normal" user, switched to owner and tried again and got it.
I had this issue on a device with USB-C using a microUSB cable with a USB-C adapter. After switching to a USB-C cable without any adapter it worked. I only saw this issue on a LeEco.
I tried most of the things on this page and none of them worked for my Samsung S5. However, when I switched the cable to a USB-C type the problem seemed to be solved...until next time.
Besides the solution mentioned above, try to download Samsung's Android USB Driver for your platform. Here is a link to the Windows one:
https://developer.samsung.com/galaxy/others/android-usb-driver-for-windows
If your app doesn't manipulate WiFi connections - another slightly different solution, which bypasses USB issues entirely - enabling a wireless debugging connection - ADB over WiFi/TCP/IP.

Not able to connect to Internet from Visual Studio Emulator for Android

I just installed VS 2015 RC and opened up the VS emulator for Android. I am not able to connect to internet from this emulator. I went to settings -> WiFi and could see its turned on, but not showing as connected to any network.
Upon turning off the wifi and turning it on, I could see the status as "Connecting".
How do I configure this emulator to access internet ?
I had to just disable the VirtualBox Host-Only Network adapter, which Genymotion emulators under VirtualBox used (Control Panel - Network and Internet - Network Connections on Windows 10), then restart the emulator and it works like a charm.
Greg
If you use Wifi to connect to internet. Just go to Run and search Hyper-v manager so run it. Select your emulator from virtual machines section right clicking on it go to settings . You see some adapters . we need seconed item external network.
so change it to your Wifi adapter. go to your emulator and google Iman Mohadesi. it works. just it.
Put away your shotguns folks. The key to solving this is a complete understanding of the problem. The VS Android Emulator is not configured out of the box with an external network connection. (Why? Why? Why?). The only network adaptor it has (Window Phone Emulator Internal Switch) is (as it name says) internal, that is not connected to the internet. It is only used (apparently) for communicating with the host.
So to have internet connection we need to add another virtual adaptor and connect it on the host system to the internet.
See this blog post to add and configure adaptor: http://blog.tpcware.com/2017/03/visual-studio-2017-android-emulation/
Overview:
In Hyper-V Manager add a new Virtual Switch. Name it External. See that it is connected to your real network connection.
In the virtual machine settings for the Android emulator, add a new network adaptor (emulator must be stopped to do this). Select the newly created external virtual switch.
Start emulator and open browser. Voila! You now have internet access.
So please disregard all the advice about rebooting, repairing, re-installing, etc. This is all a complete waste of time. I am astonished that some folks report this fixes the internet connectivity.
One last thing. The blog post says that this approach does not work if you network adapter is wireless. It works find for me and I only have a wireless connection from my laptop.
This solved my issue. there must be an internal and external network with the external listed after the internal. Use Hyper-V manager to fix these up on all your VS Emulators VMS.
No internet connection for Visual Studio Android Emulator
I only use Hyper-V and for some reason, all my Android emulators failed to connect to internet. To resolve this, go to Hyper-V Manager -> Virtual Switch Manager (on the right side of the window) and remove the corresponding virtual switch, in my case the Wireless. Finally in Visual Studio, run the app with any of the emulators and wait till finish its re-install the virtual switch.
In my case, I had the wifi enabled instead of ethernet (The cable was accidentally unplugged). pluggin it back solved the problem.
this link enter link description here
saved my a lot of times. Hope this help for you.

MonoTouch's Soft Debugger don't connect to App on iPhone - why?

I'm quite new on MonoTouch, so please forgive me my question in doubt... ;-)
I need help with the soft-debugger, because it's not connecting to the App on the device. While with iPhone Simulator everything is working as expected, the following happens when I start debugging against my device:
The is uploaded and installed to the device.
MonoDevelop comes up with a window saying the following: "Waiting for debugger to connect on 127.0.0.1:10000..." Please start the application on the device"
When starting the app on the device, the device vibrates indicating that the debugger is not connected....
In the settings of my App on the iPhone I have set the IP-Adress to my Mac's IP.
My iPhone is connected via WIFI to my network. I can ping my Mac from my iPhone and vice versa.
In several screenshots where the debugger was obviously working I saw that the debugger came up with the Mac's IP address and not the 127.0.0.1....
Do I have to configure my IP-address somewhere in MonoDevelop?
BTW: I'm using the latest version of MonoDevelop - it's 2.4.1
I have tried anything.... re-installing MonoDevelop, cleaning up the project several times, setting up a new project.... nothing...
Please, please help....
1.- Make sure you are connected the same wifi network both on device and computer
2.- Open monodevelop and your project and on top of the window select on the combobox "Debug|iPhone" (ScreenShot) setting and then clic on Run(menu)->Run Option (wait until it finishes to load your app on the device and DO NOT Open it yet)
3.- Get the ip address of your computer
4.- On the iDevice make sure that the application its closed then go to Settings -> (YourAppName) here you will be with the debug settings
5.- On Debugger Host setting you must put you computers ip address
6.- on MonoDevelop under Run(menu)->Debug you will be presented with the "Waitting for Debugger"
7.- Open you application and debbuger should connect now
Hope this helps
Alex
Alex,
many thanks for your replies! They were very helpful to me (especially point 5).
I have solved the problem by setting the Host IP in the ~/.config/MonoDevelop/MonoDevelopProperties.xml. That did it! :-)
Now I'm wondering where I do this setting in the MonoDevelop GUI... ;-)
Cheers,
Andreas

Resources