MCPcopy
hub / github.com/APKLab/APKLab

github.com/APKLab/APKLab @v2.0.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.0 ↗
88 symbols 275 edges 35 files 32 documented · 36%
README

APKLab APKLab

The ultimate Android RE experience right inside your VS Code.

APKLab seamlessly integrates the best open-source tools: Apktool, smali-lsp, Jadx, uber-apk-signer, apk-mitm and more to the excellent VS Code so you can focus on app analysis and get it done without leaving the IDE.

<a href="https://github.com/APKLab/APKLab">
    <img alt="Version" src="https://img.shields.io/github/v/tag/APKLab/APKLab?label=latest&color=f0f0e0&labelColor=404752">
</a>
<a href="https://open-vsx.org/extension/Surendrajat/apklab">
    <img alt="Download" src="https://img.shields.io/static/v1?label=get%20from&message=open-vsx&color=629&labelColor=404752">
</a>
<a href="https://marketplace.visualstudio.com/items?itemName=Surendrajat.apklab">
    <img alt="Installs" src="https://img.shields.io/visual-studio-marketplace/i/surendrajat.apklab?logo=visual-studio-code&logoColor=blue&labelColor=404752&color=blue">
</a>
<a href="https://github.com/APKLab/APKLab/actions/workflows/apklab.yml">
    <img alt="CI" src="https://github.com/APKLab/APKLab/actions/workflows/apklab.yml/badge.svg?branch=master&event=push">
</a>






<a href="https://t.me/apklab_re">
    <img alt="Telegram" src="https://img.shields.io/badge/telegram-eff?logo=telegram">
</a>
<a href="https://matrix.to/#/#apklab:matrix.org">
    <img alt="Matrix" src="https://img.shields.io/badge/matrix-f5faef?logo=matrix&logoColor=black">
</a>
    <a href="https://forum.xda-developers.com/t/4109409/">
    <img alt="XDA Developers" src="https://img.shields.io/badge/XDA%20Forums-ffb?logo=xda-developers">
</a>

Features

  • Decode/Edit/Rebuild app resource files
  • Disassemble/Mod/Rebuild an APK to/from Smali
  • Decompile the APK to Java source
  • Excellent Smali language support with smali-lsp — go to definition, find references, hover, call/type hierarchy, code lens, completion, diagnostics
  • Analyze & mod effectively in VS Code with full IDE features
  • Sign & Install the APK after rebuild
  • Generate Frida hooks for any smali methods
  • Inject Frida gadget into APK with automatic main activity patching
  • Initialize git repo in project dir to track changes
  • Apply MITM patch for HTTPS inspection
  • Interactive Malware Analysis Report
  • Support for Apktool-style projects (apktool.yml)
  • Support for Apktool 3.0+ CLI arguments
  • Android resource frameworks management
  • Support for user-provided keystore for APK signing
  • Check for update and install needed tools automatically
  • Supports Linux, Mac and WSL2

Requirements

  • JDK 17+

Run java -version in your Shell, if not found, download from here.

  • quark-engine >=21.01.6 (optional - for malware analysis)

Run quark in your Shell, if not found, check official docs.

  • adb (optional)

    Run adb devices in your Shell, if not found, check this guide.

Getting Started

Open APK or Apktool project

  • Open the Command Palette (Ctrl+Shift+P) ➜ APKLab: Open an APK

decode.gif

  • Or Just open an existing Apktool project folder

Apply MITM patch

  • Right-Click on or inside apktool.yml file ➜ APKLab: Prepare for HTTPS inspection

mitm.gif

ReBuild and Sign APK

  • Right-Click on or inside apktool.yml file ➜ APKLab: Rebuild the APK

rebuild.gif

Install APK to device

  • Right-Click on .apk file (in dist directory) ➜ APKLab: Install the APK

install.gif

Generate Frida Hook

  • Right-Click inside a .method in a .smali file ➜ APKLab: Generate Frida Hook
  • Hook is appended to frida_hooks.ts in the project root

Inject Frida Gadget

  • Right-Click on or inside apktool.yml file ➜ APKLab: Inject Frida Gadget
  • Select the gadget .so file, target architecture, and the main activity is patched automatically

Clean ApkTool frameworks dir

  • Open the Command Palette (Ctrl+Shift+P) ➜ APKLab: Empty ApkTool Framework Dir

Extension Settings

Dependency Paths

  • apklab.apktoolPath: Full Path of apktool.jar. If you want to use a different version of it, change it like:

"apklab.apktoolPath": "/home/oozer/downloads/apktool_2.4.1.jar"

  • apklab.apkSignerPath: Full Path of uber-apk-signer.jar. If you want to use a different version of it, change it like:

"apklab.apkSignerPath": "/home/oozer/downloads/uber-apk-signer-1.1.0.jar"

  • apklab.jadxDirPath: Full Path of jadx-x.y.z dir. If you want to use a different version of it, change it like:

"apklab.jadxDirPath": "/home/oozer/downloads/jadx-1.1.0"

  • apklab.smaliLspPath: Full Path of smali-lsp.jar. If you want to use a different version of it, change it like:

"apklab.smaliLspPath": "/home/oozer/downloads/smali-lsp.jar"

  • apklab.javaPath: Path to the Java executable (default: java). Change it if Java is not on your PATH:

"apklab.javaPath": "/usr/lib/jvm/java-17/bin/java"

Keystore configuration

  • apklab.keystorePath: Put the absolute path of your Java keystore(.jks or .keystore) file here.

"apklab.keystorePath": "/home/oozer/downloads/debug.keystore"

  • apklab.keystorePassword: Put the password of your keystore here.

  • apklab.keyAlias: Put the alias of the used key in the keystore here.

  • apklab.keyPassword: Put the password of the used key in the keystore here.

Additional configuration

  • apklab.initProjectDirAsGit: Initialize project output directory as Git repository.
  • apklab.updateTools: Whether APKLab should check for tools (for apklab, jadx...) update and show a notification.
  • smaliLsp.trace.server: Traces the communication between VS Code and the Smali Language Server (off, messages, verbose).

Known Issues

Please check our Bug tracker for known issues.

Contribution Guide

For bug reports, feature requests or simply discussing an idea, please open an issue here. PRs are always welcome.

Changelog

Credits

Extension points exported contracts — how you extend this code

ProcessOptions (Interface)
* Options for executeProcess function.
src/utils/executor.ts
QuarkApiCall (Interface)
(no doc)
src/tools/quark-engine.ts
Config (Interface)
* structure of update config data
src/utils/updater.ts
QuarkCrime (Interface)
(no doc)
src/tools/quark-engine.ts
Tool (Interface)
(no doc)
src/utils/updater.ts
QuarkRawReport (Interface)
(no doc)
src/tools/quark-engine.ts
QuarkFunction (Interface)
(no doc)
src/tools/quark-engine.ts
QuarkApiCallEntry (Interface)
(no doc)
src/tools/quark-engine.ts

Core symbols most depended-on inside this repo

smaliTypeToJava
called by 16
src/tools/frida.ts
checkAndInstallTools
called by 12
src/utils/updater.ts
parseSmaliParams
called by 8
src/tools/frida.ts
detectArchFromFilename
called by 8
src/tools/frida.ts
executeProcess
called by 8
src/utils/executor.ts
getJavaPath
called by 7
src/utils/java.ts
findMainActivity
called by 6
src/utils/manifest.ts
showStatusBar
called by 5
src/tools/smali-lsp.ts

Shape

Function 71
Interface 10
Class 4
Method 3

Languages

TypeScript100%

Modules by API surface

src/tools/quark-engine.ts14 symbols
src/tools/frida.ts14 symbols
src/test/suite/vsix.test.ts10 symbols
src/tools/smali-lsp.ts8 symbols
src/test/suite/smali-lsp.test.ts7 symbols
src/utils/updater.ts5 symbols
src/tools/apktool.ts4 symbols
src/utils/manifest.ts3 symbols
src/interface.ts3 symbols
src/utils/quick-picks.ts2 symbols
src/utils/executor.ts2 symbols
src/utils/downloader.ts2 symbols

Dependencies from manifests, versioned

@eslint/js10.0.1 · 1×
@types/cross-spawn6.0.6 · 1×
@types/listr0.14.10 · 1×
@types/mocha10.0.10 · 1×
@types/node24 · 1×
@types/vscode1.75.0 · 1×
@vscode/test-electron2.5.2 · 1×
@vscode/vsce3.7.1 · 1×
apk-mitm1.3.0 · 1×
cross-spawn7.0.6 · 1×
esbuild0.28.0 · 1×
eslint10.2.0 · 1×

For agents

$ claude mcp add APKLab \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact