WiFi debugging without USB - android

I am developing on a Sony Xperia Z3 Compact at the moment, which now has a broken USB slot. I read about how to connect my phone to Android Studio via WiFi, but all the solutions I found were requiring the phone to be connected via USB in the first step. My device is not rooted!
Is there any way to get the connection to Android Studio going without connecting via USB first?

Related

How to Debug my Android Application Over WiFi Without a USB Connection?

I have a Samsung Galaxy S10 running Android version 10, and my USB connector does not work anymore. The Android docs state that I have to connect my phone to the host computer with a USB cable first before debugging via WiFi...
Are there any ways to work around this? I read one StackOverflow post that provided a solution (not sure if it works) for phones that are rooted, but I was hoping there was a simpler way.
Since your device is Android 10 you cannot init a Wireless connection without connecting it via USB first.
I don't know if the S10 is rooteable if you can root your device or it is already rooted you can follow the steps listed here:
How can I connect to Android with ADB over TCP?
You only need to prompt a few commands in your device to enable usb debugging via TCP.
Or you just need to wait for the Samsung S10 Android 11 update. Planned for this month.

Cannot connect to android device from arch

I am trying to push software to my phone from android studio but something very strange is happening. My Samsung S7 is detected under usb devices but not under android devices and there are 6 "ghost" android devices that are not in the usb devices list but show up in adb, all the "ghost" devices are listed as api level 1 and are unaccessable and i cannot connect to my phone, also my phone has usb debugging enabled, is in mtp mode and i have all the adb stuff and mtpfs and jmtpfs installed on my computer
Edit: Also when I connect my phone to my laptop my phone says The connected device is unable to access data on this device. Reconnect the USB device and try again
Edit 2: I added some udev rules and now the ghost devices have dissapeared but my device is still not accessable
Edit 3: I can access the files on my phone through MTP but adb still does not recognize it
Try changing the connection type in your phone for example from Media Device (MTP) to Camera (PTP). I had the same issue with my Galaxy S8 and changing the connection type fixed it.

Testing USB peripheral on Android Emulator

I have one tablet, OTG cable and one specific device that reads signals and send them over USB. Now I want to make application that reads data from this device. That device is based on FTDI chip.
In documentation there is stated that emulator does not support USB connections.
So how to test and debug applications in this case? Copying .apk file every time to tablet is not solution.
You can debug on your tablet just as you do with the emulator, unless there is no adb USB driver available for your device.
Guidance can be found here: http://developer.android.com/tools/device.html

Android cannot find accessory device after enabling WiFi debugging

I'm developing an Android Accessory using a Galaxy Nexus phone and the official Arduino ADK board. I'm using all the standard Arduino libraries available here. I'd like to be able to debug my Android code at runtime so I followed Googles' instructions in their "Debugging Considerations" documentation in order to do remote debugging via WiFi.
When I connect to the phone via USB I'm able to debug just fine (of course it's not talking to the Arduino board though). When I connect to the phone via WiFi I can debug just fine. However when I plug in the board to the phone it no longer auto-launches my application (that's registered with the ADK device). So instead I manually start my application but it cannot find the Arduino accessory. If I switch back to USB debugging and reconnect the ADK board to the phone it auto-launches like normal and everything is fine, but then I'm back to not being able to debug.
There are no changes to the code during all of this. All I did was change how the adb tool reaches the phone. Any guesses why the phone and my application can no longer see the ADK board?
In short:
If the phone is set to debug via USB, it can talk to the Arduino ADK with no problems.
If I invoke "adb tcpip 5555 < enter> adb connect < device-ip-address>:5555" I can remotely debug the phone with no problems.
If I now connect the ADK board to the phone with the USB cable, the phone cannot find the ADK board, but I can still do remote debugging via WiFi. That's how I know that the accessory cannot be found.
Edit:
The phone is running Android 4.1.1 and the Arduino is 1.0.1.
Just bumped into this problem, having returned to USB Accessory work. Yes there is a problem, I've no idea how to fix the problem as later versions of Android simply don't allow you to both run adb over wifi and USB Accessory at the same time. My solution and you probably got there already yourself was to root my phone, luckily a Nexus S, and down grade the Android on it to 2.3.6
It's not a great solution but to debug USB Accessory I have to boot into 2.3.6. Hopefully in the future this might work again.
Debugging USB Accessory through wifi is only possible on Nexus devices. I tried many others (Samsung's, Motorola), they don't detect accessory when USB debugging is enabled in settings. Also tried hardware usb switcher - does not help.

developing a special device communication app that connects through USB port on Android

I found the USB docs for Android and from there it seems as if one could write a communication program on an Android phone that works exactly like on a PC.
I have a normal USB-cable that normally connects between a PC and an external device. On one end it is a normal USB on the other end it has a special plug for the device.
If I get an USB female-female adapter I could connect my normal Android phone cable USB end to my device USB cable and so basically plug in my special USB cable into the Android phone.
Does anyone have experience doing USB communcation programming on Android - basically copying normal PC USB functionality? All I would have to do is sent and receive text strings over the USB port - just like on a PC.
Is this possible or is the USB port programming on Android limited in any way
and not really identical to USB programming on a PC? eg. power supply through USB or anything else?
ps on the PC I need to have a FTDI driver installed to work with the external device.
Many thanks
UPDATE:
it seems that starting with Android 3.1 it is possible to do this - however, if I understand htis correctly, Android 3.1 runs only on tablet Android devices - I might be wrong with this - compared to Apple this all this pretty confusing (however, with Apple iPhone it will never work! ;)
Yes, Android supports USB host on 3.1 and newer, so you can connect USB devices directly to an Android device using a converter cable. Android 4.0 brings this feature to handset devices.

Categories

Resources