Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3864: Debug-sign locally deployed AABs #3867

Merged
merged 2 commits into from
Oct 6, 2021
Merged

Conversation

BenHenning
Copy link
Sponsor Member

@BenHenning BenHenning commented Oct 1, 2021

Explanation

Fix #3864

I noticed this while working on #3866. When trying to deploy the dev version of the app to certain versions of Android, the installation will fail since the AAB we generate isn't signed. Fortunately, bundletool makes it easy by passing it a keystore & credentials during the installation step (presumably so that it can zipalign & sign the generated APK before installing it on the device). For consistency with android_binary targets, we use Bazel's packaged debug keystore through Starlark.

Automated testing isn't really worth it here since this is a developer-only utility that can easily be mitigated or fixed if it were to break in the future. It can be manually verified by running bazel //:install_oppia_dev locally on develop vs. this branch when deploying to an Android 11+ emulator or device (I haven't tested it on earlier versions except 8.1 where it isn't an issue).

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

N/A

Add debug signing to locally deployed AABs
Undo change that leaked from a localization PR.
@BenHenning BenHenning marked this pull request as ready for review October 1, 2021 09:16
@anandwana001
Copy link
Contributor

I will review this later today.

Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working for me. LGTM

@oppiabot oppiabot bot added the PR: LGTM label Oct 5, 2021
@oppiabot
Copy link

oppiabot bot commented Oct 5, 2021

Hi @BenHenning, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@BenHenning
Copy link
Sponsor Member Author

Thanks @anandwana001! Merging this.

@BenHenning BenHenning merged commit 7289893 into develop Oct 6, 2021
@BenHenning BenHenning deleted the debug-sign-aabs branch October 6, 2021 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

//:install_oppia_dev doesn't work on newer Android versions
2 participants