Fix hiddenapibypass
This commit is contained in:
@@ -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") }
|
||||
|
||||
Reference in New Issue
Block a user