The place where random ideas get written down and lost in time.

2022-05-25 - Android Apps Update: Asqare, Bearing

Category DEV

Spent the last week or so “rebuilding” Asqare.

Only needs “one last little change”.

Tradeoffs:

  • See plenty of things I could change in the game, but that would delay release.
  • Did a few minor things to make the game usable on Android 12.
  • Will release a “1.4” which is mostly the same thing.
  • Wrote dev notes and maybe will do a “1.5” that has game changes.

One thing that works well: Android 12 + Android Studio chipmunk ⇒ Wireless Debugging. Enable in android settings, customize a quick setting tile to toggle it. Very convenient to push/debug from AS that way.

Question: can command-line adb also use Wireless Debugging?

For release, using the B3 script to create a bundle (aab), without the flavors.

This produces a signed AAB (for Dev Console) + temporary APKS for local deployment.

My script signs the AAB using the old jarsigner. I had to work around it that way because the key format is old and I failed to update into a newer format.

Issue: the local APKS are signed with a debug key. Which means I can’t push and update an app store signed binary.

According to this SO, I should be able to sign the AAB with release and thus the APK should be signed too?

For the Dev Console, the only choice is to upload an AAB. I’m using the self-signed method where the console does not sign the APK for me (I think?)

When uploading the AAB: “Error: To upload an Android App Bundle you must be enrolled in Play App Signing.”

When uploading the signed APK: “You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: MIN_SIG_SCHEME_FOR_TARGET_SDK_NOT_MET: Target SDK version 32 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme”

The “signature scheme v2” is explained here: https://source.android.com/security/apksigning/v2

The tool to use is “apksigner” available in build-tool 24.0.3 and above.

However I had already tried it years before and my signature uses an older SHA-1 which is now considered obsolete; I had tried to change the keyfile with no success.

Plan B:

“Google isn't protecting the app signing key for your app. Opt in to use Android App Bundles

I had to do that for Bearing and Seeds: see “\pɔʁt.na.wak\”

Learning for these:

  • The Opt In selection in the Dev console is FINAL. The choices are confusing, poorly explained, and there’s no way to change them later on. <grrr>
  • Be very careful to select the option to keep using my signing key and not let the store generate a new one. This is NOT the default and it’s a PITA to use.
  • Need their PEPK tool to sign the release key to set it up the first time.
  • Need the upload key from the store.

Opt In:

  • In screen “Let Google Play manage your app signing key”:
  • Use option “Use existing app signing key from Java KeyStore
  • Generated a release key based on my key using PEPK ⇒ that’s the same signature arguments as used for Bearing, so maybe keep that file around and write down where it is!
  • Upload release key
  • Save

IMPORTANT:

  • My keystore has 2 aliases. Asqare uses alias 1. Bearing/Seeds used alias 2. Because history.

In the Dev Console:

  • Upload an AAB to the Internal Testing track.
  • WAIT for an email from Firebase Test to get a health check on many devices.
    • Takes at least 5 hours, but less than 24 h.
  • Once it’s fine, convert it to a prod push.
    • There’s an email when it’s available.


 Generated on 2025-01-18 by Rig4j 0.1-Exp-f2c0035