diff --git a/mobile/build.gradle.kts b/mobile/build.gradle.kts index 2b2c71bc..50eb3a0d 100644 --- a/mobile/build.gradle.kts +++ b/mobile/build.gradle.kts @@ -87,7 +87,6 @@ dependencies { implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") implementation("be.mygod.librootkotlinx:librootkotlinx:1.0.4") implementation("com.android.billingclient:billing-ktx:6.0.0") - implementation("com.github.tiann:FreeReflection:3.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") @@ -97,6 +96,7 @@ dependencies { 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") add("googleImplementation", "com.google.android.play:app-update-ktx:2.1.0") diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/util/UnblockCentral.kt b/mobile/src/main/java/be/mygod/vpnhotspot/util/UnblockCentral.kt index 2a8827e6..b8e4c20b 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/util/UnblockCentral.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/util/UnblockCentral.kt @@ -5,8 +5,7 @@ import android.net.MacAddress import android.net.wifi.SoftApConfiguration import android.net.wifi.p2p.WifiP2pConfig import androidx.annotation.RequiresApi -import be.mygod.vpnhotspot.App.Companion.app -import me.weishu.reflection.Reflection +import org.lsposed.hiddenapibypass.HiddenApiBypass /** * The central object for accessing all the useful blocked APIs. Thanks Google! @@ -19,7 +18,7 @@ object UnblockCentral { /** * Retrieve this property before doing dangerous shit. */ - private val init by lazy { if (needInit) check(Reflection.unseal(app.deviceStorage) == 0) } + private val init by lazy { if (needInit) check(HiddenApiBypass.setHiddenApiExemptions("")) } @RequiresApi(33) fun getCountryCode(clazz: Class<*>) = init.let { clazz.getDeclaredMethod("getCountryCode") }