diff options
author | cjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 09:16:13 +0000 |
---|---|---|
committer | cjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 09:16:13 +0000 |
commit | d148b0151854cd0db25b813c28a09db6c355a943 (patch) | |
tree | 69405bd9ad842115a6c755922e555f6f42e9d193 /build/java_apk.gypi | |
parent | 7e198dc8b77d9500d3b49a861dd0ef7291626bdf (diff) | |
download | chromium_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/java_apk.gypi')
-rw-r--r-- | build/java_apk.gypi | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/build/java_apk.gypi b/build/java_apk.gypi index ecf5474..5fbdd48 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -106,8 +106,10 @@ 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', 'source_dir': '<(java_in_dir)/src', - 'apk_install_stamp': '<(intermediate_dir)/apk_install.stamp', + 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', + 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', + 'symlink_script_device_path': '/data/local/tmp/chromium/<(_target_name)/create_symlinks.sh', }, # Pass the jar path to the apk's "fake" jar target. This would be better as # direct_dependent_settings, but a variable set by a direct_dependent_settings @@ -210,22 +212,24 @@ 'includes': ['../build/android/push_libraries.gypi'], }, { - 'action_name': 'create_library_links', + 'action_name': 'create device library symlinks', 'message': 'Creating links on device for <(_target_name).', 'inputs': [ + '<(DEPTH)/build/android/gyp/util/build_utils.py', '<(DEPTH)/build/android/gyp/create_device_library_links.py', - '<(apk_install_stamp)', - '<(push_stamp)' + '<(apk_install_record)', + '<(ordered_libraries_file)', ], 'outputs': [ '<(link_stamp)' ], 'action': [ 'python', '<(DEPTH)/build/android/gyp/create_device_library_links.py', - '--apk=<(final_apk_path)', '--libraries-json=<(ordered_libraries_file)', - '--libraries-dir=<(libraries_source_dir)', + '--script-host-path=<(symlink_script_host_path)', + '--script-device-path=<(symlink_script_device_path)', '--target-dir=<(device_library_dir)', + '--apk=<(final_apk_path)', '--stamp=<(link_stamp)', ], }, @@ -273,18 +277,18 @@ '<(final_apk_path)', ], 'outputs': [ - '<(apk_install_stamp)', + '<(apk_install_record)', # If a user switches the connected device, the APK may need to be # installed even if there have been no changes. To ensure that the # APK on the device is always up-to-date, this step should always # be triggered. - '<(apk_install_stamp).fake', + '<(apk_install_record).fake', ], 'action': [ 'python', '<(DEPTH)/build/android/gyp/apk_install.py', '--android-sdk-tools=<(android_sdk_tools)', '--apk-path=<(final_apk_path)', - '--stamp=<(apk_install_stamp)' + '--install-record=<(apk_install_record)' ], }, ], |