ClaudiuGeorgiu/Obfuscapk

unknown shorthand flag

70r63x opened this issue · 7 comments

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'.

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

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]
<APK_OR_BUNDLE_FILE>

Obfuscate an application (.apk/.aab) without needing its source code.`

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

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\).

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

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.

Thanks so much for the help

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

Greetings