Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Is there is a way to remotely open and debug a given Android device?

My scenario is as follow: I'm working with an app development which a bug occurs in the app when it is in a different country than mine, and only there. The bug is related with a fail in an image download through an URL access. Right now, I haven't figured out yet what it can be. Some subjects I've already looked up are:

  • Its not related to internationalization and/or culture, because the code does not implement this;
  • Its not related to firewall/security access, because if the user in the other country opens the image's URL, he can look at the image;

Without rooting the device, is there is a way to remotely open and debug a given Android device, just like a SSH or a VNC?

Similar questions are:

  • Debugging android app on a device remotely
  • Remote Debugging
like image 834
Marcelo Avatar asked Mar 04 '13 19:03

Marcelo


People also ask

What is wireless debugging on Android?

You can run or debug an Android application directly to a real Android device using Wireless Network. This way you don't have to connect your device to a USB port all the time. This is specially useful and easier when developing on a Virtual Machine.

What is remote debugging?

If you debug a routine running on a system accessible through a network connection, you are performing remote debugging. With remote debugging, you can run the routine on one system and control it from your workstation.


3 Answers

Well, you can debug a device using a TCP/IP connection (I sometimes debug using WIFI at home). all you need to do is make sure the remote device is connected to the internet and is accessible to your PC with a direct TCP/IP connection.

As the Android device is connected in another location - you'll have to make sure your router's firewall allows outgoing connection for communications in the port ADB is using , and that the target Android device receives communications in that port (if it's behind a router - the router should allow connections under the righ port and forward all comm in that port to the android device).

in other words - you have to "tunnel" your communication to the target device. there are other tunneling solutions/products but I've never used them and I prefer the "manual" way

Good luck, Dan

EDIT : in Android 11 - adb can work on WIFI natively : https://developer.android.com/studio/run/device#wireless

like image 174
FunkSoulBrother Avatar answered Sep 20 '22 13:09

FunkSoulBrother


Perhaps you can have the user install something like aLogcat and have them send you a log with the failure.

like image 25
boltup_im_coding Avatar answered Sep 22 '22 13:09

boltup_im_coding


Well as remotely debugging a device I don't know but you can use ACRA (Application Crash Report for Android) .

All you need is to set up a google doc, add the lib to your project and when the app crashes it will send a crash report to that google doc. See quick setup here

like image 21
pepipe Avatar answered Sep 22 '22 13:09

pepipe