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
Related
I'm struggling to get my stock standard Android application ("hello world") running on my LG G5. My device is just not picked up by Android studio's deployment target window ("No USB devices or running emulators detected").
Can not understand why though because I do not pick up any usb driver issues in computer manager (G5 SE identified under portable devices without shown driver problem), and my phone's development option with USB debugging is enabled as shown by Android instructions.
Some additional guidance would help please.
First of all run adb devices (located in android sdk>platform-tools>) from command line / terminal and check if your phone is listed.
If not restart adb :
adb kill-server
adb start-server
If it doesn't work try changing USB Configuration on your phone: select MTP or PTP. You can change this from top panel when your phone is connected.
If this will show confirmation dialog with MAC address confirm it.
Your phone has to be visible by ADB before it can be visible by Android Studio.
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:
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.
Android adb can't detect Telcast G18 tpad for mac os. I've run
adb kill-server
to stop the adb daemon and run
adb start-server
to restart the adb daemon. But still failed to make adb recognize it?
According to this discussion on the google group, I am trying to modify the adb_usb.ini file by appending the correspondance device usb vendor id.
But how can I know which usb vendor id should I use? Fortunately, I managed to google a list of vendors for usb drivers here, in which case here, the usb device vendor id is:
vendor TECLAST 0x071b Teclast
I faced the similar problem with Teclast P79HD tablet PC built on Intel CPU. My Windows7 desktop detected the tablet which was connect via USB as an unknown USB device and I could not update its driver. The only program that helped me to revive the tablet was Adb_Run_v.3.78.65 by Vitaly Shipilov. You can download this program anywhere in the Internet. It's free.
You should act in the following way:
Install Adb_Run_v.3.78.65 on your Windows desktop.
Restart your PC.
Click Adb Run icon to start the program, then exit from the program. You should start it to start adb server. After that you will see adb.exe process via the Task Manager.
Go to Setting of your tablet, then Storage -> USB computer connection (additional settings) and check 'Media device (MTP)' in 'Connect as' section. Then connect your tablet to PC via USB cable.
After that your PC will detect the tablet as Media device (MTP). You will see the unit in the Device Manager as Android Phone. Now you can transfer files but you cannot use the tablet in debug mode when USB is connected. To resolve this problem you should act as it is described on the page:
Configuring Your Android* USB Debug Connection
See the second half of this article 'To install the Android USB debug driver on Windows 7, 8 or 10'. The driver which helped in my case was 'Android Composite ADB Interface v.4.0.0.0 [23.05.2014]' by Google, Inc. And I checked 'Camera (PTP)' in 'USB computer connection' instead of 'Media device (MTP)'. After this procedure Android Studio began detecting my tablet right and I was able to use it in debug mode.
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