Convert Figma logo to code with AI

CodingGay logoBlackDex

BlackDex is an Android unpack(dexdump) tool, it supports Android 5.0~12 and need not rely to any environment. BlackDex can run on any Android mobile phone or emulator, you can unpack APK File in several seconds.

5,691
1,221
5,691
61

Top Related Projects

17,465

LSPosed Framework

Virtual Engine for Android(Support 14.0 in business version)

2,568

This is a tool to repackage apk file, then the apk can load any xposed modules installed in the device. It is another way to hook an app without root device.

4,410

Dynamic java method AOP hook for Android(continution of Dexposed on ART), Supporting 5.0~11

Quick Overview

BlackDex is an Android unpack (dex dump) tool that can be used to unpack or dump dex from various Android protection systems. It's designed to work on Android 4.4 to Android 12 and supports both 32-bit and 64-bit architectures. BlackDex operates by injecting a native library into the target application process.

Pros

  • Supports a wide range of Android versions (4.4 to 12)
  • Works with both 32-bit and 64-bit architectures
  • Can unpack multiple types of Android protection systems
  • Open-source project with active development

Cons

  • Requires root access on the Android device
  • May not work with all types of protection systems
  • Potential legal and ethical concerns regarding reverse engineering
  • Limited documentation, especially for non-Chinese speakers

Getting Started

To use BlackDex:

  1. Download the latest release APK from the GitHub repository.
  2. Install the APK on a rooted Android device.
  3. Open the BlackDex app and grant root permissions.
  4. Select the target application from the list.
  5. Click the "Unpack" button to start the unpacking process.
  6. Once completed, the unpacked dex files will be saved in the specified output directory.

Note: Using BlackDex may violate terms of service for some applications and could be illegal in certain jurisdictions. Use responsibly and only on applications you have permission to analyze.

Competitor Comparisons

17,465

LSPosed Framework

Pros of LSPosed

  • More comprehensive and versatile, supporting a wide range of Android versions and devices
  • Actively maintained with frequent updates and a larger community
  • Offers advanced features like module management and system-wide modifications

Cons of LSPosed

  • More complex to set up and use, requiring root access and custom recovery
  • Potentially higher risk of system instability due to deep system modifications
  • Larger footprint and resource usage compared to BlackDex

Code Comparison

LSPosed (Java):

public class XposedHelpers {
    public static void findAndHookMethod(Class<?> clazz, String methodName, Object... parameterTypesAndCallback) {
        // Implementation
    }
}

BlackDex (Kotlin):

class BlackDex {
    fun unpack(context: Context, apkPath: String, outputPath: String) {
        // Implementation
    }
}

Summary

LSPosed is a powerful Xposed framework implementation for Android, offering extensive customization and modification capabilities. It's more feature-rich but requires more technical expertise. BlackDex, on the other hand, is a simpler tool focused specifically on unpacking and decompiling Android apps. While LSPosed provides broader functionality, BlackDex offers a more straightforward approach for its specific use case.

Virtual Engine for Android(Support 14.0 in business version)

Pros of VirtualApp

  • More comprehensive virtualization capabilities, allowing for full app cloning and sandboxing
  • Larger community and more frequent updates
  • Better documentation and examples for integration

Cons of VirtualApp

  • More complex setup and integration process
  • Heavier resource usage due to full app virtualization
  • Potential legal concerns due to app cloning functionality

Code Comparison

VirtualApp:

VirtualCore.get().setResourcesHook(true);
VirtualCore.get().setComponentDelegate(new MyComponentDelegate());
VirtualCore.get().initialize(new VirtualInitializer() {
    @Override
    public void onMainProcess() {
        // Main process initialization
    }
});

BlackDex:

BlackDex.init(this);
BlackDex.setDebug(true);
BlackDex.addHookClass(MyHookClass.class);
BlackDex.start();

Summary

VirtualApp offers more comprehensive app virtualization and cloning capabilities, with a larger community and better documentation. However, it's more complex to set up and use, and may have legal implications. BlackDex, on the other hand, focuses on simpler app unpacking and protection removal, making it easier to use for specific tasks but less versatile overall.

2,568

This is a tool to repackage apk file, then the apk can load any xposed modules installed in the device. It is another way to hook an app without root device.

Pros of Xpatch

  • Focuses specifically on modifying APKs to bypass signature verification
  • Provides a command-line interface for easier integration into build processes
  • Supports both Windows and Linux operating systems

Cons of Xpatch

  • Limited to signature verification bypass, less comprehensive than BlackDex
  • May require more technical knowledge to use effectively
  • Less actively maintained, with fewer recent updates

Code Comparison

BlackDex (Java):

public class Shell {
    public static String exec(String command) {
        try {
            Process process = Runtime.getRuntime().exec(command);
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            StringBuilder output = new StringBuilder();
            String line;
            while ((line = reader.readLine()) != null) {
                output.append(line).append("\n");
            }
            return output.toString();
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
}

Xpatch (Java):

public class ApkSignatureSchemeV2Verifier {
    private static boolean verifyV2Signature(ByteBuffer apk, int apkSigningBlockOffset, int centralDirOffset, int eocdOffset, Map<Integer, byte[]> signatureSchemeV2Signatures) throws SecurityException {
        // Verify APK Signature Scheme v2 signature
        ByteBuffer signatureBlock = sliceFromTo(apk, apkSigningBlockOffset, centralDirOffset);
        return verifySignatures(signatureBlock, signatureSchemeV2Signatures);
    }
}

Both repositories focus on Android app manipulation, but BlackDex offers a more comprehensive solution for unpacking and modifying apps, while Xpatch specializes in bypassing signature verification. BlackDex's code example shows a general shell execution method, while Xpatch's code demonstrates specific signature verification logic.

4,410

Dynamic java method AOP hook for Android(continution of Dexposed on ART), Supporting 5.0~11

Pros of Epic

  • More comprehensive Android system modification capabilities
  • Supports a wider range of Android versions (4.0 to 13)
  • Active development with frequent updates and community support

Cons of Epic

  • More complex setup and usage compared to BlackDex
  • Requires root access, which may not be suitable for all users
  • Potentially higher risk of system instability due to deep modifications

Code Comparison

Epic (Java):

public class Epic {
    public static void main(String[] args) {
        EpicNative.init(null);
        // Additional initialization code
    }
}

BlackDex (Kotlin):

class BlackDex : Application() {
    override fun attachBaseContext(base: Context) {
        super.attachBaseContext(base)
        // Initialization and context attachment
    }
}

Summary

Epic offers more extensive Android system modification capabilities, supporting a wider range of Android versions and providing active development. However, it requires root access and has a more complex setup. BlackDex, on the other hand, focuses specifically on unpacking and is generally easier to use but with more limited functionality. The code comparison shows the different approaches to initialization, with Epic using a native interface and BlackDex extending the Application class.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

BlackDex

English Version

BlackDex是一个运行在Android手机上的脱壳工具,支持5.0~12,无需依赖任何环境任何手机都可以使用,包括模拟器。只需几秒,即可对已安装包括未安装的APK进行脱壳。

运行原理

博客地址

项目声明

本项目并不针对任何加固,在遇到检测环境等均不处理,仅供安全领域分析用途。项目免费开源仅供学习用途、请勿用于非法用途。否则后果自负!

Black系列交流群:390562046(QQ)

编译说明

运行前请请Make Project一次

运行前请请Make Project一次

运行前请请Make Project一次

脱壳说明

本项目针对一(落地加载)、二(内存加载)、三(指令抽取)代壳,摆脱对以往脱壳环境的困扰,几乎支持5.0以上的任何系统。并且拥有 快速、方便、成功率高 的优点。一般只需要几秒钟即可完成对已安装包括未安装应用脱壳。**未安装应用**脱壳时间主要花费在复制文件IO消耗上,由应用大小决定速度。已安装应用一般在数秒内即可完成脱壳。

脱壳文件说明

  • hook_xxxx.dex hook系统api脱壳的dex,深度脱壳不修复
  • cookie_xxxx.dex 利用dexFile cookie脱壳的dex,深度脱壳时会修复此dex

脱壳原理

通过DexFile cookie进行脱壳,理论兼容art开始的所有版本。可能少数因设备而异,绝大部分是支持的。资源有限无法大量测试,遇到问题请提issues.

深度脱壳

深度脱壳模式下会自主修复被抽取的方法指令,将指向其他内存块的指令回填至DEX内,解决nop问题,但是不会确保一定会有用,例如:指令需要主动调用才解密等则无法回填或者说是无效回填。深度脱壳并不包含任何解密、主动调用等操作。本功能仍然在测试阶段,可能会出现以下情况,请悉知,愿世上再无nop。

  1. 脱壳时间会大幅度上升,预计几分钟都十几分钟不等
  2. 脱壳期间有可能会出现应用闪退(遇到反检测等)
  3. 会增加脱壳失败几率
  4. 不一定能够100%还原

部分抽取壳脱壳前后对比

xx

环境要求

  • 一台普通手机
  • Xposed
  • Frida
  • Magisk
  • Root
  • 定制系统

架构特别说明

本项目区分32位与64位,目前是2个不同的app,如在Demo已安装列表内无法找到需要开启的app说明不支持,请使用另一个版本。

BlackDex下载:https://github.com/CodingGay/BlackDex/releases

演示

xx

感谢

License

Copyright 2021 Milk

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.