Giter Site home page Giter Site logo

luckypray / dexkit Goto Github PK

View Code? Open in Web Editor NEW
406.0 11.0 46.0 2.63 MB

An easy-to-use, high-performance dex deobfuscation library.

Home Page: https://luckypray.org/DexKit/

License: GNU Lesser General Public License v3.0

CMake 0.18% C++ 43.41% C 0.32% Kotlin 53.74% Java 1.70% TypeScript 0.51% Python 0.14%
deobfuscation dex high-performance library native-module xposed

dexkit's Introduction

DexKit

license Maven Central Telegram

English | 简体中文

A high-performance runtime parsing library for dex implemented in C++, used for lookup of obfuscated classes, methods, or properties.


DexKit 2.0

Currently 2.0 has been officially released, please refer to Release Notes for related improvements.

Supported APIs

Basic Features:

  • Multi-condition class search
  • Multi-condition method search
  • Multi-condition field search
  • Provides multiple metadata APIs to obtain field/method/class related data

⭐️ Distinctive Features (Recommended):

  • Batch search of classes using strings
  • Batch search of methods using strings

Note: Optimizations have been implemented for string search scenarios, significantly enhancing search speed. Increasing query groups will not lead to a linear increase in time consumption.

Documentation

  • Click here to go to the documentation page to view more detailed tutorials.

Dependencies

Add dexkit dependency in build.gradle.

repositories {
    mavenCentral()
}
dependencies {
    // replace <version> with your desired version, e.g. `2.0.0`
    implementation 'org.luckypray:dexkit:<version>'
}

Note Starting with DexKit 2.0, the new ArtifactId has been changed from DexKit to dexkit.

DexKit current version: Maven Central

Usage Example

Here's a simple usage example.

Suppose this class is what we want to obtain, with most of its names obfuscated and changing in each version.

Sample app:

package org.luckypray.dexkit.demo;

import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.h;
import java.util.Random;
import org.luckypray.dexkit.demo.annotations.Router;

@Router(path = "/play")
public class PlayActivity extends AppCompatActivity {
    private static final String TAG = "PlayActivity";
    private TextView a;
    private Handler b;

    public void d(View view) {
        Handler handler;
        int i;
        Log.d("PlayActivity", "onClick: rollButton");
        float nextFloat = new Random().nextFloat();
        if (nextFloat < 0.01d) {
            handler = this.b;
            i = -1;
        } else if (nextFloat < 0.987f) {
            handler = this.b;
            i = 0;
        } else {
            handler = this.b;
            i = 114514;
        }
        handler.sendEmptyMessage(i);
    }

    public void e(boolean z) {
        int i;
        if (!z) {
            i = RandomUtil.a();
        } else {
            i = 6;
        }
        String a = h.a("You rolled a ", i);
        this.a.setText(a);
        Log.d("PlayActivity", "rollDice: " + a);
    }

    protected void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        setContentView(0x7f0b001d);
        Log.d("PlayActivity", "onCreate");
        HandlerThread handlerThread = new HandlerThread("PlayActivity");
        handlerThread.start();
        this.b = new PlayActivity$1(this, handlerThread.getLooper());
        this.a = (TextView) findViewById(0x7f080134);
        ((Button) findViewById(0x7f08013a)).setOnClickListener(new a(this));
    }
}

At this point, to obtain this class, you can use the following code:

This is just an example, in actual usage, there's no need for such an extensive set of matching conditions. Choose and use as needed to avoid unnecessary complexity in matching due to an excessive number of conditions.

Java Example

public class MainHook implements IXposedHookLoadPackage {
    
    static {
        System.loadLibrary("dexkit");
    }
    
    private ClassLoader hostClassLoader;
    
    @Override
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) {
        String packageName = loadPackageParam.packageName;
        String apkPath = loadPackageParam.appInfo.sourceDir;
        if (!packageName.equals("org.luckypray.dexkit.demo")) {
            return;
        }
        this.hostClassLoader = loadPackageParam.classLoader;
        // DexKit creation is a time-consuming operation, please do not create the object repeatedly. 
        // If you need to use it globally, please manage the life cycle yourself and ensure 
        // that the .close() method is called when not needed to prevent memory leaks.
        // Here we use `try-with-resources` to automatically close the DexKitBridge instance.
        try (DexKitBridge bridge = DexKitBridge.create(apkPath)) {
            findPlayActivity(bridge);
            // Other use cases
        }
    }
    
    private void findPlayActivity(DexKitBridge bridge) {
        ClassData classData = bridge.findClass(FindClass.create()
            // Search within the specified package name range
            .searchPackages("org.luckypray.dexkit.demo")
            // Exclude the specified package name range
            .excludePackages("org.luckypray.dexkit.demo.annotations")
            .matcher(ClassMatcher.create()
                // ClassMatcher Matcher for classes
                .className("org.luckypray.dexkit.demo.PlayActivity")
                // FieldsMatcher Matcher for fields in a class
                .fields(FieldsMatcher.create()
                    // Add a matcher for the field
                    .add(FieldMatcher.create()
                        // Specify the modifiers of the field
                        .modifiers(Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL)
                        // Specify the type of the field
                        .type("java.lang.String")
                        // Specify the name of the field
                        .name("TAG")
                    )
                    // Add a matcher for the field of the specified type
                    .addForType("android.widget.TextView")
                    .addForType("android.os.Handler")
                    // Specify the number of fields in the class
                    .count(3)
                )
                // MethodsMatcher Matcher for methods in a class
                .methods(MethodsMatcher.create()
                    // Add a matcher for the method
                    .methods(List.of(
                        MethodMatcher.create()
                            // Specify the modifiers of the method
                            .modifiers(Modifier.PROTECTED)
                            // Specify the name of the method
                            .name("onCreate")
                            // Specify the return type of the method
                            .returnType("void")
                            // Specify the parameter type of the method
                            .paramTypes("android.os.Bundle")
                            // Specify the strings used by the method
                            .usingStrings("onCreate"),
                        MethodMatcher.create()
                            .paramTypes("android.view.View")
                            // Specify the numbers used in the method, the type is Byte, Short, Int, Long, Float, Double
                            .usingNumbers(0.01, -1, 0.987, 0, 114514),
                        MethodMatcher.create()
                            .modifiers(Modifier.PUBLIC)
                            .paramTypes("boolean")
                            // Specify the methods called in the method list
                            .invokeMethods(MethodsMatcher.create()
                                .add(MethodMatcher.create()
                                    .modifiers(Modifier.PUBLIC | Modifier.STATIC)
                                    .returnType("int")
                                    // Specify the strings used in the method called in the method,
                                    .usingStrings(List.of("getRandomDice: "), StringMatchType.Equals)
                                )
                                // Only need to contain the call to the above method
                                .matchType(MatchType.Contains)
                            )
                    ))
                    // Specify the number of methods in the class, a minimum of 1, and a maximum of 10
                    .count(1, 10)
                )
                // AnnotationsMatcher Matcher for annotations in a class
                .annotations(AnnotationsMatcher.create()
                    // Add a matcher for the annotation
                    .add(AnnotationMatcher.create()
                        // Specify the type of the annotation
                        .type("org.luckypray.dexkit.demo.annotations.Router")
                        // The annotation needs to contain the specified element
                        .addElement(AnnotationElementMatcher.create()
                            // Specify the name of the element
                            .name("path")
                            // Specify the value of the element
                            .stringValue("/play")
                        )
                    )
                )
                // Strings used by all methods in the class
                .usingStrings("PlayActivity", "onClick", "onCreate")
            )
        ).singleOrThrow(() -> new IllegalStateException("The returned result is not unique"));
        // Print the found class: org.luckypray.dexkit.demo.PlayActivity
        System.out.println(classData.getName());
        // Get the corresponding class instance
        Class<?> clazz = classData.getInstance(loadPackageParam.classLoader);
    }
}

Kotlin Example

class MainHook : IXposedHookLoadPackage {
    
    companion object {
        init {
            System.loadLibrary("dexkit")
        }
    }

    private lateinit var hostClassLoader: ClassLoader

    override fun handleLoadPackage(loadPackageParam: XC_LoadPackage.LoadPackageParam) {
        val packageName = loadPackageParam.packageName
        val apkPath = loadPackageParam.appInfo.sourceDir
        if (!packageName.equals("org.luckypray.dexkit.demo")) {
            return
        }
        this.hostClassLoader = loadPackageParam.classLoader
        // DexKit creation is a time-consuming operation, please do not create the object repeatedly. 
        // If you need to use it globally, please manage the life cycle yourself and ensure 
        // that the .close() method is called when not needed to prevent memory leaks.
        // Here we use `Closable.use` to automatically close the DexKitBridge instance.
        DexKitBridge.create(apkPath).use { bridge ->
            findPlayActivity(bridge)
            // Other use cases
        }
    }

    private fun findPlayActivity(bridge: DexKitBridge) {
        val classData = bridge.findClass {
            // Search within the specified package name range
            searchPackages("org.luckypray.dexkit.demo")
            // Exclude the specified package name range
            excludePackages("org.luckypray.dexkit.demo.annotations")
            // ClassMatcher Matcher for classes
            matcher {
                // FieldsMatcher Matcher for fields in a class
                fields {
                    // Add a matcher for the field
                    add {
                        // Specify the modifiers of the field
                        modifiers = Modifier.PRIVATE or Modifier.STATIC or Modifier.FINAL
                        // Specify the type of the field
                        type = "java.lang.String"
                        // Specify the name of the field
                        name = "TAG"
                    }
                    // Add a matcher for the field of the specified type
                    addForType("android.widget.TextView")
                    addForType("android.os.Handler")
                    // Specify the number of fields in the class
                    count = 3
                }
                // MethodsMatcher Matcher for methods in a class
                methods {
                    // Add a matcher for the method
                    add {
                        // Specify the modifiers of the method
                        modifiers = Modifier.PROTECTED
                        // Specify the name of the method
                        name = "onCreate"
                        // Specify the return type of the method
                        returnType = "void"
                        // Specify the parameter types of the method, if the parameter types are uncertain,
                        // use null, and this method will implicitly declare the number of parameters
                        paramTypes("android.os.Bundle")
                        // Specify the strings used in the method
                        usingStrings("onCreate")
                    }
                    add {
                        paramTypes("android.view.View")
                        // Specify the numbers used in the method, the type is Byte, Short, Int, Long, Float, Double
                        usingNumbers(0.01, -1, 0.987, 0, 114514)
                    }
                    add {
                        paramTypes("boolean")
                        // Specify the methods called in the method list
                        invokeMethods {
                            add {
                                modifiers = Modifier.PUBLIC or Modifier.STATIC
                                returnType = "int"
                                // Specify the strings used in the method called in the method,
                                usingStrings(listOf("getRandomDice: "), StringMatchType.Equals)
                            }
                            // Only need to contain the call to the above method
                            matchType = MatchType.Contains
                        }
                    }
                    count(1..10)
                }
                // AnnotationsMatcher Matcher for annotations in a class
                annotations {
                    // Add a matcher for the annotation
                    add {
                        // Specify the type of the annotation
                        type = "org.luckypray.dexkit.demo.annotations.Router"
                        // The annotation needs to contain the specified element
                        addElement {
                            // Specify the name of the element
                            name = "path"
                            // Specify the value of the element
                            stringValue("/play")
                        }
                    }
                }
                // Strings used by all methods in the class
                usingStrings("PlayActivity", "onClick", "onCreate")
            }
        }.singleOrNull() ?: error("The returned result is not unique")
        // Print the found class: org.luckypray.dexkit.demo.PlayActivity
        println(classData.name)
        // Get the corresponding class instance
        val clazz = classData.getInstance(loadPackageParam.classLoader)
    }
}

Third-Party Open Source References

Star History

Star History Chart

License

LGPL-3.0 © LuckyPray

dexkit's People

Contributors

keta1 avatar kyuubiran avatar teble avatar tiann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dexkit's Issues

麻烦大佬给个查Field的例子

已使用2.0-alpha6速度很快,查方法和查类的,都基本会用。
查Field的不太确定是不是这样用。
用的也比较少。
能否给个稍微详细具体的例子。
尽量把已提供的api都用上。

bridge.findField {
        matcher {
            name = "xxField"
            modifiers = Modifier.PUBLIC
            declaredClass = "int.class"
            type = "I"
            getMethods {

            }
            putMethods {

            }
            annotations {

            }
        }
    }

2.0大概率导致宿主崩溃

貌似出现个问题,dexkit的相关调用代码 DouYinMain.kt#L148 ,以下是log日志:

Event:APP_SCOUT_WARNING Thread:main backtrace:
                     at org.luckypray.dexkit.DexKitBridge.nativeInitDexKit(Native Method)
                     at org.luckypray.dexkit.DexKitBridge.access$nativeInitDexKit(DexKitBridge.kt:28)
                     at org.luckypray.dexkit.DexKitBridge$Companion.nativeInitDexKit(Unknown Source:0)
                     at org.luckypray.dexkit.DexKitBridge$Companion.access$nativeInitDexKit(DexKitBridge.kt:425)
                     at org.luckypray.dexkit.DexKitBridge.<init>(DexKitBridge.kt:48)
                     at org.luckypray.dexkit.DexKitBridge.<init>(Unknown Source:0)
                     at org.luckypray.dexkit.DexKitBridge$Companion.create(DexKitBridge.kt:428)
                     at com.freegang.hook.DouYinMain.initDexKit(DouYinMain.kt:151)
                     at com.freegang.hook.DouYinMain.<init>(DouYinMain.kt:85)
                     at com.freegang.xpler.HookMain.handleLoadPackage(HookMain.kt:24)
                     at com.freegang.xpler.HookInit$handleLoadPackage$1$1.invoke(HookInit.kt:35)
                     at com.freegang.xpler.HookInit$handleLoadPackage$1$1.invoke(HookInit.kt:32)
                     at com.freegang.xpler.core.bridge.MethodHookImpl$startHook$unhook$2.afterHookedMethod(MethodHookImpl.kt:82)
                     at sX.rWW.KsypfPI.TT.Pshk.XposedBridge$LegacyApiSupport.handleAfter(Unknown Source:33)
                     at J.callback(Unknown Source:292)
                     at LSPHooker_.callApplicationOnCreate(Unknown Source:11)
                     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7232)
                     at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2241)
                     at android.os.Handler.dispatchMessage(Handler.java:106)
                     at android.os.Looper.loopOnce(Looper.java:211)
                     at android.os.Looper.loop(Looper.java:300)
                     at android.app.ActivityThread.main(ActivityThread.java:8401)
                     at java.lang.reflect.Method.invoke(Native Method)
                     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

补充一下:不知道是不是共存包的问题,对于mt管理器共存的包(未签名)几乎完全崩溃,原版很少(没有)。

[菜狗头] 这个日志似乎都存在,不管是否崩溃。

API讨论

查找方法和类比较割裂,findClass的结果和findMethod不能一起用。我理想中的API是这样

bridge.findMethod(FindMethodArgs.builder()
    .addMethodDeclareClassConstraints(
        FindClassArgs.builder().superClass("xxx.xxx.mysuperclass")
    )
)

或者考虑

bridge.findClassForFilter(FindClassArgs.builder())
.findMethod(FindMethodArgs.builder())

opNames匹配不到

opNames(Arrays.asList("new-instance", "invoke-direct", "invoke-virtual", "invoke-virtual", "move-result-object", "if-eqz", "return-object", "new-instance", "invoke-direct", "throw"))

求助 权限问题

在执行dexkit的时候发生如下报错:
java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map "/data/app/~~XJDf3lkJxeo86nnpZPIaEw==/Com.HChen.Hook-x7LVELe3pOsPXPq7ZvcVAQ==/base.apk!/lib/arm64-v8a/libdexkit.so" segment 1: Permission denied
对象是Athena App

关于2.0的对于方法参数推测功能的猜想

不知道2.0有么有类似于这样的操作

例如在某个类中有这样一个方法:

private void abc(View p1, KWB p2, int p3){
	//some logic..
}

其中参数2是被混淆的类型。

...
methods {
    // 添加对于方法的匹配器
    add {
        modifiers = Modifier.PRIVATE
        paramTypes = listOf("android.view.View","java.lang.Object","I") //模糊匹配第二个参数
    }
}
...

当然如果这样进行模糊匹配的话,搜寻耗时肯定会大大增加。
(小声,没试过,不知道有没有这种逻辑,没有或没打算也没啥,哈哈哈,2.0的新搜索已经很细了)

Caused by: java.lang.IllegalAccessError: Illegal class access: 'kotlin.LazyKt__LazyJVMKt' attempting to access 'kotlin.SynchronizedLazyImpl'

System.err: java.lang.reflect.InvocationTargetException
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at android.app.Application.doStart(Application.java:499)
System.err: at android.app.Application.attach(Application.java:356)
System.err: at android.app.Instrumentation.newApplication(Instrumentation.java:1159)
System.err: at android.app.LoadedApk.makeApplication(LoadedApk.java:1261)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7042)
System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:260)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1937)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:223)
System.err: at android.app.ActivityThread.main(ActivityThread.java:8021)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:813)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
System.err: Caused by: java.lang.IllegalAccessError: Illegal class access: 'kotlin.LazyKt__LazyJVMKt' attempting to access 'kotlin.SynchronizedLazyImpl'
System.err: at kotlin.LazyKt__LazyJVMKt.lazy(LazyJVM.kt:21)
System.err: at org.luckypray.dexkit.result.ClassData.(ClassData.kt:76)
System.err: at org.luckypray.dexkit.result.ClassData.(Unknown Source:0)
System.err: at org.luckypray.dexkit.result.ClassData$-Companion.from(ClassData.kt:50)
System.err: at org.luckypray.dexkit.DexKitBridge.findClass(DexKitBridge.kt:171)

使用2.0.0-rc7版本,查找com.miravia.android这个包名的apk(bridge.findClass(xx)或bridge.findMethod)出现这个异常

如何搜索数字?

package io.luckypray.dexkit.demo;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        int i = 1145;
    }
}

例如,查找这段代码中使用了 R.layout.activity_main 或 1145 的方法

[Helper] 求助 怎么按成员变量查找类

package com.meizu.flyme.update.model;

/* loaded from: classes.dex */
public class n {
    public b cdnCheckResult;
    public e currentFimware;
    public g firmwarePlan;
    public UpdateFirmware upgradeFirmware;

    public n() {
    }

    public n(UpdateFirmware updateFirmware, e eVar, g gVar, b bVar) {
        this.upgradeFirmware = updateFirmware;
        this.currentFimware = eVar;
        this.firmwarePlan = gVar;
        this.cdnCheckResult = bVar;
    }
}

求助这个类的构造方法怎么hook

bridge.batchFindClassesUsingStrings {
                    addQuery(
                        "upgradeModel",
                        setOf("cdnCheckResult", "firmwarePlan", "upgradeFirmware", "currentFimware")
                    )

                }

这么写找不到任何类。因为这个是json反序列化出来的类,所以这个属性名一般不会变的。

新版的查找方法问题反馈

查找代码
image
输出
image
输出非常多结果,且结果是错误的,okhttp3的类都搜索出来了。
我之前用alpha-6好像没这个问题。
代码我拉的主分支最新代码。
是我使用上有问题了吗?

编译失败,请问大佬这个错误如何解决

userNameXXX@localhost DexKit % ./gradlew clean :main:run

Configure project :dexkit-android
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the gradle.properties file or use the new publishing DSL.

Task :dexkit-android:externalNativeBuildCleanDebug
Clean dexkit-x86, dexkit_static-x86

Task :dexkit:cmakemain_mac-aarch64
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found JNI: NotNeeded
-- Disable dexkit log
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/userNameXXX/Documents/AndroidProjects/DexKit/dexkit/build/cmake/main/mac-aarch64

Task :dexkit:main_mac-aarch64_runGeneratorUnix_Makefiles
[ 4%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/bytecode_encoder.cc.o
[ 8%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/code_ir.cc.o
[ 12%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/common.cc.o
[ 16%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/control_flow_graph.cc.o
[ 20%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/debuginfo_encoder.cc.o
[ 24%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_bytecode.cc.o
[ 28%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_format.cc.o
[ 32%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_ir.cc.o
[ 36%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_ir_builder.cc.o
[ 40%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_utf8.cc.o
[ 44%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/instrumentation.cc.o
[ 48%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/reader.cc.o
[ 52%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/tryblocks_encoder.cc.o
[ 56%] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/writer.cc.o
[ 60%] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/beans.cpp.o
[ 64%] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/common.cpp.o
[ 68%] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o
/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/dexkit/dex_item.cpp:589:32: error: no member named 'all_of' in namespace 'std::ranges'
auto all_of = std::ranges::all_of(types, [this](std::string_view type_name) {
~~~~~~~~~~~~~^
1 error generated.
make[2]: *** [Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o] Error 1
make[1]: *** [Core/CMakeFiles/dexkit_static.dir/all] Error 2
make: *** [all] Error 2

Task :dexkit:main_mac-aarch64_runGeneratorUnix_Makefiles FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':dexkit:main_mac-aarch64_runGeneratorUnix_Makefiles'.

Process 'command 'make'' finished with non-zero exit value 2

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 13s
10 actionable tasks: 7 executed, 3 up-to-date
userNameXXX@localhost DexKit % ./gradlew clean :main:run

Configure project :dexkit-android
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the gradle.properties file or use the new publishing DSL.

Task :dexkit-android:externalNativeBuildCleanDebug
Clean dexkit-x86, dexkit_static-x86

Task :dexkit:cmakemain_mac-aarch64
-- The C compiler identification is AppleClang 14.0.0.14000029
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found JNI: NotNeeded
-- Disable dexkit log
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/userNameXXX/Documents/AndroidProjects/DexKit/dexkit/build/cmake/main/mac-aarch64

Task :dexkit:main_mac-aarch64_runGeneratorNinja
[1/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/common.cc.o
[2/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_format.cc.o
[3/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_bytecode.cc.o
[4/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_utf8.cc.o
[5/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/control_flow_graph.cc.o
[6/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/debuginfo_encoder.cc.o
[7/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_ir.cc.o
[8/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/common.cpp.o
[9/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/dex_ir_builder.cc.o
[10/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/bytecode_encoder.cc.o
[11/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/tryblocks_encoder.cc.o
[12/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/instrumentation.cc.o
[13/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/code_ir.cc.o
[14/25] Building CXX object CMakeFiles/dexkit.dir/native-bridge.cpp.o
[15/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/beans.cpp.o
[16/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/writer.cc.o
[17/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/third_party/slicer/reader.cc.o
[18/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item_find.cpp.o
[19/25] Building CXX object Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o
FAILED: Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -I/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/dexkit/include -I/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/third_party/slicer/export -I/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/third_party/thread_helper -I/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/third_party/aho_corasick_trie -I/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/third_party/parallel_hashmap -I/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/third_party/flatbuffers/include -Wno-empty-body -Wno-unused-private-field -Wno-unused-value -Wno-unused-variable -Wno-unused-function -pthread -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -std=gnu++2a -MD -MT Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o -MF Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o.d -o Core/CMakeFiles/dexkit_static.dir/dexkit/dex_item.cpp.o -c /Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/dexkit/dex_item.cpp
/Users/userNameXXX/Documents/AndroidProjects/DexKit/Core/dexkit/dex_item.cpp:589:32: error: no member named 'all_of' in namespace 'std::ranges'
auto all_of = std::ranges::all_of(types, [this](std::string_view type_name) {
~~~~~~~~~~~~~^
1 error generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.