summaryrefslogtreecommitdiffstats
path: root/build/android/gyp/apk_install.py
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 09:16:13 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 09:16:13 +0000
commitd148b0151854cd0db25b813c28a09db6c355a943 (patch)
tree69405bd9ad842115a6c755922e555f6f42e9d193 /build/android/gyp/apk_install.py
parent7e198dc8b77d9500d3b49a861dd0ef7291626bdf (diff)
downloadchromium_src-d148b0151854cd0db25b813c28a09db6c355a943.zip
chromium_src-d148b0151854cd0db25b813c28a09db6c355a943.tar.gz
chromium_src-d148b0151854cd0db25b813c28a09db6c355a943.tar.bz2
[Android] Use a script on the device for creating library symlinks
On new versions of Android, re-installing an APK creates a new /lib/ folder for native libraries. This means we need to recreate all the symlinks in that directory (not just the ones that have changed). To make all these links quickly, it should run as a single adb command. To make that simple, we first create a simple script that, when run, creates all the symlinks for an APK. Then, after any install, we send a single adb command to run that script. This also requires that the apk_install script only triggers its dependents when it actually installs an apk. BUG=158821 Review URL: https://chromiumcodereview.appspot.com/14017010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/gyp/apk_install.py')
-rwxr-xr-xbuild/android/gyp/apk_install.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py
index 8f1e69b..8cd1a60 100755
--- a/build/android/gyp/apk_install.py
+++ b/build/android/gyp/apk_install.py
@@ -27,6 +27,8 @@ def main(argv):
help='Path to Android SDK tools.')
parser.add_option('--apk-path',
help='Path to .apk to install.')
+ parser.add_option('--install-record',
+ help='Path to install record (touched only when APK is installed).')
parser.add_option('--stamp',
help='Path to touch on success.')
options, _ = parser.parse_args()
@@ -37,10 +39,14 @@ def main(argv):
'install', '-r',
options.apk_path]
+ def Install():
+ build_utils.CheckCallDie(install_cmd)
+ build_utils.Touch(options.install_record)
+
serial_number = android_commands.AndroidCommands().Adb().GetSerialNumber()
record_path = '%s.%s.md5.stamp' % (options.apk_path, serial_number)
md5_check.CallAndRecordIfStale(
- lambda: build_utils.CheckCallDie(install_cmd),
+ Install,
record_path=record_path,
input_paths=[options.apk_path],
input_strings=install_cmd)