Skip to content

About

Feature-rich Android WebView wrapper for Google AI Mode

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

Searchmini

An Android app that wraps Google Search AI Mode in a WebView, with extras:

  • Adaptive icon — a zodiac glyph filled with a yellow→red→blue→green gradient, on a white background. The glyph is a public-domain astrology symbol.
  • Material 3 theme with light/dark mode support
  • Navbar color adapts to device type + orientation + theme:
    • Dark mode: #0F0F0F on tablet landscape (desktop-style layout), OLED black #000000 elsewhere
    • Light mode: #FDFCFC everywhere (matches the web light surface)
  • Loading screen with the Searchmini logo that fades out smoothly after first page load
  • Blob: URL download support — downloads code files, images, and other attachments that use blob: URLs (including blob:null/... from sandboxed iframes) via WebViewCompat.addDocumentStartJavaScript
  • Long-press image menu with Share / Download options (downloads the preview image — see warning in the dialog)
  • Share-to-Searchmini — share text from other apps to open an AI Mode query (udm=50), or share files to attach from the page
  • Hidden Settings menu with:
    • WebView switcher (pick which WebView implementation to use — Thorium recommended)
    • Desktop mode toggle
    • Performance optimizations (GPU blocklist bypass, surface control)
    • Update checker

Searchmini is an independent, unofficial client. It is not affiliated with, endorsed by, or sponsored by Google. The Searchmini name, icon, and source code are this project's own. Searchmini loads the public Google Search AI Mode page (https://www.google.com/ai, and https://www.google.com/search with udm=50) inside an Android WebView, the same way any general-purpose browser would.

Build

Prerequisites

  • JDK 17+ (JDK 21 tested)
  • Android SDK with platforms;android-34 and build-tools;34.0.0
  • AndroidX WebView 1.12+ (for addDocumentStartJavaScript blob capture support)

Build commands

# Set SDK location
echo "sdk.dir=$HOME/Android/Sdk" > local.properties

# Build release APK. Without SEARCHMINI_KEYSTORE this is unsigned
# (app-release-unsigned.apk). To sign it, set these in the environment
# or in ~/.gradle/gradle.properties:
#   SEARCHMINI_KEYSTORE=/absolute/path/to/searchmini-release.keystore
#   SEARCHMINI_KEYSTORE_PASSWORD=<password>
#   SEARCHMINI_KEY_ALIAS=<alias>
#   SEARCHMINI_KEY_PASSWORD=<password>
./gradlew assembleRelease

# Signed APK:   app/build/outputs/apk/release/app-release.apk
# Unsigned APK: app/build/outputs/apk/release/app-release-unsigned.apk

Debug build

./gradlew assembleDebug
# APK lands in app/build/outputs/apk/debug/app-debug.apk

How blob: URL downloads work

Android WebView's DownloadListener only gives Java a URL string. For blob: URLs (especially blob:null/... created in sandboxed iframes), Java can't fetch the blob directly. This app uses WebViewCompat.addDocumentStartJavaScript (androidx.webkit 1.12+) to inject a blob-capture script into every frame at document creation time. The script:

  1. Overrides URL.createObjectURL in every frame (main + all iframes, including sandboxed null-origin ones)
  2. Eagerly reads each blob via FileReader.readAsDataURL at creation time (before the page can revoke the URL)
  3. Main frame stores blob data in window.__blobRefs
  4. Iframes send blob data to parent via postMessage (works cross-origin)
  5. When the DownloadListener fires, the download interceptor checks __blobRefs first, then falls back to fetch()

See app/src/main/assets/blob_capture.js and app/src/main/assets/download_interceptor.js for the implementation.

Updates

The in-app Check for updates button queries the GitHub releases API for this repository:

https://api.github.com/repos/MrHuaweiFan/Webmini/releases

When a newer release is found, the app opens the release's download page in the user's default browser. If you fork this repo, update REPO_API and USER_AGENT in app/src/main/java/com/searchmini/app/webview/UpdateChecker.java to point at your own releases.

Customization

  • Web URL: edit URL in app/src/main/java/com/searchmini/app/MainActivity.java (https://www.google.com/ai). Shared text opens https://www.google.com/search?udm=50&q=....
  • App name: edit app_name in app/src/main/res/values/strings.xml
  • App icon: edit app/src/main/res/drawable/ic_launcher_foreground.xml (vector drawable with gradient) and regenerate the PNG fallbacks, or just replace the ic_launcher.png files under app/src/main/res/mipmap-*/
  • Version: edit versionCode / versionName in app/build.gradle

Credits

Based on WebGPT.

License

Searchmini is free software released under the MIT License — see LICENSE for the full text. The Searchmini name and icon are this project's own and do not infringe any third-party trademark. This project is not affiliated with Google and loads the public Google Search AI Mode page inside an Android WebView.

F-Droid metadata

The repository ships F-Droid / Fastlane upstream metadata so the app's listing (description, icon, screenshots, changelog) is under direct control of the developer:

fastlane/metadata/android/en-US/
├── short_description.txt        (≤ 80 chars, no trailing dot)
├── full_description.txt
├── changelogs/
│   └── 22.txt                   (max 500 chars; 22 = versionCode)
└── images/
    ├── icon.png                 (512×512 PNG)
    ├── phoneScreenshots/        (1.png … 5.png)
    └── sevenInchScreenshots/    (1.png)

See Submitting to F-Droid — Quick Start Guide for the official spec.

This project loads the public Google Search AI Mode page. It is not a Google product.

About

Feature-rich Android WebView wrapper for Google AI Mode

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages