dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.62k stars 347 forks source link

Unable to detect devices less than Lollipop #129

Open Ebirux opened 9 years ago

Ebirux commented 9 years ago

Hello,

In the viewclient.py line 1456 if s != 'unknown': serialno = s

There is a bug when using a virtual device that does not have a serial number and the android version is less than Lollipop. When it hits that line, it sets the serialno to "* daemon not running. starting it now on port xxx *"

I added if "daemon not running." in serialno:

FIXME !!!!!

                # this must be calculated from somewhere, though using a fixed serialno for now
                warnings.warn("Running on emulator but no serial number was specified then 'emulator-5554' is used")
                serialno = 'emulator-5554'

right after line 1457 and that resolved the issue.