Commit d2fb312d authored by james.wei@intel.com's avatar james.wei@intel.com

init AndroidCommand after the device online to root it

AndroidCommand object will root the device when it is created. 
If this happened before the device is online, error will appear.

BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10695170

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146306 0039d316-1c4b-4281-b951-d872f2087c98
parent c7e948b4
...@@ -196,7 +196,6 @@ class Emulator(object): ...@@ -196,7 +196,6 @@ class Emulator(object):
After confirming a wait-for-device can be successful, make sure After confirming a wait-for-device can be successful, make sure
it returns the right answer. it returns the right answer.
""" """
a = android_commands.AndroidCommands(self.device)
seconds_waited = 0 seconds_waited = 0
number_of_waits = 2 # Make sure we can wfd twice number_of_waits = 2 # Make sure we can wfd twice
adb_cmd = "adb -s %s %s" % (self.device, 'wait-for-device') adb_cmd = "adb -s %s %s" % (self.device, 'wait-for-device')
...@@ -221,7 +220,7 @@ class Emulator(object): ...@@ -221,7 +220,7 @@ class Emulator(object):
if wait_for_boot: if wait_for_boot:
# Now that we checked for obvious problems, wait for a boot complete. # Now that we checked for obvious problems, wait for a boot complete.
# Waiting for the package manager is sometimes problematic. # Waiting for the package manager is sometimes problematic.
a.Adb().SetTargetSerial(self.device) a = android_commands.AndroidCommands(self.device)
a.Adb().WaitForSystemBootCompleted(self._WAITFORBOOT_TIMEOUT) a.Adb().WaitForSystemBootCompleted(self._WAITFORBOOT_TIMEOUT)
def Shutdown(self): def Shutdown(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment