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

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.

Related

Android Studio cannot detect phone

When I tried to run the app, I don't see the phone listed on the connected devices list at all. I have connected the Samsung S3 GT-I9300, which is rooted using Kingo ROOT app downloaded from Google Play Store. I also have turned on developer options and the USB debugging. Still, nothing seems to work. I searched online and tried finding computer management to search for the phone listed under device manager. However, there's no mention of portable devices or other devices. Nevertheless, the phone is able to be charged. Is the problem caused by the USB cable? If so, which type of USB cable should I buy?
Try install ADB driver from here
and you can read manual here

How to use SpaceDesk over a Wired Connection?

I have a Samsung Galaxy Tab A 10.1" that I want to use as a second monitor with my PC. Spacedesk works great for my needs so long as I'm on a network with lots of bandwidth -- but more frequently I want to use second-monitor functionality in other environments, e.g. at a coffee shop, where the number of users bogs down network traffic and makes Spacedesk unacceptably slow.
Spacedesk doesn't natively support a wired connection, but for those who want one they suggest using USB tethering, presumably so both devices are on the same network. Problem is, my tablet is the Wifi-only version, so USB tethering isn't enabled. I rooted the device and used adb to run the commands enabling USB tethering as an option. It didn't take - the option never appeared under Settings / Connections. Then I installed ClockworkMod Tether as a 3rd party usb tether app. The PC tether software said it connected successfully to the tablet, but Spacedesk couldn't connect. Next I tried "gnirehtet", a reverse-tethering app. Got it working fine, but again Spacedesk on the tablet couldn't find the Spacedesk server on the PC.
How can I get both devices to be on the same network, without an intermediate connection (e.g. a router), in a way that preserves my PC's ability to connect to wifi, and that will allow Spacedesk to connect?
Turns out there's this thing called "Mobile Hotspot". Of course I couldn't use this on my tablet, as it had been disabled (thanks Samsung). But you can set it up on Windows easily -- in Windows 10 it's under Settings / Network & Internet / Mobile Hotspot. Connect your tablet to that hotspot and Spacedesk works like a charm.
Huge thanks to SpaceDesk customer support, who were extremely helpful in troubleshooting this apparently rather unusual situation. 5 stars both for the product, which I can now use anywhere, and the customer service.
Wifi tethering is possible with the tab A but only on android versions 6.x and below. it can be turned on via usb tethering enabling apps found in the app store that take you to the options in the settings of your device, these options appear to just be hidden in versions lower than 7 but removed in android 7 for whatever reason as the same apps just take you to an empty screen when used with 7.
If you have already upgraded to android 7.0 or above, and having spacedesk work with minimal lag is important to you, then I suggest you roll back youre tablet android version using Odin. This is what I've had to do after updating my tablet today (google it, there's plenty of guides out there)
TBH spacedesk is just poop over wifi. With USB you can watch video no problem
I tried the advice suggested here of using the mobile hotspot on my Windows 10 PC and used an old android tablet to create the extended screen to my PC using the suggested SpaceDesk app and it worked great! The download for Spacedesk for your Windows 10 PC is at https://spacedesk.net/ and the android app is in on the Google Playstore. Give it a try; it worked great for me.
I was connected to the internet over the LAN on my WIFI so I had difficulty in connecting the tablet (Samsung Galaxy Tab 3) over USB. My solution to this problem is disconnect your Laptop from the WIFI router from LAN cable as well as WIFI and use the tether option in tablet and connect it to the laptop and now it will work. Now for using the inter connect your Wi-Fi or LAN cable after this.
I tested the #Twiffy solution "Windows 10 hotspot" and worked for me. I disabled the tablet (Galaxy Tab A7) WiFi and the lag ended.

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

How to debug a nexus 10? Needs usb charger but need usb connected to debug

Has anyone found a good solution to debug a galaxy nexus as it gets power?
I can only debug and use the nexus 10 while its plugged into my computer. I can only charge the nexus 10 when its plugged into a wall.
It charges from USB so what am I suppose to do short of rooting the device and using ADB connect to its IP address?
Do they make cables? Are there ways to send more amps through a USB slot? would a USB hub work?
Something, anything? This is truly a nightmare
I see you're leaning towards a hardware solution, but my answer is more of a workaround I am using:
I assume that most of your debugging you do on emulators, but if you just need to know what's crashing your app on nexus 10, maybe you can try ACRA to get the stack trace. I found it very useful as I cannot test all devices and all versions, plus my IDE is on a VM without USB support... I call it "poor man's debugging".
More on this post: android - how to send crash reports
If it was me, I would get two USB cables (1 Nexus 10 cable and another USB-USB cable) and splice the power leads from one into the Nexus 10 cable. That way you could then plug the Nexus 10 cable from computer to Nexus 10, and the other cable from your wall charger.
Of course, you have to be comfortable doing this, and sure of your soldering.
EDIT 1: I should also note, that you might wish to look into the POGO pins on the side of your Nexus 10. I believe that these can be used to charge the device (I'm sure a little bit of googling will confirm this). You could see if there are any docks out yet (There weren't when I last checked a couple months back) that could be used to charge it, leaving the USB connection free.
If you don't mind to root your device, or already have done this. ADB over WIFI could be an option. You can find the directions for ADB over TCP in this post:
How can I connect to Android with ADB over TCP?

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.

Categories

Resources