Skip to content

Wrong diff for obfuscated artifacts #96

@mateuszkwiecinski

Description

@mateuszkwiecinski

When running:

diffuse diff old_obfuscated.apk new_obfuscated.apk

the diff shows output with invalid +- stats

 DEX     │ old   │ new   │ diff               
─────────┼───────┼───────┼────────────────────
   files │     1 │     1 │  0                 
 strings │ 15365 │ 15368 │ +3 (+2449 -2446)   
   types │  3315 │  3317 │ +2 (+2250 -2248)   
 classes │  2564 │  2566 │ +2 (+2182 -2180)   
 methods │ 16360 │ 16364 │ +4 (+9971 -9967)   
  fields │ 15108 │ 15108 │  0 (+13635 -13635) 

and prints all strings, types, classes, methods and fields within the app twice (once visible as added and once as removed), resulting in large, unreadable text outputs.

collapsed expanded
image image

running diffuse diff --help reveals additonal parameters --old-mapping and --new-mapping, but they don't change the output.
Looking at the source code, the DexDiff doesn't take mapping parameters into account. And actually none of existing Diff types leverage the ApiMapping class.

Expected behavior:
diffuse diff old_obfuscated.apk new_obfuscated.apk --old-mapping old_mapping.txt --new-mapping new_mapping.txt shows actuall diff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions