.SMALI

SMALI File

Android Smali Assembly Source File
Ask a question
QUICK ANSWER

A .smali file is Android Dalvik assembly source code produced when an APK is disassembled with apktool or baksmali. It is a reverse-engineering artifact - not something regular users encounter. Open it in any text editor or Visual Studio Code. If you have a folder of .smali files and want an APK back, use apktool to reassemble them.

Developer: Ben Gruver (JesusFreke) - original author; now maintained by Google (baksmali/smali v3) Category: Developer Files MIME: text/plain
OPENS ON Windows macOS Linux Android
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 12, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the SMALI file format?

.smali files contain human-readable Dalvik or ART bytecode - the assembly language representation of Android application code. The names smali and baksmali are Icelandic words for assembler and disassembler; the tools were created by Ben Gruver (JesusFreke) in 2010 and are now maintained by Google.

When an Android .apk is unpacked using apktool or baksmali, each compiled class inside the .dex file is extracted as a separate .smali file. The syntax declares class metadata with .class, .super, and .implements directives; fields with .field; and methods inside .method....end method blocks. Individual Dalvik opcodes (invoke-virtual, move-result, return-void, and others) operate on named registers (v0, v1, p0, etc.).

.smali files are used primarily in Android reverse engineering, security research, and CTF (Capture The Flag) challenges. A typical workflow is: unpack an APK with apktool d, edit the .smali sources to patch behavior, then repackage with apktool b and re-sign. They are an intermediate disassembly artifact - regular Android users never encounter raw .smali files.

Each .smali file corresponds to exactly one class, including anonymous inner classes (which appear as separate files). Available opcodes vary with Android API level, reflected in the .dex format version (e.g., 035 for Android 5, 039 for Android 12+).

Security & safety

RISK: MEDIUM

.smali files themselves are plain text and cannot harm your system when viewed in an editor. Risk is contextual: 1. If you disassembled a suspicious APK, the .smali files reveal its behavior - look for obfuscated strings, dynamic code loading (DexClassLoader), and network calls to suspicious hosts. 2. Patching APKs and re-signing them for distribution may violate app terms of service and in some jurisdictions copyright law. Personal use is generally accepted; redistribution is not. 3. Downloading .smali "patches" from unknown sources - treat like executable code; review before applying.

Format details

in a nutshell
FULL NAMEAndroid Smali Assembly Source Fileaka Smali file, Dalvik assembly
DEVELOPERBen Gruver (JesusFreke) - original author; now maintained by Google (baksmali/smali v3)since 2010 (baksmali 1.0 by Ben Gruver/JesusFreke)
MIME TYPEtext/plain
TYPEplain text assembly source code (Dalvik/ART bytecode representation)

Programs that open SMALI files

Windows3 apps
NotePad++ text editor Open-source File > Open - select .smali file. Syntax highlighting via user-defined language for smali available on NP++ community.
Visual Studio Code Open-source Open the .smali file directly; install 'smali' extension from the VS Code marketplace for syntax highlighting.
apktool Open-source apktool d app.apk - produces folder of .smali files. apktool b folder/ - reassembles them into APK.
macOS3 apps
TextEdit Built-in Open the .smali file in TextEdit (plain text mode - Format > Make Plain Text).
Visual Studio Code Open-source Open the .smali file; install 'smali' extension for syntax highlighting.
apktool Open-source apktool d app.apk to disassemble; apktool b to reassemble.
Linux3 apps
gedit Open-source Open .smali file in gedit for viewing and editing.
apktool Open-source apktool d app.apk to disassemble; apktool b to reassemble.
Vim / Vi Open-source vim file.smali - community smali syntax plugin available.
Android1 app
Not applicable Free Smali files are development/reverse-engineering artifacts; they are not opened on Android devices.

Technical details

deep spec
DeveloperBen Gruver (JesusFreke), original author; now Google-maintained (baksmali/smali v3+)
File typePlain-text human-readable Dalvik/ART bytecode assembly
EncodingUTF-8
Name etymologysmali and baksmali are Icelandic for assembler and disassembler
One file per classEach `.smali` file maps to exactly one Java or Kotlin class, including anonymous inner classes
Compiled equivalent`.dex` (Dalvik Executable) - `.smali` is the disassembled human-readable representation
Typical size1 KB - 200 KB per file; complex Android apps produce thousands of `.smali` files
Register syntaxLocal registers: `v0`, `v1`, ...; parameter registers: `p0`, `p1`, ... (`p0` is `this` in instance methods)
Opcode versioningTied to `.dex` format version: 035 (Android 5-6), 037 (Android 7), 038 (Android 8-11), 039 (Android 12+)
Standard workflowAPK → `baksmali` disassemble → edit `.smali` → `smali` assemble → repackaged APK (re-signing required)
Tool integration`apktool` uses `smali`/`baksmali` internally for APK disassembly and reassembly
Primary use casesAndroid reverse engineering, app patching, security vulnerability research, CTF challenges
Released2010 (baksmali 1.0 by Ben Gruver/JesusFreke)
Latest versionsmali/baksmali 3.x (Google-maintained as of 2024)
Specificationgithub.com

SMALI conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with SMALI files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about SMALI files.

Frequently asked questions

How do I get .smali files from an APK?
Use apktool: run 'apktool d yourapp.apk' in a terminal. It creates a folder with .smali files for each class. Alternatively, use baksmali directly on the classes.dex inside the APK.
How do I turn .smali files back into an APK?
Use apktool: run 'apktool b foldername/' to rebuild the APK, then re-sign it with apksigner or jarsigner.
Can I decompile .smali to Java?
Indirectly - use jadx directly on the APK to get Java source code. jadx is better than going smali→Java manually.
What does the Dalvik register syntax (v0, p0) mean?
Registers are the smali equivalent of local variables. 'v' registers are general locals; 'p' registers are method parameters (p0 = 'this' in instance methods).
Are .smali files safe to open?
Yes - they are plain text files. They cannot execute when viewed in a text editor.
Is it legal to decompile APKs to smali?
Legality varies by jurisdiction and use case. Reverse engineering for interoperability, security research, and personal use is generally allowed; redistribution of modified APKs may violate copyright or terms of service.

References

1GitHub - baksmali/smali (official, Google-maintained)github.com
2apktool - A tool for reverse engineering APKsapktool.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.PRO6XProPresenter 6 Bundle File
9.EXEWindows Executable (Portable Executable)
10.PRDXSoftMaker Presentations Document

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z