CodingGay / BlackObfuscator

Black Obfuscator is an obfuscator for Android APK DexFile, it can help developer to protect source code by control flow flattening, and make it difficult to analyze the actual program control flow.
Apache License 2.0
888 stars 208 forks source link

Keeps printing usage #10

Closed ghost closed 2 years ago

ghost commented 2 years ago

No matter what i do, it keeps printing usage. What i'm doing wrong?

i'm using Windows 10

./black-obfuscator -d 2 -i classes.dex -o classesout.dex

nnjun commented 2 years ago

./black-obfuscator d2j-black-obfuscator -d 2 -i classes.dex -o classesout.dex

ghost commented 2 years ago

it says No classes found

nnjun commented 2 years ago

see readme

ghost commented 2 years ago

Ok, apparently i need to provide class, it does allow to obfuscate all. Now i got another error

java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
        at org.jf.dexlib2.writer.DexWriter.writeAnnotationDirectories(DexWriter.java:698)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:267)
        at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246)
        at org.jf.DexLib2Utils.saveDexFileDexLib2(DexLib2Utils.java:116)
        at org.jf.DexLib2Utils.splitDex(DexLib2Utils.java:79)
        at com.googlecode.dex2jar.tools.BlackObfuscatorCmd.doCommandLine(BlackObfuscatorCmd.java:103)
        at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:290)
        at com.googlecode.dex2jar.tools.BlackObfuscatorCmd.main(BlackObfuscatorCmd.java:38)
nnjun commented 2 years ago

You can try downloading the source code and using idea

developer-krushna commented 10 months ago

it says No classes found

Hey , how you fixed it can you help?