| OLD | NEW |
| 1 #!/usr/bin/env python |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 4 """Tool to diff 2 dex files that have been proguarded. | 5 """Tool to diff 2 dex files that have been proguarded. |
| 5 | 6 |
| 6 To use this tool, first get dextra. http://newandroidbook.com/tools/dextra.html | 7 To use this tool, first get dextra. http://newandroidbook.com/tools/dextra.html |
| 7 Then use the dextra binary on a classes.dex file like so: | 8 Then use the dextra binary on a classes.dex file like so: |
| 8 dextra_binary -j -f -m classes.dex > output.dextra | 9 dextra_binary -j -f -m classes.dex > output.dextra |
| 9 Do this for both the dex files you want to compare. Then, take the appropriate | 10 Do this for both the dex files you want to compare. Then, take the appropriate |
| 10 proguard mapping files uesd to generate those dex files, and use this script: | 11 proguard mapping files uesd to generate those dex files, and use this script: |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 278 |
| 278 diffs = _DiffDexDicts(dex_base, dex_new) | 279 diffs = _DiffDexDicts(dex_base, dex_new) |
| 279 if diffs: | 280 if diffs: |
| 280 for diff in diffs: | 281 for diff in diffs: |
| 281 print diff | 282 print diff |
| 282 | 283 |
| 283 | 284 |
| 284 if __name__ == '__main__': | 285 if __name__ == '__main__': |
| 285 main() | 286 main() |
| 286 | 287 |
| OLD | NEW |