install_failed_invalid_apk

Matt_code_guy

New User
15
04/26/17
1
Thread Author
Hey everyone,
This site is the best. This my first big issue so hoping to find someone who can help.

My end goal: mod an apk.

I take the apk, unzip it, extract csharp_assembly.dll and open it with either ILSPY or .NetReflector8.5.
The AiO reflexil plugins are installed and seemingly working.

When i make my changes, and save csharp_assembly.dll, that DLL is bad.

If I take that dll and include it inside of any apk/sign/install i get the following error: install_failed_invalid_apk

My buddy is working with me, and can go through the complete process of modifying/signing/installing/running/testing.

We took the same csharp_assembly.dll file and modified it with the same changes. He then took the output csharp_assembly.dll files from his computer and mine. He can install his, he cannot install mine either.

I have tried ILSPY and reflexil. Something seems off with my reflexil. Any ideas?
 
Correct me if I'm wrong but apktool is just for signing?

I am using jarsigner directly, whereas he uses a script to sign his. However... when he tries to take my generated csharp-assembly.dll and reconstruct/sign the apk it also gives him the error install_failed_invalid_apk when he tries to install it.
 
Apktool is just for signing (assuming you aren't doing other modifications such as smali to it). However, if you sign it and it gives you that error, it may be whatever you're doing when signing it.
 
Apktool is just for signing (assuming you aren't doing other modifications such as smali to it). However, if you sign it and it gives you that error, it may be whatever you're doing when signing it.
so I'm 90% sure its not a problem with signing. My friend can do the full process, and if he uses my modded csharp-assembly.dll file, constructs it, signs it, installs it he see's error install_failed_invalid_apk. If he makes the same IL code changes, saves the csharp-assembly.dll and does the same process on his laptop it works.

We spent a ton of time walking through it step by step to identify where it was failing for me. It seems like its a reflexil issue. So I tried ILSPY/NetReflector each with different reflexil plugins and either way it ends the same for me : /
 
When he used the same assembly c-sharp you used, was that a signed one already signed by your signing tool, or it was signed by his tool?
 
installation error typically because of bad-structured apk, not because of corrupt dll. figure out why your apk is bad-structured to begin with. no clue why you've got the error though. as mentioned above, try different tools? try to sign original apk and see if that even runs? GL
 
installation error typically because of bad-structured apk, not because of corrupt dll. figure out why your apk is bad-structured to begin with. no clue why you've got the error though. as mentioned above, try different tools? try to sign original apk and see if that even runs? GL

Thanks!
I will give that a try
 
Thanks guys! Now its working for me.
Using a tool like apktool constructed the apk in the right format solving my problem.
 
Back
Top Bottom