Utilities
Assemble smali files into DEX bytecode
smali-assemble is an offline adapter for a selected google/smali operation.
overview
What smali-assemble does
Supply a folder containing only .smali files to assemble a classes.dex artifact. The adapter selects API level 28 and one native worker.
A FILE containing native DEX bytecode. The adapter checks DEX header length, SHA1 signature and Adler32 checksum. These structural checks do not prove that the code is safe or behaves correctly.
Native execution has a 120-second timeout and JVM -Xmx256m. The adapter checks a 4 MiB artifact limit after execution; this is not peak process-memory or temporary-disk containment. The source is limited to 200 files and 10 MiB, with only .smali files and no symlink entries.
Pinned native source 3.0.7 at 878d37fe960945e1b2eec430f1649d43910a4fd0. Final-image native positive and negative fixtures passed. The private platform fixture-tool-verifier run passed. The exact image and source/notices bundle are publicly downloadable; the exact public Library identity was verified. This is a source-built fatJAR; native version output has an upstream -dev suffix and the image uses tag 3.0.7-source1. It is not claimed to be an official release binary.
source github.com/google/smali/tree/878d37fe960945e1b2eec430f1649d43910a4fd0
use cases
Where smali-assemble fits
Assemble smali files into DEX bytecode
Supply a folder containing only .smali files to assemble a classes.dex artifact. The adapter selects API level 28 and one native worker.
Retain the native artifact
A FILE containing native DEX bytecode. The adapter checks DEX header length, SHA1 signature and Adler32 checksum. These structural checks do not prove that the code is safe or behaves correctly.
reference
smali-assemble inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| source | FOLDER | --source | Folder containing only .smali source files. |
Showing key inputs. smali-assemble exposes 1 inputs in total.
example
Run smali-assemble
python3 /app/run.py --source ./smali-source ./output[{"class": "Lorg/trickest/fixture/Fixture;", "methods": [{"name": "answer", "descriptor": "()I", "instructions": [["const/16", "v0, 42"], ["return", "v0"]]}, {"name": "endpoint", "descriptor": "()Ljava/lang/String;", "instructions": [["const-string", "v0, \"https://fixture.invalid/api/v1\""], ["return-object", "v0"]]}]}]guidance
Choosing smali-assemble
Use this job for smali-to-DEX assembly. Apktool rebuilds broader package resources, while baksmali disassembles DEX in the reverse direction. The tool does not generate a signed APK.
faq
smali-assemble questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run smali-assemble yourself
Retained Androguard inspection of the actual assembled DEX from a self-owned smali fixture. This JSON is independent inspection output, not the binary DEX format returned by the node. It confirms the answer() method returns 42. Invalid source syntax and an empty source folder were rejected separately.
Facts on this page come from the live Trickest tool library.