Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1110)

Unified Diff: sky/tools/shelldb

Issue 1156993004: Sky shelldb should restart app when using --no_install and forward observatory port (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/shelldb
diff --git a/sky/tools/shelldb b/sky/tools/shelldb
index 31f1f57c8d161bbd16b3076837cb06fb77a488b9..32ddc2cbb699a7370243834e1af80236ffac3e54 100755
--- a/sky/tools/shelldb
+++ b/sky/tools/shelldb
@@ -20,6 +20,7 @@ SKY_ROOT = os.path.dirname(SKY_TOOLS_DIR)
SRC_ROOT = os.path.dirname(SKY_ROOT)
SKY_SERVER_PORT = 9888
+OBSERVATORY_PORT = 8181
DEFAULT_URL = "sky://domokit.github.io/sky_home"
APK_NAME = 'SkyDemo.apk'
ADB_PATH = os.path.join(SRC_ROOT,
@@ -194,6 +195,16 @@ class StartSky(object):
if args.install:
# -r to replace an existing apk, -d to allow version downgrade.
subprocess.check_call([ADB_PATH, 'install', '-r', '-d', apk_path])
+ else:
+ subprocess.check_call([
+ ADB_PATH, 'shell', 'am', 'force-stop', ANDROID_PACKAGE
+ ])
+
+ # Set up port forwarding for observatory
+ port_string = 'tcp:%s' % OBSERVATORY_PORT
+ subprocess.check_call([
+ ADB_PATH, 'forward', port_string, port_string
+ ])
port_string = 'tcp:%s' % sky_server.port
subprocess.check_call([
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698