It only compares files in the main smali dir. Many applications are multi-dex which means they also have multiple smali directories
The tool only compares files that exist both in apk1 and apk2
So I made a few modifications:
Removed shell=True as that breaks the tool on most OS's
Added a -u optional argument that will list unique files
Removed the unzipping of classes.dex, as that isn't necessary. It's also not complete (since there can be classesX.dex) and classes.dex isn't used anywhere
Skipped decoding of resources by apktool. This is something that can give errors when analysing malware, and since the tool is only focused on code, we don't need it
Added code to merge all smali folders into one smali folder
Some python updates (using os.path.join rather than concatenation, getting a system temp dir instead of hardcoding, ...)
There are a few issues with the current version:
So I made a few modifications: