Closed FAngelvs closed 3 years ago
did you ever find a fix for this?
@Nathan187 Yeap. I just don't zipalign anymore :)
Previous build process was like:
now it is just:
Looks to be OK now. Not sure if Play Store will accept it, though. We do not use it. But according to my memories - alignment verification shows that everything is OK and APK is aligned even without aligning it.
so, you are not wrapping the app? (thanks for the response)
@Nathan187 Ah. Yeah. Sorry. I forgot about that.
I still wrap it. So, current process is like:
are you using jarsigner? (sorry for the dumb question) i've been struggling with this.
are you having problems if the app requires permissions (i.e. network, internet, location)
Nope, I use build-tools\28.0.3\apksigner:
call "%sdk%\build-tools\28.0.3\apksigner" sign --ks .\[filename].keystore -v --v1-signing-enabled true --v2-signing-enabled true --ks-pass pass:%pwd% ".\platforms\android\app\build\outputs\apk\release\app-release-unsigned-wrapped.apk"
and no issues with permissions
everything i try, just doesn't work. i used the example you provided and it signed. tried to upload it to managed google play....said it wasn't zipaligned. zip aligned it...says APK signature is invalid. never got this crap to work
@FAngelvs I owe you a drink. You helped me get beyond my issue. And for that I am quite thankful!
I was wrapping the apk (using jar signer) with the SigAlg flag...and I shouldn't have done that. I removed that parameter and after wrapping, I signed it with apk signer. That seem to do the trick. (was having problems with zipalign...but it's not necessary, so i skip that step...which i think you are to zipalign before signing)
@Nathan187 Ha! I'm happy this helped you.
But for that zipalign before signing - I recall like this is what you should NOT do. I recall seeing something like that while trying to resolve this issue by myself.
Hi @FAngelvs Thanks for your explanation for this problem. However in my case, this is a little bit different. I need to zipalign the apk first before sign it using apksigner, otherwise I can't install it in my phone.
Hi,
I have ionic/cordova app. Recently switched to ionic 5 / cordova 9 from much older version.
I create an app release version, apply wrapping tool, sign. If I try to install APK directly - I can see this in logs:
Also tried to install using Company Portal app. It fails to install there too. But there I can see only this in logs:
2021-02-10 10:21:19.612 5023-5106/? E/PackageInstaller: Commit of session 1949276321 failed: Failed to extract native libraries, res=-2
Any ideas what that might be?Not wrapped, signed release APK installs with no issues. Only thing that I've noticed - with this new ionic / cordova build - it starts failing if I apply zipalign to it.
With regards, Viktor