diff --git a/.gitignore b/.gitignore index 065189d1..87d404b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ -*.iml -.gradle -/local.properties -/.idea -.DS_Store -/build -/captures -.externalNativeBuild -release/vpnhotspotmod.apk +*.iml +.gradle +/local.properties +/.idea +.DS_Store +/build +/captures +.externalNativeBuild +release/vpnhotspotmod.apk diff --git a/build.gradle.kts b/build.gradle.kts index 93041244..17fbcabb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,13 +1,14 @@ plugins { - id("com.android.application") version "8.0.2" apply false - id("com.github.ben-manes.versions") version "0.47.0" - id("org.jetbrains.kotlin.android") version "1.8.21" apply false + id("com.android.application") version "8.2.0" apply false + id("com.github.ben-manes.versions") version "0.49.0" + id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false + id("org.jetbrains.kotlin.android") version "1.9.10" apply false } buildscript { dependencies { - classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.5") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9") classpath("com.google.android.gms:oss-licenses-plugin:0.10.6") - classpath("com.google.gms:google-services:4.3.15") + classpath("com.google.gms:google-services:4.4.0") } -} +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d3..874e7f66 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ +#Thu Dec 21 01:34:39 CST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-2-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index ba564112..50092340 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -25,7 +25,7 @@ android { compileSdk = 34 defaultConfig { minSdk = 28 - targetSdk = 34 + targetSdk = 33 resourceConfigurations.addAll(arrayOf("it", "pt-rBR", "ru", "zh-rCN", "zh-rTW")) versionCode = 1005 versionName = "2.16.5" @@ -71,34 +71,34 @@ android { } dependencies { - val lifecycleVersion = "2.6.1" - val roomVersion = "2.5.1" + val lifecycleVersion = "2.6.2" + val roomVersion = "2.6.1" - coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3") + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") kapt("androidx.room:room-compiler:$roomVersion") implementation(kotlin("stdlib-jdk8")) - implementation("androidx.browser:browser:1.5.0") - implementation("androidx.core:core-ktx:1.11.0-beta02") - implementation("androidx.fragment:fragment-ktx:1.6.0") + implementation("androidx.browser:browser:1.7.0") + implementation("androidx.core:core-ktx:1.12.0") + implementation("androidx.fragment:fragment-ktx:1.6.2") implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion") implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion") - implementation("androidx.preference:preference:1.2.0") + implementation("androidx.preference:preference:1.2.1") implementation("androidx.room:room-ktx:$roomVersion") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") - implementation("be.mygod.librootkotlinx:librootkotlinx:1.0.5") - implementation("com.android.billingclient:billing-ktx:6.0.0") + implementation("be.mygod.librootkotlinx:librootkotlinx:1.1.1") + implementation("com.android.billingclient:billing-ktx:6.1.0") implementation("com.google.android.gms:play-services-base:18.2.0") // fix for GoogleApiActivity crash @ 18.1.0+ implementation("com.google.android.gms:play-services-oss-licenses:17.0.1") - implementation("com.google.android.material:material:1.9.0") - implementation("com.google.firebase:firebase-analytics-ktx:21.3.0") - implementation("com.google.firebase:firebase-crashlytics:18.3.7") - implementation("com.google.zxing:core:3.5.1") + implementation("com.google.android.material:material:1.11.0") + implementation("com.google.firebase:firebase-analytics-ktx:21.5.0") + implementation("com.google.firebase:firebase-crashlytics:18.6.0") + implementation("com.google.zxing:core:3.5.2") implementation("com.jakewharton.timber:timber:5.0.1") implementation("com.linkedin.dexmaker:dexmaker:2.28.3") implementation("com.takisoft.preferencex:preferencex-simplemenu:1.1.0") implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3") - implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1") + implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") add("googleImplementation", "com.google.android.play:app-update-ktx:2.1.0") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.room:room-testing:$roomVersion") diff --git a/mobile/src/main/java/hanson/xyz/vpnhotspotmod/net/TetheringManager.kt b/mobile/src/main/java/hanson/xyz/vpnhotspotmod/net/TetheringManager.kt index c36d954b..18d2bdd2 100644 --- a/mobile/src/main/java/hanson/xyz/vpnhotspotmod/net/TetheringManager.kt +++ b/mobile/src/main/java/hanson/xyz/vpnhotspotmod/net/TetheringManager.kt @@ -567,6 +567,8 @@ object TetheringManager { val tetheredInterfaces = args!![0] as List callback?.onTetheredInterfacesChanged(tetheredInterfaces) +// Toast.makeText(this, "Adding Tether Interface to VPN", 5).show() + // hansonxyz tetheredInterfaces?.let { for (iface in it) { diff --git a/mobile/src/main/java/hanson/xyz/vpnhotspotmod/util/RootSession.kt b/mobile/src/main/java/hanson/xyz/vpnhotspotmod/util/RootSession.kt index 9926f359..4864826f 100644 --- a/mobile/src/main/java/hanson/xyz/vpnhotspotmod/util/RootSession.kt +++ b/mobile/src/main/java/hanson/xyz/vpnhotspotmod/util/RootSession.kt @@ -8,6 +8,7 @@ import timber.log.Timber import java.util.* import java.util.concurrent.locks.ReentrantLock import kotlin.concurrent.withLock +import android.util.Log class RootSession : AutoCloseable { companion object { @@ -38,8 +39,12 @@ class RootSession : AutoCloseable { fun submit(command: String) = execQuiet(command).message(listOf(command))?.let { Timber.v(it) } fun execQuiet(command: String, redirect: Boolean = false) = runBlocking { + // Log the command to debug console + Log.d("ExecQuiet", "Executing command: $command") + server!!.execute(RoutingCommands.Process(listOf("sh", "-c", command), redirect)) } + fun exec(command: String) = execQuiet(command).check(listOf(command)) /**