Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building APK fails #4

Open
erichegit opened this issue May 10, 2017 · 4 comments
Open

Building APK fails #4

erichegit opened this issue May 10, 2017 · 4 comments

Comments

@erichegit
Copy link

What might the problem be if rebuilding of the .apk fails ??

Patching keys ...
Patching URLs ...
Verifying keys ...
Verifying URLs ...
Backing up original APK ...
Rewriting android manifest /home/pi/python_games/cor_proxy/cr-patcher/com.supercell.clashroyale-1.8.1/AndroidManifest.xml
Building APK ...
ERROR: Failed to build com.supercell.clashroyale-1.8.1 (W: /tmp/brut_util_Jar_1820504874564873883.tmp: 1: /tmp/brut_util_Jar_1820504874564873883.tmp: Syntax error: word unexpected (expecting ")")

and my 2nd question.
Why at all is patching the APK neccessary?
If I modify the Hosts and redirect game.clashroyale to my proxy IP - isn`t this enougth?
So is patching only to change the URL - or is it manditory to get the proxy working?

@erichegit
Copy link
Author

Now I was setting up the stuff from scratch on a Debian 8.

No chance to get the patcher run :(
Please can you tell me on which OS you had success with this solution,...

...
Verifying URLs ...
Backing up original APK ...
Rewriting android manifest /home/xxx/Downloads/cr-patcher/com.supercell.clashroyale-1.8.1/AndroidManifest.xml
Building APK ...
Signing APK ...
/usr/bin/jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore /home/xxx/Downloads/cr-patcher/client.keystore -storepass teststorepass -keypass testkeypass /home/xxx/Downloads/cr-patcher/com.supercell.clashroyale-1.8.1/build/com.supercell.clashroyale-1.8.1-unsigned.apk testalias
Aligning APK ...
Traceback (most recent call last):
File "patcher.py", line 515, in
result = subprocess.run([config['paths']['zipalign'], '4', UNALIGNED_PATH, PATCHED_PATH], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
File "/usr/local/lib/python3.5/subprocess.py", line 696, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.5/subprocess.py", line 950, in init
restore_signals, start_new_session)
File "/usr/local/lib/python3.5/subprocess.py", line 1540, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error

@erichegit
Copy link
Author

can be closed.
Its damn complicated to get all the dependencies running,...
zipalign was not working on my Debian 8 32bit from the "command line tools",...

But a happy end ;)

Just still dont know why patching is neccessary,... Isnt it possible to implement the decryption into the proxy, even if the apk is not patched?

@aperpen
Copy link

aperpen commented May 18, 2017

@erichegit Patching is necessary to make the apk connecting to supercell's servers through the proxy

@ghost
Copy link

ghost commented May 22, 2017

Because nobody knows Supercell's private key ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants