Skip to content
Projects

shreyagarwal72/petal has 169 GitHub stars and 10 forks. Star changes are not measured yet. Last checked 2026-11-13 20:09 UTC. Last push 2026-11-13.

How these counts are measured

What you can do

  • Firefox GeckoView Engine Independent from Android WebView. Complete Gecko 159 web standards, CSS grids, and extensions runtime. - Native Rust Adblocking Powered by adblock-rust compiled via NDK. Real-time cosmetic hiding and script blocking before download.

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Material 3 Expressive Browser For Android

Security

README.md

Original
Petal Browser



Petal

A private, fast Android browser on Firefox's GeckoView engine, designed with Material 3 Expressive.


Google Play Store Download APK Petal Website GitHub Source Telegram Channel Report an Issue

GeckoView 159 Rust Adblock Material 3 Expressive 100% Ad-Free Zero Telemetry Add-ons Ready Android 8.0+ Kotlin Compose GPL-3.0 Google Play Petal Web PRs Welcome


Features · Screenshots · Quick Facts · Permissions · Build · FAQ


Petal is a private, open-source browser for Android built from the ground up on Mozilla's GeckoView engine instead of standard Chromium WebView. It blocks ads, tracking beacons, and crypto miners before they execute, combined with fluid Material 3 Expressive spring physics, adaptive dynamic coloring, and deep Firefox add-on integration.


Quick Facts

AttributeDetails
App NamePetal Browser
PlatformAndroid 8.0 and above (API 26+, target API 36)
EngineMozilla GeckoView 159 (Independent standards engine)
Ad BlockingHigh-performance native Rust engine (Brave adblock-rust) + uBlock & Hagezi lists
UI SystemJetpack Compose & Material 3 Expressive (Spring physics, morphing shapes, dynamic color)
ExtensionsFirefox WebExtensions / Add-ons support
PrivacyZero accounts, local biometric password vault, per-site shield, zero telemetry
AI AssistantOptional BYOK (Gemini, OpenAI, Anthropic, Groq, Ollama)
LicenseGNU GPL v3.0

Screenshots

Petal home Petal tabs Petal shield Petal AI Petal settings

Features

Firefox GeckoView Engine

Independent from Android WebView. Complete Gecko 159 web standards, CSS grids, and extensions runtime.

Native Rust Adblocking

Powered by adblock-rust compiled via NDK. Real-time cosmetic hiding and script blocking before download.

Material 3 Expressive

Dynamic color extracted from wallpaper, morphing bottom pill bar, fluid spring curves, and true-black AMOLED mode.

Hardware-Backed Privacy

BiometricPrompt-protected password vault, granular per-site tracking shield, and zero background analytics.

Segmented Downloader

Multi-threaded background download manager, floating picture-in-picture media player, and native PDF viewer.

Bring-Your-Own-Key AI

Optional on-device and cloud companion. Connect Gemini, OpenAI, Claude, or local Ollama instances to query pages.

Permissions

Petal asks only when a feature is actively invoked:

Permission Purpose
INTERNET & ACCESS_NETWORK_STATE Loading web pages and detecting connection state.
CAMERA & RECORD_AUDIO Requested only when a web page prompts for camera/mic access or QR code scanning.
ACCESS_FINE_LOCATION Optional; prompted strictly per site with granular allow/block toggles.
READ_MEDIA_* & storage Uploading files, viewing downloaded PDFs, and local storage management.
POST_NOTIFICATIONS & foreground Foreground services for ongoing downloads and background media playback.
USE_BIOMETRIC Unlocking your local password safe with biometric authentication.
VIBRATE Material 3 Expressive spring motion haptics and touch feedback.
REQUEST_INSTALL_PACKAGES Optional built-in seamless updater for GitHub releases.
SYSTEM_ALERT_WINDOW Optional floating island on devices running versions without Android 16 Live Updates.

Tech Stack

LayerLibrary / ToolRole
LanguageKotlin 2.x · Rust (NDK)Expressive, null-safe app code with high-performance native adblock filtering.
UI SystemJetpack Compose · Material 3 ExpressiveDynamic container transforms, custom spring specs, and expressive motion tokens.
Browser EngineMozilla GeckoView 159Independent browser engine and WebExtension runtime.
Ad Blockingadblock-rust (NDK JNI)High-performance URL rule parsing and cosmetic element filtering.
ArchitectureMVVM · StateFlow · FlowClean separation of reactive UI state and GeckoView engine events.
Dependency InjectionDagger HiltModular singleton and Android lifecycle dependency injection.
Storage & VaultRoom SQLite · SQLCipher · BiometricsEncrypted vault for credentials, history, and bookmarks.
Privileged APIsShizuku APIElevated system integration for package installs & overlays without root.
Platform TargetsMin SDK 26 (Android 8.0) · Target SDK 36Broad compatibility from Android 8 through modern Android versions.

Architecture & Codebase Mind Map

Petal is a reactive, single-app Android project built on Mozilla GeckoView with a high-performance native Rust core. Explore the architectural mind map and interactive package tree below:

Petal Browser Architecture Mind Map

🗺️ View Mermaid Syntax Diagram (Click to expand)
graph TD
    classDef core fill:#b81d63,stroke:#ffd9e3,stroke-width:2px,color:#ffffff,font-weight:bold
    classDef ui fill:#463647,stroke:#cfb8ce,stroke-width:1.5px,color:#fed7ff
    classDef engine fill:#224466,stroke:#78b3f0,stroke-width:1.5px,color:#e1f0ff
    classDef sec fill:#2b4c38,stroke:#85d6a4,stroke-width:1.5px,color:#e8f8ee
    classDef native fill:#5c351f,stroke:#f0a878,stroke-width:1.5px,color:#ffeedd

    Petal["🌸 Petal Browser"]:::core

    Petal --> UI["🎨 Material 3 Expressive UI<br/>ui / compose"]:::ui
    Petal --> Engine["⚡ GeckoView 159 Engine<br/>engine"]:::engine
    Petal --> Privacy["🛡️ Privacy & Security Vault<br/>passwords / privacy / sync"]:::sec
    Petal --> Media["🎵 Media & Download Manager<br/>media / download"]:::ui
    Petal --> Rust["🦀 Native Rust Adblock NDK<br/>native/adblock_rs"]:::native

    UI --> U1["Morphing Shapes & Spring Curves"]:::ui
    UI --> U2["Liquid Glass Address Pill"]:::ui
    UI --> U3["Predictive Back & Depth Blur"]:::ui
    UI --> U4["60fps Tab Grid Switcher"]:::ui

    Engine --> E1["Firefox WebExtension Runtime"]:::engine
    Engine --> E2["GeckoSession & Tab History Controller"]:::engine
    Engine --> E3["Total Cookie Protection & Sandboxing"]:::engine

    Privacy --> P1["BiometricPrompt Password Vault"]:::sec
    Privacy --> P2["SQLCipher Local Encrypted SQLite"]:::sec
    Privacy --> P3["Zero Telemetry & Per-Site Shields"]:::sec

    Media --> M1["mpvEx Floating Video PiP"]:::ui
    Media --> M2["Hi-Res Audio Player & Sniffer"]:::ui
    Media --> M3["Fetch2 Resumable Multi-thread Downloads"]:::ui

    Rust --> R1["Brave adblock-rust NDK Engine"]:::native
    Rust --> R2["Sub-millisecond Cosmetic Hiding"]:::native
    Rust --> R3["HaGeZi PRO & uBlock Network Filters"]:::native
📂 Interactive Package Directory Tree (Click to expand)

Paths below are inside app/src/main/java/com/petal/browser/ unless noted:

Area Package Path Architectural Responsibility
UI Components ui/ Shared M3E containment, glass effects, dynamic wallpaper palette, and haptics.
Screens compose/ Full-screen Compose views: Home, Tab Grid, Settings, Downloads, PDF Viewer, and AI Hub.
Browser Engine engine/ Mozilla GeckoView integration, WebExtensions bridge, and navigation event dispatcher.
Media Player media/ Native audio/video player with PiP, media sniffer, and playback notification service.
Downloads download/ Multi-threaded segmented background download manager with auto-resumption.
Privacy & Vault passwords/ privacy/ Hardware-backed biometric encrypted SQLite vault and per-site tracking defense.
Account Sync sync/ Optional end-to-end encrypted Firefox Account sync engine.
Native Adblock native/adblock_rs/ JNI bindings and Brave adblock-rust compiled via Android NDK (repo root).
Startup Profile baselineprofile/ Android Baseline Profile for instant cold starts and smooth 120Hz scrolling.
Project Site site/ Fast static documentation, changelog, PRD, and privacy portal.

Building

You need JDK 17 or newer and the Android SDK.

git clone https://github.com/shreyagarwal72/petal.git
cd petal

./gradlew assembleDebug      # debug APK
./gradlew assembleRelease    # release APK

The release APK is written to app/build/outputs/apk/release/. Or open the folder in Android Studio and run the app configuration on a device.

Contributing

Bug reports, ideas and pull requests are welcome, especially for browsing reliability, interface polish, privacy and documentation. Read the code of conduct first, and open an issue before starting a large change. For the visual rules, start with design.md.

Credits

License

Petal is free software under the GNU General Public License v3.0.

Made by Vanshu Agarwal From India 🇮🇳

Explore related projects