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 android debug keystore creation #1720

Closed
wants to merge 2 commits into from

Conversation

jprinet
Copy link
Member

@jprinet jprinet commented Dec 13, 2024

Tests with AGP 8.1 and above fails with this error

Creating a keystore in a writable location fixes it

cdsap added a commit that referenced this pull request Jan 2, 2025
Recent jobs on CI builds from AGP versions were failing with:
```
java.io.IOException: Unable to create debug keystore in /home/runner/.config/.android because it is not writable.
```
There is an initial workaround to fix this problem in PR #1720. The
proposed solution is valid, but while trying to understand the reason
for the failure, we observed that it is caused by an attempt to write to
the Android folder during the build. This occurs in a folder created by
a different user (root). The original folder is created when manually
installing the SDK build tool version 34.0.0(during the gha setup):
```
      - name: List Android Packages
        run: sudo ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --list | sed -n '/Available Packages/q;p'
      - name: Accept license 34.0.0
        run: echo "y" | sudo ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;34.0.0"
```
Given this situation, we need to understand what caused this change in
the GHA infrastructure: The ubuntu-latest workflows have started
[rolling out](actions/runner-images#10636) the
ubuntu-24.04 image since December 5th (scheduled to be completed by
January 17th). One of the changes in the new version is the use of SDK
build tools version 34.0.0.

This PR removes the manual installation of the SDK tools (performed as
root), resolving the folder permission issue caused by the user
mismatch.
@erichaagdev
Copy link
Member

@jprinet @cdsap can we close this one since this PR is now merged?

@jprinet
Copy link
Member Author

jprinet commented Jan 3, 2025

Absolutely @erichaagdev, thanks for pointing out!

@jprinet jprinet closed this Jan 3, 2025
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.

2 participants