提交 0991da0d 编写于 作者: C Collin Jackson

Sky shelldb should restart app when using --no_install and forward observatory port

R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1156993004
上级 279cd624
...@@ -20,6 +20,7 @@ SKY_ROOT = os.path.dirname(SKY_TOOLS_DIR) ...@@ -20,6 +20,7 @@ SKY_ROOT = os.path.dirname(SKY_TOOLS_DIR)
SRC_ROOT = os.path.dirname(SKY_ROOT) SRC_ROOT = os.path.dirname(SKY_ROOT)
SKY_SERVER_PORT = 9888 SKY_SERVER_PORT = 9888
OBSERVATORY_PORT = 8181
DEFAULT_URL = "sky://domokit.github.io/sky_home" DEFAULT_URL = "sky://domokit.github.io/sky_home"
APK_NAME = 'SkyDemo.apk' APK_NAME = 'SkyDemo.apk'
ADB_PATH = os.path.join(SRC_ROOT, ADB_PATH = os.path.join(SRC_ROOT,
...@@ -194,6 +195,16 @@ class StartSky(object): ...@@ -194,6 +195,16 @@ class StartSky(object):
if args.install: if args.install:
# -r to replace an existing apk, -d to allow version downgrade. # -r to replace an existing apk, -d to allow version downgrade.
subprocess.check_call([ADB_PATH, 'install', '-r', '-d', apk_path]) 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 port_string = 'tcp:%s' % sky_server.port
subprocess.check_call([ subprocess.check_call([
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册