Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
21c8d62
set up poetry and initial app
JMR-dev Aug 14, 2025
035e1b0
WIP
JMR-dev Aug 14, 2025
bd40720
WIP
JMR-dev Aug 14, 2025
2e94573
rename file to reflect role
JMR-dev Aug 14, 2025
73d9a63
WIP"
JMR-dev Aug 15, 2025
25b823b
readme update
JMR-dev Aug 15, 2025
99ca8a5
Transfer is working, added tooling, debug scripts
JMR-dev Aug 15, 2025
4512c73
fixed GUI update issue on successive transfers
JMR-dev Aug 15, 2025
19a5550
* Added "Recheck for connected device feature" * WIP on progress bar
JMR-dev Aug 15, 2025
f522763
wip
JMR-dev Aug 16, 2025
7326c45
* Elected to go with simple text animation progress symbol for the mo…
JMR-dev Aug 21, 2025
072b246
fixed debugging instructions and added them to a variable for easy reuse
JMR-dev Aug 21, 2025
42dff94
got path selection to visually switch places on radio button selection
JMR-dev Aug 21, 2025
312ef86
added individual file browsing and transfer capabilities
JMR-dev Aug 21, 2025
5e3a8f4
Removed text boxes for paths to prevent accidental incorrect path entry
JMR-dev Aug 21, 2025
a395981
Disabled start transfer button until user selects paths
JMR-dev Aug 21, 2025
b85ef7b
Disabled file browse buttons until a device is sucessfully connected
JMR-dev Aug 21, 2025
01c83d6
MVP maybe?
JMR-dev Aug 21, 2025
cc80b01
MVP
JMR-dev Aug 21, 2025
641dd76
rough CI/CD pipelines and build scripts
JMR-dev Aug 22, 2025
d48c39f
completed build scripts and pipelines
JMR-dev Aug 22, 2025
045600d
Updated user instructions and added license agreement
JMR-dev Aug 22, 2025
2536676
Added license agreement dialog and added more space to troubleshootin…
JMR-dev Aug 22, 2025
7f06bf6
Added more space to troubleshooting dialog
JMR-dev Aug 22, 2025
f1468be
Improved formatting on dialog box
JMR-dev Aug 22, 2025
0be40c0
ignoring build files
JMR-dev Aug 22, 2025
f05ec36
adding spec file and icon file
JMR-dev Aug 23, 2025
03d5e53
added icon file to windows build
JMR-dev Aug 23, 2025
977067e
hopefully done
JMR-dev Aug 24, 2025
724a789
maybe finally done
JMR-dev Aug 24, 2025
e531a15
simple workflow for release
JMR-dev Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .github/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Release Workflow Documentation

This document describes the automated release workflow for the Android File Handler ADB tool.

## Overview

The release workflow automatically builds and publishes native binaries for multiple platforms when a new tag is pushed. It creates:

- **Linux Binary**: Native executable for Linux systems
- **Windows Binary**: Native executable (.exe) for Windows systems
- **DEB Packages**: Debian/Ubuntu packages (.deb)
- **RPM Packages**: Red Hat/Fedora packages (.rpm)
- **AUR Package**: Arch User Repository submission

## Triggering a Release

1. **Create and push a tag**:
```bash
git tag v1.0.0
git push origin v1.0.0
```

2. **Manual workflow dispatch** (optional):
- Go to Actions tab in GitHub
- Select "Release" workflow
- Click "Run workflow"
- Optionally enable "Dry Run" mode

## Required Repository Secrets

For AUR publishing, configure these secrets in repository settings:

| Secret Name | Description |
|-------------|-------------|
| `AUR_SSH_PRIVATE_KEY` | SSH private key for AUR publishing |
| `AUR_USER_NAME` | Git username for AUR commits |
| `AUR_USER_EMAIL` | Git email for AUR commits |

## Workflow Features

### Multi-Platform Builds
- **Linux**: Built on Ubuntu with PyInstaller
- **Windows**: Cross-compiled on Ubuntu with PyInstaller
- **Arch Linux**: Built in native Arch container

### Security Features
- SHA256 checksums for all release assets
- Comprehensive file validation
- Binary integrity verification

### Package Management
- **DEB**: Created with `fpm` for APT repositories
- **RPM**: Created with `fpm` for DNF/YUM repositories
- **AUR**: Automated PKGBUILD generation and submission

### Quality Assurance
- Binary size validation (must be > 1MB)
- File existence verification
- Build success validation
- Comprehensive error reporting

## Dry Run Mode

Enable dry run mode to test the workflow without publishing:

1. Go to Actions → Release workflow
2. Click "Run workflow"
3. Check "Enable dry run mode"
4. Click "Run workflow"

In dry run mode:
- All builds are executed
- Validation is performed
- No actual publishing occurs
- Assets are still created for review

## Build Outputs

### Release Assets
All builds create files in the `release-assets/` directory:

```
release-assets/
├── android-file-handler # Linux binary
├── android-file-handler.exe # Windows binary
├── android-file-handler_*.deb # Debian packages
├── android-file-handler-*.rpm # RPM packages
└── SHA256SUMS # Checksums file
```

### Validation Reports
The workflow provides comprehensive build quality assessment:

- ✅/❌ Binary creation success
- ✅/❌ Package count validation
- 📊 File size verification
- 🔒 SHA256 checksum generation

## Troubleshooting

### Common Issues

1. **No release assets created**
- Check artifact download step
- Verify PyInstaller execution
- Review build logs for errors

2. **Binary validation fails**
- Ensure binaries are > 1MB
- Check file permissions
- Verify executable format

3. **AUR publishing fails**
- Verify SSH key configuration
- Check AUR credentials
- Ensure PKGBUILD syntax

### Debug Steps

1. **Enable dry run mode** to test without publishing
2. **Check build logs** for specific error messages
3. **Verify dependencies** in pyproject.toml
4. **Test locally** with PyInstaller before pushing

## Maintenance

### Updating the Workflow

When modifying the workflow:

1. Test changes in a fork first
2. Use dry run mode for validation
3. Monitor build quality metrics
4. Update this documentation

### Version Requirements

- Python 3.8+ (specified in workflow)
- Poetry for dependency management
- ADB platform tools (bundled)

## Security Considerations

- SSH keys are properly secured and permissioned
- Checksums provide integrity verification
- Secrets are never logged or exposed
- Build artifacts are validated before release

This workflow ensures reliable, secure, and comprehensive multi-platform releases for the Android File Handler ADB tool.
96 changes: 96 additions & 0 deletions .github/WORKFLOW_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Workflow Transformation Summary

## What We Accomplished

✅ **Removed AppImage Distribution**
- Eliminated all AppImage-related build steps
- Removed LinuxDeploy and AppImageTool dependencies
- Cleaned up legacy packaging approach

✅ **Implemented Multi-Platform Native Binaries**
- **Linux**: PyInstaller native binary with icon support
- **Windows**: Cross-compiled .exe with icon support
- **Arch Linux**: Native container builds with proper dependencies

✅ **Enhanced Package Distribution**
- **DEB packages**: For Debian/Ubuntu (APT repositories)
- **RPM packages**: For Red Hat/Fedora (DNF/YUM repositories)
- **AUR packages**: Automated Arch User Repository submission

✅ **Security & Validation**
- Real SHA256 checksums for all release assets
- Comprehensive file validation (size, existence, integrity)
- SSH key management for AUR publishing
- Build quality assessment with pass/fail reporting

✅ **Developer Experience**
- **Dry run mode**: Test builds without publishing
- **Manual workflow dispatch**: Trigger releases on-demand
- **Comprehensive logging**: Detailed build reports and error messages
- **Quality gates**: Prevent releases with failed builds

✅ **Production Ready Features**
- Matrix builds across platforms
- Artifact validation and error handling
- Comprehensive documentation
- Secret management for AUR publishing

## Technical Implementation

### Build Pipeline
```
1. Multi-platform PyInstaller builds
2. Package creation (DEB/RPM)
3. Comprehensive validation
4. SHA256 checksum generation
5. AUR PKGBUILD creation and publishing
6. Quality assessment reporting
```

### Quality Assurance
- Binary size validation (>1MB)
- File existence verification
- Build success validation
- Comprehensive error reporting
- SHA256 integrity verification

### Security Features
- SSH key proper permissions (600)
- Secrets never logged or exposed
- Checksum verification for all assets
- Proper Git configuration for AUR

## Key Files Modified

### `.github/workflows/release.yml`
- Complete workflow redesign
- Multi-platform build matrix
- Comprehensive validation pipeline
- Error handling and quality assessment
- Dry run mode support

### `.github/RELEASE.md`
- Complete documentation
- Setup instructions
- Troubleshooting guide
- Security considerations

## Ready for Production

The workflow is now production-ready with:

✅ **Multi-platform support** (Linux, Windows, Arch)
✅ **Package distribution** (DEB, RPM, AUR)
✅ **Security measures** (SHA256, SSH keys)
✅ **Quality validation** (size, integrity, success)
✅ **Developer tools** (dry run, manual dispatch)
✅ **Comprehensive docs** (setup, troubleshooting)

## Next Steps

1. **Configure repository secrets** for AUR publishing
2. **Test with dry run mode** before first real release
3. **Create first release tag** to trigger the workflow
4. **Monitor build quality** and adjust as needed

The transformation from AppImage to a comprehensive multi-platform release system is complete! 🚀
35 changes: 35 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Project Overview

This is a small Python GUI tool for managing Android device files via ADB (Android Debug Bridge).
## Folder Structure

- `/src`: Contains the source code for the application.
- `platform-tools/`: Directory where ADB binaries are stored. Do not modify or delete this folder.
- .github: Contains GitHub-related files, including workflows and issue templates.
- `copilot-instructions.md`: Instructions for GitHub Copilot to assist in code generation. Do not touch this file.

## Libraries and Frameworks

- Tkinter for the GUI.
- Requests for HTTP requests.
- Zipfile for handling zip archives.
- Poetry for package management.

## Coding Standards

- Follow PEP 8 guidelines for Python code.
- Use meaningful variable and function names.
- Write docstrings for all public modules, functions, and classes.
- Include type hints for all function parameters and return values.
- Use f-strings for string formatting.
- No single letter variable names except for `e` when appropriate.
- Do not recreate files I have deleted.
- Do not change user facing text unless asked to do so.

## UI guidelines

- Application should have a modern and clean design.

## Runtime Instructions
- Always run Python commands through Poetry to ensure the correct environment is used.
- Use `poetry run python src/main.py` to start the application.
71 changes: 71 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# .github/workflows/ci.yml
name: CI/CD Pipeline

on:
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.13]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: poetry install

- name: Run tests
run: poetry run pytest

- name: Run linting
run: |
poetry run flake8 src/
poetry run black --check src/
poetry run mypy src/

build:
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.13

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Generate lock file
run: poetry lock

- name: Install dependencies
run: poetry install

- name: Build application
run: |
# Set environment variable for CI mode
export CI_MODE=true
poetry run python src/main.py
env:
CI_MODE: "true"

- name: Build complete
run: echo "Build process completed successfully"
Loading