-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs: add comprehensive CONTRIBUTING.md guide #430
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
Open
Devvekariya711
wants to merge
2
commits into
kavishdevar:main
Choose a base branch
from
Devvekariya711:docs/add-contributing-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+341
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,341 @@ | ||
| # Contributing to LibrePods | ||
|
|
||
| Thank you for your interest in contributing to LibrePods! This project aims to liberate AirPods from Apple's ecosystem, and we welcome contributions of all kinds. | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| - [Code of Conduct](#code-of-conduct) | ||
| - [How Can I Contribute?](#how-can-i-contribute) | ||
| - [Development Setup](#development-setup) | ||
| - [Making Changes](#making-changes) | ||
| - [Submitting Changes](#submitting-changes) | ||
| - [Style Guidelines](#style-guidelines) | ||
| - [Additional Resources](#additional-resources) | ||
|
|
||
| ## Code of Conduct | ||
|
|
||
| This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please be respectful and constructive in all interactions. | ||
|
|
||
| ## How Can I Contribute? | ||
|
|
||
| ### Reporting Bugs | ||
|
|
||
| Before creating bug reports, please check existing issues. When creating a bug report, include: | ||
|
|
||
| - **Device Information**: Phone model, OS version, AirPods model | ||
| - **LibrePods Version**: Found in app settings | ||
| - **Root Status** (Android): LSPosed version if applicable | ||
| - **Steps to Reproduce**: Clear, numbered steps | ||
| - **Expected vs Actual Behavior** | ||
| - **Logs**: Use the troubleshooting feature in the app | ||
|
|
||
| ### Suggesting Features | ||
|
|
||
| Feature requests are welcome! Please: | ||
| - Check if the feature has already been requested | ||
| - Explain the use case and expected behavior | ||
| - Consider if it aligns with the project's goals | ||
|
|
||
| ### Code Contributions | ||
|
|
||
| All code contributions follow the standard GitHub workflow: | ||
| 1. Fork the repository | ||
| 2. Create a feature branch | ||
| 3. Make your changes | ||
| 4. Submit a pull request | ||
|
|
||
| See [Making Changes](#making-changes) for detailed instructions. | ||
|
|
||
| ### Documentation | ||
|
|
||
| Improvements to documentation are always welcome, including: | ||
| - README updates | ||
| - Protocol documentation | ||
| - Setup guides | ||
| - Code comments | ||
|
|
||
| ### Translations | ||
|
|
||
| Help make LibrePods accessible to more users by contributing translations. See [Translation Guide](#translation-guide) for details. | ||
|
|
||
| ## Development Setup | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| Choose the platform you want to contribute to: | ||
|
|
||
| #### Android Development | ||
|
|
||
| **Requirements:** | ||
| - Android Studio Narwhal (2025.1.x) or later | ||
| - JDK 17+ | ||
| - Android SDK: API 35 (min) and API 36 (target) | ||
| - Root access with Xposed Framework (LSPosed recommended) | ||
|
|
||
| **Note**: Root is required due to an [Android Bluetooth stack limitation](https://issuetracker.google.com/issues/371713238). Exception: ColorOS/OxygenOS 16 users. | ||
|
|
||
| #### Linux Development | ||
|
|
||
| **Requirements:** | ||
| - Qt 6 (base, connectivity, multimedia) | ||
| - CMake 3.22+ | ||
| - OpenSSL development headers | ||
| - libpulse development headers | ||
| - C++17 compatible compiler | ||
|
|
||
| <details> | ||
| <summary>Installation commands for different distributions</summary> | ||
|
|
||
| **Arch Linux / EndeavourOS:** | ||
| ```bash | ||
| sudo pacman -S qt6-base qt6-connectivity qt6-multimedia cmake openssl libpulse | ||
| ``` | ||
|
|
||
| **Debian / Ubuntu:** | ||
| ```bash | ||
| sudo apt-get install qt6-base-dev qt6-declarative-dev qt6-connectivity-dev \ | ||
| qt6-multimedia-dev cmake libssl-dev libpulse-dev \ | ||
| qml6-module-qtquick-controls qml6-module-qtquick-layouts | ||
| ``` | ||
|
|
||
| **Fedora:** | ||
| ```bash | ||
| sudo dnf install qt6-qtbase-devel qt6-qtconnectivity-devel \ | ||
| qt6-qtmultimedia-devel qt6-qtdeclarative-devel cmake \ | ||
| openssl-devel pulseaudio-libs-devel | ||
| ``` | ||
| </details> | ||
|
|
||
| ### Building the Project | ||
|
|
||
| #### Android | ||
|
|
||
| ```bash | ||
| git clone https://github.com/YOUR_USERNAME/librepods.git | ||
| cd librepods/android | ||
| ./gradlew assembleDebug | ||
| adb install -r app/build/outputs/apk/debug/app-debug.apk | ||
| ``` | ||
|
|
||
| #### Linux | ||
|
|
||
| ```bash | ||
| git clone https://github.com/YOUR_USERNAME/librepods.git | ||
| cd librepods/linux | ||
| mkdir build && cd build | ||
| cmake .. | ||
| make -j $(nproc) | ||
| ./librepods | ||
| ``` | ||
|
|
||
| For troubleshooting, see [linux/README.md](linux/README.md). | ||
|
|
||
| ## Making Changes | ||
|
|
||
| ### 1. Fork and Clone | ||
|
|
||
| Fork the repository on GitHub, then: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/YOUR_USERNAME/librepods.git | ||
| cd librepods | ||
| git remote add upstream https://github.com/kavishdevar/librepods.git | ||
| ``` | ||
|
|
||
| ### 2. Create a Branch | ||
|
|
||
| ```bash | ||
| git checkout -b feat/your-feature-name | ||
| # or | ||
| git checkout -b fix/bug-description | ||
| ``` | ||
|
|
||
| ### 3. Make Your Changes | ||
|
|
||
| - Write clear, readable code | ||
| - Follow the [style guidelines](#style-guidelines) | ||
| - Add comments for complex logic | ||
| - Update documentation if needed | ||
|
|
||
| ### 4. Test Your Changes | ||
|
|
||
| **Android:** | ||
| - Build and install the APK | ||
| - Test on a physical device with AirPods | ||
| - Verify no regressions in existing features | ||
|
|
||
| **Linux:** | ||
| - Build and run the application | ||
| - Test core functionality | ||
| - Verify system tray integration | ||
|
|
||
| ### 5. Commit Your Changes | ||
|
|
||
| ```bash | ||
| git add . | ||
| git commit -m "type(scope): description" | ||
| ``` | ||
|
|
||
| See [Commit Message Guidelines](#commit-messages) for format details. | ||
|
|
||
| ## Submitting Changes | ||
|
|
||
| ### Pull Request Process | ||
|
|
||
| 1. **Push to your fork:** | ||
| ```bash | ||
| git push origin your-branch-name | ||
| ``` | ||
|
|
||
| 2. **Create a Pull Request** on GitHub with: | ||
| - **Clear title**: `type(scope): Brief description` | ||
| - **Description** including: | ||
| - What changed and why | ||
| - Related issue number (closes #123) | ||
| - Testing performed | ||
| - Screenshots for UI changes | ||
|
|
||
| 3. **Wait for review** (Note: Maintainer on hiatus until May 2026) | ||
|
|
||
| 4. **Address feedback** if requested | ||
|
|
||
| ### Pull Request Checklist | ||
|
|
||
| - [ ] Code builds without errors | ||
| - [ ] Tested on target platform | ||
| - [ ] Follows style guidelines | ||
| - [ ] Documentation updated (if applicable) | ||
| - [ ] Commit messages follow convention | ||
| - [ ] PR description is clear and complete | ||
|
|
||
| ## Style Guidelines | ||
|
|
||
| ### Commit Messages | ||
|
|
||
| Follow [Conventional Commits](https://www.conventionalcommits.org/): | ||
|
|
||
| ``` | ||
| <type>(<scope>): <description> | ||
|
|
||
| [optional body] | ||
|
|
||
| [optional footer] | ||
| ``` | ||
|
|
||
| **Types:** | ||
| - `feat`: New feature | ||
| - `fix`: Bug fix | ||
| - `docs`: Documentation changes | ||
| - `style`: Code style changes (formatting) | ||
| - `refactor`: Code refactoring | ||
| - `test`: Adding tests | ||
| - `chore`: Maintenance tasks | ||
|
|
||
| **Examples:** | ||
| ``` | ||
| feat(android): add German translation | ||
| fix(linux): resolve system tray detection | ||
| docs: update development setup guide | ||
| ``` | ||
Devvekariya711 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Code Style | ||
|
|
||
| #### Kotlin (Android) | ||
|
|
||
| - Follow [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html) | ||
| - 4 spaces for indentation | ||
| - Meaningful variable and function names | ||
| - Use `camelCase` for variables/functions, `PascalCase` for classes | ||
|
|
||
| #### C++ (Linux) | ||
|
|
||
| - Follow [Qt Coding Style](https://wiki.qt.io/Qt_Coding_Style) | ||
| - Use `camelCase` for variables/functions | ||
| - Use `PascalCase` for classes | ||
| - Include proper header guards | ||
| - Use C++17 features where appropriate | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| ### Documentation | ||
|
|
||
| - **Protocol Specifications**: [AAP Definitions.md](AAP%20Definitions.md) | ||
| - **Control Commands**: [docs/control_commands.md](docs/control_commands.md) | ||
| - **Linux Setup**: [linux/README.md](linux/README.md) | ||
|
|
||
| ### External Links | ||
|
|
||
| - [AAP Protocol (Third-party)](https://github.com/tyalie/AAP-Protocol-Definition) | ||
| - [Android Bluetooth Bug](https://issuetracker.google.com/issues/371713238) - Please upvote! | ||
|
|
||
| ### Community | ||
|
|
||
| - **Discussions**: [GitHub Discussions](https://github.com/kavishdevar/librepods/discussions) | ||
| - **Issues**: [GitHub Issues](https://github.com/kavishdevar/librepods/issues) | ||
|
|
||
| --- | ||
|
|
||
| ## Translation Guide | ||
|
|
||
| Translations help make LibrePods accessible to users worldwide. Currently supported: 10 languages (Android), 3 languages (Linux). | ||
|
|
||
| ### Android Translations | ||
|
|
||
| 1. Create translation directory: | ||
| ```bash | ||
| mkdir -p android/app/src/main/res/values-{LANG_CODE} | ||
| ``` | ||
|
|
||
| 2. Copy base strings file: | ||
| ```bash | ||
| cp android/app/src/main/res/values/strings.xml \ | ||
| android/app/src/main/res/values-{LANG_CODE}/ | ||
| ``` | ||
|
|
||
| 3. Translate all `<string>` tags while preserving: | ||
| - Placeholders: `%1$s`, `%d` | ||
| - XML entities: `\'` for apostrophes | ||
| - Technical terms from Apple's official translations | ||
|
|
||
| 4. Test: | ||
| ```bash | ||
| cd android | ||
| ./gradlew assembleDebug | ||
| adb shell "setprop persist.sys.locale {LANG_CODE}; setprop ctl.restart zygote" | ||
| ``` | ||
|
|
||
| ### Linux Translations | ||
|
|
||
| 1. Copy template: | ||
| ```bash | ||
| cd linux/translations | ||
| cp librepods_tr.ts librepods_{LANG_CODE}.ts | ||
| ``` | ||
|
|
||
| 2. Edit with Qt Linguist (recommended) or manually: | ||
| ```xml | ||
| <message> | ||
| <source>English text</source> | ||
| <translation>Translated text</translation> | ||
| </message> | ||
| ``` | ||
|
|
||
| 3. Test: | ||
| ```bash | ||
| mkdir build && cd build | ||
| cmake .. && make | ||
| LANG={LANG_CODE}.UTF-8 ./librepods | ||
| ``` | ||
|
|
||
| ### Needed Languages | ||
|
|
||
| High-priority: German, Japanese, Korean, Hindi, Arabic, Russian | ||
|
|
||
| --- | ||
|
|
||
| ## License | ||
|
|
||
| By contributing, you agree that your contributions will be licensed under the GNU GPL v3.0 License. | ||
|
|
||
| **Thank you for contributing to LibrePods!** 🎉 | ||
|
|
||
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.
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.
Add language to fenced code block for commit format.
markdownlint (MD040) flags missing language. Use
textto keep formatting consistent.✅ Proposed fix
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
217-217: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents