Android release APK sign verification fails


#1

Hello, I have built a release apk with onic build android --release (also tried platforms/android/gradlew assembleRelease ). I have also created a keystore using keytool -genkey -v -keystore thearcinv.jks -alias thearcinv -keyalg RSA -keysize 2048 -validity 1000.
After building the release apk, i run the following commands:

  1. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore thearcinv.jks THEARCTICINVEST/platforms/android/build/outputs/apk/android-release-unsigned.apk thearcinv , with the output jar signed.
  2. ~/Library/Android/sdk/build-tools/25.0.2/zipalign -v 4 THEARCTICINVEST/platforms/android/build/outputs/apk/android-release-unsigned.apk anroid-release.apk, with the final output Verification succesful
  3. ~/Library/Android/sdk/build-tools/25.0.2/apksigner verify anroid-release.apk. This is where I get DOES NOT VERIFY ERROR: assets/www/assets/fonts/Icon entry referenced by META-INF/MANIFEST.MF not found in the APK ERROR: Malformed META-INF/MANIFEST.MF: invidual section #74 does not have a name.

When trying to install the apk on a device I get Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

I have tried cleaning the project, deleting all generated files, updated ionic and cordova, etc…

Only interesting output I find is in the beginning of the zipalign command:
Verifying alignment of anroid-release.apk (4)... 50 META-INF/MANIFEST.MF (OK - compressed) 3080 META-INF/THEARCIN.SF (OK - compressed) 6155 META-INF/THEARCIN.RSA (OK - compressed) 7328 AndroidManifest.xml (OK - compressed) (OK)436 assets/www/assets/fonts/Icon 8511 assets/www/assets/fonts/ionicons.eot (OK - compressed).... The (OK) is in front of the 436 assets/www/assets/fonts/Icon, whereas the other lines have it in the end.

ls -l plugins returns:
-rw-r--r-- 1 otto staff 974 Dec 31 16:32 android.json drwxr-xr-x 13 otto staff 442 Dec 13 11:24 cordova-plugin-device drwxr-xr-x 13 otto staff 442 Dec 30 23:38 cordova-plugin-inappbrowser drwxr-xr-x 13 otto staff 442 Dec 13 11:24 cordova-plugin-splashscreen drwxr-xr-x 13 otto staff 442 Dec 13 11:24 cordova-plugin-statusbar drwxr-xr-x 11 otto staff 374 Dec 13 11:24 cordova-plugin-whitelist drwxr-xr-x 10 otto staff 340 Dec 31 12:02 cordova-plugin-x-socialsharing drwxr-xr-x 20 otto staff 680 Dec 24 01:01 cordova-sqlite-storage -rw-r--r-- 1 otto staff 1658 Dec 31 16:32 fetch.json drwxr-xr-x 8 otto staff 272 Dec 13 11:24 ionic-plugin-keyboard -rw-r--r-- 1 otto staff 968 Dec 31 16:32 ios.json

ionic info returns:
Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.48 ios-deploy version: 1.9.0 ios-sim version: 5.0.12 OS: macOS Sierra Node Version: v6.9.1 Xcode version: Xcode 8.2.1 Build version 8C1002

Everything works fine in both Android emulator and iOS simulator using the ionic emulate.

If anyone knows where the problem might be or has similar issues, any help is appreciated.