Skip to content
Görkem KaraLead Mobile Developer

See how any Android app was built in 2 minutes (APK + jadx)

3 min read

you can see how any app on your phone was built in about two minutes. you need the APK and one free tool, jadx. this is also exactly how api keys leak, so the second half of this page is how to not be that app.

How any app was built, in 2 minutes (APK + jadx)

Step 1: grab the APK

every public android app ships as an APK. mirror sites like APKMirror have most of them. for your own app, take the build output or pull it from your phone:

bash
adb shell pm path com.example.app
adb pull /data/app/<path from above>/base.apk

Step 2: get jadx

jadx is a free dex to java decompiler with a gui. on a mac:

bash
brew install jadx
jadx-gui base.apk

it opens apk, aab, apks, apkm, xapk and plain dex files. or grab the zip from the releases page and run bin/jadx-gui.

jadx in 3 steps: pull the APK with adb, open it in jadx-gui, read the source tree and strings.xml
APK to source in 3 steps

Step 3: drop the APK in

that is it, the whole app is a tree now:

  • source code: every activity, service and screen class, decompiled back to readable java

  • every library it uses, by package name: firebase, analytics, payments, ads

  • AndroidManifest.xml: permissions, services, deep links

  • res/values/strings.xml: every string the app ships, keys included

R8 renames classes to a, b, c, but the logic and the strings stay readable. flutter and react native apps keep their own code in a native lib or js bundle, the java side and the resources still open.

jadx tree of an Android app: source code packages and resources
the tree jadx shows
strings.xml in jadx with google_api_key highlighted, values blurred
strings.xml, values blurred

What a baked-in key looks like

xml
<string name="google_api_key">AIza...</string>
<string name="google_app_id">1:1234567890:android:...</string>
<string name="google_storage_bucket">your-project.appspot.com</string>

the google-services gradle plugin writes these into every firebase app. that key is meant to identify your project, so it only stays harmless if you lock it down. an openai key, a stripe secret or your own admin token sitting next to it is a different story, anyone with jadx has it in a few clicks.

The rule: secret keys never live in the app

they live on your server. the app calls your endpoint, your server adds the key and calls the api.

  • put the call behind your own backend or an edge function (cloudflare worker, firebase or supabase functions), key stored as a server secret

  • check who is calling: signed-in user, firebase id token or app check, plus a rate limit so nobody burns your quota

  • google / firebase keys: in google cloud console restrict the key to android apps (package name + SHA-1) and to only the apis you use, and lock firestore and storage with security rules

  • already shipped a secret? rotate it. obfuscation does not hide strings

a minimal proxy as a cloudflare worker, key set with wrangler secret put OPENAI_KEY:

javascript
export default {
  async fetch(req, env) {
    // check the caller first: session, firebase id token or app check
    const r = await fetch('https://api.openai.com/v1/responses', {
      method: 'POST',
      headers: { Authorization: `Bearer ${env.OPENAI_KEY}`, 'Content-Type': 'application/json' },
      body: await req.text(),
    });
    return new Response(r.body, { status: r.status, headers: { 'Content-Type': 'application/json' } });
  },
};
Diagram: the Android app calls your server, the server adds the secret API key and calls the third-party API
the key stays on the server

The tool

github.com/skylot/jadx · ★52.1k · last commit 6d ago

View on GitHub

skylot/jadx GitHub stars

Frequently asked questions

Is jadx free?

Yes. jadx is a free, open source dex to Java decompiler with a GUI. On a Mac install it with brew install jadx, or download the zip from the GitHub releases page and run bin/jadx-gui.

Which files can jadx open?

APK, AAB, APKS, APKM, XAPK and plain DEX files. Flutter and React Native apps keep their own code in a native lib or JS bundle, but the Java side and the resources still open.

Can anyone see the API keys inside my Android app?

Yes. Every string the app ships, keys in res/values/strings.xml included, is readable in jadx, and R8 renames classes but does not hide strings. Keep secret keys on your server and let the app call your own endpoint.

More AI guides and real runs

Last updated: Written by: Görkem KARA