Skip to content

Commit

Permalink
Merge pull request CodingGay#1 from wukaicheng/main
Browse files Browse the repository at this point in the history
新UI
  • Loading branch information
nnjun authored May 24, 2021
2 parents efc3907 + e50208e commit f426032
Show file tree
Hide file tree
Showing 48 changed files with 1,269 additions and 368 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![](https://img.shields.io/badge/language-java-brightgreen.svg)

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

## 项目声明
- 由于 [黑盒BlackBox](https://github.com/nnjun/BlackBox) 已被抄家,多的不想说了,请关注本项目或者其他未来项目吧。
Expand Down
41 changes: 37 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
}

android {
Expand All @@ -14,10 +15,12 @@ android {
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

ndk {
// 设置支持的SO库架构
abiFilters 'armeabi-v7a', 'x86'
}

}

buildTypes {
Expand All @@ -26,20 +29,50 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

buildFeatures{
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

implementation project(':Bcore')

//coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2"

//viewModel liveData lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"

//third

implementation 'com.afollestad.material-dialogs:core:3.3.0'
//dialog
implementation 'com.github.nukc.stateview:kotlin:2.2.0'
//状态控制控件
implementation 'com.roger.catloadinglibrary:catloadinglibrary:1.0.9'
//加载dialog
implementation 'com.github.Ferfalk:SimpleSearchView:0.2.0'
//searchView


testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package top.niunaijun.blackdex

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("top.niunaijun.blackdex", appContext.packageName)
}
}
23 changes: 14 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="top.niunaijun.blackdex">
xmlns:tools="http://schemas.android.com/tools"
package="top.niunaijun.blackdex">

<!-- Android 11 需要 -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />

<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BlackDex">
<activity android:name=".MainActivity">
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:name=".App"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BlackDex">
<activity android:name=".view.main.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
43 changes: 0 additions & 43 deletions app/src/main/java/top/niunaijun/blackdex/App.java

This file was deleted.

26 changes: 26 additions & 0 deletions app/src/main/java/top/niunaijun/blackdex/App.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package top.niunaijun.blackdex

import android.app.Application
import android.content.Context
import top.niunaijun.blackbox.BlackDexCore
import top.niunaijun.blackbox.app.configuration.ClientConfiguration
import top.niunaijun.blackdex.data.BlackDexConfiguration

/**
*
* @Description:
* @Author: wukaicheng
* @CreateDate: 2021/5/23 14:00
*/
class App : Application() {

override fun attachBaseContext(base: Context?) {
super.attachBaseContext(base)
BlackDexCore.get().doAttachBaseContext(base,BlackDexConfiguration(base!!))
}

override fun onCreate() {
super.onCreate()
BlackDexCore.get().doCreate()
}
}
45 changes: 0 additions & 45 deletions app/src/main/java/top/niunaijun/blackdex/MainActivity.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package top.niunaijun.blackdex.data

import android.content.Context
import top.niunaijun.blackbox.app.configuration.ClientConfiguration
import top.niunaijun.blackbox.utils.FileUtils
import top.niunaijun.blackbox.utils.compat.BuildCompat
import java.io.File

/**
*
* @Description: 启动配置文件
* @Author: wukaicheng
* @CreateDate: 2021/5/23 14:04
*/
class BlackDexConfiguration(private val context: Context) : ClientConfiguration() {

companion object {
fun getDexDumpDir(context: Context): String {
return if (BuildCompat.isR()) {
val dump = File(context.externalCacheDir?.parentFile?.parentFile?.parentFile?.parentFile, "Download/dexDump")
FileUtils.mkdirs(dump)
dump.absolutePath
} else {
val dump = File(context.externalCacheDir?.parentFile, "dump")
FileUtils.mkdirs(dump)
dump.absolutePath
}
}
}

private val dir = getDexDumpDir(context)

override fun getHostPackageName(): String {
return context.packageName
}

override fun getDexDumpDir(): String {
return dir
}

}
Loading

0 comments on commit f426032

Please sign in to comment.