USB Debugging over Wifi - android

I am unable to debug over wifi.
I have followed below steps.
Go to Android Sdk-> Platform-tools and type cmd
run adb tcpip 5555
adb connect and MY IP ADDRESS
Now i got the result show in below Image.
After my device is connected. I removed my USB cable then i got device list empty.
I have no idea why this is happening.
I have motorola X play Mobile Phone Android 6.0 and having Windows 10 operating System.
Need Help.

For simple one click connection of ADB over wifi - You can try using the Android ADB Plugin from JetBrains. The plugin will internally handle all the setup and you can click-away and connect to adb over wifi without worrying about anything else. Steps to install and use can be found on its GitHub repo page.
Provides an action which allow you quickly connect your Android device
over WiFi to install, run and debug your applications without a USB
connected by pressing one button. Connect your device using a USB
cable and press the Android WiFi ADB button. Once the device be
connected over WiFi you'll see an IntelliJ/Android Studio
notification. Now you can disconnect your USB cable and enjoy
deploying, running and debugging your applications over WiFi. The
version 2.0 enables a window to check which of your devices are
connected or not and connect/disconnect it manually if needed.
Screenshots from the plugin page:

Related

How can I develop my own apps for the Huawei P30 Pro?

I have been developing some apps with Xcode for my iPhone but recently I got the Huawei P30 Pro and would like to start making my own apps for it.
I've tried Android Studio for Mac but it doesn't detect my phone plus google doesn't show any results for developing apps for the Huawei.
Is it possible or is there nothing I can do as of now?
I've enabled USB Debugging on the phone and run 'ads devices' which shows my device as connected but still noting in Android Studio.
You may have accidentally revoked access to debugging try turning debugging off and back on again you NEED debugging for any form of android development. as for no documentation, that is OK your phone is new and there will not be much info on the specifics, just google stuff about android development in general.
If Android Studio doesn't detect your device, you may want to try using wifi to connect the device, I use AS on a mac every day, and the devices I have often disconnect when cabled, but with this they stay connected for days.
Connect device via cable.
Open terminal / preferred command line app.
Run command adb devices. If no device detects unplug and try again, if it continues with no device then check settings on device that usb debugging is enabled, and enabled in charging mode.
If device connected:
if only one device, run adb tcpip 5555
if multiple devices run adb -s deviceid tcpip 5555
If successful then disconnect the device
Run command adb connect 192.168.x.x:5555 with x.x being your device IP address.
If that's all done and it says connected, then you should see it in AS.

Unable to do wireless debugging (ADB) in 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.

Development on Nexus 5x which cannot connect via USB

I faced an issue with my Nexus 5x which I just acquired for Android 8 development: even after setting the development mode to be on, USB debugging to be on, Android Studio or adb refused to see it. (On the other hand, my Nexus 6 works fine...) Tried a few USB-C wires (including one that said compatible with Nexus 5x). and the result is the same.
I am using a Mac.
1) Is this a hardware defect or is it a USB mode I need to set?
2) If it is not possible to connect, how do I do wireless development (without connecting via wire first)?
First of all you need to check if your device is showing in adc command shell using this command: adb devices
if you device is showing then it's good and if not you need to make sure that Media device (MTP) is disabled. When it's disabled adb devices lists the device, when enabled it does not. After that go through the following process
Run adb tcpip 5555
Disconnect your device (remove the USB cable).
Go to the Settings -> About phone -> Status to view the IP address of
your phone.
Run adb connect :5555
more you can follow up with this Link.
And the second option is open your android studio go to
file -> settings -> plugins -> search adb wifi
install that plugin and follow the steps. More you can read about adb wifi is here:
Android Wifi ADB
Github link

Adb over wireless without usb cable at all for not rooted phones [duplicate]

This question already has answers here:
How can I connect to Android with ADB over TCP? [closed]
(37 answers)
Closed 5 years ago.
I want to debug Android APPs on my phone (LG nexus 4). I'm travelling and I forgot my USB cable. When I work at home I can do it just connecting the USB cable and executing the command 'adb tcpip 5555'. Then I can unplug the USB cable and connect via 'adb connect IP'.
But now I cannot execute the first command because I don't have a cable. I don't understand why I have to do it every time, since I already execute the 'adb tcpip' command before.
What I tried now:
I installed a terminal application on my Android and tried to execute that command there, but I received a "device not found" error. Maybe he cannot see himself...
I search for any reasonable option in "Android Development Options" and enabled everything seemed to have relation with Wifi. But nothing helped.
I search StackOverflow, but all answers I found involving connect via USB cable before. Is there I way to do this connection without the need of a cable at all?
Some info:
My Nexus 4 isn't rooted.
The android version is 5.1.1.
The question is about a non rooted device but if it is rooted the simplest way would be to:
From the terminal on your phone, do this:
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
See this answer for full details.
For your question
Adb over wireless without USB cable at all for not rooted phones.
Old Answer:
You need to connect your device to your computer via USB cable. Make sure USB debugging is working. You can check if it shows up when running adb devices.
Open cmd in ...\AppData\Local\Android\sdk\platform-tools
Step1: Run adb devices
Ex: C:\pathToSDK\platform-tools>adb devices
You can check if it shows up when running adb devices.
Step2: Run adb tcpip 5555
Ex: C:\pathToSDK\platform-tools>adb tcpip 5555
Disconnect your device (remove the USB cable).
Step3: Go to the Settings -> About phone -> Status to view the IP address of your phone.
Step4: Run adb connect <IP address of your device>:5555
Ex: C:\pathToSDK\platform-tools>adb connect 192.168.0.2
Step5: Run adb devices again, you should see your device.
Now you can execute adb commands or use your favorite IDE for android development - wireless!
Now you might ask, what do I have to do when I move into a different workspace and change WiFi networks? You do not have to repeat steps 1 to 3 (these set your phone into WiFi-debug mode). You do have to connect to your phone again by executing steps 4 to 6.
Unfortunately, the android phones lose the WiFi-debug mode when restarting. Thus, if your battery died, you have to start over. Otherwise, if you keep an eye on your battery and do not restart your phone, you can live without a cable for weeks!
See here for more
Ref: https://futurestud.io/tutorials/how-to-debug-your-android-app-over-wifi-without-root
UPDATE 1:
If you set C:\pathToSDK\platform-tools this path in Environment variables then there is no need to repeat all steps, you can simply use only Step 4 that's it, it will connect to your device.
To set a path:
My Computer-> Right click--> properties -> Advanced system settings -> Environment variables -> edit path in System variables -> paste the platform-tools path in variable value -> ok -> ok -> ok
UPDATE 2:
Go to the android terminal
adb tcpip 5555
adb connect your_ip_address
We can do it without a USB cable at all in the following ways.
NEW UPDATE 1: (Latest Answer without using USB cable at all)
Note: It will work only when your laptop and mobile should connect to the same WiFi.
Step 1: In Android studio choose "Pair Devices Using Wi-Fi" from the Device Connections dropdown.
Step 2: In Mobile go to settings and search for "Pair using QR code" and scan the QR code
NEW UPDATE 2: (Latest Answer without using USB cable at all)
Note: It will work only when your laptop and mobile should connect to the same WiFi.
Go to developer options from the mobile settings and enable Wireless Debugging
That's it!
Had same issue, however I'm using Macbook Pro (2016) which has USB-c only and I forgot my adapter at home.
Since unable to run adb at all on my development machine, I found a different approach.
Connecting phone with USB cable to another computer (in same WiFi) and enable run adb tcpip from there.
Master-machine : computer where development goes on, with only USB-C connectors
Slave-machine: another computer with USB and in same WiFi
Steps:
Connect the phone to a different computer (slave-machine)
Run adb usb && adb tcpip 5555 from there
On master machine
deko$: adb devices
List of devices attached
deko$: adb connect 10.0.20.153:5555
connected to 10.0.20.153:5555
Now Android Studio or Xamarin can install and run app on the phone
Sidenote:
I also tested Bluetooth tethering from the Phone to Master-machine and successfully connected to phone. Both Android Studio and Xamarin worked well, however the upload process, from Xamarin was taking long time. But it works.
This might help:
If the adb connection is ever lost:
Make sure that your host is still connected to the same Wi-Fi network your Android device is.
Reconnect by executing the "adb connect IP" step. (IP is obviously different when you change location.)
Or if that doesn't work, reset your adb host:
adb kill-server
and then start over from the beginning.
If usb is not working you should checkout debugging over bluetooth (Without Rooting)
http://zcourts.com/2013/07/19/android-debugging-over-bluetooth-without-root/#sthash.hVCLtWSk.dpbs
type in Windows cmd.exe
cd %userprofile%\.android
dir
copy adbkey.pub adb_keys
dir
copy the file adb_keys to your phone folder /data/misc/adb. Reboot the phone. RSA Key is now authorized.
from:
How to solve ADB device unauthorized in Android ADB host device?
now follow the instructions for adb connect, or use any app for preparing. i prefer ADB over WIFI Widget from Mehdy Bohlool, it works without root.
from:
How can I connect to Android with ADB over TCP?
Connect android phone without using USB cable except XIAOMI PHONES
== MAKE SURE THAT YOUR PHONE HAS USB DEBUGGING ENABLED ==
== IP Address series should NOT be '0' like 192.168.0.10
1. Connect your PC (Laptop) and Android phone to same wifi network.
2. Go to the Android SDK folder > platform-tools and open command prompt by holding the shift key and right clicking on the folder.
3. Type the command "adb tcpip 5555", and hit Enter, sometimes it gives an error but ignore it and go ahead.
4. Type "adb connect [YOUR PHONE IP]". example: "adb connect 192.168.1.34" and hit enter, your phone will be connected to PC.

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