Unable to do wireless debugging (ADB) in android - android

I have a situation where I need to store some data on USB. There are some errors that occur when I try to attach USB to my android device. I tried to debug my app through ADB. Here is what I have done up till now.
I have downloaded the AndroidWiFiADB plugin.
I have connected my mobile by giving commands through the terminal.
E:>adb connect 192.168.0.13:5555
connected to 192.168.0.13:5555
and it shows that my device is connected in the terminal.
E:>adb devices
List of devices attached
0123456789ABCDEF device
192.168.0.13:5555 device
But when I press the AndroidWiFiADB icon I get the following message.
"Unable to connect to device 'Signature_Touch'. Make sure that your computer
and your device is connected to the same WiFi network."
I have enabled all the possible options of wifi available in developers' options.

Follow these below steps:
Connect your phone to PC/Laptop with USB.
Open terminal, go to your AndroidSDK/platform-tools local path and type adb devices. That will list down all connected devices.
Type: adb tcpip 5555
Type: adb connect <your-ip-address>:5555
Type: adb devices. That will show your device that is connected wireless with your IP Address and Port.
Then, you can enjoy Wireless debugging.
Note: You need to have same network on your PC/Laptop and on your phone.

Before connecting through WiFi you need to connect the device using USB to authorize the PC in the device (Such thing can't be done through wifi).
Then using the terminal, ping the device's IP. Pinging must be successful.
Then restart ADB and connect to your device.
Update
Since Android 11, you can use Android studio BumbleBee to use built-in "Adb over wifi" feature

You can use ADB Wifi Connect to debug the android application via wifi. You can also find it from android studio plugins.
You have to be in the same network to use wifi debugging.
May be help you.

Your Computer and Your Device should be connected to the same network. So that your device can be able to make a bridge connection with your computer.

Related

Can we do Flutter App Development Wireless ? Without connecting USB cable from Mobile to laptop?

We have to attach mobile with the laptop through USB cable during development. Because, often usb cable got disconnect and mobile connection got lost and again need to install whole App.
Is there any option do it wireless ?
through wifi or hotspot something ?
Yes, It is possible to wirelessly debug your application through adb over wifi.
Make sure your development machine and your device is on the same wifi network
Connect your device via USB
On console type : adb tcpip 5555
Disconnect USB and find the IP of your testing device (Settings -> About Phone -> IP Address)
On console type : adb connect YOUR_IP_ADDRESS
For future convenience you may assign a static IP address to your testing device on the router.
Pure WiFi Solution (No USB Cable Required)
In Android version 11 and later, you can connect ADB and test Flutter apps on your phone without a USB cable, using WiFi pairing.
Enable developer options on your device if necessary and go to "Settings -> System -> Developer Options -> Wireless debugging".
Enable wireless debugging and click on "Pair device with pairing code", which shows an IP address, port, and pairing code.
Run adb pair <ip>:<port> <pairing code> to pair with your device.
Go back to the main "Wireless debugging" settings, which shows your same device IP but a different port, and then run adb connect <ip>:<different port> to connect ADB to your device.
You should now see your device listed in the output of adb devices and flutter devices.
Deploy your app to your device by running flutter run -d <ip> in your app folder, where <ip> is your device IP from the previous steps.
(I have a phone that won't connect over USB for some reason, so I needed this. The official Google docs I linked to above don't mention the adb connect step, which caused me much confusion.)
First, connect your phone to the laptop with a USB cable and ensure that you are able to debug. Then type this in your terminal or powershell window-
adb tcpip 5555
Unplug the USB cable and ensure that you are on the same wifi network (hotspots will work as well). Go to Settings > About Phone > Status Information and find your phone's IP address in the IP address section. Assuming your IP is 192.168.1.3, type the following in your terminal-
adb connect 192.168.1.3:5555
Remember that you have to repeat these steps everytime you restart your phone
first you must download the SDK Plateform tools https://developer.android.com/studio/releases/platform-tools
and extract the file.
after extracting the file, open this file in cmd and run :
adb tcpip 5555,
adb connect your_ip_adress:5555 make sur you device is connected to the same wireless and the last command is
flutter run to run the app

Connect mobile device wireless on android studio for flutter

How to connect mobile device wireless android studio for flutter. I try every method but am failed. When i create emulator thy run very slow beacause I think Ram issue if any other solution please guide me thank u
You can connect mobile device and debug wirelessly but you need both your laptop and mobile on the same network(WiFi).
follow these steps:
Connect your mobile through a usb cable to the device and in the terminal run the command :
adb devices
Now you will see your attached device id, like this :
list of devices attached
RZ8N904WT6Y device
Copy the device id (RZ8N904WT6Y-in my case)
Now start the device in tcpip port, like this :
adb -s <device-id> tcpip 5555
Find out the local IP address of the Android device. You can find this information by pressing/long-pressing the WiFi icon in the quick settings drop-down and then clicking the WiFi network you are connected to
Type below command to connect to the device over WiFi:
adb connect <IP address>:5555
If the command ran successfully, you can now disconnect the USB cable and enjoy debugging over WiFi

No connection could be made because the target machine actively refused it. (10061)

I have problems trying to do wireless debugging.
I followed this instruction: https://developer.android.com/studio/command-line/adb#wireless
And it seems that I cannot connect to my phone at step 7 of the article adb connect device_ip_address.
It said cannot connect to 192.168.1.35:5555: No connection could be made because the target machine actively refused it. (10061)
I tried searching for the solution in stackoverflow but the answers do not suit my situation. They said to make sure that I connect to the same network and I'm pretty sure I am connected to the same network. I see my phone is connected to wifi name "Chor" And PC is also connected to the same name. I can even ping phone IP in the command prompt and receive a good response.
Any clues about what could be the issue?
The phone I use is Huawei P30 Lite.
I'm using Windows 10.
that Occurs due to
device is Restarted
device is connected to another computer or computer is debugging another device
turn offing the developer options of device
Follow those Steps to resolve that problem,
Connect your device to PC by USB cable to pc(one time requirement) and and turn on usb debugging it will connect successfully, allow for connection in device for promoted message.
2)then type this Command in terminal "adb tcpip 5555"
now remove the USB cable and connect device with pc with wifi
now type this command "adb connect <your_ip>"
you're all done !!
I have accidentally found the solution now!
It seems to be a phone issue (specifically Huawei phone).
It keeps turning off USB debugging mode by itself so what I had to do was to prevent it from turning off USB debugging mode.
I am not clearly sure of what is the exact step that fixed the issue but here's everything I did in Developer options:
Revoke USB debugging authorizations
Allow ADB debugging in charge only mode (I think this fixed the issue)
Turn off Always prompt when connecting to USB
Seems like there are some bugs with authorization conditions across different manufacturers. To get your target device to trust your computer, you need to go through more than just approving the computer's MAC address.
After some modifications of #off99555's answer, this is the solution for OnePlus 7 T/Pro devices on OxygenOS 10 (Android 10.x). Might be device manufacturer specific:
Revoke USB debugging authorizations
Connect target device via USB
Change USB usage mode to "File Transfer"
Run 'adb connect 192.168.x.x:5555'
The target device should recognize your computer now, and you can unplug USB and use ADB wireless now. Note that if you revoke USB auth in the future, you will have go through these steps again.
I ran into this error message when attempting to debug my Samsung Galaxy watch and it turns out that the Samsung Galaxy watches run on the Tizen OS and are not meant to be connected to Android Studio via adb. In order to develop apps for these devices, you will need to use Tizen Studio and connect to your device via sdb.
I'm facing the same issue then I'm restart everything like Phone, Android Studio/VS Code, and restart Computer. then solved.
Some of the commands you can try.
adb tcpip 4568
adb connect <Your device IP>:4568
adb disconnect
adb kill-server
in my case it showed wrong device ip when i ran ipconfig command. so check your device ip and try again
check your wifi debugging ip address
developer option -> wifi debugging
As other mentioned about the process you should first clean the path for connection. But try these two important points
1- Change adb to .\adb
.\adb kill-server
.\adb usb
.\adb tcpip 5555
.\adb connect 192.168.1.34:5555
2- Just you can keep one IP and for the next must clean the path!
Points:
1- As you know, we can set the IP address for a real phone in Static
2- If use a real phone by android 11, need to turn on Wireless debugging, then find the IP & Port
Solved:-
Just once connect your mobile with USB and allow the permission pop-up on the mobile screen, and then try to connect on wifi, it will connect.
Make sure you are using a cable that can transfer data, and that the device appears in the devices list when the cable is connected.
For device list run command:
adb devices
While the device is still connected enter the connecting command, with the IP address from the device wifi settings.
adb connect ip_address

ADB WIFI Connect - how to?

I want to run an app on my device to do that I am using ADB Wifi Connect plugin. Both my phone and laptop are connected to same wifi network. I am still not able to run the app on my phone. Please give an appropriate solution.
Error while connecting my Android device using ADB WIFI Connect plugin.
If you are using android studio then follow the below procedures:
Connect your smart phone with your system via physical cable.
make sure your smartphone and computer is connected via same network.
1.Open terminal in your android studio.
2. type "adb devices", which will show you the list of devices attached.
3. type "adb tcpip 5555".
4. type "adb your phone ip address:5555".
Hope this will help you

Debugging in Android device over wifi without rooting [duplicate]

This question already has answers here:
Run/install/debug Android applications over Wi-Fi?
(41 answers)
Closed 6 years ago.
Is there any possible way to debug or run android apps from eclipse to my Sony Tablet S over wifi rather than USB without rooting the device?
There are ways to do it, if the device is rooted. However, I am seeking the solution in a device that is not rooted.
Disconnect device from usb then tell it to listen on 4455
adb tcpip 4455
restarting in TCP mode port: 4455
connect to the device using a specified ip:port. my device is using wifi
adb connect 192.168.1.103:4455
connected to 192.168.1.103:4455
now do normal adb commands over tcp like
adb shell
when your done, you can put it back in USB mode
adb usb
restarting in USB mode
After a bit of dabbling with testing I successfully managed to connect a Sony Tablet S over ADB following this procedure, when both the computer and the tablet were on the same wifi network. I used an Xperia T as a tethering point between a laptop and the Tablet S. I followed the same procedure on an Xperia Tablet S and an Xperia S as well.
Connect the Sony Tablet S through USB to a computer, make sure you have ADB debugging enabled on the tablet.
On the computer, execute "adb devices", verifying the tablet is showing up in the list of available devices.
Execute "adb tcpip [port]" while the tablet is connected to the computer, verifying you get a response "restarting in TCP mode port: [port]"
Disconnect from the device from the computer it was connected to.
From a host located on the same wifi network, execute "adb connect [ip to device]:[port]", verifying you get a response "connected to [ip to device]:[port]"
In the end I launched Eclipse, created a test project and tried launching the project. The project installed and launched automatically from Eclipse. I also tested this for debugging and that worked equally well.
Finally After lots of search, here is the consolidated, short tutorial about "Wireless Debugging with Android without rooting" your android phone.
Steps:
Make sure your Phone and your PC/Laptop is connected in the same network.
Find your Android Device's IP Address: Go to Settings > About Phone > Status. Note down it.
Ping Test: Lets first check if your phone is accessible from your PC/Laptop to do this ping your Android Device and check its response. See Notes if ping is unsuccessful.
e.g: ping 192.168.1.55
Connect your Android Device Via USB in USB Debugging Mode.
Open command prompt and cd into <Android SDK Folder>\platform-tools directory and run the following commands.
adb tcpip 5555
adb connect DEVICE_IP_ADDRESS_HERE:5555
If you want to switch back to USB mode, use the following command.
adb -s DEVICE_IP_ADDRESS_HERE:5555
Disconnect Android Device from USB. If everything is fine, you can Wirelessly debug your Android Apps!
Notes:
If ping is unsuccessful, Make sure Wireless (WiFi) devices and wired devices are not isolated. If Isolated, you need to disable isolation. Router Mfgrs calls it as AP Isolation. There will be a setting in Router's Wireless Configuration page. I have D-Link Router, I unchecked the Enable MultiAP Isolation setting in Wireless Basic Setup Page.
I personally felt this method of connecting is taking more time.. so, I configured my android device so it uses static IP like 192.168.1.55 to connect to my router and I made a windows batch file like below,
#echo off
cd C:\AndroidSDK\platform-tools\
echo make sure your your Phone is connected in USB Debugging Mode.
pause
adb kill-server
adb tcpip 5555
adb connect 192.168.1.55
pause
so, every time I have just need to plug in my device, and double click the batch file and all done automatic :P !
(No root required) There is one best, easy and with UI method for Android Studio
IntelliJ and Android Studio plugin created to quickly connect your Android device over WiFi to install, run and debug your applications without a USB connected. Press one button and forget about your USB cable.
just install plugin Android WiFi ADB
Download and install Android WiFi ADB directly from
Intellij / Android Studio: Preferences/Settings->Plugins->Browse Repositories
.
Remember! for first time to initialize the device you must have to connect using usb
Alternatively, you can download the plugin from the JetBrains plugin site and install it manually in: Preferences/Settings->Plugins->Install plugin from disk.
for more information read here https://github.com/pedrovgs/AndroidWiFiADB

Categories

Resources