Skip to main content

Code of Conduct

By participating in this project, you agree to:
  • Be respectful and inclusive
  • Focus on constructive feedback
  • Help create a welcoming environment for all contributors
  • Follow the project’s technical standards

Code Style

Java Conventions

Follow the existing code style in the project:

Code Formatting

  • Use 4 spaces for indentation (no tabs)
  • Consistent with existing files in app/src/main/java/ and server/src/main/java/

Compiler Warnings

The project is configured to show unchecked and deprecation warnings:
Fix all compiler warnings before submitting your PR. Clean builds should produce no warnings.

Commit Message Format

Write clear, descriptive commit messages following this format:

Structure

Types

  • feat: New feature or functionality
  • fix: Bug fix
  • refactor: Code restructuring without behavior change
  • perf: Performance improvements
  • docs: Documentation changes
  • style: Code formatting, missing semicolons, etc.
  • test: Adding or updating tests
  • build: Build system or dependency changes
  • chore: Maintenance tasks

Examples

Pull Request Process

Before Submitting

1

Fork and Branch

Fork the repository and create a feature branch:
2

Make Your Changes

  • Follow the code style guidelines
  • Keep commits atomic and focused
  • Test your changes thoroughly
3

Test Locally

Verify your changes work:
Test on both:
  • Physical devices
  • Emulators (if applicable)
4

Update Documentation

  • Update relevant documentation files
  • Add code comments for complex logic
  • Update README.md if adding user-facing features

Submitting Your PR

  1. Push to Your Fork
  2. Create Pull Request
    • Go to the original repository on GitHub
    • Click “New Pull Request”
    • Select your fork and branch
    • Fill out the PR template
  3. PR Description Should Include
    • Clear description of what changed and why
    • Screenshots/videos for UI changes
    • Testing steps performed
    • Related issue numbers (e.g., “Fixes #123”)

PR Template

Review Process

  • Maintainers will review your code
  • Address feedback promptly
  • Push additional commits to the same branch
  • Don’t force-push after review has started
  • All builds must pass
  • No new compiler warnings
  • Code must compile for both debug and release
Your PR will be merged when:
  • All review comments are addressed
  • CI builds pass
  • At least one maintainer approves
  • No merge conflicts exist

Testing Requirements

Manual Testing Checklist

Before submitting, test these scenarios:
  • Connect to device on same network
  • Connect to device on public network
  • IPv4 address format
  • IPv6 address format
  • Hostname format
  • Handle connection failures gracefully

Test Build Variants

Always test both build types:

Documentation Updates

When to Update Docs

Update documentation when you:
  • Add new features or functionality
  • Change existing behavior
  • Fix bugs that affect user experience
  • Add configuration options
  • Change build requirements

Documentation Files

README.md

User-facing instructions and feature descriptions

Code Comments

Inline documentation for complex logic

JavaDoc

API documentation for public methods/classes

Docs Site

Comprehensive guides and tutorials

License

Scrcpy for Android is licensed under the GNU General Public License v3.0 (GPL-3.0).

What This Means

  • The software is free and open source
  • You can modify and distribute the software
  • Modified versions must also be GPL-3.0 licensed
  • You must disclose source code when distributing
  • Changes must be documented

Contributing Code

By contributing to this project, you agree that:
  • Your contributions will be licensed under GPL-3.0
  • You have the right to submit the code
  • You grant the project maintainers the right to use your contribution
Add this to new files you create:

Reporting Bugs

Before Reporting

1

Search Existing Issues

Check if the bug has already been reported:
  • Search open and closed issues
  • Look for similar problems
  • Check if it’s already fixed in main branch
2

Gather Information

Collect the following details:
  • Scrcpy for Android version
  • Android version of both devices
  • Device models
  • Steps to reproduce
  • Expected vs actual behavior
  • Logcat output
3

Verify the Bug

  • Test on latest version
  • Try to reproduce consistently
  • Test on different devices if possible

Bug Report Template

Getting Logs

Capture logs to help debug:

Feature Requests

Proposing Features

We welcome feature suggestions! Before proposing:
  • Search issues for similar requests
  • Review closed feature requests
  • Check the project roadmap if available
Good feature requests:
  • Align with project goals
  • Benefit multiple users
  • Are technically feasible
  • Don’t overcomplicate the app
Include in your request:
  • Clear use case and motivation
  • Expected behavior description
  • UI/UX mockups (if applicable)
  • Technical approach (if you have ideas)

Feature Request Template

Implementing Features

Interested in implementing a feature yourself?
  1. Comment on the feature request issue
  2. Discuss approach with maintainers
  3. Wait for approval before starting work
  4. Follow the PR process outlined above

Getting Help

If you need assistance:

GitHub Issues

For bug reports and feature requests

GitHub Discussions

For questions and community support

Code Review

Tag maintainers in your PR for review

Documentation

Check the docs for guides and references
Be patient and respectful. Maintainers are volunteers who contribute in their free time.

Recognition

Contributors are recognized in:
  • GitHub contributors list
  • Release notes for significant contributions
  • Code comments for complex implementations
Thank you for contributing to Scrcpy for Android!