APK Downloader
·7 min read

Scan an APK for Malware Without Installing an Antivirus: The On-Device Toolkit

Uploading a sideloaded APK to an online scanner or trusting the phone's built-in security centre sounds responsible but misses a whole class of junk: repackaged builds, greymarket ad SDKs, and signature-swapped clones rarely match any malware signature. The reliable path is to inspect the file before installing it, using tools Android already ships with - apksigner, aapt, unzip and adb. This guide covers the five checks, what each one can and cannot prove, and the permission/function mismatch table that filters most bad builds in one read.

apksecurityadbverification

So you downloaded an APK from a site you half-trust. The usual moves are to upload it to an online multi-engine scanner, or to install it and tap "Scan" in the phone's built-in security centre. Both feel responsible. Both miss a large class of problems.

Online scanners match static file signatures. Repackaged builds, greymarket ad SDKs and clones with swapped payment channels are usually clean by that measure - they contain no known malware, they just contain things you did not agree to. Phone-based "security centres" often only validate the install source against a vendor whitelist; once the file is installed, they announce "protected" and stop looking.

The reliable path is the opposite of both: inspect the file before installing it, using tools that ship with the Android SDK - apksigner, aapt, unzip and adb. About ten minutes of work gives you a concrete picture of what the package declares it can do, whether it came from who it claims, and whether it carries signs of a shell packer.

This guide is about the decision criteria, not the commands - the commands are trivially copyable.

1. What this can and cannot prove

Set the boundary first, so you do not over-trust it.

You can establish:

  • Whether the package really comes from the developer it claims (certificate and signing scheme).
  • Every permission it requests, including the dangerous ones: SMS, accessibility, notification access, overlay, device admin.
  • Whether components are exported to the rest of the system - i.e. how much of an attack surface it presents.
  • Whether there are signs of runtime code loading (dropped dex/so, encrypted assets/ payloads).
  • Whether well-known ad or analytics SDKs are baked in.

You cannot establish:

  • Server-delivered behaviour after install, including staged payloads.
  • The real logic inside a packed or heavily obfuscated binary - you can only see that a packer is present.
  • Zero-days.

Treat this as risk reduction, not a guarantee. It is extremely effective against sloppy clones, stripped builds and pirated apps that quietly request SMS access. It will not defeat a well-built multi-stage trojan.

2. Preparation

Install Android SDK platform-tools and build-tools (this is where aapt and apksigner live), then confirm:

adb version
aapt version
apksigner --version

Use the official apksigner for signature work. Third-party verifiers still misreport some v3/v4 signatures, which is exactly the kind of ambiguity you do not want in a security check.

3. Check 1: signature and provenance

apksigner verify --print-certs app.apk

Read Signer #1 certificate DN and the SHA-256 digest.

  • A company DN that matches the official publisher (e.g. a recognisable corporate CN=) is a good sign.
  • CN=Android Debug, Unknown, or a random string means either a repack or a hobby build. Risk rises sharply.
  • The same app from two sources with different SHA-256 fingerprints: at least one was modified. Do not install both, and do not assume the one you have is the good one.

The single most useful trick here: download the official copy from Google Play and compare fingerprints. If they match, a third-party mirror likely shipped you the real file - just possibly with a different download wrapper.

Then check the signing scheme:

apksigner verify -v app.apk

If only v1 scheme (JAR signing): true shows while v2 and v3 are false, the build is old or badly packaged, and is easier to modify in transit.

4. Check 2: declared permissions (highest signal per minute spent)

aapt dump permissions app.apk

Or, for something already installed:

adb shell dumpsys package <package> | grep -i "granted\|requested"

The judgement is a permission-to-function comparison, not a count:

PermissionLegitimate useRed flag when
SEND_SMS / READ_SMSMessaging apps, OTP autofillA flashlight, calculator or small game requests it
BIND_ACCESSIBILITY_SERVICEAccessibility, some automation toolsRequested by a utility app (can read screen and click for you)
BIND_NOTIFICATION_LISTENER_SERVICENotification managers, watch syncUnrelated to widgets or screens
SYSTEM_ALERT_WINDOWFloating widgets, screen recordersCleaning tools, "boosters"
DEVICE_ADMINEnterprise MDM, find-my-phoneEntertainment apps
REQUEST_INSTALL_PACKAGESApp stores, updatersSingle-purpose utilities

One heuristic does most of the work: a calculator asking for SMS access is broken; a camera asking for accessibility is hostile. A mismatch between declared power and stated purpose is stronger evidence than any scanner verdict.

5. Check 3: exported components

aapt dump xmltree app.apk AndroidManifest.xml | grep -B2 -A2 "android:exported"

Exported activities, services and receivers are reachable by any other app on the device. Most apps have a few, so the question is again proportional:

  • An exported BroadcastReceiver on BOOT_COMPLETED means it starts at every boot. Paired with an ad SDK, that is a permanently resident background process.
  • An exported Service with no permission guard can be bound by third parties - a convenient relay for data.
  • An exported Activity on android.intent.action.VIEW with a custom scheme is a phishing landing target.

An offline note-taking app with five boot-start receivers is not a plausible design.

6. Check 4: signs of packing and runtime loading

unzip -l app.apk | head -50
unzip -l app.apk | grep -iE "\.so$|assets/|payload"

Signals worth flagging:

  • Large encrypted blobs under assets/ (.bin, .dat) - often a second-stage payload.
  • An unusual number of native libraries with random names (liba1b2c3.so) - classic packer output.
  • Networks endpoints discoverable with unzip -p app.apk classes.dex | strings | grep -iE "http://|report|track" - quick look at where it phones home.

For a closer read, apktool d app.apk decompiles to smali; grep for DexClassLoader, Runtime.exec, System.loadLibrary to see whether it loads executable code at runtime. Slow, but decisive for "is this a shell".

Cross-check against known ad SDK prefixes (com.google.android.gms.ads, com.bytedance.sdk, com.qq.e, and similar). Ads alone are not malware - but many permissions plus an ad SDK plus several exported boot receivers is the standard signature of a grey-market build.

7. Check 5: runtime behaviour after install

Static analysis sees declared capability. Behaviour needs the device:

adb logcat -v time | grep -iE "permission|denied|security|avc"

Frequent avc: denied lines mean the app keeps reaching for resources outside its grants. Frequent clipboard reads or location requests in the log are also meaningful.

Finally open Settings → Apps → <app> → Permissions → Permission usage history. Access to features you have never triggered from that app is the clearest post-install signal there is. Uninstall on the spot.

8. Status summary

CheckLow riskHigh risk
Signer DNOfficial publisherDebug / Unknown / mismatch
Signing schemev2 + v3v1 only
PermissionsMatch stated functionHigh power, trivial function
Exported componentsFew, justifiedMultiple boot-start receivers
Package structureClean, few nativesMany random so, encrypted assets
RuntimeNo anomaliesRepeated privilege attempts

Three or more items in the right column: drop the build and get it from an official source.

9. FAQ

Q1: Do I need a computer?

Permissions are readable on-device from Settings after install, and some tools can show the certificate. Precise inspection with aapt/apksigner is desktop-first. Termux can host aapt on the phone, at the cost of setup friction.

Q2: Online scanners report the file is clean. Isn't that enough?

It means the static file matches no known signature. Most problematic sideloaded builds are not viruses at all - they are clones with extra ad SDKs and changed payment paths. Clean but harmful.

Q3: If the signature matches the official one, is it definitely safe?

No. A matching fingerprint proves it is the same developer and key - it does not mean the official build itself is free of ads or trackers. Signature matching removes the "modified by a third party" risk, nothing more.

Q4: Everything checks out but the installed app still behaves badly.

That is the runtime phase: watch traffic, wake locks and permission usage history. Static checks describe what an app is allowed to do, not what it does.

Bottom line

Auditing an APK on your own machine is five steps: `apksigner` for provenance, `aapt dump permissions` for declared power, exported-component review for attack surface, package inspection for runtime loading, then `logcat` plus permission-usage history for real behaviour. The value is not technical sophistication - it is replacing a gut feeling with evidence. The one rule that filters the most bad builds on its own: does the requested power match the advertised function.