-
Notifications
You must be signed in to change notification settings - Fork 47
feat: implement Google Play API to download actual signed APK #100
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
Conversation
- Use Google Play Publisher API to download real signed universal APK - Add fallback to bundletool generation if API download fails - Support downloading existing signed APKs from Google Play Console - Proper error handling and informative messages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements Google Play Publisher API integration to download actual signed universal APKs from Google Play Console instead of generating APKs with debug certificates. The change enhances the release workflow by providing real production-signed APKs when available, with a fallback mechanism for cases where the API download fails.
- Replaces debug-certificate APK generation with Google Play Publisher API integration
- Adds smart fallback to bundletool generation if API download fails
- Improves error handling and messaging for download failures
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| PACKAGE_NAME="me.ghui.v2er" | ||
| # Create Python script to download signed universal APK | ||
| cat > download_signed_apk.py << 'EOF' |
Copilot
AI
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using heredoc to create a Python script inline poses security risks. Consider storing the Python script as a separate file in the repository to improve maintainability and security review capabilities.
| return False | ||
| print(f"Downloading APK from: {download_url}") | ||
| response = requests.get(download_url, stream=True) |
Copilot
AI
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The download request lacks timeout and certificate verification settings. Add timeout parameters and ensure SSL verification is enabled to prevent hanging requests and security vulnerabilities.
| response = requests.get(download_url, stream=True) | |
| response = requests.get(download_url, stream=True, timeout=30, verify=True) |
| # Run the download script | ||
| echo "Attempting to download Google Play signed APK..." | ||
| if python3 download_signed_apk.py > download_output.txt 2>&1; then |
Copilot
AI
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output redirection captures both stdout and stderr, making it difficult to distinguish between normal output and error messages. Consider using separate handling for stdout and stderr or using more explicit error handling.
| OUTPUT_FILE="v2er-${VERSION_NAME}_google_play_signed.apk" | ||
| mv universal.apk "$OUTPUT_FILE" | ||
| echo "Generated fallback APK: $OUTPUT_FILE" |
Copilot
AI
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback APK is being named with '_google_play_signed' suffix even though it's signed with a debug certificate. This naming is misleading and could confuse users about the actual signing status of the APK.
Summary
Key Features
Test Plan
Since Google Play already has signed APKs available, this should now successfully download the real signed APK instead of generating one with a debug certificate.
🤖 Generated with Claude Code