aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2017-08-09 16:41:20 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-08-10 13:42:09 +0200
commit2b3207b04b12d14ee8013eb32b600e07633c5e48 (patch)
tree0c16f886c22fa4b6a5aecd78607a5cdeac8c2461
parenta2fed4b4a17a86dc663031d4c89a0fc15c64a440 (diff)
Windows,Android: mobile-install fully works
One of the output files in the incremental apk (stub_application_data.txt) was using CRLF on Windows, so the mobile-install'ed app was crashing on startup. Fix is to open the output file in binary mode so line endings are not converted to the host-platform-native one. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: Id7d4b5aa4362a21e699517b97dd24858c396eaa7 PiperOrigin-RevId: 164722314
-rw-r--r--tools/android/stubify_manifest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/android/stubify_manifest.py b/tools/android/stubify_manifest.py
index 874e041cdf..7e48d84c42 100644
--- a/tools/android/stubify_manifest.py
+++ b/tools/android/stubify_manifest.py
@@ -1,3 +1,4 @@
+# pylint: disable=g-direct-third-party-import
# Copyright 2015 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -147,7 +148,7 @@ def main():
with file(FLAGS.output_manifest, "w") as output_xml:
output_xml.write(new_manifest)
- with file(FLAGS.output_datafile, "w") as output_file:
+ with file(FLAGS.output_datafile, "wb") as output_file:
output_file.write("\n".join([old_application, app_package]))
elif FLAGS.mode == "instant_run":