Cannot Discover Android Devices

Mobile Testing, Android App Testing.
cavellmc
Posts: 1
Joined: Fri Jun 15, 2012 10:16 pm

Cannot Discover Android Devices

Post by cavellmc » Fri Jun 15, 2012 10:25 pm

Hello everyone,

Just downloaded the trial version to see what kind of automation I can accomplish on Android devices in order to save and repeat system and app settings.

However when first attempting to use this and discover devices, all I get are timeout messages. I've tried on a Galaxy tab running 3.x, and a rooted Infuse running 4.0.4. The Ranorex app is installed and running on the devices. I can validate their IP addresses both inside the app and on the DHCP server. The devices have internet connectivity. I've tried connecting my laptop wirelessly, and via ethernet cable. Per the help doc, I've increased all of the Mobile timeout values to 10 seconds. Still no dice.

Does anybody have any experience connecting to Android devices? Is there any way possible to connect via USB? My network is a simple one, no firewall between my laptop and the devices. They're on the same wireless network..

Thanks!

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cannot Discover Android Devices

Post by Support Team » Tue Jun 19, 2012 8:42 am

Hi,
cavellmc wrote:Does anybody have any experience connecting to Android devices? Is there any way possible to connect via USB? My network is a simple one, no firewall between my laptop and the devices. They're on the same wireless network..
Maybe you are running WEP or even no security on your wlan-router. Android devices somtimes mess up packets when using WEP. Please try to use WPA or any higher level protocol if you have choosen the WEP protocol on your router.

If this doesn't help you can also connect your device via USB http://www.ranorex.com/support/user-gui ... html#c4181

Regards,
Peter
Ranroex Team

ostap
Posts: 7
Joined: Fri Aug 31, 2012 12:37 pm

Re: Cannot Discover Android Devices

Post by ostap » Fri Aug 31, 2012 12:54 pm

Hello,

I also can not discover my device via Ranorex(trial), I have tried:
1. To connect to Emulator, I have installed Ranorex service on the android device - it shows IP: 10.0.2.15.
Device is not auto recognized, also tried manually using 10.0.2.15 IP(it seems like it is internal) and 127.0.0.1 (on Android device set redir add tcp:31001:31001 to enable redirection)

2. Tried to connect real Android device to USB and use 127.0.0.1 with ports 31001, 31000, 31002, but the same problem - device not found

3. Tried via WI-FI, the IP was similar: 10.0.xx.xx, it looks like device is in another subnet and Ranorex can not find it, found that need to set redirection but does not help: http://developer.android.com/tools/devi ... directions

Please help,
Ostap

ostap
Posts: 7
Joined: Fri Aug 31, 2012 12:37 pm

Re: Cannot Discover Android Devices

Post by ostap » Fri Aug 31, 2012 4:19 pm

I have discovered my device not via Emulator but using Device drop down item, but in my case it is actually Emulator.

But now when application is instrumented error occurs when I am starting to launch app, it says : "Cannot enable/disable event synchronization...", I am trying to perform Instrumentation manually but can not find Ranorex.jar
You have stated that:
You can find the Ranorex.jar file in your Ranorex installation directory:
<Ranorex install dir>\bin\RxEnv\Android\Ranorex.jar

http://www.ranorex.com/support/user-gui ... -code.html

I see only RanorexAutomation.jar, tried to link lib but it does not help.
com.ranorex.android.RanorexAndroidAutomation.Hook(this);
is marked as error because package/object is not present

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cannot Discover Android Devices

Post by Support Team » Mon Sep 03, 2012 9:29 am

Hello,

There were some bugs fixed in our new release, which can cause this error.
Please try to update Ranorex to the version 3.3.2 and try it again. If this will not help please send your APK to [email protected].

Regards,
Bernhard
Ranorex Support Team

topcatalpha
Posts: 47
Joined: Tue Sep 06, 2011 7:48 am

Re: Cannot Discover Android Devices

Post by topcatalpha » Tue May 14, 2013 1:08 pm

Downloaded latest version version 4.3 + installed service apk, but ranorex cannot connect to my phone with android 4.0.1 connected via usb.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cannot Discover Android Devices

Post by Support Team » Wed May 15, 2013 12:56 pm

Hello,

I have a few questions about your environment.
Could you please check if the device is listed using the command "adb devices" in the command line.
Just open the command line and switch to the "Ranorex Android Tools" directory (<Ranorex Installation Folder>\bin\RxEnv\Android\tools) and type "adb devices".

Please make sure that the correct driver for your Android device is installed.
Is the "usb debugging" enabled on your device?
Thank you!

Regards,
Bernhard

topcatalpha
Posts: 47
Joined: Tue Sep 06, 2011 7:48 am

Re: Cannot Discover Android Devices

Post by topcatalpha » Tue May 21, 2013 3:32 pm

adb devices gives a

List of devices attached
304D19...... device

Galaxy SII is now connected using USB,
but my galaxy SIII mini cannot connect. i check it again....

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cannot Discover Android Devices

Post by Support Team » Wed May 22, 2013 3:25 pm

Hello,
List of devices attached
304D19...... device
Is the galaxy SIII mini device listed if you call adb devices?
Is the Android version the same as on Galaxy SII?
You are using Ranorex 4.0.3, right?

Regards,
Bernhard

chandra
Posts: 1
Joined: Tue Jan 21, 2014 4:15 am

Re: Cannot Discover Android Devices

Post by chandra » Tue Jan 21, 2014 4:22 am

I was able to discover Android device Samsung Galaxy Tab 3 today. Initially when you connect the device on Windows 7 , it installs some drivers and the device is accessible from the listed drives. This alone is not sufficient. You need to right click computer > manage and list the android devices and update the drivers for those listed which is displayed in yellow with errors. Once this is done Ranorex was able to identify the listed devices. Also do not forget to install the correct Java version. I installed Java 6 Update 45 for my Windows 7 64 bit OS ( Home Premium ).

User avatar
BernhardS
Ranorex Guru
Ranorex Guru
Posts: 32
Joined: Tue Dec 17, 2013 6:35 pm

Re: Cannot Discover Android Devices

Post by BernhardS » Wed Jan 22, 2014 4:54 pm

Hello chandra,

Thank you for providing your solution.
I hope it will help some other users too.

Regards,
Bernhard