Skip to content

About

An in-app debugger for Android, with a browser dashboard for when you want a bigger screen.

Resources

Contributing

Security policy

Stars

28 stars

Watchers

1 watching

Forks

Repository files navigation

DevConsole

An in-app debugger for Android, with a browser dashboard for when you want a bigger screen.

JitPack License: MIT minSdk 23 CI


In-app inspector showing live network traffic on the device  Web dashboard overview with traffic health and the latest signals

Shake your debug build and DevConsole opens on top of it. Network traffic, crashes and ANRs, feature flags, SharedPreferences, SQLite, files — all of it on the device, no cable required.

When a phone screen isn't enough, start the embedded server and the same data live-tails into any browser, where you can also edit mock rules and export HAR, Postman, or a whole bug report.

Your release build never sees any of it. It compiles against a no-op twin that records nothing and links no server code, and the Gradle plugin fails the build if the real runtime ever slips in.

Contents · Quick start · What you get · How it works · Guide · Artifacts · Permissions · Security · Samples · Docs

Quick start

1. Add the JitPack repository to your settings.gradle.kts — DevConsole is distributed through JitPack:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

2. Add the plugin and two dependencies to your app's build.gradle.kts:

plugins {
    id("com.android.application")
    id("io.github.devconsole-android") version "1.4.1"
}

dependencies {
    debugImplementation("com.github.devconsole-android.DevConsole:devconsole:1.4.1")
    releaseImplementation("com.github.devconsole-android.DevConsole:devconsole-noop:1.4.1")
}

3. Open the inspector on the device. The SDK auto-initializes on debuggable builds, so this works right away from any button in your debug UI:

DevConsole.open(context)

Or go hands-free. Opt into the built-in triggers and shake the device, or tap a draggable floating button:

DevConsole.initialize(
    application,
    DevConsoleConfig.default()
        .withOpenTriggers(OpenTriggers(shakeToOpen = true, floatingButton = true)),
)

That's the setup. You now have crash and ANR reports, feature flags, and editable inspectors for SharedPreferences, SQLite, and files. Add one line to your HTTP client (see Wire up your network stack) and network, WebSocket, and MQTT traffic show up too.

4. Want a bigger screen? Start the browser dashboard. Tap Start server on the inspector's More screen and it hands you a connect URL and a QR code. You can also do it from code. Either way your manifest needs INTERNET, which most apps already declare:

lifecycleScope.launch { // startBrowser is a suspend function; the server never starts on its own
    val result = DevConsole.startBrowser(StartRequest())
    val connectUrl = (result as? StartResult.Started)?.access?.connectUrl
    // e.g. http://192.168.0.15:8080 — surface this in your debug UI
}

Browser authentication is off by default for local development, so opening that URL does not require a new key after each build. To restore the single-use session-code flow, opt in explicitly:

DevConsole.initialize(
    application,
    DevConsoleConfig.default().withBrowserSecurity(BrowserSecurity.SESSION_CODE),
)

The default binding is BindingMode.AUTO: it binds your device's network address when there is one, so the URL opens from any machine on the same Wi-Fi, and falls back to 127.0.0.1 when there isn't. If it fell back — or if you passed BindingMode.LOOPBACK to keep it off the network on purpose — forward the port first:

adb forward tcp:8080 tcp:8080   # use the port from the loopback start's log line

Then open the URL. With the default BrowserSecurity.NONE, the bare address is enough. With BrowserSecurity.SESSION_CODE, open the full #code= URL because that fragment is the credential.

The dashboard speaks plaintext HTTP. On a network address, everything it shows — headers, tokens, bodies — is readable by anyone who can see your traffic. That is fine on a home or office Wi-Fi and a bad idea on a conference or café network. Pass BindingMode.LOOPBACK to rule it out, and read the threat model.

What you get

Area What it does
In-app inspector DevConsole.open(context) shows every inspector below as an on-device screen (included with devconsole), plus a QR code for pairing the browser. Opens by shake (adjustable intensity) or draggable floating button via the opt-in DevConsoleConfig.openTriggers flags. Its More screen can also start and stop the dashboard server.
Network inspector Every HTTP call with headers, bodies, and a DNS/TCP/TLS/send/wait/receive timing bar. Live-tails as traffic happens.
Find in a capture Every detail screen has a find field that filters and highlights as you type. Network captures go further: step through hits with a counter and arrows, scope the search to the sections you choose, and match field names, values, or both. Any body can be expanded full-screen to read or copy.
WebSocket & MQTT inspectors Connection lifecycles and every frame, inbound and outbound. MQTT rides the Eclipse Paho adapter.
Mock rules Serve canned responses for matching requests (OkHttp), toggled from the dashboard, with deterministic priority matching. Wired by installDevConsole and editable out of the box.
Request composer Make the device issue ad-hoc HTTP requests from the dashboard. Enabled by default; empty host lists allow any host, non-empty lists restrict destinations.
Crash & ANR capture Uncaught exceptions and a main-looper watchdog with bounded all-thread dumps and breadcrumbs. Always delegates to any crash reporter you already have.
Push timeline Record FCM (or any) push messages and their lifecycle: received → displayed → opened. The Firebase adapter uses reflection — no compile-time Firebase dependency.
State & feature flags Snapshot host-registered state and override feature flags from the browser.
Location ping tracker Record the location-ping requests you name to files on the device and replay them on a map: every ping coloured by whether it was sent, failed, dropped on the device or never left it, with device- and fix-time gaps, filters, and a route summary. See Location pings.
Remote Config inspector Every Remote Config value active on the device, and where each one came from — server, in-app default, static fallback, or a local override — plus last fetch time and status. Read-only. The Firebase adapter uses reflection — no compile-time Firebase dependency.
Data inspectors Browse and edit SharedPreferences, SQLite (incl. a SQL console), and app files. All editing capabilities enabled; read-only operation is opt-in.
Evidence tray & exports Flag anything, attach it to a bug report bundle or Markdown/Jira/GitHub clipboard text. Export HAR, Postman Collection, or a full session ZIP.
Background keep-alive Default foreground service that keeps the server alive while your app is backgrounded. Enabled by the debug-only full runtime; the no-op runtime contributes no service or permissions.

Capture is category-scoped. DevConsoleConfig.withCaptureCategories(...) narrows what gets recorded to any of NETWORK, SOCKET, MQTT, PUSH, LOGS, CRASHES, STATE, INSPECTION, and MOCKS. All of them are on by default. Events land in a Room database with a retention policy that defaults to 7 days or 100 MB, whichever comes first.

How it works

devconsole (debug) and devconsole-noop (release) expose the same public API. The no-op twin records nothing, serves nothing, and links no server code. Production safety comes from which artifact you depend on, not from a runtime flag someone can forget to set.

The Gradle plugin (io.github.devconsole-android) wires that debug/release split for you if you omit the dependencies. It then checks three things: your declared dependencies, the resolved runtime classpath, and the bytes in the final APK or AAB. If the full runtime reaches a protected variant, the build fails.

On debuggable builds the SDK initializes itself from its own ContentProvider, so there is no Application.onCreate boilerplate. The server is the exception: it never auto-starts. You always call startBrowser(...) yourself.

Step-by-step guide

Open the in-app inspector

DevConsole.open(context) opens the inspector from any trigger you like and returns an InspectorOpenResult. If you'd rather not write that call, opt into the built-in triggers. Both are off by default, and neither ever starts the server:

DevConsoleConfig.default().withOpenTriggers(
    OpenTriggers(
        shakeToOpen = true,
        shakeIntensity = ShakeIntensity.MEDIUM, // LIGHT | MEDIUM | FIRM
        floatingButton = true,
    ),
)

The floating button is draggable. Press and move it anywhere on screen and it stays there across Activity changes and rotation, re-clamping into the window so it can never strand itself off-screen. It sits at 65% opacity so it doesn't hide your UI, and goes fully opaque while you touch it. A drag never counts as a tap, so moving it won't open the inspector.

Both triggers are UI-framework agnostic. The button is a plain ImageView on the Activity's decor view and the shake detector is a sensor listener, so an XML/Views or Java host behaves exactly like a Compose one, with no ui-compose or ui-views dependency involved. In Java that reads OpenTriggers.builder().shakeToOpen(true).floatingButton(true).build(), as views-java-app does.

Java: DevConsoleConfig.builder().openTriggers(OpenTriggers.builder().shakeToOpen(true).build()).

Start and stop the dashboard server

No code required. The inspector's More screen has Start and Stop buttons, and once the server is up it shows the live connect URL three ways: as text, behind a copy button, and as a QR code you can scan from another machine.

More screen with the server started, showing the connect URL and QR code

That button binds AUTO by default, so on a device with a live Wi-Fi or Ethernet connection the QR code is scannable from another machine straight away, and on one without it the URL falls back to 127.0.0.1 and needs adb forward. The button issues no StartRequest of its own, so if you want to pin it, declare it on the config:

// Never touch the network:
DevConsoleConfig.default().withBrowserConfig(BrowserConfig(binding = BrowserBinding.LOOPBACK))

// Require the network — fails loudly instead of falling back, and surfaces the
// ACCESS_LOCAL_NETWORK prompt on API 37+ devices:
DevConsoleConfig.default().withBrowserConfig(
    BrowserConfig(binding = BrowserBinding.LAN),
)

This is independent of the bindingMode you pass to startBrowser yourself; set both if you start the server from your own UI too. Read the threat model before leaving either one on the network.

From code:

// Optional — auto-init already ran on debuggable builds. Call it yourself to customize:
DevConsole.initialize(application, DevConsoleConfig.default())

// startBrowser and stop are suspend functions — call them from a coroutine:
val result = DevConsole.startBrowser(StartRequest()) // BindingMode.AUTO
when (result) {
    is StartResult.Started -> {
        result.endpoint              // host + port actually bound; bindingMode is LOOPBACK or LAN,
                                     // never AUTO — it reports the socket, not the request
        result.access.connectUrl     // bare URL by default; a #code= credential URL when opted in
    }
    is StartResult.PermissionRequired -> { /* explicit LAN only: request result.permission */ }
    else -> { /* NoEligibleNetwork, ServerUnavailable, ... */ }
}

DevConsole.stop(StopReason.UserRequested)

For a shared or untrusted network, combine loopback with adb forward, or keep the reachable binding and opt into the secure browser handshake:

DevConsole.initialize(
    application,
    DevConsoleConfig.default().withBrowserSecurity(BrowserSecurity.SESSION_CODE),
)

Java is fully supported via async variants and builders:

DevConsole.initialize(getApplication(), DevConsoleConfig.builder().build());
StartRequest request = new StartRequest(BindingMode.LAN, new kotlin.ranges.IntRange(8080, 8099));
DevConsole.startBrowserAsync(request, result -> runOnUiThread(() -> {
    if (result instanceof StartResult.Started) {
        StartResult.Started started = (StartResult.Started) result;
        String url = started.getAccess().getConnectUrl();
    }
}));

Find the connect URL

After startBrowser, filter Logcat on the DevConsole tag:

I/DevConsole: Dashboard available at: http://192.168.0.15:8080/ (access link available through the DevConsole API/launcher; binding: LAN)

The default open mode has no session code, so Logcat prints only the bare dashboard URL. In BrowserSecurity.SESSION_CODE mode, the session code is deliberately absent from Logcat: the full URL, with its #code=<session code> credential fragment, comes from only three places: StartResult.Started.access.connectUrl, DevConsole.accessInfo(), and the device's More screen as text or a QR code. The port is the first free one in 8080–8099, so read it from the log rather than assuming 8080.

Connect from your browser

  • AUTO (default): binds your device's network address when it has one, so you open the connect URL — or scan its QR code — from any machine on the same network with nothing else to set up. With no usable interface, or without the ACCESS_LOCAL_NETWORK grant on an API 37+ device, it binds 127.0.0.1 instead and the log line says so. Read the threat model, because the dashboard speaks plaintext HTTP wherever it lands.
  • LOOPBACK: run adb forward tcp:<port> tcp:<port>, then open the connect URL. Choose this to keep the dashboard off the network entirely.
  • LAN: like AUTO, except it refuses to settle. No eligible interface returns StartResult.NoEligibleNetwork and a missing grant returns StartResult.PermissionRequired — neither quietly becomes loopback. Ask for it when a 127.0.0.1 URL would be useless to you, or when you want that PermissionRequired so your app can prompt for the permission. AUTO never prompts; it just settles for loopback.

StartResult.Started.endpoint.bindingMode always tells you which one you actually got.

In the default open mode, open the bare http://host:port/ address. If you opted into BrowserSecurity.SESSION_CODE, open the whole URL: its #code= fragment is single-use, expires in five minutes, and creates a session immediately with no approval step. If that code lapses, issue a fresh one from the device.

Wire up your network stack

// OkHttp / Retrofit — capture, timing, and mock rules in one call:
val client = OkHttpClient.Builder()
    .installDevConsole(DevConsole.networkRecorder())
    .build()

// Ktor client, any engine (captures request + response bodies, textual, up to 256 KiB each):
val ktor = HttpClient { install(DevConsoleKtorClientPlugin) { recorder = DevConsole.networkRecorder() } }

// Ktor on the OkHttp engine — only needed for DNS/TCP/TLS timing phases and mock rules, which the
// plugin above can't provide on any engine. Skip the plugin and instrument the engine instead:
val ktorOkHttp = HttpClient(OkHttp) {
    engine { config { installDevConsole(DevConsole.networkRecorder()) } }
}

// WebSocket (OkHttp): inbound + outbound
val socket = client.newWebSocket(request, DevConsoleOkHttpWebSocketListener(DevConsole.socketRecorder()))
val recording = DevConsoleRecordingWebSocket.wrap(socket, DevConsole.socketRecorder())

// MQTT (Eclipse Paho):
val publisher = DevConsolePahoMqtt.install(mqttClient, DevConsole.socketRecorder())

// Push (from FirebaseMessagingService.onMessageReceived):
DevConsole.recordPush(FirebaseRemoteMessageAdapter().toPushInput(remoteMessage))

// Anything else (Cronet, Volley, custom): record directly — never throws, never blocks:
DevConsole.networkRecorder().record(requestInput, responseInput, startedAtMs, completedAtMs)

One limit worth knowing up front: response bodies are captured up to a cap. That's 512 KiB on OkHttp, where chunked and unknown-length bodies go through a tee and get recorded at EOF or close, and 256 KiB on Ktor. On both adapters, text/event-stream and known-binary bodies stay metadata-only, since a live SSE feed is endless for all practical purposes. See Chunked and streaming responses for how the OkHttp tee works.

Java equivalents exist throughout, such as DevConsoleOkHttp.install(builder, recorder). For the details see docs/NETWORK_ADAPTERS.md, docs/MQTT_CAPTURE.md, and docs/PUSH.md.

Once traffic is flowing, every call shows up with its headers, payload, and body side by side, and you can replay it, clone it into the composer, or flag it into a bug report:

Network inspector in the browser dashboard, showing a captured request and response side by side

Search inside a capture

Every detail screen — a call, a frame, a push, a log line, a crash — has a find field at the top. Type, and it filters the sections down to what matched and highlights the hits in place, with a count so you know whether the thing you're looking for is here at all.

On network captures it goes further, because that's where you usually arrive with a specific token in hand. Arrows step you through the hits one at a time with a running 3/17 counter, the same motion as find-in-page, so you can hold an ID in your head and walk every place it appears.

Those captures also let you aim the search. Tap the Search in chip and you can pick which sections to look at — it starts on the request and response bodies, since that's where most real questions live — and choose whether to match field names, values, or both.

One thing worth knowing, because it's the kind of thing that costs an afternoon: matching names only works where the body has names to match. JSON has them. A raw or XML body doesn't — it's text all the way down — so a names-only search skips it entirely and quietly reports nothing. That's why the default matches both, and why the sheet spells out what each mode will and won't find.

Body too dense to read in a card? Expand it full-screen. You get the whole viewport, a Formatted/Raw switch, a line count, and a copy button that puts the body on the clipboard.

Set up Remote Config

Add the adapter — it is not part of the devconsole umbrella, so that Firebase never lands on the classpath of an app that doesn't use it:

debugImplementation("com.github.devconsole-android.DevConsole:devconsole-remote-config-firebase:1.4.1")
releaseImplementation("com.github.devconsole-android.DevConsole:devconsole-remote-config-firebase-noop:1.4.1")

These two artifacts first ship in 1.2.0; earlier versions do not have them.

Then hand DevConsole your FirebaseRemoteConfig instance at init:

DevConsole.initialize(
    application,
    DevConsoleConfig(/* … */)
        .withRemoteConfigProviders(listOf(FirebaseRemoteConfigAdapter(Firebase.remoteConfig))),
)

If the client is built lazily — through DI, or only once a first fetch completes — register it when you have it. This is safe to call late, unlike feature flags, because values are read on demand rather than snapshotted at startup:

DevConsole.registerRemoteConfigProvider(FirebaseRemoteConfigAdapter(Firebase.remoteConfig))

That's the whole setup. Values then appear on the dashboard's Remote Config page and on the in-app inspector's Config tab, each tagged with where it came from:

Source Meaning
remote Fetched from the server and activated.
default An in-app default (setDefaultsAsync) — no server value is active for this key.
static Set nowhere — the SDK's static fallback for an unknown key.
override A local override is masking whatever the provider resolved.

That last column is the reason this inspector exists. Knowing a flag reads false is rarely the hard part; knowing whether it reads false because you published it, or because the last fetch was throttled and the app quietly fell back to a default, is. Each provider also reports its last fetch time, last fetch status, and minimum fetch interval — and a provider that has never fetched says never, rather than showing an epoch date.

Not using Firebase? Implement RemoteConfigProvider for any other service — the model is vendor-neutral, and docs/REMOTE_CONFIG.md has a worked example. The inspector is read-only: DevConsole never sets overrides and never triggers fetch() or activate().

With RedactionPolicy.recommended(), values are redacted by key name before either surface sees them, matched separator-insensitively so api_key and apiKey are caught as well as api-key. It is still an allowlist, so a secret under a name nobody listed is shown in full — extend RedactionPolicy.sensitiveFieldNames if you keep anything sensitive in Remote Config.

Artifacts

Group com.github.devconsole-android.DevConsole, one version for everything. There is deliberately no BOM, and two coordinates cover a normal integration:

Coordinate Scope What it is
devconsole debugImplementation The full debug runtime: server, dashboard, capture, storage, exports, OkHttp adapters.
devconsole-noop releaseImplementation Same API, does nothing, links nothing.

Opt-in add-ons (each -noop twin is the matching releaseImplementation):

Coordinate Release twin Adds
devconsole-ui-compose (none — debugImplementation only) Compose launcher-panel API; protected variants reject it unless scoped to debug
devconsole-ui-views (none — debugImplementation only) DevConsolePanelView launcher for XML/Views hosts; protected variants reject it unless scoped to debug
devconsole-network-ktor (none) Ktor HttpClient capture plugin (full request + response body capture, any engine; protected variants reject it; see Network adapters)
devconsole-logs-timber (none) Timber tree + DevConsoleLog drop-in that forward app logs to the timeline (release-safe: forwards to the no-op recorder in protected variants)
devconsole-socket-paho devconsole-socket-paho-noop MQTT capture via Eclipse Paho
devconsole-push-firebase devconsole-push-firebase-noop FCM push adapter (reflection-based)
devconsole-remote-config-firebase devconsole-remote-config-firebase-noop Firebase Remote Config adapter (reflection-based; see Remote Config)

Everything else (devconsole-core, devconsole-storage-room, and the rest) arrives transitively. You never name those. Every module publishes sources, javadoc, and a POM.

Versions and unreleased code

All 35 library artifacts come from JitPack, which builds a ref on demand. Releases are tagged v1.4.1, and JitPack resolves a bare version against the v-prefixed tag, which is why the coordinates above read 1.4.1 — the same spelling the Gradle plugin uses on the Portal. Any branch works as <branch>-SNAPSHOT, with / written as ~, so a feature/x branch is feature~x-SNAPSHOT — that is how you try an unreleased fix before it ships. JitPack support starts at 1.1.1; earlier tags do not build there. Two things to know:

  • The Gradle plugin comes from the Gradle Plugin Portal, not JitPack, because the plugins { } DSL cannot resolve a plugin marker from JitPack. That is why the quick start adds JitPack for dependencies only; plugins { id("io.github.devconsole-android") version "…" } resolves from the Portal with no extra repository configuration.
  • Snapshots move. -SNAPSHOT follows the branch, so a build that worked can change under you. Pin a tag for anything you keep.

Permissions

Nothing DevConsole needs reaches your release build. There is nothing to declare to Google Play and nothing for a store reviewer to ask about. The permissions live in devconsole, which is a debugImplementation. Your release variant compiles against devconsole-noop, and that declares none at all.

Permission Declared by Why it exists In your release build?
ACCESS_LOCAL_NETWORK DevConsole (devconsole) Android 17 (API 37) gates local-network access. Without it a LAN-bound dashboard binds and then silently serves nobody — see LAN permission. Declared by the full runtime and requested at runtime when needed. No
ACCESS_NETWORK_STATE DevConsole (devconsole) Normal (non-runtime) permission, used only to record connectivity-change markers on the timeline. No
NEARBY_WIFI_DEVICES DevConsole (devconsole) Nearby-devices permission used by Android 13–16's local-network compatibility path. The SDK declares neverForLocation; it does not read location. No
FOREGROUND_SERVICE + FOREGROUND_SERVICE_SPECIAL_USE DevConsole (devconsole) Default debug-only keep-alive for the dashboard server — keep-alive. The service runs whenever the server is running. No
POST_NOTIFICATIONS DevConsole (devconsole) Declared by the full runtime so the inspector can offer the Android 13+ runtime grant; it only controls notification visibility, not whether the service runs. No
INTERNET You, in src/main Binding the dashboard's TCP socket needs it. Not DevConsole-specific — most apps already declare it for their own networking, which is why DevConsole doesn't add it for you. Yes — but it's yours, and almost certainly already there

Don't take the table's word for it. Check any build yourself:

aapt2 dump permissions app/build/outputs/apk/release/app-release.apk

The Gradle plugin enforces the same split mechanically. verify<Variant>DevConsoleProtectedArtifacts fails the build if the full runtime reaches a protected variant, checking declared dependencies, the resolved runtime classpath, and (on assemble<Variant> / bundle<Variant>) the final packaged APK/AAB/AAR bytes through separate verify<Variant>DevConsolePackagedArtifact and verify<Variant>DevConsolePackagedBundle tasks. Running the per-variant verify<Variant>DevConsoleProtectedArtifacts task by itself checks dependencies only. See Build variants and production safety.

Flavored projects: verify the variant you ship

If your app has product flavors, read this before wiring the plugin into a release pipeline.

By default every non-debug variant is PROTECTED, so a project with production, staging, and partner flavors gets three protected release variants and three verifiers:

verifyProductionReleaseDevConsoleProtectedArtifacts
verifyStagingReleaseDevConsoleProtectedArtifacts
verifyPartnerReleaseDevConsoleProtectedArtifacts

Each one is wired onto its own assemble<Variant> / bundle<Variant> and nothing else, so ./gradlew :app:assembleProductionRelease checks productionRelease dependencies and scans its packaged APK, then resolves productionRelease's classpath — no other flavor is touched. That matters most when your flavors carry environment-specific coordinates:

productionImplementation "com.example.sdk:analytics-production-release:1.8.0"
stagingImplementation    "com.example.sdk:analytics-staging-release:1.8.0"
partnerImplementation    "com.example.sdk:analytics-partner-release:1.8.0"

A production build must never reach for another environment's artifacts — especially when those live in a repository only reachable from an internal network. It doesn't.

The aggregate verifyDevConsoleProtectedArtifacts still exists and still verifies every protected variant — that is its job, and check depends on it. On the project above it therefore resolves and builds all three release variants. Use it in a CI job that is meant to cover everything; don't put it on the critical path of a single-flavor release build:

./gradlew :app:assembleProductionRelease                            # ships production, verifies production
./gradlew :app:verifyProductionReleaseDevConsoleProtectedArtifacts  # dependency graph check only
./gradlew :app:verifyProductionReleaseDevConsolePackagedArtifact     # APK/AAR byte scan
./gradlew :app:verifyProductionReleaseDevConsolePackagedBundle       # AAB byte scan
./gradlew :app:verifyDevConsoleProtectedArtifacts                   # full sweep, all flavors, CI

Upgrading from 1.2.4 or earlier

Up to and including 1.2.4 there was one shared verifier task carrying every protected variant's inputs, wired onto every protected variant's assemble/bundle. Building one flavor's release therefore built all of them. If you recognise any of these, that was the cause and this release fixes it:

  • a single-flavor release build downloading another flavor's dependencies
  • assembleProductionRelease running dexBuilderStagingRelease, bundlePartnerRelease, or similar
  • a release build failing or hanging on a repository only one flavor's artifacts live in
  • release builds several times slower than the flavor being shipped could explain

No migration is needed — the task name your scripts and CI already call still works, it is now the aggregate. If you worked around this by excluding the verifier (-x verifyDevConsoleProtectedArtifacts) or by narrowing protectedVariantPatterns to one flavor, undo it: those workarounds bought speed by dropping enforcement, and you no longer have to pay for one with the other.

Narrowing what gets protected

If you genuinely want fewer protected variants — a flavor whose release build is never distributed, say — lower the default and name what you protect. Understand that a variant left out is a variant nobody checks:

import io.devconsole.gradle.DevConsoleVariantPolicy

devConsole {
    defaultPolicy.set(DevConsoleVariantPolicy.DISABLED)
    protectedVariantPatterns.set(listOf("(?i)production.*release"))
}

DISABLED variants still get devconsole-noop auto-wired — they simply are not verified.

Security model

DevConsole is a debug-only developer tool. Runtime security layers are off by default and opt-in. Use these settings for shared networks or production-like data:

Layer Default Enable protection
Redaction Off DevConsoleConfig(redactionPolicy = RedactionPolicy.recommended())
Rate limits Off .withNetworkProtection(NetworkProtection(rateLimiting = true))
Host/Origin checks Off .withNetworkProtection(NetworkProtection(hostAndOriginChecks = true))
Both network protections Off .withNetworkProtection(NetworkProtection.recommended())
Browser auth NONE .withBrowserSecurity(BrowserSecurity.SESSION_CODE)
Read-only editing Off; all seven capabilities true .withEditingCapabilities(EditingCapabilities.readOnly())
Composer host restriction Any host (empty list) DevConsoleConfig(composerAllowedHosts = setOf("api.example.test"))
Disable Composer Enabled DevConsoleConfig(composerEnabled = false)
Disable state mutations Enabled DevConsoleConfig(stateMutationsEnabled = false)
Disable screenshots Enabled .withScreenshotPolicy(ScreenshotPolicy(enabled = false))

withNetworkProtection replaces the policy, so use recommended() to enable both switches. The release/noop build guard is unchanged; static security headers remain on. /api/v1/meta reports redaction: "off" | "on" and both effective networkProtection switches.

  • The dashboard speaks plaintext HTTP, and the default browser mode is open. There is no TLS. BindingMode.AUTO binds your device's network address whenever it can, and BrowserSecurity.NONE means any client that can reach that address can read the dashboard and use every editing capability by default. Host and Origin checks require NetworkProtection(hostAndOriginChecks = true). For a shared or untrusted network, pass BindingMode.LOOPBACK, set BrowserConfig(binding = BrowserBinding.LOOPBACK), or opt into BrowserSecurity.SESSION_CODE.
  • The connect URL is a credential only in SESSION_CODE mode. Holding a live #code= fragment creates a session, with no approval step on the device. Codes are single-use and expire in five minutes; sessions last 30. Treat that URL like a password. You can revoke sessions from the More screen.
  • Redaction is opt-in. default() and none() mask nothing. recommended() restores the previous built-in sensitive field names; Authorization headers and Bearer text remain visible unless you add rules. Unmatched custom fields and PII remain visible. See docs/SECURITY_AND_REDACTION.md.
  • Screenshots cannot be redacted. Pixels don't have field names. Capture is on by default and everything it produces is marked UNREDACTED.
  • Editing is enabled by default. Preferences, feature flags, database, files, mocks, request execution, and capture rules all default to true, in constructors and Java Builders. EditingCapabilities.readOnly() refuses everything including mocks. Composer and state mutations have independent flags, both enabled by default.

For the full analysis, including what a malicious network peer or a co-installed app can and cannot do, read docs/THREAT_MODEL.md.

Sample apps

Three runnable samples under samples/, one per integration style:

Sample Stack Posture
compose-app Jetpack Compose Everything unlocked: all editing capabilities, composer, screenshots, OkHttp + Ktor (CIO) network demos, MQTT + WebSocket demos, in-app inspector, shake + floating-button open triggers
foundation-app Stock widgets, no UI framework Explicit read-only capabilities, Composer/state mutations disabled, screenshots disabled
views-java-app Java + XML, ui-views panel Java Builder integration, editable defaults, async Java APIs, shake-to-open (LIGHT) + floating button
./gradlew :samples:compose-app:assembleDebug

Each one seeds preferences, a SQLite table, and files so the inspectors have something real to show, and each has a hazard section that triggers a genuine crash and a genuine ANR.

Compatibility

minSdk 23
compileSdk / targetSdk 35
Android Gradle Plugin 8.13.0 (built against; the Gradle plugin supports AGP 8.x–9.x hosts)
Gradle 8.9+ (including 9.x)
Kotlin 2.2.20

Versioning

1.0 shipped, and the public API is stable. Breaking changes to sdk:api need a major version, new API needs a minor, and everything else is a patch.

That is enforced rather than promised. Every published module carries a committed ABI baseline, and an unintended change to any public surface fails the build before it can reach a release. The changelog has the full policy.

Documentation

Full index: docs/README.md. Highlights:

Contributing

CONTRIBUTING.md has the build prerequisites and the test, lint, and API-check commands. CI runs those same ./gradlew tasks on every PR, so if it passes locally it passes there.

License

MIT

About

An in-app debugger for Android, with a browser dashboard for when you want a bigger screen.

Resources

Contributing

Security policy

Stars

28 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages