explaingit

amitshekhariitbhu/android-debug-database

8,656JavaAudience · developerComplexity · 2/5Setup · easy

TLDR

A one-line Android library that starts a local web server in debug builds so you can view, query, and edit your app's SQLite databases and settings in a browser, no root access or special tools required.

Mindmap

mindmap
  root((android-debug-database))
    What it does
      Browser-based viewer
      No root needed
      Debug builds only
    Features
      View all tables
      Run SQL queries
      Edit and delete rows
    Database types
      SQLite files
      Shared preferences
      Room in-memory DB
    Setup
      One gradle line
      Wi-Fi or emulator
      Auto port forwarding
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Browse all database tables and shared preferences of a running Android app in real time from a browser on the same Wi-Fi network.

USE CASE 2

Run ad hoc SQL queries against your app's SQLite database without a rooted device or ADB shell access.

USE CASE 3

Inspect and edit in-memory Room databases that are normally inaccessible from external developer tools.

Tech stack

JavaAndroidSQL

Getting it running

Difficulty · easy Time to first run · 5min

Device and laptop must be on the same Wi-Fi network, emulator access requires one ADB port-forwarding command.

In plain English

Android Debug Database is a Java library that lets Android developers view and edit their app's local database and settings through a web browser while the app is running. Normally, inspecting what's stored in an Android app's database requires special tools, a rooted device, or digging through developer menus. This library removes that friction. After adding one line to your project's build configuration, the library starts a small local web server when you launch the app in debug mode. It prints the server address to the log output. You open that address in a browser on the same Wi-Fi network, and you get a view of all the databases and app settings (called shared preferences) that the app uses. From the browser interface you can read all stored data, run SQL queries to search or filter records, edit values directly, add new rows or settings entries, delete records, sort and search through the data, and download the entire database file. No rooted device is needed. The library is built specifically for debug builds. When you use the recommended debugImplementation dependency setting, it is automatically excluded from production builds, so it does not ship to end users. If you need to debug an encrypted database, a separate variant of the library handles that with a password provided through the build configuration. The library also works with Android emulators via a port-forwarding command. Additional setup code lets you expose custom database file paths and in-memory Room databases, which are databases that exist only in RAM and are normally harder to inspect. The library auto-initializes on app start with no extra code required.

Copy-paste prompts

Prompt 1
I added android-debug-database to my Android project. How do I find the server address in Logcat and open it in my laptop's browser?
Prompt 2
I need to run a SQL query against my app's Room database using android-debug-database. Show me how to set it up and write the query.
Prompt 3
How do I use android-debug-database with an Android emulator instead of a physical device? What ADB port-forwarding command do I need?
Open on GitHub → Explain another repo

← amitshekhariitbhu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.