百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

smali

> 编程语言
开源

关于 smali/baksmali 是一个用于 dalvik、Android Java 虚拟机实现的 dex 格式的汇编器/反汇编器。语法松散,可用于编写 dex 格式的代码。

389 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

关于 smali/baksmali 是一个用于 dalvik、Android Java 虚拟机实现的 dex 格式的汇编器/反汇编器。语法松散,可用于编写 dex 格式的代码。

About

smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)

NOTE: This is a fork of https://github.com/JesusFreke/smali for patches needed by Google as the original repository is currently not maintained. After forking the namespace was changed from org.jf to com.android.tools.smali. The artifacts are released on Google Maven under the following coordinates:

  • com.android.tools.smali:smali:
  • com.android.tools.smali:smali-dexlib2:
  • com.android.tools.smali:smali-baksmali:
  • com.android.tools.smali:smali-util:

After the fork the first version released was 3.0.0, which was version 2.5.2 from the original repo with a few patches and the namespace change.

Support

  • github Issue tracker - For any bugs/issues/feature requests

Some useful links for getting started with smali

  • Official dex bytecode reference
  • Registers wiki page
  • Types, Methods and Fields wiki page
  • Official dex format reference

Building and testing

All building and testing should be done using a version of OpenJDK 11. Newer OpenJDK versions are currently not supported due to issues with some of the tools used in the build process.

Building

./gradlew assemble

Command Line Version

To run the smali and baksmali tools from the command line build the fat jars. The fat jars will be named with the current version followed by the first 8 characters of the current git hash followed by an optional -dirty if the repository was dirty when building and ending in -fat . The fat jar can be invoked with java -jar.

./gradlew smali:fatJar
java -jar smali/build/libs/smali-x.y.z-aaaaaaaa-dirty-fat.jar

Testing

To execute all tests run

./gradlew test

Testing Maven Release

Push a release version to your local maven repository (add -Dmaven.repo.local= to override the default local maven repository location)

./gradlew release publishToMavenLocal

Releasing

Building release versions and releasing to Google Maven use Google infrastructure and support scripts maintained as part of the R8 repository. The tasks below can only be performed by Google employees.

Prepare and build a release version

To prepare a release update build.gradle with the next release version and commit that. Then create a tag for that commit with the version.

bash
git tag  
git push origin 

Release versions can then be built by the Google R8 team using:

tools/trigger.py --smali= --release

in the R8 repository.

The status of the build on the bot is at https://ci.chromium.org/p/r8/builders/ci/smali.

Releasing to Google Maven

When a release version has been built on the bot, it can be released to Google Maven by running

tools/release_smali.py --version=

in the R8 repository. This kick off an internal Google approval process to finalize the release.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言