From 6d462cfa7036c74a099bd58c7512e2660d006430 Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Sun, 18 Feb 2024 18:25:46 +0100 Subject: [PATCH] Fix arguments for jar2dex --- .../main/java/com/googlecode/dex2jar/tools/Jar2Dex.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/Jar2Dex.java b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/Jar2Dex.java index 18c273bd..9a5af843 100644 --- a/dex-tools/src/main/java/com/googlecode/dex2jar/tools/Jar2Dex.java +++ b/dex-tools/src/main/java/com/googlecode/dex2jar/tools/Jar2Dex.java @@ -5,6 +5,7 @@ import java.nio.file.FileSystem; import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -28,7 +29,7 @@ public static void main(String... args) { private boolean verbose = false; @Opt(opt = "o", longOpt = "output", description = "output .dex file, default is $current_dir/[jar-name]-jar2dex" - + ".dex", argName = "out-dex-file") + + ".dex", argName = "out-dex-file") private Path output; @Override @@ -80,11 +81,11 @@ protected void doCommandLine() throws Exception { System.out.println("jar2dex " + realJar + " -> " + output); - List ps = Arrays.asList( + List ps = new ArrayList<>(Arrays.asList( "--dex", "--no-strict", "--output=" + output.toAbsolutePath(), "--min-sdk-version=" + minSdkVersion - ); + )); if (verbose) ps.add("--verbose"); if (debug) ps.add("--debug"); ps.add(realJar.toAbsolutePath().toString());