Skip to content

batmanpriv/HyperAdvancedDownloader-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HAD β€” Hyper Advanced Downloader

HAD Banner

Android Kotlin Compose License GitHub Downloads

A fully native Android download manager built entirely in Kotlin.
Multi-thread β€’ HLS Streams β€’ Torrent β€’ Web Archive β€’ Remote Control


πŸ“– Table of Contents


πŸ“± Screenshots

Main Screen Download Manager HLS Download Torrent Client
Main Dashboard Download Manager HLS Stream Download Torrent Client

✨ Features

⚑ Core Downloading

Feature Description
Multi-thread HTTP Split files into parallel chunks for maximum speed (up to 16 threads)
Resumable downloads Automatically resumes from exact byte position after interruption, app close, or device reboot
Session saving Download progress persisted to disk; never lose progress
Smart queue Configurable concurrent download limit; queue promotes automatically when a slot opens
Mirror / fallback URLs Probes all mirrors on start, picks the fastest; auto-switches on failure
Adaptive buffer Buffer size adjusts dynamically based on connection speed
Speed limiting Token Bucket algorithm for smooth, configurable bandwidth cap per download

πŸ“Ί HLS / Stream Downloading

  • Full .m3u8 playlist support (VOD and Live streams)
  • Auto-selects highest quality variant from master playlist
  • Parallel segment downloading with configurable thread count
  • AES-128 and SAMPLE-AES decryption β€” fetches key automatically
  • Segments merged and converted to a single .mp4 file via FFmpeg
  • Live stream recording β€” continuously downloads new segments until stream ends or manually stopped
  • fMP4 / fragmented MP4 init segment support
  • Audio and subtitle track extraction

🌊 Torrent & Magnet

Feature Description
.torrent file Full parsing and downloading
Magnet links Support with DHT metadata fetching
Multi-tracker HTTP + UDP tracker announce
DHT discovery Bootstrap nodes for peer finding
Piece verification SHA-1 checksum validation
Per-file selection Choose exactly which files to download
Peer management Choking/unchoking algorithm with rarest-first piece selection
Endgame mode Optimized completion for near-finished downloads

🌐 Built-in Browser

  • Full WebView browser with multi-tab support
  • Automatic file interception β€” detects downloadable files via WebView + JavaScript bridge
  • Monitors XHR, fetch, video/audio/source elements in real time
  • Incognito mode β€” no history, cookies, or cache saved
  • Desktop Site toggle
  • Paste & Go from clipboard
  • Intercepted files panel with one-tap download
  • Quick access to popular websites

πŸ” Link Scraper

  • Scrape any web page for downloadable links
  • Detects: video, audio, archives, documents, HLS, DASH, torrents, subtitles, images, fonts, and more
  • Filter by file type, extension, or filename keyword
  • Select multiple links and batch download or queue
  • Direct link to New Download dialog for custom configuration per link

πŸ“¦ Web Archive

  • Save any website for offline viewing
  • Single Page mode (fast) or Full Site crawl mode (recursive)
  • Downloads HTML, CSS, JavaScript, images, fonts, and all assets
  • Rewrites all internal links for correct offline rendering
  • Configurable: max pages, concurrency, asset size limit, retries
  • Cookie and custom header support for authenticated pages
  • Optional HTML minification
  • iframe crawling and hash route (SPA) support

πŸ“‘ Remote Download Server

  • Turns your phone into a local HTTP server (port 8080)
  • Control downloads from any PC browser on the same Wi-Fi
  • Web UI with single URL download, bulk URL download, and request history
  • Re-download or re-queue any past request from history
  • Live server status and request counter

πŸ“‹ Clipboard Detection

  • Detects URLs copied to clipboard on demand
  • Handles single URLs or multiple URLs in one paste
  • Auto-detects download type (HTTP / HLS / torrent)
  • Selection dialog for multi-URL clipboard content

πŸ”„ Smart Retry Engine

Status Code Strategy
403 Rotates User-Agent, adds browser-like headers
429 Exponential back-off (5s β†’ 120s)
503 Increasing delay with UA rotation
Timeout Increasing delay up to 60s
500-599 Exponential back-off with retry limit
  • Pool of 8 User-Agent strings (Chrome, Firefox, Safari, curl, wget, Python)
  • Cookie refresh on auth failures

⏰ Download Scheduler

  • Schedule any download to start at a specific date and time
  • Global time window setting β€” downloads only run within allowed hours
  • AlarmManager with setExactAndAllowWhileIdle β€” fires even in Doze mode
  • Downloads auto-pause outside the window and resume when it opens
  • Preset scheduling chips: Tonight, Midnight, Dawn

πŸ” Advanced Options (per download)

Option Description
Proxy HTTP and SOCKS5 support
Cookies Custom cookie header
HTTP Headers Custom headers (one per line)
User-Agent Custom user agent string
Checksum MD5, SHA-1, SHA-256, SHA-512
HTTP Method GET, POST, etc.
Thread Count Configurable per download
Max Speed Bandwidth cap per download
Retries Per-chunk retry count
Timeout Connection timeout

πŸ—‚οΈ Duplicate Detection

  • Checks filesystem and download history before starting
  • Options:
    • Rename β€” auto-increments filename (file (1).mp4)
    • Overwrite β€” replaces existing file
    • Skip β€” cancels download

πŸ“Š Analytics

Metric Description
Overview Total downloads, success rate, total saved, avg and peak speed
Monthly chart Download volume per month
Hourly heatmap Download distribution by hour of day
Speed history Real-time speed graph for current download
Recent history Last 200 downloads with status, size, and speed
Auto-purge Data older than 30 days automatically removed

🎨 UI & Design

  • Dark space theme with electric cyan accent (#00D4FF)
  • Built entirely with Jetpack Compose + Material3
  • Animated progress bars with glow effects
  • Thread visualizer β€” 3 modes: Segment Bar, Waveform, Grid
  • Countdown badge for scheduled downloads
  • Multi-select mode with batch delete
  • Status badges with pulse animation
  • Smooth animated transitions throughout

πŸ“± Screenshots

Screenshots coming soon β€” stay tuned!


πŸ—οΈ Architecture

app/src/main/java/com/had/downloader/
β”‚
β”œβ”€β”€ MainActivity.kt                    ← Entry point + permission gates
β”œβ”€β”€ AppModule.kt                       ← Hilt dependency injection
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ model/
β”‚   β”‚   └── Models.kt                  ← Data classes, enums, extension functions
β”‚   └── repository/
β”‚       β”œβ”€β”€ Database.kt                ← Room DB, DAOs, type converters
β”‚       β”œβ”€β”€ AnalyticsDao.kt            ← Analytics queries
β”‚       └── AnalyticsRepository.kt     ← Analytics business logic
β”‚
β”œβ”€β”€ service/
β”‚   β”œβ”€β”€ SmartDownloader.kt             ← Core multi-thread HTTP engine
β”‚   β”œβ”€β”€ HlsDownloader.kt               ← HLS/M3U8 stream downloader
β”‚   β”œβ”€β”€ TorrentEngine.kt               ← BitTorrent client
β”‚   β”œβ”€β”€ ScraperEngine.kt               ← Web page link extractor
β”‚   β”œβ”€β”€ VideoDetectionEngine.kt        ← Stream/media URL detector
β”‚   β”œβ”€β”€ WebArchiveEngine.kt            ← Website archiver/crawler
β”‚   β”œβ”€β”€ RemoteDownloadServer.kt        ← Local HTTP control server
β”‚   β”œβ”€β”€ ForegroundDownloadService.kt   ← Android foreground service
β”‚   β”œβ”€β”€ DownloadSchedulerService.kt    ← Scheduled download service
β”‚   β”œβ”€β”€ SmartRetryEngine.kt            ← Intelligent retry logic
β”‚   β”œβ”€β”€ DuplicateDetector.kt           ← Duplicate file detection
β”‚   β”œβ”€β”€ FileSizeFetcher.kt             ← HEAD/GET file info fetcher
β”‚   β”œβ”€β”€ ClipboardMonitor.kt            ← Clipboard URL detection
β”‚   β”œβ”€β”€ BrowserInterceptor.kt          ← WebView request interceptor
β”‚   β”œβ”€β”€ Scheduler.kt                   ← AlarmManager scheduling
β”‚   β”œβ”€β”€ BootReceiver.kt                ← Resume downloads after reboot
β”‚   β”œβ”€β”€ DownloadAlarmReceiver.kt       ← Alarm trigger handler
β”‚   └── TriggerReceiver.kt             ← Internal broadcast receiver
β”‚
└── ui/
    β”œβ”€β”€ theme/
    β”‚   └── Theme.kt                   ← Colors, typography, Material3 scheme
    β”œβ”€β”€ components/
    β”‚   β”œβ”€β”€ Components.kt              ← Shared UI components
    β”‚   β”œβ”€β”€ ThreadVisualizer.kt        ← Download thread visualization
    β”‚   └── HlsProgressCard.kt         ← HLS segment progress display
    └── screens/
        β”œβ”€β”€ MainScreen.kt              ← Main UI + navigation drawer
        β”œβ”€β”€ MainViewModel.kt           ← Central ViewModel
        β”œβ”€β”€ AnalyticsTab.kt            ← Analytics dashboard
        β”œβ”€β”€ BrowserTab.kt              ← Built-in browser
        β”œβ”€β”€ EnhancedBrowserTab.kt      ← Browser implementation
        β”œβ”€β”€ TorrentTab.kt              ← Torrent management UI
        β”œβ”€β”€ RemoteServerTab.kt         ← Remote server control UI
        β”œβ”€β”€ WebArchiveTab.kt           ← Web archive UI
        β”œβ”€β”€ SettingsDialog.kt          ← App settings
        β”œβ”€β”€ AboutTab.kt                ← About + donate
        β”œβ”€β”€ GuideTab.kt                ← Full in-app user guide
        β”œβ”€β”€ SchedulePicker.kt          ← Schedule time picker
        β”œβ”€β”€ PermissionScreen.kt        ← Storage permission gate
        β”œβ”€β”€ ShareReceiverActivity.kt   ← Share intent handler
        └── ChunkSessionManager.kt     ← Download session persistence

πŸ› οΈ Tech Stack

Technology Purpose
Kotlin 100% of the codebase
Jetpack Compose Declarative UI framework
Material3 Design system
Hilt / Dagger Dependency injection
Room Local database for download history
Kotlin Coroutines + Flow Async operations and reactive state
FFmpeg Kit HLS segment merging and MP4 conversion
AlarmManager Exact scheduled downloads (Doze-safe)
WebView Built-in browser with JS bridge
SharedPreferences User preferences storage
Foreground Service Background download execution
Broadcast Receiver Boot completion and alarm triggers

πŸš€ Quick Start

Prerequisites

  • Android Studio Hedgehog or newer
  • JDK 17
  • Android SDK 36

Steps

git clone https://github.com/batmanpriv/HyperAdvancedDownloader-Android.git
cd HyperAdvancedDownloader-Android

Open in Android Studio:

File β†’ Open β†’ select the HyperAdvancedDownloader-Android folder β†’ wait for Gradle sync

Run on device:

Run β†’ Run 'app'

Build release APK:

Build β†’ Generate Signed Bundle/APK β†’ APK

βš™οΈ Configuration

All settings are configurable from the in-app Settings screen:

Setting Default Description
Default threads 4 Parallel chunks per download
Max concurrent 2 Simultaneous active downloads
Default proxy β€” HTTP or SOCKS5 proxy
Max speed Unlimited Bandwidth cap in bytes/s
Retries 5 Max retry attempts per chunk
Timeout 30s Connection timeout
Schedule window Disabled Allowed download hours
Save folder Downloads/HAD Default output directory
Gzip Disabled Enable gzip compression
Session resume Enabled Resume interrupted downloads

πŸ“‹ Requirements

Requirement Details
Android Version 8.0+ (API 26+)
Architecture arm64-v8a
Storage Permission MANAGE_EXTERNAL_STORAGE (Android 11+) or WRITE_EXTERNAL_STORAGE (Android 10 and below)
Network Internet access for downloads
Optional Wi-Fi for Remote Server

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Guidelines

  • Follow Kotlin coding conventions
  • Write meaningful commit messages
  • Update documentation for user-facing changes
  • Test on multiple Android versions when possible

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ“¬ Contact

Platform Link
GitHub @batmanpriv
Email spect3rog@gmail.com
Donate coffeete.ir/specter

πŸ’° Support

If HAD has been useful to you, consider supporting its development:

Bitcoin (BTC)

bc1q00h2kl4uvwcvzp7zdl80yx97f0p8jv450qdzwc

Tron (TRX)

TL1417xeaNrvU6La3N5Vgpye1e47i4zHUv

Donate


Built with ❀️ entirely in Kotlin + Jetpack Compose

A fully Kotlin-based native Android app