commonuserlol / fgi

Another frida-gadget injector into APK
GNU General Public License v3.0
13 stars 2 forks source link

Problem with signing process on windows 10 #3

Closed NicolasVautrin closed 1 month ago

NicolasVautrin commented 1 month ago

C:\VirtualBox_SharedFiles>fgi -i Rivengard.apk --config-type listen 1s - I: Downloading frida-gadget... 1s - I: Downloading arm frida-gadget... 7s - I: Downloading arm64 frida-gadget... 15s - I: Downloading x86 frida-gadget... 25s - I: Downloading x86_64 frida-gadget... 33s - I: Downloading APKEditor... 40s - I: Decoding APK to C:\Users\nicolasv\AppData\Local\Temp\HofIJkLKQsnh... 90s - I: Looking for UnityPlayerActivity.smali... 90s - I: Found at C:\Users\nicolasv\AppData\Local\Temp\HofIJkLKQsnh\smali\classes2\com\unity3d\player\UnityPlayerActivity.smali 90s - I: Injecting loadLibrary("frida") 90s - I: Copying arm frida-gadget 90s - I: Copying arm64 frida-gadget 90s - I: Copying x86 frida-gadget 90s - I: Copying x86_64 frida-gadget 91s - I: Building APK... 131s - I: Zipaligning APK... 135s - E: Unexpected exception: 'utf-8' codec can't decode byte 0xe9 in position 1: invalid continuation byte 135s - E: Traceback (most recent call last): File "C:\Users\nicolasv\AppData\Local\Programs\Python\Python312\Lib\site-packages\fgi\main.py", line 83, in main app.run() File "C:\Users\nicolasv\AppData\Local\Programs\Python\Python312\Lib\site-packages\fgi\main.py", line 72, in run apk.generate_debug_key(cache.get_key_path()) File "C:\Users\nicolasv\AppData\Local\Programs\Python\Python312\Lib\site-packages\fgi\apk.py", line 116, in generate_debug_key self._run_command_and_check( File "C:\Users\nicolasv\AppData\Local\Programs\Python\Python312\Lib\site-packages\fgi\apk.py", line 24, in _run_command_and_check return subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf8") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1: invalid continuation byte

No problem with uber-apk-signer-1.3.0.jar

commonuserlol commented 1 month ago

That's probably caused by keytool, can you run keytool -genkey -v -keystore key -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug" and send output here?

NicolasVautrin commented 1 month ago

C:\Perso\platform-tools>keytool -genkey -v -keystore key -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug" Génération d'une paire de clés RSA de 2 048 bits et d'un certificat auto-signé (SHA256withRSA) d'une validité de 10 000 jours pour : C=US, O=Android, CN=Android Debug [Stockage de key]

commonuserlol commented 1 month ago

Should be fixed in https://github.com/commonuserlol/fgi/commit/f0951b69e1b1b6d9d8d8d65d64b465a02e9e43f5

Reinstall (pip uninstall fgi and run command from readme again) and let me know about result

commonuserlol commented 1 month ago

I guess "👍" means "it works now"? If yes, I'm closing this