Automated UI Testing of an APK Without the Source Code

You have an APK and no source: a build handed over by an agency, a release candidate from a CI pipeline you do not control, a competitor's app you are benchmarking, or last year's version nobody can r

By · February 26, 2026 · 3 min read · How-To Guides

You have an APK and no source: a build handed over by an agency, a release candidate from a CI pipeline you do not control, a competitor's app you are benchmarking, or last year's version nobody can rebuild. You can still test its UI automatically. This guide covers what works without source, what does not, and how to run it — from platform tools to autonomous testing with no human intervention.

What "without source" actually rules out

Instrumentation tests — Espresso and UI Automator test classes — are compiled into a *test APK* that must be signed with the same key as the app under test. Without the source, the keystore and a build, you cannot produce that test APK for a third-party build. That is the one genuine wall. Everything that drives the app from outside, through the accessibility hierarchy and ADB, is unaffected.

What works with only the APK

ApproachNeedsGives you
adb + uiautomator dumpthe APK, a device or emulatorInstall, launch, tap, type, and read the full UI hierarchy from the shell
Appium (UiAutomator2 driver)the APK, a scriptScripted UI tests in any WebDriver language; no re-signing needed
Maestrothe APK, a YAML flowDeclarative flows that read the accessibility tree
Monkeythe APKRandom event stress; crash detection, no verdicts
Autonomous testing (SUSA)the APKPersona-driven exploration with PASS/FAIL verdicts, crash/ANR capture, accessibility findings, reproduction steps and exported Appium scripts — no script written
Device clouds (Firebase Test Lab, AWS Device Farm)the APK, a test package or Robo/fuzz runRuns on real devices you do not own

Step 1 — install and inspect from the shell


adb install -r app-release.apk
adb shell monkey -p com.example.app -c android.intent.category.LAUNCHER 1   # launch
adb shell uiautomator dump /sdcard/ui.xml && adb pull /sdcard/ui.xml       # the hierarchy

The XML is the ground truth every automated tool works from: element classes, resource IDs, text, content descriptions, bounds and clickable state. If the interactive elements have neither IDs nor labels, scripted tools will struggle and accessibility findings will be severe — you learn that in the first minute.

Step 2 — script it, or explore it

Scripted (Appium). Point the UiAutomator2 driver at the APK; locate elements by resource ID, accessibility ID or XPath; assert on the hierarchy after each action. This is the right choice when you know the flows you must guarantee and have someone to maintain the script.

Autonomous (no script). Install the agent and hand it the APK:


pip install susatest-agent
susatest-agent test ./app-release.apk --device <adb-serial>

SUSA installs the build on the attached device or a local emulator, reads the hierarchy through UI Automator, and explores as different user personas — impatient, novice, adversarial and others — recording each flow's verdict, every crash and ANR from logcat, dead controls, and accessibility checks (contrast, touch targets, focus order, labels, text scaling) on every screen. The report carries reproduction steps and screenshots, and the discovered paths export as Appium scripts you can keep as a regression suite. None of it requires source, symbols or a re-signed build.

Step 3 — run it without human intervention

For a nightly or per-build run:


susatest-agent test ./app-release.apk --format junit --output susa-results.xml

The junit output gates the pipeline like any other test job. On a physical phone, susatest-agent connect bridges it to the run; with no phone, susatest-agent connect --emulator provisions a Google-APIs emulator. A login-gated app needs --username / --password; OTP flows need the SUSA SMS forwarder on the phone, set up once with fleet-prep.

Limits you should know before you start

Frequently asked questions

Can you do automated UI testing of an APK without the source?

Yes. Anything that drives the app from outside — ADB, Appium, Maestro, Monkey, autonomous tools — works from the installed APK alone. Only instrumentation tests, which must be compiled and signed with the app, need the source and keystore.

How do you test an Android app without human intervention?

Give an autonomous tool the APK and a device or emulator; it decides the actions, verifies outcomes per flow, captures crashes and ANRs from logcat, and writes a report with reproduction steps. Run it from CI with junit output so a failed verdict fails the build.

Do you need coding for automation testing of an APK?

Not for exploration. Scripted frameworks need code (or YAML) for every path; an autonomous run needs none and produces exportable scripts afterwards for the paths worth repeating.

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 11 real users — finds bugs, accessibility violations, and security issues. No scripts. New to the category? Start with what autonomous product intelligence & QA means.

Try SUSA Free