diff --git a/app/build.gradle b/app/build.gradle
index 8ac198b..c06c3e8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -14,6 +14,7 @@ android {
versionCode 5
versionName "3.1.0"
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
flavorDimensions "BlackDex32"
diff --git a/app/src/main/java/top/niunaijun/blackdex/app/BlackDexLoader.kt b/app/src/main/java/top/niunaijun/blackdex/app/BlackDexLoader.kt
index 2eae60a..d95e80c 100644
--- a/app/src/main/java/top/niunaijun/blackdex/app/BlackDexLoader.kt
+++ b/app/src/main/java/top/niunaijun/blackdex/app/BlackDexLoader.kt
@@ -23,6 +23,8 @@ class BlackDexLoader {
private var mFixCodeItem by AppSharedPreferenceDelegate(App.getContext(),false)
+ private var mHookDump by AppSharedPreferenceDelegate(App.getContext(),true)
+
private var mDir = if (mSaveEnable) {
getDexDumpDir(App.getContext())
} else {
@@ -46,6 +48,10 @@ class BlackDexLoader {
override fun isFixCodeItem(): Boolean {
return mFixCodeItem
}
+
+ override fun isEnableHookDump(): Boolean {
+ return mHookDump
+ }
})
}
@@ -77,6 +83,15 @@ class BlackDexLoader {
return this.mFixCodeItem
}
+ fun setHookDump(enable: Boolean){
+ this.mHookDump = enable
+ }
+
+ fun isHookDump(): Boolean {
+
+ return this.mHookDump
+ }
+
companion object {
diff --git a/app/src/main/java/top/niunaijun/blackdex/view/setting/SettingFragment.kt b/app/src/main/java/top/niunaijun/blackdex/view/setting/SettingFragment.kt
index 1233fe4..e393107 100644
--- a/app/src/main/java/top/niunaijun/blackdex/view/setting/SettingFragment.kt
+++ b/app/src/main/java/top/niunaijun/blackdex/view/setting/SettingFragment.kt
@@ -28,6 +28,8 @@ class SettingFragment : PreferenceFragmentCompat() {
private lateinit var fixCodeItemPreference: SwitchPreferenceCompat
+ private lateinit var hookDumpPreference: SwitchPreferenceCompat
+
private val initialDirectory = AppManager.mBlackBoxLoader.getSavePath()
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
@@ -44,6 +46,10 @@ class SettingFragment : PreferenceFragmentCompat() {
fixCodeItemPreference.onPreferenceChangeListener = mFixCodeItemChange
fixCodeItemPreference.isChecked = AppManager.mBlackBoxLoader.isFixCodeItem()
+ hookDumpPreference = findPreference("hook_dump")!!
+ hookDumpPreference.onPreferenceChangeListener = mHookDumpChange
+ hookDumpPreference.isChecked = AppManager.mBlackBoxLoader.isHookDump()
+
}
private val mSavedPathClick = Preference.OnPreferenceClickListener {
@@ -79,6 +85,11 @@ class SettingFragment : PreferenceFragmentCompat() {
return@OnPreferenceChangeListener true
}
+ private val mHookDumpChange = Preference.OnPreferenceChangeListener { _, newValue ->
+ AppManager.mBlackBoxLoader.saveEnable(newValue as Boolean)
+ return@OnPreferenceChangeListener true
+ }
+
private val mFixCodeItemChange = Preference.OnPreferenceChangeListener { _, newValue ->
if (newValue as Boolean) {
diff --git a/app/src/main/res/values-zh/string.xml b/app/src/main/res/values-zh/string.xml
index c4cf813..4ebf552 100644
--- a/app/src/main/res/values-zh/string.xml
+++ b/app/src/main/res/values-zh/string.xml
@@ -30,7 +30,8 @@
开启后将进行深度脱壳,深度脱壳会自主修复被抽取的指令,开启后请注意以下变化。\n\n1.脱壳时间会大幅度上升,预计几分钟都十几分钟不等\n2.脱壳期间有可能会出现应用闪退(遇到反检测等)\n3.会增加脱壳失败几率\n4.不一定能够100%还原
-
+ Hook脱壳
+ 使用Hook提高脱壳成功率
正在脱壳…
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2ae70c2..50e0123 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -32,4 +32,6 @@
classes.dex (%1d/%1d)
Unpacking…
+ Use hook to improve the success rate of shelling
+ Hook Dump
\ No newline at end of file
diff --git a/app/src/main/res/xml/setting.xml b/app/src/main/res/xml/setting.xml
index d536006..c20720d 100644
--- a/app/src/main/res/xml/setting.xml
+++ b/app/src/main/res/xml/setting.xml
@@ -14,10 +14,17 @@
+
+
+
+
\ No newline at end of file