Obfuscation always returning non-zero exit status 255.
See original GitHub issueHi.
I’m trying to obfuscate an. apk that is signed and process always returns non-zero exit status 255.
I suspect that I’m doing it the wrong way.
sudo docker run --rm -it -u $(id -u):$(id -g) -v "${PWD}":"/workdir" obfuscapk -o RandomManifest -o Rebuild -o NewAlignment -o NewSignature original.apk -p --keystore-file XXXX.key --keystore-password PASS --key-alias PASS --key-password PASS
The result is always this:
Traceback (most recent call last): File "/Obfuscapk/obfuscapk/main.py", line 153, in perform_obfuscation (obfuscator_name_to_function[obfuscator_name])(obfuscation) File "/Obfuscapk/obfuscapk/obfuscators/new_alignment/new_alignment.py", line 20, in obfuscate obfuscation_info.align_obfuscated_apk() File "/Obfuscapk/obfuscapk/obfuscation.py", line 620, in align_obfuscated_apk zipalign.align(self.obfuscated_apk_path) File "/Obfuscapk/obfuscapk/tool.py", line 247, in align output = subprocess.check_output( File "/usr/local/lib/python3.10/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/local/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/android-sdk-linux/build-tools/32.0.0/zipalign', '-p', '-v', '-f', '4', 'obfuscation_working_dir/original_obfuscated.copy.apk', 'obfuscation_working_dir/original_obfuscated.apk']' returned non-zero exit status 255. Traceback (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Obfuscapk/obfuscapk/cli.py", line 189, in <module> main() File "/Obfuscapk/obfuscapk/cli.py", line 171, in main perform_obfuscation( File "/Obfuscapk/obfuscapk/main.py", line 153, in perform_obfuscation (obfuscator_name_to_function[obfuscator_name])(obfuscation) File "/Obfuscapk/obfuscapk/obfuscators/new_alignment/new_alignment.py", line 20, in obfuscate obfuscation_info.align_obfuscated_apk() File "/Obfuscapk/obfuscapk/obfuscation.py", line 620, in align_obfuscated_apk zipalign.align(self.obfuscated_apk_path) File "/Obfuscapk/obfuscapk/tool.py", line 247, in align output = subprocess.check_output( File "/usr/local/lib/python3.10/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/local/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/android-sdk-linux/build-tools/32.0.0/zipalign', '-p', '-v', '-f', '4', 'obfuscation_working_dir/original_obfuscated.copy.apk', 'obfuscation_working_dir/original_obfuscated.apk']' returned non-zero exit status 255.
What I’m doing wrong?
Thanks in advance Jose
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
LOL…makes sense
thanks for the quick response
You are using some obfuscators after rebuilding the app, see FAQ. Put
-o Rebuild -o NewAlignment -o NewSignature
after all the other obfuscators.