Skip to content

Commit

Permalink
Bandaid fix for Dex2jar
Browse files Browse the repository at this point in the history
The real fix is resolving the error that Dex2Jar spits out every APK decompilation, but until that happens this bandaid should work
  • Loading branch information
Konloch committed Jun 21, 2021
1 parent 6d615cd commit 26e3b23
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ public static synchronized void dex2Jar(File input, File output) {
File realOutputF2 = new File(realOutput);
while (realOutputF2.exists())
realOutputF2.delete();

//TODO fix this properly
// WARNING: this could probably delete important error files but until a proper dex2jar fix is added this is needed
// or else after each APK decompile the file directory will be flooded with -error.zip
for(File localFile : new File(".").listFiles())
{
if(localFile.getName().length() == 42 && localFile.getName().endsWith("-error.zip"))
localFile.delete();
}
} catch (Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
}
Expand Down

0 comments on commit 26e3b23

Please sign in to comment.