Creator · rcosteira79
Last updated · Sep 4, 2026
Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation.
Creator · rcosteira79
Last updated · Sep 4, 2026
Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation.
Creator · rcosteira79
Last updated · Sep 4, 2026
Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation.
Creator · rcosteira79
Last updated · Sep 4, 2026
Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation.
Sandbox only
Install targets
Codex install prompt
Install the "android-debugging" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/android-debugging. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"rcosteira79-android-debugging","task":"Install android-debugging","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add rcosteira79/android-skills --skill android-debugging
Maintenance
fresh
11d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
136
68/100 Quality · 75/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
136 GitHub stars
Repo activity
136 stars, 14 forks
Maintenance
11d since push
License
MIT
Install
npx skills add rcosteira79/android-skills --skill android-debugging
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add rcosteira79/android-skills --skill android-debuggingDo not use when
Alternative
1.9K Stars
npx skills add yanliudesign/mono-color-skill --skill mono-color
Alternative
61.0K Stars
npx skills add mvanhorn/last30days-skill -g
Alternative
38.4K Stars
npx skills add Imbad0202/academic-research-skills
Alternative
28.0K Stars
npx skills add assafelovic/gpt-researcher
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/rcosteira79-android-debugging/install
Agent should check
Copy prompt
Task: Use android-debugging in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install
Install command: npx skills add rcosteira79/android-skills --skill android-debugging
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/rcosteira79-android-debugging/install
LLM text format
/api/skills/rcosteira79-android-debugging/install?format=text
Find alternatives
/api/skills/search?q=android-debugging&limit=3
Agent prompt
Use android-debugging for this task. Review https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install, then install with: npx skills add rcosteira79/android-skills --skill android-debuggingRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/rcosteira79-android-debugging
LLM text
/api/registry/manifest/rcosteira79-android-debugging?format=text
Install alias
/api/registry/install/rcosteira79-android-debugging
Recommend
/api/registry/recommend?task=Use%20android-debugging%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO136 GitHub stars
Stars/forks activity
CHECK136 stars, 14 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
Academic Research Skills for Claude Code: research → write → review → revise → finalize
Run autonomous deep research over web and local sources
--- name: android-debugging description: > Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. ---
# Android Debugging
## Overview
Android-specific evidence-gathering and investigation techniques on a root-cause-first foundation.
**Root-cause-first foundation:** - **No fix before the root cause is found.** Investigate first — reproduce, gather evidence (observed values, not assumed), trace the cause. Patching a symptom you don't understand creates two bugs. - **Three failed guesses ⇒ stop and question the architecture** rather than guessing again.
The Android-specific tools below serve that investigation. *Optional:* if you run a dedicated debugging-discipline skill (e.g. `superpowers:systematic-debugging` or `ace:systematic-debugging`), this layers on top of it — but it requires none.
## Evidence-Gathering by Problem Type
### Crashes & Exceptions
```bash # Stream crash logs filtered by app package adb logcat --pid=$(adb shell pidof -s com.example.app)
# Save full logcat to file for analysis adb logcat -d > crash_log.txt
# Filter by tag adb logcat -s "YourTag:E" ```
Key logcat log levels: `V` (verbose) `D` (debug) `I` (info) `W` (warn) `E` (error) `F` (fatal)
Read the **full stack trace** — the root cause is usually at the bottom of the `Caused by:` chain, not the top-level exception.
### ANR (Application Not Responding)
ANRs mean the main thread was blocked. Evidence:
```bash # Pull ANR trace from device adb pull /data/anr/traces.txt ./anr_traces.txt
# Or stream while reproducing adb logcat -s "ActivityManager:E" | grep -A 30 "ANR in" ```
Look for: `main` thread in state `MONITOR` (waiting for a lock) or blocking I/O on `main`. Trace backward to find what holds the lock.
**Common causes:** Database/network call on main thread, `runBlocking` on main thread, deadlock between coroutine scopes.
### Memory Leaks
Add [LeakCanary](https://square.github.io/leakcanary/) to `debugImplementation`. It surfaces leak traces automatically in a notification.
Read the leak trace top-to-bottom: the first bold line is the leaking object, the path shows what's holding the reference. Fix by clearing the reference in the appropriate lifecycle callback.
```bash # Dump heap manually for Android Profiler analysis adb shell am dumpheap com.example.app /data/local/tmp/heap.hprof adb pull /data/local/tmp/heap.hprof ./heap.hprof ```
### Performance Trace Investigation (Perfetto)
For bottleneck investigation across CPU, graphics, I/O, IPC, memory, or power — beyond what Logcat and ANR traces show — capture a Perfetto trace and query it with SQL.
**Measure before you fix.** For performance regressions, logs usually mislead — capture a *baseline* measurement before changing anything, then bisect against it. A trace tells you where time goes; only a comparison against a known-good baseline tells you what actually regressed.
```bash # Capture a trace (system-level, all categories) adb shell perfetto -c - --txt -o /data/misc/perfetto-traces/trace.pftrace \ <<'EOF' buffers { size_kb: 65536 } data_sources { config { name: "linux.ftrace" } } data_sources { config { name: "android.surfaceflinger.frame" } } duration_ms: 10000 EOF
adb pull /data/misc/perfetto-traces/trace.pftrace ./ ```
Then open the trace at https://ui.perfetto.dev and run SQL against it (`SELECT name, dur FROM slice WHERE dur > 16e6` for frames slower than 16ms, etc.).
For an agent-driven workflow — translating an investigation intent (jank, slow startup, battery drain) into the right Perfetto SQL and iterating across the trace — see Google's [`perfetto-sql`](https://github.com/android/skills/tree/main/profilers/perfetto-sql) and [`perfetto-trace-analysis`](https://github.com/android/skills/tree/main/profilers/perfetto-trace-analysis) skills (`android skills list` to check for a local install; `android skills add perfetto-sql perfetto-trace-analysis` otherwise). They provide Domain Hints (CPU/Graphics/I/O/IPC/Memory/Power), a mandatory scratchpad chain-of-evidence pattern, and `GLOB`-over-`LIKE` query rules.
### R8 / ProGuard — Obfuscated Stack Traces
Release crash stack traces are obfuscated. Decode them with the mapping file generated at build time.
```bash # retrace a crash (AGP 7+) ./gradlew :app:retrace --stacktrace-file crash.txt
# Or use the retrace CLI directly java -jar retrace.jar mapping.txt crash.txt ```
Mapping files are in `app/build/outputs/mapping/<variant>/mapping.txt`. Always archive them alongside release builds.
If a class is unexpectedly removed or renamed, add a `-keep` rule in `proguard-rules.pro` and verify with:
```bash ./gradlew :app:assembleRelease # Then inspect: app/build/outputs/mapping/release/usage.txt (removed) and seeds.txt (kept) ```
For the **inverse problem** — reading obfuscated third-party code or decoding a stack trace from a library where the mapping file isn't yours — `retrace` doesn't apply. Use `jadx --deobf` (consistent renames across the decompiled output) or `jadx --deobf-map` (when the SDK ships a mapping). The [`android-reverse-engineering` plugin](https://github.com/SimoneAvogadro/android-reverse-engineering-skill) covers the full workflow including the anchor-via-strings strategy for navigating obfuscated code by string literals and framework class names that survive obfuscation (check if it's already installed locally first — it ships as `android-reverse-engineering:*` skills).
### Gradle Build Failures
Read the error from the **bottom up** — Gradle wraps errors in multiple layers.
Common patterns:
| Error | Investigation | |-------|--------------| | `Manifest merger failed` | Check `app/build/intermediates/merged_manifests/` for the merged output; look for conflicting `android:` attributes | | `Duplicate class` | Run `./gradlew dependencies` and look for the same class in multiple transitive deps; use `exclude` or force a version | | `Could not resolve` | Check repository declarations, VPN/proxy, dependency version exists | | `D8/R8: Type not present` | Missing `keep` rule or desugaring issue; check `minSdk` vs API used | | `KSP / KAPT error` | Look for the processor's own error above the Gradle wrapper message |
```bash # Full dependency tree for a configuration ./gradlew :app:dependencies --configuration releaseRuntimeClasspath
# Run with stacktrace for deeper Gradle errors ./gradlew assembleDebug --stacktrace --info 2>&1 | grep -A 20 "FAILED" ```
### Runtime UI Inspection
When a bug is visual (wrong element state, missing content, overlap), dump the layout tree directly instead of reasoning from a screenshot:
```bash # Full layout tree as JSON — search by class/text/bounds instead of parsing an image android layout --pretty
# Only elements that changed since last call — useful for animations or transient state android layout --diff --pretty
# Target a specific device, write to file android layout --device=emulator-5554 -o layout.json ```
Prefer `android layout` over `adb screencap` whenever the question is "what is the UI state?" rather than "what does it look like?". The JSON tree is grep-able and survives `--diff` state across invocations.
### Compose Recomposition Bugs
For deeper Compose performance analysis (stability, recomposition skipping, baseline profiles), see `android-skills:compose` → `compose/references/performance.md`.
Wrong state or unexpected re-renders:
1. **Layout Inspector** (Android Studio) → enable "Show recomposition counts" to identify hot paths. For headless/CLI workflows, `android layout --diff` gives a JSON tree of what changed between frames. 2. Add `SideEffect { Log.d("Recompose", "MyComposable recomposed") }` temporarily to confirm 3. Check that `State` objects are not created inside the composition (use `remember`) 4. Verify `equals()` on state data classes — a new object with same values still triggers recomposition if `equals` is not implemented
**Note:** Since Compose compiler 2.0+ (Kotlin 2.0+), strong skipping mode is enabled by default and the compiler automatically memoizes lambdas that capture stable references. Manual `remember {{ }}` wrapping is no longer necessary in most cases. If you see excessive recomposition from lambdas, check whether the captured references are unstable (mutable collections, non-data classes) rather than wrapping in `remember`.
(Standard `adb` commands — `devices`, `install -r`, `am start`, `pm clear`, `ps`, `run-as … ls /data/data/<pkg>/` — aren't covered here; for visual-state bugs prefer `android layout` over `screencap` as noted above.)
## Multi-Component Evidence Template
For issues spanning multiple layers (e.g. Repository → ViewModel → UI):
```kotlin // Temporarily instrument each boundary with a UNIQUE run-specific tag // (pick a fresh suffix per session, e.g. DEBUG-a4f2) so the SAME tag both // filters logcat at runtime and greps cleanly at teardown. class UserRepository(...) { suspend fun fetchUser(id: String): User { Log.d("DEBUG-a4f2", "Repository: fetching user $id") val result = api.getUser(id) Log.d("DEBUG-a4f2", "Repository: received ${result}") return result } } ```
Run once to identify **which layer** produces the bad value. Filter the run at runtime with `adb logcat -s "DEBUG-a4f2"`, then tear the instrumentation back out with a single `grep -rl "DEBUG-a4f2"`. A unique per-session tag is what makes both one-liners work — a shared tag like `DEBUG_LAYER` collides across sessions and leaves orphaned logs behind. Then investigate the implicated layer in isolation before proposing a fix.
## Red Flags
- Fixing a crash without reading the full `Caused by:` chain - Guessing at an R8 issue without checking the mapping file - Adding `Thread.sleep()` to "fix" an ANR or race condition - Resolving a dependency conflict by adding `exclude` without understanding why the duplicate exists - Fixing a Compose bug by wrapping in `key()` without understanding what triggers recomposition - Leaving temporary instrumentation in the tree — tag every debug log with a unique per-session prefix (e.g. `DEBUG-a4f2`) so cleanup is one `grep`, and remove them all before declaring the fix done
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for android-debugging, ready for a manual X post.
android-debugging: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB,... 136 stars https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x
Listing + install path for android-debugging: https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x Install: npx skills add rcosteira79/android-skills --skill android-debugging
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to rcosteira79 but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging/audit)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)rcosteira79
@rcosteira79
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
mono-color
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
1.9K StarsLast30days Skill
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
61.0K StarsAcademic Research Skills
Academic Research Skills for Claude Code: research → write → review → revise → finalize
38.4K StarsGPT Researcher
Run autonomous deep research over web and local sources
28.0K StarsSandbox only
Install targets
Codex install prompt
Install the "android-debugging" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/android-debugging. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"rcosteira79-android-debugging","task":"Install android-debugging","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add rcosteira79/android-skills --skill android-debugging
Maintenance
fresh
11d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
136
68/100 Quality · 75/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
136 GitHub stars
Repo activity
136 stars, 14 forks
Maintenance
11d since push
License
MIT
Install
npx skills add rcosteira79/android-skills --skill android-debugging
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add rcosteira79/android-skills --skill android-debuggingDo not use when
Alternative
1.9K Stars
npx skills add yanliudesign/mono-color-skill --skill mono-color
Alternative
61.0K Stars
npx skills add mvanhorn/last30days-skill -g
Alternative
38.4K Stars
npx skills add Imbad0202/academic-research-skills
Alternative
28.0K Stars
npx skills add assafelovic/gpt-researcher
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/rcosteira79-android-debugging/install
Agent should check
Copy prompt
Task: Use android-debugging in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install
Install command: npx skills add rcosteira79/android-skills --skill android-debugging
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/rcosteira79-android-debugging/install
LLM text format
/api/skills/rcosteira79-android-debugging/install?format=text
Find alternatives
/api/skills/search?q=android-debugging&limit=3
Agent prompt
Use android-debugging for this task. Review https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install, then install with: npx skills add rcosteira79/android-skills --skill android-debuggingRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/rcosteira79-android-debugging
LLM text
/api/registry/manifest/rcosteira79-android-debugging?format=text
Install alias
/api/registry/install/rcosteira79-android-debugging
Recommend
/api/registry/recommend?task=Use%20android-debugging%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO136 GitHub stars
Stars/forks activity
CHECK136 stars, 14 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
Academic Research Skills for Claude Code: research → write → review → revise → finalize
Run autonomous deep research over web and local sources
--- name: android-debugging description: > Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. ---
# Android Debugging
## Overview
Android-specific evidence-gathering and investigation techniques on a root-cause-first foundation.
**Root-cause-first foundation:** - **No fix before the root cause is found.** Investigate first — reproduce, gather evidence (observed values, not assumed), trace the cause. Patching a symptom you don't understand creates two bugs. - **Three failed guesses ⇒ stop and question the architecture** rather than guessing again.
The Android-specific tools below serve that investigation. *Optional:* if you run a dedicated debugging-discipline skill (e.g. `superpowers:systematic-debugging` or `ace:systematic-debugging`), this layers on top of it — but it requires none.
## Evidence-Gathering by Problem Type
### Crashes & Exceptions
```bash # Stream crash logs filtered by app package adb logcat --pid=$(adb shell pidof -s com.example.app)
# Save full logcat to file for analysis adb logcat -d > crash_log.txt
# Filter by tag adb logcat -s "YourTag:E" ```
Key logcat log levels: `V` (verbose) `D` (debug) `I` (info) `W` (warn) `E` (error) `F` (fatal)
Read the **full stack trace** — the root cause is usually at the bottom of the `Caused by:` chain, not the top-level exception.
### ANR (Application Not Responding)
ANRs mean the main thread was blocked. Evidence:
```bash # Pull ANR trace from device adb pull /data/anr/traces.txt ./anr_traces.txt
# Or stream while reproducing adb logcat -s "ActivityManager:E" | grep -A 30 "ANR in" ```
Look for: `main` thread in state `MONITOR` (waiting for a lock) or blocking I/O on `main`. Trace backward to find what holds the lock.
**Common causes:** Database/network call on main thread, `runBlocking` on main thread, deadlock between coroutine scopes.
### Memory Leaks
Add [LeakCanary](https://square.github.io/leakcanary/) to `debugImplementation`. It surfaces leak traces automatically in a notification.
Read the leak trace top-to-bottom: the first bold line is the leaking object, the path shows what's holding the reference. Fix by clearing the reference in the appropriate lifecycle callback.
```bash # Dump heap manually for Android Profiler analysis adb shell am dumpheap com.example.app /data/local/tmp/heap.hprof adb pull /data/local/tmp/heap.hprof ./heap.hprof ```
### Performance Trace Investigation (Perfetto)
For bottleneck investigation across CPU, graphics, I/O, IPC, memory, or power — beyond what Logcat and ANR traces show — capture a Perfetto trace and query it with SQL.
**Measure before you fix.** For performance regressions, logs usually mislead — capture a *baseline* measurement before changing anything, then bisect against it. A trace tells you where time goes; only a comparison against a known-good baseline tells you what actually regressed.
```bash # Capture a trace (system-level, all categories) adb shell perfetto -c - --txt -o /data/misc/perfetto-traces/trace.pftrace \ <<'EOF' buffers { size_kb: 65536 } data_sources { config { name: "linux.ftrace" } } data_sources { config { name: "android.surfaceflinger.frame" } } duration_ms: 10000 EOF
adb pull /data/misc/perfetto-traces/trace.pftrace ./ ```
Then open the trace at https://ui.perfetto.dev and run SQL against it (`SELECT name, dur FROM slice WHERE dur > 16e6` for frames slower than 16ms, etc.).
For an agent-driven workflow — translating an investigation intent (jank, slow startup, battery drain) into the right Perfetto SQL and iterating across the trace — see Google's [`perfetto-sql`](https://github.com/android/skills/tree/main/profilers/perfetto-sql) and [`perfetto-trace-analysis`](https://github.com/android/skills/tree/main/profilers/perfetto-trace-analysis) skills (`android skills list` to check for a local install; `android skills add perfetto-sql perfetto-trace-analysis` otherwise). They provide Domain Hints (CPU/Graphics/I/O/IPC/Memory/Power), a mandatory scratchpad chain-of-evidence pattern, and `GLOB`-over-`LIKE` query rules.
### R8 / ProGuard — Obfuscated Stack Traces
Release crash stack traces are obfuscated. Decode them with the mapping file generated at build time.
```bash # retrace a crash (AGP 7+) ./gradlew :app:retrace --stacktrace-file crash.txt
# Or use the retrace CLI directly java -jar retrace.jar mapping.txt crash.txt ```
Mapping files are in `app/build/outputs/mapping/<variant>/mapping.txt`. Always archive them alongside release builds.
If a class is unexpectedly removed or renamed, add a `-keep` rule in `proguard-rules.pro` and verify with:
```bash ./gradlew :app:assembleRelease # Then inspect: app/build/outputs/mapping/release/usage.txt (removed) and seeds.txt (kept) ```
For the **inverse problem** — reading obfuscated third-party code or decoding a stack trace from a library where the mapping file isn't yours — `retrace` doesn't apply. Use `jadx --deobf` (consistent renames across the decompiled output) or `jadx --deobf-map` (when the SDK ships a mapping). The [`android-reverse-engineering` plugin](https://github.com/SimoneAvogadro/android-reverse-engineering-skill) covers the full workflow including the anchor-via-strings strategy for navigating obfuscated code by string literals and framework class names that survive obfuscation (check if it's already installed locally first — it ships as `android-reverse-engineering:*` skills).
### Gradle Build Failures
Read the error from the **bottom up** — Gradle wraps errors in multiple layers.
Common patterns:
| Error | Investigation | |-------|--------------| | `Manifest merger failed` | Check `app/build/intermediates/merged_manifests/` for the merged output; look for conflicting `android:` attributes | | `Duplicate class` | Run `./gradlew dependencies` and look for the same class in multiple transitive deps; use `exclude` or force a version | | `Could not resolve` | Check repository declarations, VPN/proxy, dependency version exists | | `D8/R8: Type not present` | Missing `keep` rule or desugaring issue; check `minSdk` vs API used | | `KSP / KAPT error` | Look for the processor's own error above the Gradle wrapper message |
```bash # Full dependency tree for a configuration ./gradlew :app:dependencies --configuration releaseRuntimeClasspath
# Run with stacktrace for deeper Gradle errors ./gradlew assembleDebug --stacktrace --info 2>&1 | grep -A 20 "FAILED" ```
### Runtime UI Inspection
When a bug is visual (wrong element state, missing content, overlap), dump the layout tree directly instead of reasoning from a screenshot:
```bash # Full layout tree as JSON — search by class/text/bounds instead of parsing an image android layout --pretty
# Only elements that changed since last call — useful for animations or transient state android layout --diff --pretty
# Target a specific device, write to file android layout --device=emulator-5554 -o layout.json ```
Prefer `android layout` over `adb screencap` whenever the question is "what is the UI state?" rather than "what does it look like?". The JSON tree is grep-able and survives `--diff` state across invocations.
### Compose Recomposition Bugs
For deeper Compose performance analysis (stability, recomposition skipping, baseline profiles), see `android-skills:compose` → `compose/references/performance.md`.
Wrong state or unexpected re-renders:
1. **Layout Inspector** (Android Studio) → enable "Show recomposition counts" to identify hot paths. For headless/CLI workflows, `android layout --diff` gives a JSON tree of what changed between frames. 2. Add `SideEffect { Log.d("Recompose", "MyComposable recomposed") }` temporarily to confirm 3. Check that `State` objects are not created inside the composition (use `remember`) 4. Verify `equals()` on state data classes — a new object with same values still triggers recomposition if `equals` is not implemented
**Note:** Since Compose compiler 2.0+ (Kotlin 2.0+), strong skipping mode is enabled by default and the compiler automatically memoizes lambdas that capture stable references. Manual `remember {{ }}` wrapping is no longer necessary in most cases. If you see excessive recomposition from lambdas, check whether the captured references are unstable (mutable collections, non-data classes) rather than wrapping in `remember`.
(Standard `adb` commands — `devices`, `install -r`, `am start`, `pm clear`, `ps`, `run-as … ls /data/data/<pkg>/` — aren't covered here; for visual-state bugs prefer `android layout` over `screencap` as noted above.)
## Multi-Component Evidence Template
For issues spanning multiple layers (e.g. Repository → ViewModel → UI):
```kotlin // Temporarily instrument each boundary with a UNIQUE run-specific tag // (pick a fresh suffix per session, e.g. DEBUG-a4f2) so the SAME tag both // filters logcat at runtime and greps cleanly at teardown. class UserRepository(...) { suspend fun fetchUser(id: String): User { Log.d("DEBUG-a4f2", "Repository: fetching user $id") val result = api.getUser(id) Log.d("DEBUG-a4f2", "Repository: received ${result}") return result } } ```
Run once to identify **which layer** produces the bad value. Filter the run at runtime with `adb logcat -s "DEBUG-a4f2"`, then tear the instrumentation back out with a single `grep -rl "DEBUG-a4f2"`. A unique per-session tag is what makes both one-liners work — a shared tag like `DEBUG_LAYER` collides across sessions and leaves orphaned logs behind. Then investigate the implicated layer in isolation before proposing a fix.
## Red Flags
- Fixing a crash without reading the full `Caused by:` chain - Guessing at an R8 issue without checking the mapping file - Adding `Thread.sleep()` to "fix" an ANR or race condition - Resolving a dependency conflict by adding `exclude` without understanding why the duplicate exists - Fixing a Compose bug by wrapping in `key()` without understanding what triggers recomposition - Leaving temporary instrumentation in the tree — tag every debug log with a unique per-session prefix (e.g. `DEBUG-a4f2`) so cleanup is one `grep`, and remove them all before declaring the fix done
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for android-debugging, ready for a manual X post.
android-debugging: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB,... 136 stars https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x
Listing + install path for android-debugging: https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x Install: npx skills add rcosteira79/android-skills --skill android-debugging
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to rcosteira79 but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging/audit)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)rcosteira79
@rcosteira79
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
mono-color
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
1.9K StarsLast30days Skill
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
61.0K StarsAcademic Research Skills
Academic Research Skills for Claude Code: research → write → review → revise → finalize
38.4K StarsGPT Researcher
Run autonomous deep research over web and local sources
28.0K StarsSandbox only
Install targets
Codex install prompt
Install the "android-debugging" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/android-debugging. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"rcosteira79-android-debugging","task":"Install android-debugging","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add rcosteira79/android-skills --skill android-debugging
Maintenance
fresh
11d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
136
68/100 Quality · 75/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
136 GitHub stars
Repo activity
136 stars, 14 forks
Maintenance
11d since push
License
MIT
Install
npx skills add rcosteira79/android-skills --skill android-debugging
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add rcosteira79/android-skills --skill android-debuggingDo not use when
Alternative
1.9K Stars
npx skills add yanliudesign/mono-color-skill --skill mono-color
Alternative
61.0K Stars
npx skills add mvanhorn/last30days-skill -g
Alternative
38.4K Stars
npx skills add Imbad0202/academic-research-skills
Alternative
28.0K Stars
npx skills add assafelovic/gpt-researcher
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/rcosteira79-android-debugging/install
Agent should check
Copy prompt
Task: Use android-debugging in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install
Install command: npx skills add rcosteira79/android-skills --skill android-debugging
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/rcosteira79-android-debugging/install
LLM text format
/api/skills/rcosteira79-android-debugging/install?format=text
Find alternatives
/api/skills/search?q=android-debugging&limit=3
Agent prompt
Use android-debugging for this task. Review https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install, then install with: npx skills add rcosteira79/android-skills --skill android-debuggingRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/rcosteira79-android-debugging
LLM text
/api/registry/manifest/rcosteira79-android-debugging?format=text
Install alias
/api/registry/install/rcosteira79-android-debugging
Recommend
/api/registry/recommend?task=Use%20android-debugging%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO136 GitHub stars
Stars/forks activity
CHECK136 stars, 14 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
Academic Research Skills for Claude Code: research → write → review → revise → finalize
Run autonomous deep research over web and local sources
--- name: android-debugging description: > Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. ---
# Android Debugging
## Overview
Android-specific evidence-gathering and investigation techniques on a root-cause-first foundation.
**Root-cause-first foundation:** - **No fix before the root cause is found.** Investigate first — reproduce, gather evidence (observed values, not assumed), trace the cause. Patching a symptom you don't understand creates two bugs. - **Three failed guesses ⇒ stop and question the architecture** rather than guessing again.
The Android-specific tools below serve that investigation. *Optional:* if you run a dedicated debugging-discipline skill (e.g. `superpowers:systematic-debugging` or `ace:systematic-debugging`), this layers on top of it — but it requires none.
## Evidence-Gathering by Problem Type
### Crashes & Exceptions
```bash # Stream crash logs filtered by app package adb logcat --pid=$(adb shell pidof -s com.example.app)
# Save full logcat to file for analysis adb logcat -d > crash_log.txt
# Filter by tag adb logcat -s "YourTag:E" ```
Key logcat log levels: `V` (verbose) `D` (debug) `I` (info) `W` (warn) `E` (error) `F` (fatal)
Read the **full stack trace** — the root cause is usually at the bottom of the `Caused by:` chain, not the top-level exception.
### ANR (Application Not Responding)
ANRs mean the main thread was blocked. Evidence:
```bash # Pull ANR trace from device adb pull /data/anr/traces.txt ./anr_traces.txt
# Or stream while reproducing adb logcat -s "ActivityManager:E" | grep -A 30 "ANR in" ```
Look for: `main` thread in state `MONITOR` (waiting for a lock) or blocking I/O on `main`. Trace backward to find what holds the lock.
**Common causes:** Database/network call on main thread, `runBlocking` on main thread, deadlock between coroutine scopes.
### Memory Leaks
Add [LeakCanary](https://square.github.io/leakcanary/) to `debugImplementation`. It surfaces leak traces automatically in a notification.
Read the leak trace top-to-bottom: the first bold line is the leaking object, the path shows what's holding the reference. Fix by clearing the reference in the appropriate lifecycle callback.
```bash # Dump heap manually for Android Profiler analysis adb shell am dumpheap com.example.app /data/local/tmp/heap.hprof adb pull /data/local/tmp/heap.hprof ./heap.hprof ```
### Performance Trace Investigation (Perfetto)
For bottleneck investigation across CPU, graphics, I/O, IPC, memory, or power — beyond what Logcat and ANR traces show — capture a Perfetto trace and query it with SQL.
**Measure before you fix.** For performance regressions, logs usually mislead — capture a *baseline* measurement before changing anything, then bisect against it. A trace tells you where time goes; only a comparison against a known-good baseline tells you what actually regressed.
```bash # Capture a trace (system-level, all categories) adb shell perfetto -c - --txt -o /data/misc/perfetto-traces/trace.pftrace \ <<'EOF' buffers { size_kb: 65536 } data_sources { config { name: "linux.ftrace" } } data_sources { config { name: "android.surfaceflinger.frame" } } duration_ms: 10000 EOF
adb pull /data/misc/perfetto-traces/trace.pftrace ./ ```
Then open the trace at https://ui.perfetto.dev and run SQL against it (`SELECT name, dur FROM slice WHERE dur > 16e6` for frames slower than 16ms, etc.).
For an agent-driven workflow — translating an investigation intent (jank, slow startup, battery drain) into the right Perfetto SQL and iterating across the trace — see Google's [`perfetto-sql`](https://github.com/android/skills/tree/main/profilers/perfetto-sql) and [`perfetto-trace-analysis`](https://github.com/android/skills/tree/main/profilers/perfetto-trace-analysis) skills (`android skills list` to check for a local install; `android skills add perfetto-sql perfetto-trace-analysis` otherwise). They provide Domain Hints (CPU/Graphics/I/O/IPC/Memory/Power), a mandatory scratchpad chain-of-evidence pattern, and `GLOB`-over-`LIKE` query rules.
### R8 / ProGuard — Obfuscated Stack Traces
Release crash stack traces are obfuscated. Decode them with the mapping file generated at build time.
```bash # retrace a crash (AGP 7+) ./gradlew :app:retrace --stacktrace-file crash.txt
# Or use the retrace CLI directly java -jar retrace.jar mapping.txt crash.txt ```
Mapping files are in `app/build/outputs/mapping/<variant>/mapping.txt`. Always archive them alongside release builds.
If a class is unexpectedly removed or renamed, add a `-keep` rule in `proguard-rules.pro` and verify with:
```bash ./gradlew :app:assembleRelease # Then inspect: app/build/outputs/mapping/release/usage.txt (removed) and seeds.txt (kept) ```
For the **inverse problem** — reading obfuscated third-party code or decoding a stack trace from a library where the mapping file isn't yours — `retrace` doesn't apply. Use `jadx --deobf` (consistent renames across the decompiled output) or `jadx --deobf-map` (when the SDK ships a mapping). The [`android-reverse-engineering` plugin](https://github.com/SimoneAvogadro/android-reverse-engineering-skill) covers the full workflow including the anchor-via-strings strategy for navigating obfuscated code by string literals and framework class names that survive obfuscation (check if it's already installed locally first — it ships as `android-reverse-engineering:*` skills).
### Gradle Build Failures
Read the error from the **bottom up** — Gradle wraps errors in multiple layers.
Common patterns:
| Error | Investigation | |-------|--------------| | `Manifest merger failed` | Check `app/build/intermediates/merged_manifests/` for the merged output; look for conflicting `android:` attributes | | `Duplicate class` | Run `./gradlew dependencies` and look for the same class in multiple transitive deps; use `exclude` or force a version | | `Could not resolve` | Check repository declarations, VPN/proxy, dependency version exists | | `D8/R8: Type not present` | Missing `keep` rule or desugaring issue; check `minSdk` vs API used | | `KSP / KAPT error` | Look for the processor's own error above the Gradle wrapper message |
```bash # Full dependency tree for a configuration ./gradlew :app:dependencies --configuration releaseRuntimeClasspath
# Run with stacktrace for deeper Gradle errors ./gradlew assembleDebug --stacktrace --info 2>&1 | grep -A 20 "FAILED" ```
### Runtime UI Inspection
When a bug is visual (wrong element state, missing content, overlap), dump the layout tree directly instead of reasoning from a screenshot:
```bash # Full layout tree as JSON — search by class/text/bounds instead of parsing an image android layout --pretty
# Only elements that changed since last call — useful for animations or transient state android layout --diff --pretty
# Target a specific device, write to file android layout --device=emulator-5554 -o layout.json ```
Prefer `android layout` over `adb screencap` whenever the question is "what is the UI state?" rather than "what does it look like?". The JSON tree is grep-able and survives `--diff` state across invocations.
### Compose Recomposition Bugs
For deeper Compose performance analysis (stability, recomposition skipping, baseline profiles), see `android-skills:compose` → `compose/references/performance.md`.
Wrong state or unexpected re-renders:
1. **Layout Inspector** (Android Studio) → enable "Show recomposition counts" to identify hot paths. For headless/CLI workflows, `android layout --diff` gives a JSON tree of what changed between frames. 2. Add `SideEffect { Log.d("Recompose", "MyComposable recomposed") }` temporarily to confirm 3. Check that `State` objects are not created inside the composition (use `remember`) 4. Verify `equals()` on state data classes — a new object with same values still triggers recomposition if `equals` is not implemented
**Note:** Since Compose compiler 2.0+ (Kotlin 2.0+), strong skipping mode is enabled by default and the compiler automatically memoizes lambdas that capture stable references. Manual `remember {{ }}` wrapping is no longer necessary in most cases. If you see excessive recomposition from lambdas, check whether the captured references are unstable (mutable collections, non-data classes) rather than wrapping in `remember`.
(Standard `adb` commands — `devices`, `install -r`, `am start`, `pm clear`, `ps`, `run-as … ls /data/data/<pkg>/` — aren't covered here; for visual-state bugs prefer `android layout` over `screencap` as noted above.)
## Multi-Component Evidence Template
For issues spanning multiple layers (e.g. Repository → ViewModel → UI):
```kotlin // Temporarily instrument each boundary with a UNIQUE run-specific tag // (pick a fresh suffix per session, e.g. DEBUG-a4f2) so the SAME tag both // filters logcat at runtime and greps cleanly at teardown. class UserRepository(...) { suspend fun fetchUser(id: String): User { Log.d("DEBUG-a4f2", "Repository: fetching user $id") val result = api.getUser(id) Log.d("DEBUG-a4f2", "Repository: received ${result}") return result } } ```
Run once to identify **which layer** produces the bad value. Filter the run at runtime with `adb logcat -s "DEBUG-a4f2"`, then tear the instrumentation back out with a single `grep -rl "DEBUG-a4f2"`. A unique per-session tag is what makes both one-liners work — a shared tag like `DEBUG_LAYER` collides across sessions and leaves orphaned logs behind. Then investigate the implicated layer in isolation before proposing a fix.
## Red Flags
- Fixing a crash without reading the full `Caused by:` chain - Guessing at an R8 issue without checking the mapping file - Adding `Thread.sleep()` to "fix" an ANR or race condition - Resolving a dependency conflict by adding `exclude` without understanding why the duplicate exists - Fixing a Compose bug by wrapping in `key()` without understanding what triggers recomposition - Leaving temporary instrumentation in the tree — tag every debug log with a unique per-session prefix (e.g. `DEBUG-a4f2`) so cleanup is one `grep`, and remove them all before declaring the fix done
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for android-debugging, ready for a manual X post.
android-debugging: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB,... 136 stars https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x
Listing + install path for android-debugging: https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x Install: npx skills add rcosteira79/android-skills --skill android-debugging
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to rcosteira79 but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging/audit)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)rcosteira79
@rcosteira79
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
mono-color
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
1.9K StarsLast30days Skill
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
61.0K StarsAcademic Research Skills
Academic Research Skills for Claude Code: research → write → review → revise → finalize
38.4K StarsGPT Researcher
Run autonomous deep research over web and local sources
28.0K StarsSandbox only
Install targets
Codex install prompt
Install the "android-debugging" agent skill from https://github.com/rcosteira79/android-skills/tree/main/plugins/android-skills/skills/android-debugging. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"rcosteira79-android-debugging","task":"Install android-debugging","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add rcosteira79/android-skills --skill android-debugging
Maintenance
fresh
11d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
136
68/100 Quality · 75/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
PromisingUseful candidate, but compare it with alternatives before adopting.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
136 GitHub stars
Repo activity
136 stars, 14 forks
Maintenance
11d since push
License
MIT
Install
npx skills add rcosteira79/android-skills --skill android-debugging
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add rcosteira79/android-skills --skill android-debuggingDo not use when
Alternative
1.9K Stars
npx skills add yanliudesign/mono-color-skill --skill mono-color
Alternative
61.0K Stars
npx skills add mvanhorn/last30days-skill -g
Alternative
38.4K Stars
npx skills add Imbad0202/academic-research-skills
Alternative
28.0K Stars
npx skills add assafelovic/gpt-researcher
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/rcosteira79-android-debugging/install
Agent should check
Copy prompt
Task: Use android-debugging in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20android-debugging%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install
Install command: npx skills add rcosteira79/android-skills --skill android-debugging
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/rcosteira79-android-debugging/install
LLM text format
/api/skills/rcosteira79-android-debugging/install?format=text
Find alternatives
/api/skills/search?q=android-debugging&limit=3
Agent prompt
Use android-debugging for this task. Review https://www.openagentskill.com/api/skills/rcosteira79-android-debugging/install, then install with: npx skills add rcosteira79/android-skills --skill android-debuggingRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/rcosteira79-android-debugging
LLM text
/api/registry/manifest/rcosteira79-android-debugging?format=text
Install alias
/api/registry/install/rcosteira79-android-debugging
Recommend
/api/registry/recommend?task=Use%20android-debugging%20in%20an%20agent%20workflow&limit=3
Agent fit
GitHub automation
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Prototype with this skill first; keep a fallback candidate ready.
Role in stack
Fallback candidate
Primary fit
GitHub automation
Trust label
Prototype first
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO136 GitHub stars
Stars/forks activity
CHECK136 stars, 14 forks; issue activity unavailable in current metadata
Recent maintenance
PASS11d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Useful candidate, but compare it with alternatives before adopting.
Workflow fit
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Alternative shortlist
Similar skills that may fit this task.
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
Academic Research Skills for Claude Code: research → write → review → revise → finalize
Run autonomous deep research over web and local sources
--- name: android-debugging description: > Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB, ANR traces, R8 stack trace decoding, memory leaks, Gradle build failures, and Compose recomposition bugs, on a root-cause-first foundation. ---
# Android Debugging
## Overview
Android-specific evidence-gathering and investigation techniques on a root-cause-first foundation.
**Root-cause-first foundation:** - **No fix before the root cause is found.** Investigate first — reproduce, gather evidence (observed values, not assumed), trace the cause. Patching a symptom you don't understand creates two bugs. - **Three failed guesses ⇒ stop and question the architecture** rather than guessing again.
The Android-specific tools below serve that investigation. *Optional:* if you run a dedicated debugging-discipline skill (e.g. `superpowers:systematic-debugging` or `ace:systematic-debugging`), this layers on top of it — but it requires none.
## Evidence-Gathering by Problem Type
### Crashes & Exceptions
```bash # Stream crash logs filtered by app package adb logcat --pid=$(adb shell pidof -s com.example.app)
# Save full logcat to file for analysis adb logcat -d > crash_log.txt
# Filter by tag adb logcat -s "YourTag:E" ```
Key logcat log levels: `V` (verbose) `D` (debug) `I` (info) `W` (warn) `E` (error) `F` (fatal)
Read the **full stack trace** — the root cause is usually at the bottom of the `Caused by:` chain, not the top-level exception.
### ANR (Application Not Responding)
ANRs mean the main thread was blocked. Evidence:
```bash # Pull ANR trace from device adb pull /data/anr/traces.txt ./anr_traces.txt
# Or stream while reproducing adb logcat -s "ActivityManager:E" | grep -A 30 "ANR in" ```
Look for: `main` thread in state `MONITOR` (waiting for a lock) or blocking I/O on `main`. Trace backward to find what holds the lock.
**Common causes:** Database/network call on main thread, `runBlocking` on main thread, deadlock between coroutine scopes.
### Memory Leaks
Add [LeakCanary](https://square.github.io/leakcanary/) to `debugImplementation`. It surfaces leak traces automatically in a notification.
Read the leak trace top-to-bottom: the first bold line is the leaking object, the path shows what's holding the reference. Fix by clearing the reference in the appropriate lifecycle callback.
```bash # Dump heap manually for Android Profiler analysis adb shell am dumpheap com.example.app /data/local/tmp/heap.hprof adb pull /data/local/tmp/heap.hprof ./heap.hprof ```
### Performance Trace Investigation (Perfetto)
For bottleneck investigation across CPU, graphics, I/O, IPC, memory, or power — beyond what Logcat and ANR traces show — capture a Perfetto trace and query it with SQL.
**Measure before you fix.** For performance regressions, logs usually mislead — capture a *baseline* measurement before changing anything, then bisect against it. A trace tells you where time goes; only a comparison against a known-good baseline tells you what actually regressed.
```bash # Capture a trace (system-level, all categories) adb shell perfetto -c - --txt -o /data/misc/perfetto-traces/trace.pftrace \ <<'EOF' buffers { size_kb: 65536 } data_sources { config { name: "linux.ftrace" } } data_sources { config { name: "android.surfaceflinger.frame" } } duration_ms: 10000 EOF
adb pull /data/misc/perfetto-traces/trace.pftrace ./ ```
Then open the trace at https://ui.perfetto.dev and run SQL against it (`SELECT name, dur FROM slice WHERE dur > 16e6` for frames slower than 16ms, etc.).
For an agent-driven workflow — translating an investigation intent (jank, slow startup, battery drain) into the right Perfetto SQL and iterating across the trace — see Google's [`perfetto-sql`](https://github.com/android/skills/tree/main/profilers/perfetto-sql) and [`perfetto-trace-analysis`](https://github.com/android/skills/tree/main/profilers/perfetto-trace-analysis) skills (`android skills list` to check for a local install; `android skills add perfetto-sql perfetto-trace-analysis` otherwise). They provide Domain Hints (CPU/Graphics/I/O/IPC/Memory/Power), a mandatory scratchpad chain-of-evidence pattern, and `GLOB`-over-`LIKE` query rules.
### R8 / ProGuard — Obfuscated Stack Traces
Release crash stack traces are obfuscated. Decode them with the mapping file generated at build time.
```bash # retrace a crash (AGP 7+) ./gradlew :app:retrace --stacktrace-file crash.txt
# Or use the retrace CLI directly java -jar retrace.jar mapping.txt crash.txt ```
Mapping files are in `app/build/outputs/mapping/<variant>/mapping.txt`. Always archive them alongside release builds.
If a class is unexpectedly removed or renamed, add a `-keep` rule in `proguard-rules.pro` and verify with:
```bash ./gradlew :app:assembleRelease # Then inspect: app/build/outputs/mapping/release/usage.txt (removed) and seeds.txt (kept) ```
For the **inverse problem** — reading obfuscated third-party code or decoding a stack trace from a library where the mapping file isn't yours — `retrace` doesn't apply. Use `jadx --deobf` (consistent renames across the decompiled output) or `jadx --deobf-map` (when the SDK ships a mapping). The [`android-reverse-engineering` plugin](https://github.com/SimoneAvogadro/android-reverse-engineering-skill) covers the full workflow including the anchor-via-strings strategy for navigating obfuscated code by string literals and framework class names that survive obfuscation (check if it's already installed locally first — it ships as `android-reverse-engineering:*` skills).
### Gradle Build Failures
Read the error from the **bottom up** — Gradle wraps errors in multiple layers.
Common patterns:
| Error | Investigation | |-------|--------------| | `Manifest merger failed` | Check `app/build/intermediates/merged_manifests/` for the merged output; look for conflicting `android:` attributes | | `Duplicate class` | Run `./gradlew dependencies` and look for the same class in multiple transitive deps; use `exclude` or force a version | | `Could not resolve` | Check repository declarations, VPN/proxy, dependency version exists | | `D8/R8: Type not present` | Missing `keep` rule or desugaring issue; check `minSdk` vs API used | | `KSP / KAPT error` | Look for the processor's own error above the Gradle wrapper message |
```bash # Full dependency tree for a configuration ./gradlew :app:dependencies --configuration releaseRuntimeClasspath
# Run with stacktrace for deeper Gradle errors ./gradlew assembleDebug --stacktrace --info 2>&1 | grep -A 20 "FAILED" ```
### Runtime UI Inspection
When a bug is visual (wrong element state, missing content, overlap), dump the layout tree directly instead of reasoning from a screenshot:
```bash # Full layout tree as JSON — search by class/text/bounds instead of parsing an image android layout --pretty
# Only elements that changed since last call — useful for animations or transient state android layout --diff --pretty
# Target a specific device, write to file android layout --device=emulator-5554 -o layout.json ```
Prefer `android layout` over `adb screencap` whenever the question is "what is the UI state?" rather than "what does it look like?". The JSON tree is grep-able and survives `--diff` state across invocations.
### Compose Recomposition Bugs
For deeper Compose performance analysis (stability, recomposition skipping, baseline profiles), see `android-skills:compose` → `compose/references/performance.md`.
Wrong state or unexpected re-renders:
1. **Layout Inspector** (Android Studio) → enable "Show recomposition counts" to identify hot paths. For headless/CLI workflows, `android layout --diff` gives a JSON tree of what changed between frames. 2. Add `SideEffect { Log.d("Recompose", "MyComposable recomposed") }` temporarily to confirm 3. Check that `State` objects are not created inside the composition (use `remember`) 4. Verify `equals()` on state data classes — a new object with same values still triggers recomposition if `equals` is not implemented
**Note:** Since Compose compiler 2.0+ (Kotlin 2.0+), strong skipping mode is enabled by default and the compiler automatically memoizes lambdas that capture stable references. Manual `remember {{ }}` wrapping is no longer necessary in most cases. If you see excessive recomposition from lambdas, check whether the captured references are unstable (mutable collections, non-data classes) rather than wrapping in `remember`.
(Standard `adb` commands — `devices`, `install -r`, `am start`, `pm clear`, `ps`, `run-as … ls /data/data/<pkg>/` — aren't covered here; for visual-state bugs prefer `android layout` over `screencap` as noted above.)
## Multi-Component Evidence Template
For issues spanning multiple layers (e.g. Repository → ViewModel → UI):
```kotlin // Temporarily instrument each boundary with a UNIQUE run-specific tag // (pick a fresh suffix per session, e.g. DEBUG-a4f2) so the SAME tag both // filters logcat at runtime and greps cleanly at teardown. class UserRepository(...) { suspend fun fetchUser(id: String): User { Log.d("DEBUG-a4f2", "Repository: fetching user $id") val result = api.getUser(id) Log.d("DEBUG-a4f2", "Repository: received ${result}") return result } } ```
Run once to identify **which layer** produces the bad value. Filter the run at runtime with `adb logcat -s "DEBUG-a4f2"`, then tear the instrumentation back out with a single `grep -rl "DEBUG-a4f2"`. A unique per-session tag is what makes both one-liners work — a shared tag like `DEBUG_LAYER` collides across sessions and leaves orphaned logs behind. Then investigate the implicated layer in isolation before proposing a fix.
## Red Flags
- Fixing a crash without reading the full `Caused by:` chain - Guessing at an R8 issue without checking the mapping file - Adding `Thread.sleep()` to "fix" an ANR or race condition - Resolving a dependency conflict by adding `exclude` without understanding why the duplicate exists - Fixing a Compose bug by wrapping in `key()` without understanding what triggers recomposition - Leaving temporary instrumentation in the tree — tag every debug log with a unique per-session prefix (e.g. `DEBUG-a4f2`) so cleanup is one `grep`, and remove them all before declaring the fix done
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for android-debugging, ready for a manual X post.
android-debugging: Use when debugging Android or KMP issues — Android-specific techniques covering Logcat, ADB,... 136 stars https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x
Listing + install path for android-debugging: https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=x Install: npx skills add rcosteira79/android-skills --skill android-debugging
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to rcosteira79 but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging/audit)
[](https://www.openagentskill.com/skills/rcosteira79-android-debugging?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)rcosteira79
@rcosteira79
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
mono-color
Generate original one-ink or controlled two-ink editorial images from any theme, sentence, article idea, object, or reference photo. Always use this skill when the user asks for 单色海报、双色印刷、单色调视觉、蓝色/绿色孔版印刷、risograph、网点照片、复古或当代编辑排版、zine poster, monochrome editorial poster, duotone print, or asks to use the mono-color style. It uses an adaptive white, gray, or pale-beige substrate, no more than two printing inks, active negative space, terse human language, and strong serif/grotesk/mono typography without making retro styling the default or copying a source composition, wording, logo, or artwork. Produce both the final generation prompt and the generated raster image unless the user explicitly asks for prompt only.
1.9K StarsLast30days Skill
Research the last 30 days across Reddit, X, YouTube, Hacker News, Polymarket, GitHub, and the web, then synthesize a grounded brief for an AI agent.
61.0K StarsAcademic Research Skills
Academic Research Skills for Claude Code: research → write → review → revise → finalize
38.4K StarsGPT Researcher
Run autonomous deep research over web and local sources
28.0K StarsPermission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness