diff options
-rw-r--r-- | 0xbench/run.py | 3 | ||||
-rw-r--r-- | 3D_game/run.py | 3 | ||||
-rw-r--r-- | angrybird/run.py | 3 | ||||
-rw-r--r-- | audio/run.py | 3 | ||||
-rw-r--r-- | browser/run.py | 3 | ||||
-rw-r--r-- | calculator/run.py | 3 | ||||
-rw-r--r-- | calendar/run.py | 3 | ||||
-rw-r--r-- | camera/run.py | 3 | ||||
-rw-r--r-- | clock/run.py | 3 | ||||
-rw-r--r-- | gallery/run.py | 3 | ||||
-rw-r--r-- | localaudio/run.py | 3 | ||||
-rw-r--r-- | localhwvideo/run.py | 3 | ||||
-rw-r--r-- | localswvideo/run.py | 3 | ||||
-rw-r--r-- | navigation/run.py | 3 | ||||
-rw-r--r-- | phone/run.py | 3 | ||||
-rw-r--r-- | speech_recorder/run.py | 3 | ||||
-rw-r--r-- | swipe/run.py | 3 | ||||
-rw-r--r-- | switch_back_forth/run.py | 3 | ||||
-rw-r--r-- | video/run.py | 3 |
19 files changed, 57 insertions, 0 deletions
diff --git a/0xbench/run.py b/0xbench/run.py index e22ca9e..6492f82 100644 --- a/0xbench/run.py +++ b/0xbench/run.py @@ -36,6 +36,9 @@ def main(): else: print "connect to the device: " + dev_id + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + package = "org.zeroxlab.zeroxbenchmark" comp = package + "/" + "Benchmark" device.startActivity(component=comp) diff --git a/3D_game/run.py b/3D_game/run.py index 7674109..35645a4 100644 --- a/3D_game/run.py +++ b/3D_game/run.py @@ -40,6 +40,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + #install 3D Game apk print "install diversion.apk" device.installPackage("%s/diversion.apk" % file_path) diff --git a/angrybird/run.py b/angrybird/run.py index bd8657f..1d884a1 100644 --- a/angrybird/run.py +++ b/angrybird/run.py @@ -43,6 +43,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + #install the angrybird.apk print "install angrybird.apk" device.installPackage("%s/AngryBirds_1.3.2_rio.apk" % file_path) diff --git a/audio/run.py b/audio/run.py index ee27d63..99a7818 100644 --- a/audio/run.py +++ b/audio/run.py @@ -43,6 +43,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + uri = ('http://samplemedia.linaro.org/Audio/' 'big_buck_bunny_AAC_2Channel_44.1k_128K.AAC') device.startActivity(uri=uri, diff --git a/browser/run.py b/browser/run.py index b4e3aee..c965c78 100644 --- a/browser/run.py +++ b/browser/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name package = "com.android.browser" activity = ".BrowserActivity" diff --git a/calculator/run.py b/calculator/run.py index c31c3bd..d6029f4 100644 --- a/calculator/run.py +++ b/calculator/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name package = "com.android.calculator2" activity = ".Calculator" diff --git a/calendar/run.py b/calendar/run.py index 9361f02..d11c5aa 100644 --- a/calendar/run.py +++ b/calendar/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name package = "com.android.calendar" activity = ".AllInOneActivity" diff --git a/camera/run.py b/camera/run.py index b1c5e8a..94ae47e 100644 --- a/camera/run.py +++ b/camera/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name print "Open camera" package = "com.android.camera" diff --git a/clock/run.py b/clock/run.py index 4c3c69b..70504ca 100644 --- a/clock/run.py +++ b/clock/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name package = "com.android.deskclock" activity = ".DeskClock" diff --git a/gallery/run.py b/gallery/run.py index 131e6f9..b87802c 100644 --- a/gallery/run.py +++ b/gallery/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name package = "com.android.gallery3d" activity = ".app.Gallery" diff --git a/localaudio/run.py b/localaudio/run.py index 48cd19d..ef2278c 100644 --- a/localaudio/run.py +++ b/localaudio/run.py @@ -51,6 +51,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + uri = ('file:////data/local/tests/' 'big_buck_bunny_AAC_2Channel_44.1k_128K.AAC') component = 'com.android.music/.MediaPlaybackActivity' diff --git a/localhwvideo/run.py b/localhwvideo/run.py index dfbcfca..b71bb83 100644 --- a/localhwvideo/run.py +++ b/localhwvideo/run.py @@ -49,6 +49,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + uri = ('file:////data/local/tests/' 'big_buck_bunny_1080p_H264_AAC_25fps_7200K_short.MP4') device.startActivity(uri=uri, diff --git a/localswvideo/run.py b/localswvideo/run.py index ad2259b..1257673 100644 --- a/localswvideo/run.py +++ b/localswvideo/run.py @@ -48,6 +48,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + uri = ('file:///data/local/tests/' 'big_buck_bunny_480p_H264_AAC_25fps_1800K_short.MP4') device.startActivity(uri=uri, diff --git a/navigation/run.py b/navigation/run.py index 55c0766..5bf23fa 100644 --- a/navigation/run.py +++ b/navigation/run.py @@ -42,6 +42,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + #install the googlemap apk print "install the google apk" device.installPackage("%s/googlemap.apk" % file_path) diff --git a/phone/run.py b/phone/run.py index 743e3e8..bd3cf8e 100644 --- a/phone/run.py +++ b/phone/run.py @@ -86,6 +86,9 @@ def main(): print "Start" init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + for dev_id in sys.argv[1:]: device = MonkeyRunner.waitForConnection(timeout=timeout_val, deviceId=dev_id) diff --git a/speech_recorder/run.py b/speech_recorder/run.py index e96cfa0..83a9907 100644 --- a/speech_recorder/run.py +++ b/speech_recorder/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name package = "com.android.speechrecorder" activity = ".SpeechRecorderActivity" diff --git a/swipe/run.py b/swipe/run.py index 73a54cf..13b433e 100644 --- a/swipe/run.py +++ b/swipe/run.py @@ -45,6 +45,9 @@ def main(): #clean the enviroment init(device) + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + print "run %s..." % module_name device.press("KEYCODE_HOME", MonkeyDevice.DOWN_AND_UP) MonkeyRunner.sleep(2) diff --git a/switch_back_forth/run.py b/switch_back_forth/run.py index 68dc3be..9624018 100644 --- a/switch_back_forth/run.py +++ b/switch_back_forth/run.py @@ -51,6 +51,9 @@ def main(): #clean the enviroment init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + for i in range(10): print "start %i/500 times test" % (i + 1) diff --git a/video/run.py b/video/run.py index 06155d4..f5fcc1f 100644 --- a/video/run.py +++ b/video/run.py @@ -40,6 +40,9 @@ def main(): print "Start" init() + # Wake up the screen and unlock + device.shell("svc power stayon true;input keyevent 82") + for dev_id in sys.argv[1:]: device = MonkeyRunner.waitForConnection(timeout=timeout_val, deviceId=dev_id) |