Skip to content

Contributing

Emirhan Uçan edited this page Jul 31, 2026 · 3 revisions

Contributing to HydraDragonAV Mobile

Thank you for your interest in contributing. This guide covers everything you need to get started.

Ways to Contribute

Contribution Type Description
Bug Reports Report crashes, false positives, or false negatives
Malware Samples Submit undetected samples (hash + description only)
Code Fix bugs, add features, improve performance
Documentation Improve wiki pages, add examples, fix typos
YARA Rules Write new Android malware detection rules
Localization Add or improve translations for the 20 supported languages
Testing Test on different devices and Android versions

Getting Started

1. Fork & Clone

git clone https://github.com/YOUR_USERNAME/HydraDragonAV-Mobile.git
cd HydraDragonAV-Mobile
git remote add upstream https://github.com/HydraDragonAntivirus/HydraDragonAV-Mobile.git

The native engine pulls the custom YARA-X fork as a git dependencycargo fetches it automatically, so no --recurse-submodules is needed. If you need to modify the hydradragon module itself, clone that fork separately.

2. Create a Branch

git checkout -b feature/your-feature-name

Code Standards

Rust

  • Zero-warning policy: cargo clippy -- -D warnings must pass.
  • Use rustfmt for formatting.
  • JNI functions follow the Java_com_hydradragon_antivirus_engine_NativeScanner_<name> naming convention.
  • All unsafe blocks require safety comments.
  • Android-specific code must use #[cfg(target_os = "android")] where appropriate.

Java / Kotlin

  • Follow Android AOSP code style.
  • Use AndroidX APIs where available.
  • Handle runtime permissions gracefully.

Python (Data Pipeline)

  • Follow PEP 8.
  • Use type hints where practical.

YARA Rules

  • Rules should target Android malware specifically (use the hydradragon module — including its static APK-analysis exports — where applicable).
  • Include author, date, description, and reference metadata.
  • Test rules with yara-x check before submitting.

Submitting Changes

Pull Request Process

  1. Ensure your code compiles:
    • Rust: cargo check in hydradragonandroid/
    • Android: ./gradlew assembleDebug
  2. Run clippy: cargo clippy -- -D warnings (Rust changes)
  3. Test on a physical device or emulator (Android 10+)
  4. Write a clear PR description explaining what changed and why
  5. Reference any related issues

Commit Message Format

[Component] Brief description

- Detail 1
- Detail 2

Fixes #123

Component prefixes:

  • [Engine] — Native Rust engine changes
  • [App] — Android app / Java changes
  • [Rules] — YARA rule changes
  • [Pipeline] — Data pipeline scripts
  • [CI] — Workflow / CI changes
  • [Docs] — Documentation changes
  • [L10n] — Localization changes

Reporting Issues

Bug Reports

Include:

  1. Device model and Android version
  2. HydraDragonAV Mobile version/commit
  3. Which component failed (ScanEngine, GuardService, etc.)
  4. Steps to reproduce
  5. Logcat output (if available)

False Negatives (Missed Malware)

Submit via GitHub Issues (hash + description only — never upload malware to GitHub):

  1. SHA256 hash of the sample
  2. VirusTotal link (if available)
  3. Which engines missed it

False Positives

Include:

  1. App name and package name
  2. SHA256 hash
  3. Description of the legitimate app
  4. Which engine triggered the detection

See Also

Clone this wiki locally