Fix hiddenapibypass

This commit is contained in:
Mygod
2023-06-08 21:51:13 -04:00
parent 26fbbc36e5
commit c72b4c4f27
2 changed files with 3 additions and 4 deletions

View File

@@ -87,7 +87,6 @@ dependencies {
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation("be.mygod.librootkotlinx:librootkotlinx:1.0.4") implementation("be.mygod.librootkotlinx:librootkotlinx:1.0.4")
implementation("com.android.billingclient:billing-ktx:6.0.0") 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-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.gms:play-services-oss-licenses:17.0.1")
implementation("com.google.android.material:material:1.9.0") implementation("com.google.android.material:material:1.9.0")
@@ -97,6 +96,7 @@ dependencies {
implementation("com.jakewharton.timber:timber:5.0.1") implementation("com.jakewharton.timber:timber:5.0.1")
implementation("com.linkedin.dexmaker:dexmaker:2.28.3") implementation("com.linkedin.dexmaker:dexmaker:2.28.3")
implementation("com.takisoft.preferencex:preferencex-simplemenu:1.1.0") 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-collections-immutable:0.3.5")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1")
add("googleImplementation", "com.google.android.play:app-update-ktx:2.1.0") add("googleImplementation", "com.google.android.play:app-update-ktx:2.1.0")

View File

@@ -5,8 +5,7 @@ import android.net.MacAddress
import android.net.wifi.SoftApConfiguration import android.net.wifi.SoftApConfiguration
import android.net.wifi.p2p.WifiP2pConfig import android.net.wifi.p2p.WifiP2pConfig
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import be.mygod.vpnhotspot.App.Companion.app import org.lsposed.hiddenapibypass.HiddenApiBypass
import me.weishu.reflection.Reflection
/** /**
* The central object for accessing all the useful blocked APIs. Thanks Google! * 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. * 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) @RequiresApi(33)
fun getCountryCode(clazz: Class<*>) = init.let { clazz.getDeclaredMethod("getCountryCode") } fun getCountryCode(clazz: Class<*>) = init.let { clazz.getDeclaredMethod("getCountryCode") }