mirror of
https://github.com/yggdrasil-network/crispa-android.git
synced 2024-11-09 20:11:01 +00:00
1. dex loader lib fix
This commit is contained in:
parent
d129230898
commit
5cd6ca82c4
@ -67,7 +67,6 @@ dependencies {
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha02'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.hbb20:ccp:2.4.0'
|
||||
implementation 'app.artyomd.injector:injector-android:0.5.0'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||
|
@ -11,7 +11,6 @@ import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.PreferenceManager
|
||||
import app.artyomd.injector.DexUtils
|
||||
import dalvik.system.DexFile
|
||||
import io.github.chronosx88.yggdrasil.models.DNSInfo
|
||||
import io.github.chronosx88.yggdrasil.models.PeerInfo
|
||||
@ -24,7 +23,6 @@ import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.deserializeS
|
||||
import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.deserializeStringSet2PeerInfoSet
|
||||
import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.serializeDNSInfoSet2StringList
|
||||
import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.serializePeerInfoSet2StringList
|
||||
import java.io.File
|
||||
import java.lang.reflect.Method
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
@ -142,7 +140,11 @@ class MainActivity : AppCompatActivity() {
|
||||
ipLayout.visibility = View.VISIBLE
|
||||
findViewById<TextView>(R.id.ip).text = address
|
||||
}
|
||||
val c: Class<*> = dummy.Dummy::class.java
|
||||
|
||||
val sourceDir: String = this.applicationInfo.sourceDir
|
||||
val dexFile = DexFile(sourceDir)
|
||||
val cl = classLoader
|
||||
val c: Class<*> = dexFile.loadClass("dummy/Dummy", cl)
|
||||
val methods: Array<Method> = c.declaredMethods
|
||||
showToast("Getting dummy.Dummy class methods list")
|
||||
if(methods.isEmpty()){
|
||||
@ -152,16 +154,6 @@ class MainActivity : AppCompatActivity() {
|
||||
showToast("The method is: " + m.toString())
|
||||
}
|
||||
}
|
||||
val sourceDir = listOf<File>(File(this.applicationInfo.sourceDir))
|
||||
DexUtils.loadDex(this, sourceDir)
|
||||
showToast("Getting dummy.Dummy class methods list")
|
||||
if(methods.isEmpty()){
|
||||
showToast("No class methods found in dummy.Dummy")
|
||||
} else {
|
||||
for (m in methods) {
|
||||
showToast("The method is: " + m.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun stopVpn(){
|
||||
|
Loading…
Reference in New Issue
Block a user