Skip to content

Conversation

@BigodeHR
Copy link

Fixes an issue causing apksigner/jarsigner to fail when the keystore is created by bubblewrap init. The CLI previously passed passwords and keystore path with literal quotes that became part of the values passed to apksigner and jarsigner. This caused Java KeyStore decryption to fail with BadPaddingException.

This change removes the literal quotes before calling apksigner and jarsigner and adds a unit test to ensure passwords are passed without quotes.

Changes:

  • Remove literal quoting of signing key path and passwords in packages/cli/src/lib/cmds/build.ts.
  • Export Build class to facilitate unit testing.
  • Add packages/cli/src/spec/lib/cmds/BuildSpec.ts unit test that mocks AndroidSdkTools/JarSigner and asserts unquoted passwords are passed.

How to test manually:

  1. Run bubblewrap init, choose to create a new keystore and use any password.
  2. Run bubblewrap build and verify it succeeds and apksigner/jarsigner do not produce BadPaddingException.

This PR includes tests; CI should be run to validate behavior.

@google-cla
Copy link

google-cla bot commented Nov 27, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant