title: Double-Signing .apk // SHA1 & other issues
body: <p>I am currently facing some problems with double-signing an .apk.
  The normal workflow was always:</p>
  
  <pre><code>zip -d FILE.apk META-INF/\*
  jarsigner -verbose -keystore EXTERNAL.keystore FILE.apk EXTERNAL
  jarsigner -verbose -keystore INTERNAL FILE.apk INTERNAL
  zipalign -v 4 FILE.apk FILE_ALIGNED.apk
  </code></pre>
  
  <p><strong>When using this original method, I am receiving an error from the Google Play Store:</strong></p>
  
  <p><em>You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR (Jar signer INTERNAL.RSA): JAR signature META-INF/INTERNAL.RSA uses digest algorithm 2.16.840.1.101.3.4.2.1 and signature algorithm 1.2.840.113549.1.1.1 which is not supported on API Levels [[14, 17]]</em></p>
  
  <p><strong>Since I am getting this algorithm error only for the "INTERNAL.RSA" I tried using:</strong></p>
  
  <pre><code>jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore INTERNAL FILE.apk INTERNAL
  </code></pre>
  
  <p><strong>This results in another error:</strong></p>
  
  <p><em>You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR (Jar signer EXTERNAL.DSA): No digest for assets/www/assets/fonts/FONT.ttf in META-INF/EXTERNAL.SF</em></p>
  
  <p>This is just a small snippet of the error, because it lists every asset of the app with the same error. I am thankful for every help or hint about how to resolve this issue.</p>
  
  <p>Cheers,
  Marius</p>