Code Structure
Omni is a single Gradle module (:app) with one package root, com.rebelroot.omni, organized into feature sub-packages. Here’s the map.
Repository layout
omni-browser/
├── app/ # the single Android module
│ ├── build.gradle.kts # flavors, deps, signing
│ └── src/main/
│ ├── AndroidManifest.xml
│ ├── assets/web_extensions/ # 3 bundled .xpi sources
│ ├── java/com/rebelroot/omni/ # ~75 Kotlin files
│ └── res/ # values + 9 locales
├── docs/ # ARCHITECTURE.md, SECURITY.md
├── worker/ # Cloudflare Workers backend
├── fastlane/ # store metadata
└── .github/workflows/ # release + PR CI
Package map
| Package | Contents |
|---|---|
(root) | MainActivity (single activity + NavHost), OmniApplication (theme bootstrap) |
browser/ | BrowserScreen (7.3k lines), BrowserViewModel + 8 split files, sheets, dialogs, address bar, home content, models |
browser/adblock/ | AdBlockManager — filter engine + providers |
browser/extensions/ | BuiltInExtensionManager, AiBlockerManager, UniversalCopyManager |
browser/tabs/ | SmartTabManager — domain-based auto-grouping |
media/ | MediaInterceptor, StreamDownloadEngine, FFmpegBridge, FFmpegLoader |
media/player/ | VideoPlayerScreen (ExoPlayer), OmniMediaService |
privacy/ | FireButton, TorManager, VpnManager |
tools/ | TranslationManager; tools/locker/ (vault), tools/qrcode/ (ZXing) |
settings/ | 8 settings screens (appearance, privacy, adblock, tabs, a11y, site, wallpapers) |
onboarding/ | Language selection + onboarding slides |
bookmarks/, history/, news/ui/ | Standalone screens |
ui/theme/ | OmniColors, OmniShapes, OmniTheme, OmniTypography, UiScale |
Entry points
OmniApplication
Loads the persisted theme (dark/AMOLED/accent/dynamic color) from DataStore into ThemeStateHolder before any UI is drawn, so the first frame is already themed.
MainActivity
A single FragmentActivity (Fragment is needed for the biometric prompt). It handles:
- Per-locale context wrapping in
attachBaseContext - A crash-loop-protected uncaught-exception handler
- Edge-to-edge insets and PiP support
- The Compose
NavHostwith all screen routes http/https/WEB_SEARCHintents (default-browser capable) and direct video intents
The big files
Three files carry most of the product surface. If you’re contributing, start here:
| File | Lines | Role |
|---|---|---|
browser/BrowserScreen.kt | ~7,300 | Main UI: address bar, tab strip, menus, bottom sheets, Quick Tools |
browser/BrowserViewModel.kt | ~6,000 | Central state holder and orchestrator |
browser/BrowserSheets.kt | ~3,750 | Bottom sheets incl. DevTools inspector and download dialogs |
New ViewModel logic should go into a BrowserViewModel_*.kt extension file by concern, not the main file.
Resources & localization
Strings live in res/values/strings.xml (~204 entries) with translations in nine values-* directories: Hindi, Spanish, French, German, Portuguese, Russian, Japanese, Chinese and Arabic. The manifest declares four launcher activity-aliases for alternate app icons (Default, Dark, AuraDark, AuraLight).