ClaudiuGeorgiu / Obfuscapk

An automatic obfuscation tool for Android apps that works in a black-box fashion, supports advanced obfuscation features and has a modular architecture easily extensible with new techniques
MIT License
1.09k stars 285 forks source link

unknown shorthand flag #153

Closed 70r63x closed 1 year ago

70r63x commented 1 year ago

Hi,

Im trying to obfuscate my app but the docker say that not recognize a flag Can you help me with this?

Thanks

I use this command docker run --rm -it -u $(id -u):$(id -g) -v "${PWD}":"/workdir" obfuscapk -o AdvancedReflection -o ArithmeticBranch -o AssetEncryption -o CallIndirection -o MethodOverload -o RandomManifest -o Rebuild app-release.apk -p This is the response unknown shorthand flag: 'g' in -g) See 'docker run --help'.

ClaudiuGeorgiu commented 1 year ago

Hi, what operating system are you using? Does it work if you remove -u $(id -u):$(id -g) from the command?

70r63x commented 1 year ago

Hi, im using Windows 10

docker --version Docker version 20.10.22, build 3a2c30b

`docker run --rm -it obfuscapk --help usage: python3 -m obfuscapk.cli [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK_OR_AAB] [-i] [-p] [--use-aapt2] [-k VT_API_KEY] [--keystore-file KEYSTORE_FILE] [--keystore-password KEYSTORE_PASSWORD] [--key-alias KEY_ALIAS] [--key-password KEY_PASSWORD] [--ignore-packages-file IGNORE_PACKAGES_FILE]

Obfuscate an application (.apk/.aab) without needing its source code.`
70r63x commented 1 year ago

If I remove this flag, I have a new error

The command docker run --rm -it -v "${PWD}":"/workdir" obfuscapk -o AdvancedReflection -o ArithmeticBranch -o AssetEncryption -o CallIndirection -o MethodOverload -o RandomManifest -o Rebuild app-release.apk -p

the error docker: Error response from daemon: create ${PWD}: "${PWD}" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

Thanks

ClaudiuGeorgiu commented 1 year ago

See this for Windows: https://stackoverflow.com/a/41489151/5268548. You can also try using the absolute path instead of ${PWD} (e.g., C:\path\to\apk\directory\).

70r63x commented 1 year ago

Thnaks for the info

I changed the OS to Mac and work very find for me.

but a have some problems when I try to obfuscate my app again, the process is running but is stay cold in the first part and don´t do anymore.

I try to execute the command again but ocurse the same and dont avanced more WhatsApp Image 2023-02-13 at 9 47 02 AM

Thanks

ClaudiuGeorgiu commented 1 year ago

The current image on DockerHub does not support M1 chips, I'll have to add it and also add the right command to use when using Docker on Windows.

70r63x commented 1 year ago

Thanks so much for the help

I will wait for the update to Mac chip M1 and windows command

Greetings