|
|
Chromium Code Reviews|
Created:
7 years, 8 months ago by cjhopman Modified:
7 years, 8 months ago CC:
chromium-reviews Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
Description[Android] Include gdbserver in APKs
Debug APKs with native libraries should include gdbserver. Copy this
into the apk_package_native_libs_dir. Then, the apkbuilder task will
include this in the APK for debug builds (but not for release builds).
TEST=unzip -l ContentShell.apk should list gdbserver for debug builds
(but not for release)
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=196203
Patch Set 1 #
Total comments: 2
Patch Set 2 : Rebase #Messages
Total messages: 13 (0 generated)
https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi File build/java_apk.gypi (right): https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi#newcode169 build/java_apk.gypi:169: '<(android_gdbserver)', How does the apkbuilder task know to only include gdbserver in a debug build.?
On 2013/04/23 19:02:48, shashi wrote: > https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi > File build/java_apk.gypi (right): > > https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi#newcode169 > build/java_apk.gypi:169: '<(android_gdbserver)', > How does the apkbuilder task know to only include gdbserver in a debug build.? It's based on is.packaging.debug. See http://www.java2s.com/Open-Source/Android/android-core/platform-sdk/com/andro...
I see so ApkBuilder checks for filename and includes only *.so files, except for debug builds where it also allows an extra file : SdkConstants.FN GDBSERVER (i.e. the string "gdbserver") to be included. LGTM
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an LGTM may have been provided, it was from a non-committer or a lowly provisional committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
yfriedman for OWNERS
https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi File build/java_apk.gypi (right): https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi#newcode169 build/java_apk.gypi:169: '<(android_gdbserver)', On 2013/04/23 19:02:48, shashi wrote: > How does the apkbuilder task know to only include gdbserver in a debug build.? Same q. From your CLs I take it it's governed by the debugpackaging field that's specified in the ant file?
Oh, I missed response On Tue, Apr 23, 2013 at 1:27 PM, <yfriedman@chromium.org> wrote: > > https://codereview.chromium.**org/14200040/diff/1/build/**java_apk.gypi<https... > File build/java_apk.gypi (right): > > https://codereview.chromium.**org/14200040/diff/1/build/** > java_apk.gypi#newcode169<https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi#newcode169> > build/java_apk.gypi:169: '<(android_gdbserver)', > On 2013/04/23 19:02:48, shashi wrote: > >> How does the apkbuilder task know to only include gdbserver in a debug >> > build.? > > Same q. From your CLs I take it it's governed by the debugpackaging > field that's specified in the ant file? > > https://codereview.chromium.**org/14200040/<https://codereview.chromium.org/1... >
lgtm On Tue, Apr 23, 2013 at 1:28 PM, Yaron Friedman <yfriedman@chromium.org>wrote: > Oh, I missed response > > > On Tue, Apr 23, 2013 at 1:27 PM, <yfriedman@chromium.org> wrote: > >> >> https://codereview.chromium.**org/14200040/diff/1/build/**java_apk.gypi<https... >> File build/java_apk.gypi (right): >> >> https://codereview.chromium.**org/14200040/diff/1/build/** >> java_apk.gypi#newcode169<https://codereview.chromium.org/14200040/diff/1/build/java_apk.gypi#newcode169> >> build/java_apk.gypi:169: '<(android_gdbserver)', >> On 2013/04/23 19:02:48, shashi wrote: >> >>> How does the apkbuilder task know to only include gdbserver in a debug >>> >> build.? >> >> Same q. From your CLs I take it it's governed by the debugpackaging >> field that's specified in the ant file? >> >> https://codereview.chromium.**org/14200040/<https://codereview.chromium.org/1... >> > >
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/14200040/1
Failed to apply patch for build/java_apk.gypi:
While running patch -p1 --forward --force --no-backup-if-mismatch;
patching file build/java_apk.gypi
Hunk #1 FAILED at 107.
Hunk #2 succeeded at 144 (offset 1 line).
Hunk #3 FAILED at 218.
2 out of 3 hunks FAILED -- saving rejects to file build/java_apk.gypi.rej
Patch: build/java_apk.gypi
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index
5db4fa9baf9f21d35527a35842fd0a3b74f12dc7..8aaefd8aa36fe0c2d8a044fcb3302ab067738957
100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -107,9 +107,18 @@
'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk',
'source_dir': '<(java_in_dir)/src',
'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',
+ 'variables': {
+ 'conditions': [
+ ['gyp_managed_install == 1', {
+ 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed',
+ }, {
+ 'apk_package_native_libs_dir': '<(intermediate_dir)/libs',
+ }],
+ ],
+ },
+ 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
},
# 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
@@ -143,8 +152,24 @@
'variables': {
'compile_input_paths': [ '<(native_libraries_java_stamp)' ],
'generated_src_dirs': [ '<(native_libraries_java_dir)' ],
- 'native_libs_paths':
['<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)'],
+ 'native_libs_paths': [
+ '<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)'
+ ],
+ 'package_input_paths': [
+ '<(apk_package_native_libs_dir)/<(android_app_abi)/gdbserver',
+ ],
},
+ 'copies': [
+ {
+ # gdbserver is always copied into the APK's native libs dir. The ant
+ # build scripts (apkbuilder task) will only include it in a debug
+ # build.
+ 'destination': '<(apk_package_native_libs_dir)/<(android_app_abi)',
+ 'files': [
+ '<(android_gdbserver)',
+ ],
+ },
+ ],
'actions': [
{
'variables': {
@@ -202,7 +227,6 @@
['gyp_managed_install == 1', {
'variables': {
'libraries_source_dir':
'<(intermediate_dir)/lib.stripped/<(android_app_abi)',
- 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed',
'device_library_dir':
'/data/local/tmp/chromium/lib.stripped/<(_target_name)',
},
'dependencies': [
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/14200040/10002
Message was sent while issue was closed.
Change committed as 196203 |
