04-apk-verify-fix

Verifies converted APK packages on Android devices and auto-fixes failures through iterative rebuild loops.

1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/ntd237/draft_toolkits_20042026 --skill 04-apk-verify-fix-ntd237
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: 04-apk-verify-fix
Source: https://github.com/ntd237/draft_toolkits_20042026/tree/main/other-skills/apk-skills/04-apk-verify-fix
Command: npx skills add https://github.com/ntd237/draft_toolkits_20042026 --skill 04-apk-verify-fix-ntd237

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Converted or repackaged APK/XAPK files often fail silently after installation—black screens, missing resources, ad layout crashes, or broken authentication—and manually diagnosing logcat output and rebuilding repeatedly is slow and error-prone. ## Core Features & Use Cases - Multi-Signal Smoke Testing: Runs S1-S4 test suites covering rendered UI verification via uiautomator, navigation stability, edition correctness (ads vs premium gating), and auth/integrity checks using adb and logcat. - Diagnostic Classification: Maps failures like Resources$NotFoundException, UnsatisfiedLinkError, InflateException, and Firebase DEVELOPER_ERROR into actionable diagnostic buckets. - Targeted Auto-Fix Loop: Applies surgical patches in the decompiled workspace, bumps versionCode, rebuilds with apktool, re-signs, and retests for up to 5 iterations with escalation guards. - Use Case: After converting an app to a premium edition APK, install it on an emulator, detect that the ad layout injection crashes the app, automatically convert it to programmatic-only mode, rebuild, and produce a verification report. ## Quick Start Install and verify my converted APK on the emulator, run the smoke tests, and automatically fix any crashes you find.

Frequently Asked Questions about 04-apk-verify-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a converted APK on an Android emulator?▼

Install the APK with adb install -r -d, launch the main activity with am start, then verify the process is alive and the UI renders via uiautomator dump. Check logcat for FATAL errors, native crashes, and ANRs to confirm stability.

How to automatically fix APK crashes after conversion?▼

Classify the logcat failure into a diagnostic bucket such as missing resources, classes, native libraries, or permissions, then restore the missing component from the original APK in the decompiled workspace. Rebuild with apktool, bump versionCode, re-sign, and retest up to 5 iterations.

Why does my converted APK show a black screen after install?▼

A black screen with a live process usually indicates an engine error, a missing ABI-specific native .so library, or an initialization deadlock. Process existence via pidof is not sufficient; confirm UI rendering with a non-empty uiautomator dump and check logcat for engine errors.

Can auto-fix resolve Firebase DEVELOPER_ERROR or Play Integrity failures?▼

No. Firebase SHA-1 mismatches, DEVELOPER_ERROR, 401/403 responses, and Play Integrity rejections are server-side attestation issues classified as manual fixes. They require registering the new keystore SHA-1 in Firebase Console and should not consume auto-fix iterations.

What causes InflateException crashes in modified APKs?▼

InflateException on AdView occurs when ad layout XML is injected but the corresponding ad SDK classes are absent from the dex. The fix is converting the layout-based ad injection to programmatic-only mode in the decompiled workspace.