New issue
Advanced search Search tips

Issue 713710 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 620323



Sign in to add a comment

Proguard: Release test bots need to deobfuscate java stack traces

Project Member Reported by agrieve@chromium.org, Apr 20 2017

Issue description

Not a huge issue atm, but this should be done before we enable full obfuscation of org.chromium.*.

There's already a script to do it, as described here:
https://chromium.googlesource.com/chromium/src/+/master/docs/android_debugging_instructions.md#Deobfuscating-Stack-Traces-Java

As for the recipes side, I think it would make most sense to bundle this with the stack tool (run the same logcat through both "stack" and java_deobfuscate.py
https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium_android/api.py?q=stack_tool_steps&l=1281
 
Labels: -binary-size Performance-Size
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a2065e70c18fc516374f011048cca308cf8ffa9

commit 3a2065e70c18fc516374f011048cca308cf8ffa9
Author: agrieve <agrieve@chromium.org>
Date: Fri Jun 23 03:14:36 2017

java_deobfuscate.py: Update regexp to match thread dump stacks

And simplify by having it use os.execv().

The lines in question look like:
06-22 13:58:02.895  4674  4674 E THREAD_STATE:     bLA.a(PG:173)

BUG= 713710 

Review-Url: https://codereview.chromium.org/2952283002
Cr-Commit-Position: refs/heads/master@{#481801}

[modify] https://crrev.com/3a2065e70c18fc516374f011048cca308cf8ffa9/build/android/stacktrace/java_deobfuscate.py

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 5 2017

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f1d7a79c6b4596f664b259dbebb294a1b65a30e

commit 3f1d7a79c6b4596f664b259dbebb294a1b65a30e
Author: Andrew Grieve <agrieve@chromium.org>
Date: Tue Sep 05 19:47:42 2017

Deobfuscate instrumentation test output

Adds a new GN arg "enable_proguard_obfuscation_for_tests", which enables
obfuscation for chrome instrumentation tests even when
enable_proguard_obfuscation = false.

Updates test_runner.py to filter instrumentation output through
java_deobfuscate (but not yet logcat).

Updates java_deobfuscate's regex to match:
  INSTRUMENTATION_STATUS: class=bNs

Bug:  713710 
Change-Id: I569dd62f051a041be2ec16664c5f714cb9857453
Reviewed-on: https://chromium-review.googlesource.com/614988
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499714}
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/gyp/proguard.py
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/gyp/util/proguard_util.py
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/pylib/instrumentation/instrumentation_test_instance.py
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/pylib/local/device/local_device_instrumentation_test_run.py
[add] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/pylib/symbols/deobfuscator.py
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/stacktrace/README.md
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/stacktrace/java/org/chromium/build/FlushingReTrace.java
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/test_runner.py
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/android/test_runner.pydeps
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/config/android/internal_rules.gni
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/build/config/android/rules.gni
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/chrome/android/BUILD.gn
[modify] https://crrev.com/3f1d7a79c6b4596f664b259dbebb294a1b65a30e/chrome/android/chrome_public_apk_tmpl.gni

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/90ef3855eec0a4ed5252a308b9c08cd3efef1014

commit 90ef3855eec0a4ed5252a308b9c08cd3efef1014
Author: Andrew Grieve <agrieve@chromium.org>
Date: Wed Sep 13 03:12:32 2017

Android: Update java_deobfuscate to match more lines

Also adds a test, and a --logcat flag for better matching of logcat
lines.

Bug:  713710 
Change-Id: Ie21030b3c4e68d02cfb2e0d65d2c4c4f00624a80
Reviewed-on: https://chromium-review.googlesource.com/657265
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501535}
[modify] https://crrev.com/90ef3855eec0a4ed5252a308b9c08cd3efef1014/build/android/pylib/symbols/deobfuscator.py
[modify] https://crrev.com/90ef3855eec0a4ed5252a308b9c08cd3efef1014/build/android/stacktrace/java/org/chromium/build/FlushingReTrace.java
[add] https://crrev.com/90ef3855eec0a4ed5252a308b9c08cd3efef1014/build/android/stacktrace/java_deobfuscate_test.py

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e43e5781d5f59ed7b011f3dc46c268b23094908

commit 1e43e5781d5f59ed7b011f3dc46c268b23094908
Author: Andrew Grieve <agrieve@chromium.org>
Date: Thu Sep 14 17:03:33 2017

Android: Apply deobfuscation to instrumentation test logcats

Measured runtime of chrome_public_test_apk with -f "*TabModel*" with and
without deobfuscation enabled and found no difference in runtime (3
attached devices took 1:12 for both runs without and for both runs with)

NOTRY=true  # All bots passed except windows.

Bug:  713710 
Change-Id: I5847bcdc913bb37cfdf9a37ac6f4bf24d172b4da
Reviewed-on: https://chromium-review.googlesource.com/656003
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501971}
[modify] https://crrev.com/1e43e5781d5f59ed7b011f3dc46c268b23094908/build/android/pylib/android/logdog_logcat_monitor.py
[modify] https://crrev.com/1e43e5781d5f59ed7b011f3dc46c268b23094908/build/android/pylib/local/device/local_device_instrumentation_test_run.py
[modify] https://crrev.com/1e43e5781d5f59ed7b011f3dc46c268b23094908/build/android/pylib/symbols/deobfuscator.py

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a693e9ab779b530435a8574c35dfb75af209e94

commit 5a693e9ab779b530435a8574c35dfb75af209e94
Author: Andrew Grieve <agrieve@chromium.org>
Date: Mon Sep 18 19:39:52 2017

Enable ProGuard obfuscation in chrome_public_test_apk

I plan to enable obfuscation in chrome_public_apk in the future as well,
but want to have it enabled for tests for a while first to ensure
nothing breaks and to have some time to build confidence in our ability
to deobfuscate stack traces.

Bug:  713710 
Change-Id: I7b92ac0e9bf8fb5fa3ea5357a3ee776ab2b88b36
Reviewed-on: https://chromium-review.googlesource.com/665417
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502644}
[modify] https://crrev.com/5a693e9ab779b530435a8574c35dfb75af209e94/chrome/android/BUILD.gn
[modify] https://crrev.com/5a693e9ab779b530435a8574c35dfb75af209e94/chrome/android/chrome_public_apk_tmpl.gni
[modify] https://crrev.com/5a693e9ab779b530435a8574c35dfb75af209e94/testing/android/proguard_for_test.flags

Status: Fixed (was: Assigned)

Sign in to add a comment