Fix #3864: Debug-sign locally deployed AABs #3867
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
For UI-specific PRs only
N/A