x1ongzhu 1 سال پیش
والد
کامیت
557eb45021
9فایلهای تغییر یافته به همراه1027 افزوده شده و 965 حذف شده
  1. BIN
      RcsHackTool.dex
  2. 4 4
      gen.js
  3. 17 0
      saved_spoof.txt
  4. 11 11
      scripts/_spoof.js
  5. 309 435
      scripts/_spoof_gms.js
  6. 3 4
      scripts/sendsms.js
  7. 302 302
      scripts/spoof1.js
  8. 368 196
      scripts/spoof_gms.js
  9. 13 13
      vars.json

BIN
RcsHackTool.dex


+ 4 - 4
gen.js

@@ -18,16 +18,16 @@ function randomeNumber(length) {
     return n
 }
 
-const mcc = "310"
-const mnc = "241"
+const mcc = "255"
+const mnc = "06"
 const simOperator = mcc + mnc
 const networkOperator = mcc + mnc
 const simSerialNumber = randomeNumber(20)
 const iccId = simSerialNumber
-const number = "4782426591" || randomeNumber(9)
+const number = "638783055" || randomeNumber(9)
 const imei = nodeImei.random()
 const imsi = mcc + mnc + randomeNumber(15 - (mcc + mnc).length)
-const countryIso = "us"
+const countryIso = "ua"
 let subId = "37"
 const androidId = randomstring.generate({ length: 16, charset: "hex" })
 const serialNumber = randomstring.generate({ length: 8, charset: "hex" })

+ 17 - 0
saved_spoof.txt

@@ -58,4 +58,21 @@ const subId = "21"
     "subId": "56",
     "androidId": "31be1f8ec203d552",
     "serialNumber": "7cb3a5b9"
+}
+
+
+{
+    "mcc": "255",
+    "mnc": "06",
+    "simOperator": "25506",
+    "networkOperator": "25506",
+    "simSerialNumber": "47254539375685548460",
+    "iccId": "47254539375685548460",
+    "number": "638783055",
+    "imei": "011546009466177",
+    "imsi": "255063661827038",
+    "countryIso": "ua",
+    "subId": "45",
+    "androidId": "8f0804f720128407",
+    "serialNumber": "c3ccaebf"
 }

+ 11 - 11
scripts/_spoof.js

@@ -1,14 +1,14 @@
-const mcc = "310"
-const mnc = "999"
-const simOperator = "310999"
-const networkOperator = "310999"
-const simSerialNumber = "35833137600635493160"
-const iccId = "35833137600635493160"
-const number = "4782426591"
-const imei = "357923049200019"
-const imsi = "310999996203622"
-const countryIso = "us"
-const subId = "57"
+const mcc = "302"
+const mnc = "299"
+const simOperator = "302299"
+const networkOperator = "302299"
+const simSerialNumber = "25343849204326395079"
+const iccId = "25343849204326395079"
+const number = "4305581376"
+const imei = "359028031160102"
+const imsi = "302299418648530"
+const countryIso = "ca"
+const subId = "45"
 
 class Log {
     static TAG = "[SMS]"

+ 309 - 435
scripts/_spoof_gms.js

@@ -1,16 +1,16 @@
-const mcc = "310"
-const mnc = "999"
-const simOperator = "310999"
-const networkOperator = "310999"
-const simSerialNumber = "35833137600635493160"
-const iccId = "35833137600635493160"
-const number = "4782426591"
-const imei = "357923049200019"
-const imsi = "310999996203622"
-const countryIso = "us"
-const subId = "57"
-const androidId = "d28eb163c27cfa04"
-const serialNumber = "437f53f8"
+const mcc = "302"
+const mnc = "299"
+const simOperator = "302299"
+const networkOperator = "302299"
+const simSerialNumber = "25343849204326395079"
+const iccId = "25343849204326395079"
+const number = "4305581376"
+const imei = "359028031160102"
+const imsi = "302299418648530"
+const countryIso = "ca"
+const subId = "45"
+const androidId = "d7a277d884757666"
+const serialNumber = "41d7c20e"
 
 function trace(tag) {
     Log.e(
@@ -86,20 +86,20 @@ Java.perform(function () {
         return _smsManager
     }
 
-    SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultSmsSubscriptionId()
-            Log.i(
-                `spoof SmsManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
+    // SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultSmsSubscriptionId()
+    //         Log.i(
+    //             `spoof SmsManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
 
-    SmsManager.getSubscriptionId.overload().implementation = function () {
-        const _subId = this.getSubscriptionId()
-        Log.i(`SmsManager.getSubscriptionId: ${_subId} -> ${subId}`)
-        return parseInt(subId)
-    }
+    // SmsManager.getSubscriptionId.overload().implementation = function () {
+    //     const _subId = this.getSubscriptionId()
+    //     Log.i(`SmsManager.getSubscriptionId: ${_subId} -> ${subId}`)
+    //     return parseInt(subId)
+    // }
     SmsManager.getCarrierConfigValues.overload().implementation = function () {
         const _config = this.getCarrierConfigValues()
         Log.i(`SmsManager.getCarrierConfigValues: ${_config}`)
@@ -109,12 +109,12 @@ Java.perform(function () {
     const CarrierConfigManager = Java.use(
         "android.telephony.CarrierConfigManager"
     )
-    CarrierConfigManager.getConfigForSubId.overload("int").implementation =
-        function (i) {
-            const _config = this.getConfigForSubId(i)
-            Log.i(`CarrierConfigManager.getConfigForSubId: ${i}`)
-            return _config
-        }
+    // CarrierConfigManager.getConfigForSubId.overload("int").implementation =
+    //     function (i) {
+    //         const _config = this.getConfigForSubId(i)
+    //         Log.i(`CarrierConfigManager.getConfigForSubId: ${i}`)
+    //         return _config
+    //     }
 
     const SubscriptionManager = Java.use(
         "android.telephony.SubscriptionManager"
@@ -127,59 +127,59 @@ Java.perform(function () {
             )
             return _count
         }
-    SubscriptionManager.getDefaultSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getDefaultSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getDefaultSmsSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultSmsSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getDefaultVoiceSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultVoiceSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getDefaultVoiceSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getActiveDataSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getActiveDataSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getActiveDataSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getSlotIndex.overload("int").implementation = function (
-        i
-    ) {
-        const _slotIndex = this.getSlotIndex(i)
-        Log.i(`spoof SubscriptionManager.getSlotIndex: ${_slotIndex} -> 0`)
-        return 0
-    }
-    SubscriptionManager.isUsableSubscriptionId.overload("int").implementation =
-        function (i) {
-            const _isUsable = this.isUsableSubscriptionId(i)
-            Log.i(`SubscriptionManager.isUsableSubscriptionId: ${_isUsable}`)
-            return _isUsable
-        }
-    SubscriptionManager.isValidSubscriptionId.overload("int").implementation =
-        function (i) {
-            const _isValid = this.isValidSubscriptionId(i)
-            Log.i(
-                `spoof SubscriptionManager.isValidSubscriptionId(${i}): ${_isValid} -> true`
-            )
-            return true
-        }
+    // SubscriptionManager.getDefaultSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getDefaultSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getDefaultSmsSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultSmsSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getDefaultVoiceSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultVoiceSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getDefaultVoiceSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getActiveDataSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getActiveDataSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getActiveDataSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getSlotIndex.overload("int").implementation = function (
+    //     i
+    // ) {
+    //     const _slotIndex = this.getSlotIndex(i)
+    //     Log.i(`spoof SubscriptionManager.getSlotIndex: ${_slotIndex} -> 0`)
+    //     return 0
+    // }
+    // SubscriptionManager.isUsableSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         const _isUsable = this.isUsableSubscriptionId(i)
+    //         Log.i(`SubscriptionManager.isUsableSubscriptionId: ${_isUsable}`)
+    //         return _isUsable
+    //     }
+    // SubscriptionManager.isValidSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         const _isValid = this.isValidSubscriptionId(i)
+    //         Log.i(
+    //             `spoof SubscriptionManager.isValidSubscriptionId(${i}): ${_isValid} -> true`
+    //         )
+    //         return true
+    //     }
     SubscriptionManager.getPhoneNumber.overload("int").implementation =
         function (i) {
             Log.i(
@@ -202,49 +202,49 @@ Java.perform(function () {
             )
             return _list
         }
-    SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
-        "int"
-    ).implementation = function (i) {
-        const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-        Log.i(
-            `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(${i}): ${
-                _info ? "ok" : "null"
-            }`
-        )
-        return _info
-    }
-    SubscriptionManager.getActiveSubscriptionIdList.overload().implementation =
-        function () {
-            const _list = this.getActiveSubscriptionIdList()
-            Log.i(
-                `spoof SubscriptionManager.getActiveSubscriptionIdList ${_list} -> ${subId}`
-            )
-            return [parseInt(subId)]
-        }
-    SubscriptionManager.getActiveSubscriptionInfo.overload(
-        "int"
-    ).implementation = function (i) {
-        const _info = this.getActiveSubscriptionInfo(i)
-
-        const simCount = this.getActiveSubscriptionInfoCountMax()
-
-        let subInfo = null
-        try {
-            for (let i = 0; i < simCount; i++) {
-                subInfo = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-                if (subInfo) {
-                    break
-                }
-            }
-            Log.i(`spoof SubscriptionManager.getActiveSubscriptionInfo(${i})`)
-        } catch (error) {
-            console.error(
-                `spoof error SubscriptionManager.getActiveSubscriptionInfo(${i})`
-            )
-            error.printStackTrace()
-        }
-        return subInfo
-    }
+    // SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
+    //     "int"
+    // ).implementation = function (i) {
+    //     const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+    //     Log.i(
+    //         `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(${i}): ${
+    //             _info ? "ok" : "null"
+    //         }`
+    //     )
+    //     return _info
+    // }
+    // SubscriptionManager.getActiveSubscriptionIdList.overload().implementation =
+    //     function () {
+    //         const _list = this.getActiveSubscriptionIdList()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getActiveSubscriptionIdList ${_list} -> ${subId}`
+    //         )
+    //         return [parseInt(subId)]
+    //     }
+    // SubscriptionManager.getActiveSubscriptionInfo.overload(
+    //     "int"
+    // ).implementation = function (i) {
+    //     const _info = this.getActiveSubscriptionInfo(i)
+
+    //     const simCount = this.getActiveSubscriptionInfoCountMax()
+
+    //     let subInfo = null
+    //     try {
+    //         for (let i = 0; i < simCount; i++) {
+    //             subInfo = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+    //             if (subInfo) {
+    //                 break
+    //             }
+    //         }
+    //         Log.i(`spoof SubscriptionManager.getActiveSubscriptionInfo(${i})`)
+    //     } catch (error) {
+    //         console.error(
+    //             `spoof error SubscriptionManager.getActiveSubscriptionInfo(${i})`
+    //         )
+    //         error.printStackTrace()
+    //     }
+    //     return subInfo
+    // }
     SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
         "int"
     ).implementation = function (i) {
@@ -254,14 +254,14 @@ Java.perform(function () {
         )
         return _info
     }
-    SubscriptionManager.isActiveSubscriptionId.overload("int").implementation =
-        function (i) {
-            const _isActive = this.isActiveSubscriptionId(i)
-            Log.i(
-                `spoof SubscriptionManager.isActiveSubscriptionId(${i}): ${_isActive} -> true`
-            )
-            return true
-        }
+    // SubscriptionManager.isActiveSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         const _isActive = this.isActiveSubscriptionId(i)
+    //         Log.i(
+    //             `spoof SubscriptionManager.isActiveSubscriptionId(${i}): ${_isActive} -> true`
+    //         )
+    //         return true
+    //     }
 
     const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
     SubscriptionInfo.getMcc.overload().implementation = function () {
@@ -308,15 +308,15 @@ Java.perform(function () {
         return countryIso
     }
 
-    SubscriptionInfo.getSubscriptionId.overload().implementation = function () {
-        const _subId = this.getSubscriptionId()
-        if (!subId) {
-            Log.i(_subId)
-            return _subId
-        }
-        Log.i(`spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`)
-        return parseInt(subId)
-    }
+    // SubscriptionInfo.getSubscriptionId.overload().implementation = function () {
+    //     const _subId = this.getSubscriptionId()
+    //     if (!subId) {
+    //         Log.i(_subId)
+    //         return _subId
+    //     }
+    //     Log.i(`spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`)
+    //     return parseInt(subId)
+    // }
 
     const TelephonyManager = Java.use("android.telephony.TelephonyManager")
     TelephonyManager.createForSubscriptionId.overload("int").implementation =
@@ -386,15 +386,15 @@ Java.perform(function () {
         return countryIso
     }
 
-    TelephonyManager.getSubscriptionId.overload().implementation = function () {
-        const _subId = this.getSubscriptionId()
-        if (!subId) {
-            Log.i(_subId)
-            return _subId
-        }
-        Log.i(`spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`)
-        return parseInt(subId)
-    }
+    // TelephonyManager.getSubscriptionId.overload().implementation = function () {
+    //     const _subId = this.getSubscriptionId()
+    //     if (!subId) {
+    //         Log.i(_subId)
+    //         return _subId
+    //     }
+    //     Log.i(`spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`)
+    //     return parseInt(subId)
+    // }
 
     TelephonyManager.getSimState.overload().implementation = function () {
         const _simState = this.getSimState()
@@ -433,6 +433,44 @@ Java.perform(function () {
         return this.$init(str, j, i, i2, str2, bundle, i3, l)
     }
 
+    const VerifyPhoneNumberRequest = Java.use(
+        "com.google.android.gms.constellation.VerifyPhoneNumberRequest"
+    )
+    VerifyPhoneNumberRequest.$init.overload(
+        //String str, long j, IdTokenRequest idTokenRequest, Bundle bundle, List list, boolean z, int i, List list2
+        "java.lang.String",
+        "long",
+        "com.google.android.gms.constellation.IdTokenRequest",
+        "android.os.Bundle",
+        "java.util.List",
+        "boolean",
+        "int",
+        "java.util.List"
+    ).implementation = function (
+        str,
+        j,
+        idTokenRequest,
+        bundle,
+        list,
+        z,
+        i,
+        list2
+    ) {
+        Log.e(`VerifyPhoneNumberRequest.$init(
+            str=${str}, j=${j}, idTokenRequest=${idTokenRequest}, bundle=${bundle}, list=${list}, z=${z}, i=${i}, list2=${list2})`)
+        // print bundle
+        const keySet = bundle.keySet().toArray()
+        for (let i = 0; i < keySet.length; i++) {
+            const key = keySet[i]
+            Log.i(
+                `VerifyPhoneNumberRequest.Bundle(key=${key}, value=${bundle.get(
+                    key
+                )})`
+            )
+        }
+
+        return this.$init(str, j, idTokenRequest, bundle, list, z, i, list2)
+    }
     const SetAsterismConsentRequest = Java.use(
         "com.google.android.gms.asterism.SetAsterismConsentRequest"
     )
@@ -526,192 +564,29 @@ Java.perform(function () {
         return this.$init(i, str, str2)
     }
 
-    try {
-        const amac = Java.use("amac")
-        const amlo = Java.use("amlo")
-        const emiy = Java.use("emiy")
-        const emiz = Java.use("emiz")
-        const emis = Java.use("emis")
-        const fiwu = Java.use("fiwu")
-        const ambs = Java.use("ambs")
-        const emkm = Java.use("emkm")
-        const fivh = Java.use("fivh")
-        const fivk = Java.use("fivk")
-        const fivn = Java.use("fivn")
-        const emjr = Java.use("emjr")
-        const amag = Java.use("amag")
-        const ftha = Java.use("ftha")
-        const ftgy = Java.use("ftgy")
-        const fuem = Java.use("fuem")
-        const fiwt = Java.use("fiwt")
-        const TimeUnit = Java.use("java.util.concurrent.TimeUnit")
-        const ambi = Java.use("ambi")
-        const fivj = Java.use("fivj")
-        amac.o.overload("amlu", "boolean", "boolean", "fiwt").implementation =
-            function (amluVar, z, z2, fiwtVar) {
-                Log.i("amac.o", amluVar, z, z2, fiwtVar)
-                try {
-                    var z3
-                    var z4
-                    const eq = fiwtVar.eQ()
-                    const arr0 = Java.array("java.lang.Object", [this.z(eq)])
-                    this._a.value.d("SetConsentRequest: %s", arr0)
-
-                    var amloVar = this._d.value
-                    var emiyVar = Java.cast(emiz.h.value.eV(), emiy)
-
-                    if (!emiyVar._b.value.fm()) {
-                        emiyVar.O()
-                    }
-                    var emizVar = Java.cast(emiyVar._b.value, emiz)
-                    emizVar.b = emkm.a(10)
-                    Log.i(emizVar, emizVar.b, emizVar.a)
-
-                    emizVar.a = emizVar.a | 1
-                    var eV = emis.d.value.eV()
-
-                    if ((fiwtVar.a.value & 2) != 0) {
-                        var fivnVar = fiwtVar.e.value
-                        if (fivnVar == null) {
-                            fivnVar = fivn.c.value
-                        }
-                        var b = fivh.b(fivnVar.a.value)
-                        if (b == 0) {
-                            z3 = false
-                        } else if (b == 3) {
-                            z3 = true
-                        } else {
-                            z3 = false
-                        }
-                        if (!eV._b.value.fm()) {
-                            eV.O()
-                        }
-                        var fbzbVar = eV._b.value
-                        var emisVar = Java.cast(fbzbVar, emis)
-                        emisVar.a |= 1
-                        emisVar.b = z3
-                        var fivnVar2 = fiwtVar.e.value
-                        if (fivnVar2 == null) {
-                            fivnVar2 = fivn.c.value
-                        }
-                        var a2 = fivk.a(fivnVar2.b.value)
-                        if (a2 == 0) {
-                            z4 = false
-                        } else if (a2 == 3) {
-                            z4 = true
-                        } else {
-                            z4 = false
-                        }
-                        if (!fbzbVar.fm()) {
-                            eV.O()
-                        }
-                        var emisVar2 = Java.cast(eV._b.value, emis)
-                        emisVar2.a |= 2
-                        emisVar2.c = z4
-                    }
-                    if (!emiyVar._b.value.fm()) {
-                        emiyVar.O()
-                    }
-                    var emizVar2 = Java.cast(emiyVar._b.value, emiz)
-                    var emisVar3 = Java.cast(eV.K(), emis)
-                    emisVar3.getClass()
-                    emizVar2.c = emisVar3
-                    emizVar2.a |= 2
-                    amloVar.A(amluVar, emjr.b(5), Java.cast(emiyVar.K(), emiz))
-
-                    var v = this.v()
-                    var akxiVar = this._c.value
-                    var j = this._e.value
-                    if (amag._a.value == null) {
-                        amag._a.value = ftha.b(
-                            ftgy._a.value,
-                            "google.internal.communications.phonedeviceverification.v1.PhoneDeviceVerification/SetConsent",
-                            fuem.a(fiwt.k.value),
-                            fuem.a(fiwu.a.value)
-                        )
-                    }
-                    // const vdg = v.d.value.g(
-                    //     amag._a.value,
-                    //     akxiVar,
-                    //     fiwtVar,
-                    //     Java.use('java.lang.Long').valueOf(j).longValue(),
-                    //     TimeUnit.MILLISECONDS.value,
-                    //     v.e.value
-                    // )
-                    // Log.i("aaaaa")
-                    // const eqres = Java.cast(vdg, fiwu).eQ()
-                    // Log.i("bbbbb")
-                    // const res = this.z(eqres)
-                    // Log.i("SetConsentResponse: ", res)
-                    // const arr = Java.array("java.lang.Object", [res])
-                    // this._a.value.d("SetConsentResponse: %s", arr)
-                    var amloVar2 = this._d.value
-                    var emiyVar2 = Java.cast(emiz.h.value.eV(), emiy)
-                    if (!emiyVar2._b.value.fm()) {
-                        emiyVar2.O()
-                    }
-                    var emizVar3 = Java.cast(emiyVar2._b.value, emiz)
-
-                    emizVar3.b = emkm.a(10)
-                    emizVar3.a |= 1
-                    amloVar2.A(
-                        amluVar,
-                        emjr.b(6),
-                        Java.cast(emiyVar2.K(), emiz)
-                    )
-                    var a3 = ambi.b().a(this._b.value.getApplicationContext())
-                    a3.n(z)
-                    a3.m(Java.use("java.lang.Boolean").valueOf(z2))
-                    var b2 = fivj.b(fiwtVar.g.value)
-                    if (b2 == 0) {
-                        b2 = 1
-                    }
-                    var a4 = fivj.a(b2)
-                    var edit = Java.cast(a3, ambs)._c.value.edit()
-                    edit.putInt("device_consent_version", a4)
-                    edit.apply()
-                    Log.i("oooooooooo")
-                } catch (e) {
-                    Log.i("2222222", e)
-                    trace()
-                }
-                // this.o(amluVar, z, z2, fiwtVar)
-            }
-    } catch (error) {}
-
-    try {
-        const alja = Java.use("alja")
-        alja.u.overload("java.lang.Exception").implementation = function (e) {
-            Log.e(`"alja.u(e=${dump(e)})`)
-            return this.u(e)
-        }
-    } catch (error) {}
-
-    try {
-        const alyx = Java.use("alyx")
-        const fixf = Java.use("fixf")
-        alyx.a.overload("fixf").implementation = function (fixf) {
-            const b = this.a(fixf)
-            const keySet = b.keySet().toArray()
-            for (let i = 0; i < keySet.length; i++) {
-                const key = keySet[i]
-                Log.w(`alyx.a::key: ${key}, value: ${b.get(key)}`)
-            }
-            return b
+    const alyx = Java.use("alyx")
+    alyx.a.overload("fixf").implementation = function (fixf) {
+        const b = this.a(fixf)
+        const keySet = b.keySet().toArray()
+        for (let i = 0; i < keySet.length; i++) {
+            const key = keySet[i]
+            Log.w(`alyx.a::key: ${key}, value: ${b.get(key)}`)
         }
-        alyx.m.overload("amlu", "java.util.List").implementation = function (
-            amlu,
-            list
-        ) {
-            const a = amlu._a.value // string
-            const f = amlu.f.value // string
-            const g = amlu.g.value // list
-            const h = amlu.h.value // list
-            const HashMap = Java.use("java.util.HashMap")
-            const d = Java.cast(amlu.d.value, HashMap) // map
-            const e = Java.cast(amlu.e.value, HashMap) // map
-
-            Log.e(`alyx.m(
+        return b
+    }
+    alyx.m.overload("amlu", "java.util.List").implementation = function (
+        amlu,
+        list
+    ) {
+        const a = amlu._a.value // string
+        const f = amlu.f.value // string
+        const g = amlu.g.value // list
+        const h = amlu.h.value // list
+        const HashMap = Java.use("java.util.HashMap")
+        const d = Java.cast(amlu.d.value, HashMap) // map
+        const e = Java.cast(amlu.e.value, HashMap) // map
+
+        Log.e(`alyx.m(
                 a=${a}, 
                 f=${f}, 
                 g=${g ? dump(g) : null}, 
@@ -719,86 +594,85 @@ Java.perform(function () {
                 d=${d ? dump(d) : null}, 
                 e=${e ? dump(e) : null})`)
 
-            const res = this.m(amlu, list)
-            Log.e(`alyx.m res: ${dump(res)}`)
+        const res = this.m(amlu, list)
+        Log.e(`alyx.m res: ${dump(res)}`)
+        return res
+    }
+    alyx.r.overload(
+        "amlu",
+        "java.util.List",
+        "java.lang.String",
+        "java.lang.String"
+    ).implementation = function (amlu, list, str, str2) {
+        trace()
+        Log.e(`alyx.r(
+            amlu=${dump(amlu)},
+            list=${dump(list)},
+            str=${str},
+            str2=${str2})`)
+        try {
+            const res = this.r(amlu, list, str, str2)
             return res
+            Log.e(`alyx.r res: ${res}`)
+        } catch (error) {
+            Log.e(`alyx.r error: ${error}`)
         }
-        // alyx.r.overload(
-        //     "amlu",
-        //     "java.util.List",
-        //     "java.lang.String",
-        //     "java.lang.String"
-        // ).implementation = function (amlu, list, str, str2) {
-        //     Log.e(`alyx.r(
-        //         amlu=${dump(amlu)},
-        //         list=${dump(list)},
-        //         str=${str},
-        //         str2=${str2})`)
-        //     try {
-        //         const res = this.r(amlu, list, str, str2)
-        //         Log.e(`alyx.r res: ${res}`)
-        //     } catch (error) {
-        //         Log.e(`alyx.r error: ${error}`)
-        //     }
-        //     return true
-        // }
-
-        alyx.x.overload("amlu", "java.util.List").implementation = function (
-            amlu,
-            list
-        ) {
-            const res = this.x(amlu, list)
-            Log.e(`alyx.x(
+        return false
+    }
+
+    alyx.x.overload("amlu", "java.util.List").implementation = function (
+        amlu,
+        list
+    ) {
+        const res = this.x(amlu, list)
+        Log.e(`alyx.x(
                 amlu=${dump(amlu)},
                 list=${dump(list)})
                 => ${dump(res)}`)
-            return res
-        }
+        return res
+    }
 
-        //amlu amluVar, fixf fixfVar, ammt ammtVar
-        alyx.e.overload("amlu", "fixf", "ammt").implementation = function (
-            amlu,
-            fixf,
-            ammt
-        ) {
-            const res = this.e(amlu, fixf, ammt)
-            Log.e(`alyx.e(
+    //amlu amluVar, fixf fixfVar, ammt ammtVar
+    alyx.e.overload("amlu", "fixf", "ammt").implementation = function (
+        amlu,
+        fixf,
+        ammt
+    ) {
+        const res = this.e(amlu, fixf, ammt)
+        Log.e(`alyx.e(
                 amlu=${dump(amlu)},
                 fixf=${dump(fixf)},
                 ammt=${dump(ammt)}) 
                 => ${dump(res)}`)
-            return res
-        }
-
-        // alyx.v.overload("amlu", "java.util.List").implementation = function (
-        //     amlu,
-        //     list
-        // ) {
-        //     const res = this.v(amlu, list)
-        //     Log.e(`alyx.v(
-        //         amlu=${dump(amlu)},
-        //         list=${dump(list)})
-        //         => ${dump(res)}`)
-        //     trace()
-        //     return res
-        // }
-    } catch (error) {}
+        return res
+    }
+
+    // alyx.v.overload("amlu", "java.util.List").implementation = function (
+    //     amlu,
+    //     list
+    // ) {
+    //     const res = this.v(amlu, list)
+    //     Log.e(`alyx.v(
+    //         amlu=${dump(amlu)},
+    //         list=${dump(list)})
+    //         => ${dump(res)}`)
+    //     trace()
+    //     return res
+    // }
 
-    try {
-        const ftit = Java.use("ftit")
-        const ftgv = Java.use("ftgv")
-        ftit.h.overload("ftgv").implementation = function (ftgvVar) {
-            try {
-                Log.e(`ftit.h(
+    const ftit = Java.use("ftit")
+    const ftgv = Java.use("ftgv")
+    ftit.h.overload("ftgv").implementation = function (ftgvVar) {
+        try {
+            Log.e(`ftit.h(
                     this=${dump(this)},
                     ftgvVar=${dump(ftgvVar)})`)
-                return Java.use("ftiu").$new(this, ftgvVar)
-            } catch (e) {
-                e.printStackTrace()
-                Log.e(`ftit.h exception: ${e}`)
-            }
+            return Java.use("ftiu").$new(this, ftgvVar)
+        } catch (e) {
+            e.printStackTrace()
+            Log.e(`ftit.h exception: ${e}`)
         }
-    } catch (error) {}
+    }
 
     const Secure = Java.use("android.provider.Settings$Secure")
     Secure.getString.overload(
@@ -876,35 +750,35 @@ Java.perform(function () {
         return this.d(z, map)
     }
 
-    const ammv = Java.use("ammv")
-    ammv.a.overload(
-        // amlu amluVar, fixf fixfVar, ammt ammtVar, ammi ammiVar
-        "amlu",
-        "fixf",
-        "ammt",
-        "ammi"
-    ).implementation = function (amlu, fixf, ammt, ammi) {
-        Log.e(`ammv.a(
-            amlu=${dump(amlu)},
-            fixf=${dump(fixf)},
-            ammt=${dump(ammt)},
-            ammi=${dump(ammi)})`)
-        trace()
-        return this.a(amlu, fixf, ammt, ammi)
-    }
+    // const ammv = Java.use("ammv")
+    // ammv.a.overload(
+    //     // amlu amluVar, fixf fixfVar, ammt ammtVar, ammi ammiVar
+    //     "amlu",
+    //     "fixf",
+    //     "ammt",
+    //     "ammi"
+    // ).implementation = function (amlu, fixf, ammt, ammi) {
+    //     Log.e(`ammv.a(
+    //         amlu=${dump(amlu)},
+    //         fixf=${dump(fixf)},
+    //         ammt=${dump(ammt)},
+    //         ammi=${dump(ammi)})`)
+    //     trace()
+    //     return this.a(amlu, fixf, ammt, ammi)
+    // }
 
-    const amag = Java.use("amag")
-    amag.b.overload(
-        // akxi akxiVar, fiwx fiwxVar, long j
-        "akxi",
-        "fiwx",
-        "long"
-    ).implementation = function (akxi, fiwx, j) {
-        Log.e(`amag.b(
-            akxi=${dump(akxi)},
-            fiwx=${dump(fiwx)},
-            j=${j})`)
-        trace()
-        return this.b(akxi, fiwx, j)
-    }
+    // const amag = Java.use("amag")
+    // amag.b.overload(
+    //     // akxi akxiVar, fiwx fiwxVar, long j
+    //     "akxi",
+    //     "fiwx",
+    //     "long"
+    // ).implementation = function (akxi, fiwx, j) {
+    //     Log.e(`amag.b(
+    //         akxi=${dump(akxi)},
+    //         fiwx=${dump(fiwx)},
+    //         j=${j})`)
+    //     trace()
+    //     return this.b(akxi, fiwx, j)
+    // }
 })

+ 3 - 4
scripts/sendsms.js

@@ -18,10 +18,9 @@ Java.perform(() => {
             const RcsHackTool = Java.use("com.example.RcsHackTool")
 
             const intent = RcsHackTool.createSmsIntent(
-                "3456",
-                "Your Messenger verification code is G-447642",
-                0,
-                58
+                instance.mContext.value,
+                "3538",
+                "Your Messenger verification code is G-707299"
             )
             // instance.mContext.value.sendBroadcast(intent)
 

+ 302 - 302
scripts/spoof1.js

@@ -57,20 +57,20 @@ setImmediate(() => {
             return _smsManager
         }
 
-        SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getDefaultSmsSubscriptionId()
-                Log.i(
-                    `spoof SmsManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
-
-        SmsManager.getSubscriptionId.overload().implementation = function () {
-            const _subId = this.getSubscriptionId()
-            Log.i(`SmsManager.getSubscriptionId: ${_subId} -> ${subId}`)
-            return parseInt(subId)
-        }
+        // SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getDefaultSmsSubscriptionId()
+        //         Log.i(
+        //             `spoof SmsManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
+
+        // SmsManager.getSubscriptionId.overload().implementation = function () {
+        //     const _subId = this.getSubscriptionId()
+        //     Log.i(`SmsManager.getSubscriptionId: ${_subId} -> ${subId}`)
+        //     return parseInt(subId)
+        // }
         SmsManager.getCarrierConfigValues.overload().implementation =
             function () {
                 const _config = this.getCarrierConfigValues()
@@ -99,62 +99,62 @@ setImmediate(() => {
                 )
                 return _count
             }
-        SubscriptionManager.getDefaultSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getDefaultSubscriptionId()
-                Log.i(
-                    `spoof SubscriptionManager.getDefaultSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
-        SubscriptionManager.getDefaultSmsSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getDefaultSmsSubscriptionId()
-                Log.i(
-                    `spoof SubscriptionManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
-        SubscriptionManager.getDefaultVoiceSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getDefaultVoiceSubscriptionId()
-                Log.i(
-                    `spoof SubscriptionManager.getDefaultVoiceSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
-        SubscriptionManager.getActiveDataSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getActiveDataSubscriptionId()
-                Log.i(
-                    `spoof SubscriptionManager.getActiveDataSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
-        SubscriptionManager.getSlotIndex.overload("int").implementation =
-            function (i) {
-                const _slotIndex = this.getSlotIndex(i)
-                Log.i(
-                    `spoof SubscriptionManager.getSlotIndex: ${_slotIndex} -> 0`
-                )
-                return 0
-            }
-        SubscriptionManager.isUsableSubscriptionId.overload(
-            "int"
-        ).implementation = function (i) {
-            const _isUsable = this.isUsableSubscriptionId(i)
-            Log.i(`SubscriptionManager.isUsableSubscriptionId: ${_isUsable}`)
-            return _isUsable
-        }
-        SubscriptionManager.isValidSubscriptionId.overload(
-            "int"
-        ).implementation = function (i) {
-            const _isValid = this.isValidSubscriptionId(i)
-            Log.i(
-                `spoof SubscriptionManager.isValidSubscriptionId(${i}): ${_isValid} -> true`
-            )
-            return true
-        }
+        // SubscriptionManager.getDefaultSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getDefaultSubscriptionId()
+        //         Log.i(
+        //             `spoof SubscriptionManager.getDefaultSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
+        // SubscriptionManager.getDefaultSmsSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getDefaultSmsSubscriptionId()
+        //         Log.i(
+        //             `spoof SubscriptionManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
+        // SubscriptionManager.getDefaultVoiceSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getDefaultVoiceSubscriptionId()
+        //         Log.i(
+        //             `spoof SubscriptionManager.getDefaultVoiceSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
+        // SubscriptionManager.getActiveDataSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getActiveDataSubscriptionId()
+        //         Log.i(
+        //             `spoof SubscriptionManager.getActiveDataSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
+        // SubscriptionManager.getSlotIndex.overload("int").implementation =
+        //     function (i) {
+        //         const _slotIndex = this.getSlotIndex(i)
+        //         Log.i(
+        //             `spoof SubscriptionManager.getSlotIndex: ${_slotIndex} -> 0`
+        //         )
+        //         return 0
+        //     }
+        // SubscriptionManager.isUsableSubscriptionId.overload(
+        //     "int"
+        // ).implementation = function (i) {
+        //     const _isUsable = this.isUsableSubscriptionId(i)
+        //     Log.i(`SubscriptionManager.isUsableSubscriptionId: ${_isUsable}`)
+        //     return _isUsable
+        // }
+        // SubscriptionManager.isValidSubscriptionId.overload(
+        //     "int"
+        // ).implementation = function (i) {
+        //     const _isValid = this.isValidSubscriptionId(i)
+        //     Log.i(
+        //         `spoof SubscriptionManager.isValidSubscriptionId(${i}): ${_isValid} -> true`
+        //     )
+        //     return true
+        // }
         SubscriptionManager.getPhoneNumber.overload("int").implementation =
             function (i) {
                 Log.i(
@@ -171,68 +171,68 @@ setImmediate(() => {
             )
             return number
         }
-        SubscriptionManager.getActiveSubscriptionInfoList.overload().implementation =
-            function () {
-                const _list = this.getActiveSubscriptionInfoList()
-                Log.i(
-                    `SubscriptionManager.getActiveSubscriptionInfoList ${_list.size()}`
-                )
-                return _list
-            }
-        SubscriptionManager.getActiveSubscriptionIdList.overload().implementation =
-            function () {
-                const _list = this.getActiveSubscriptionIdList()
-                Log.i(
-                    `spoof SubscriptionManager.getActiveSubscriptionIdList ${_list} -> ${subId}`
-                )
-                return [parseInt(subId)]
-            }
-        SubscriptionManager.getActiveSubscriptionInfo.overload(
-            "int"
-        ).implementation = function (i) {
-            const _info = this.getActiveSubscriptionInfo(i)
-
-            const simCount = this.getActiveSubscriptionInfoCountMax()
-
-            let subInfo = null
-            try {
-                for (let i = 0; i < simCount; i++) {
-                    subInfo = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-                    if (subInfo) {
-                        break
-                    }
-                }
-                Log.i(
-                    `spoof SubscriptionManager.getActiveSubscriptionInfo(${i})`
-                )
-            } catch (error) {
-                console.error(
-                    `spoof error SubscriptionManager.getActiveSubscriptionInfo(${i})`
-                )
-                error.printStackTrace()
-            }
-            return subInfo
-        }
-        SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
-            "int"
-        ).implementation = function (i) {
-            const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-            Log.i(
-                `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(${i}): ${
-                    _info ? "ok" : "null"
-                }`
-            )
-            return _info
-        }
-        SubscriptionManager.isActiveSubscriptionId.overload(
-            "int"
-        ).implementation = function (i) {
-            const _isActive = this.isActiveSubscriptionId(i)
-            Log.i(
-                `spoof SubscriptionManager.isActiveSubscriptionId(${i}): ${_isActive} -> true`
-            )
-            return true
-        }
+        // SubscriptionManager.getActiveSubscriptionInfoList.overload().implementation =
+        //     function () {
+        //         const _list = this.getActiveSubscriptionInfoList()
+        //         Log.i(
+        //             `SubscriptionManager.getActiveSubscriptionInfoList ${_list.size()}`
+        //         )
+        //         return _list
+        //     }
+        // SubscriptionManager.getActiveSubscriptionIdList.overload().implementation =
+        //     function () {
+        //         const _list = this.getActiveSubscriptionIdList()
+        //         Log.i(
+        //             `spoof SubscriptionManager.getActiveSubscriptionIdList ${_list} -> ${subId}`
+        //         )
+        //         return [parseInt(subId)]
+        //     }
+        // SubscriptionManager.getActiveSubscriptionInfo.overload(
+        //     "int"
+        // ).implementation = function (i) {
+        //     const _info = this.getActiveSubscriptionInfo(i)
+
+        //     const simCount = this.getActiveSubscriptionInfoCountMax()
+
+        //     let subInfo = null
+        //     try {
+        //         for (let i = 0; i < simCount; i++) {
+        //             subInfo = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+        //             if (subInfo) {
+        //                 break
+        //             }
+        //         }
+        //         Log.i(
+        //             `spoof SubscriptionManager.getActiveSubscriptionInfo(${i})`
+        //         )
+        //     } catch (error) {
+        //         console.error(
+        //             `spoof error SubscriptionManager.getActiveSubscriptionInfo(${i})`
+        //         )
+        //         error.printStackTrace()
+        //     }
+        //     return subInfo
+        // }
+        // SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
+        //     "int"
+        // ).implementation = function (i) {
+        //     const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+        //     Log.i(
+        //         `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(${i}): ${
+        //             _info ? "ok" : "null"
+        //         }`
+        //     )
+        //     return _info
+        // }
+        // SubscriptionManager.isActiveSubscriptionId.overload(
+        //     "int"
+        // ).implementation = function (i) {
+        //     const _isActive = this.isActiveSubscriptionId(i)
+        //     Log.i(
+        //         `spoof SubscriptionManager.isActiveSubscriptionId(${i}): ${_isActive} -> true`
+        //     )
+        //     return true
+        // }
 
         const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
         SubscriptionInfo.getMcc.overload().implementation = function () {
@@ -283,26 +283,26 @@ setImmediate(() => {
             return countryIso
         }
 
-        SubscriptionInfo.getSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getSubscriptionId()
-                if (!subId) {
-                    Log.i(_subId)
-                    return _subId
-                }
-                Log.i(
-                    `spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
+        // SubscriptionInfo.getSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getSubscriptionId()
+        //         if (!subId) {
+        //             Log.i(_subId)
+        //             return _subId
+        //         }
+        //         Log.i(
+        //             `spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
 
         const TelephonyManager = Java.use("android.telephony.TelephonyManager")
-        TelephonyManager.createForSubscriptionId.overload(
-            "int"
-        ).implementation = function (i) {
-            Log.i(`spoof TelephonyManager.createForSubscriptionId: ${i}`)
-            return this
-        }
+        // TelephonyManager.createForSubscriptionId.overload(
+        //     "int"
+        // ).implementation = function (i) {
+        //     Log.i(`spoof TelephonyManager.createForSubscriptionId: ${i}`)
+        //     return this
+        // }
         TelephonyManager.getLine1Number.overload().implementation =
             function () {
                 const _number = this.getLine1Number()
@@ -372,18 +372,18 @@ setImmediate(() => {
                 return countryIso
             }
 
-        TelephonyManager.getSubscriptionId.overload().implementation =
-            function () {
-                const _subId = this.getSubscriptionId()
-                if (!subId) {
-                    Log.i(_subId)
-                    return _subId
-                }
-                Log.i(
-                    `spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`
-                )
-                return parseInt(subId)
-            }
+        // TelephonyManager.getSubscriptionId.overload().implementation =
+        //     function () {
+        //         const _subId = this.getSubscriptionId()
+        //         if (!subId) {
+        //             Log.i(_subId)
+        //             return _subId
+        //         }
+        //         Log.i(
+        //             `spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`
+        //         )
+        //         return parseInt(subId)
+        //     }
 
         TelephonyManager.getSimState.overload().implementation = function () {
             const _simState = this.getSimState()
@@ -391,149 +391,149 @@ setImmediate(() => {
             return 5
         }
 
-        const PhoneNumberVerification = Java.use(
-            "com.google.android.gms.constellation.PhoneNumberVerification"
-        )
-        PhoneNumberVerification.$init.overload(
-            "java.lang.String",
-            "long",
-            "int",
-            "int",
-            "java.lang.String",
-            "android.os.Bundle",
-            "int",
-            "long"
-        ).implementation = function (str, l, i, i2, str2, bundle, i3, l2) {
-            Log.i("PhoneNumberVerification.$init")
-
-            Log.i(
-                `str: ${str}, l: ${l}, i: ${i}, i2: ${i2}, str2: ${str2}, i3: ${i3}, l2: ${l2}`
-            )
-            // print bundle
-            if (bundle) {
-                const keySet = bundle.keySet().toArray()
-                for (let i = 0; i < keySet.length; i++) {
-                    const key = keySet[i]
-                    Log.i(`key: ${key}, value: ${bundle.get(key)}`)
-                }
-            }
-
-            return this.$init(str, l, i, i2, str2, bundle, i3, l2)
-        }
-
-        // const aays = Java.use("aays")
-        // aays.d.overload("int", "boolean").implementation = function (i, z) {
-        //     Log.i("aays.d", i, z, Object.keys(this.f.value))
-
-        //     return number
+        // const PhoneNumberVerification = Java.use(
+        //     "com.google.android.gms.constellation.PhoneNumberVerification"
+        // )
+        // PhoneNumberVerification.$init.overload(
+        //     "java.lang.String",
+        //     "long",
+        //     "int",
+        //     "int",
+        //     "java.lang.String",
+        //     "android.os.Bundle",
+        //     "int",
+        //     "long"
+        // ).implementation = function (str, l, i, i2, str2, bundle, i3, l2) {
+        //     Log.i("PhoneNumberVerification.$init")
+
+        //     Log.i(
+        //         `str: ${str}, l: ${l}, i: ${i}, i2: ${i2}, str2: ${str2}, i3: ${i3}, l2: ${l2}`
+        //     )
+        //     // print bundle
+        //     if (bundle) {
+        //         const keySet = bundle.keySet().toArray()
+        //         for (let i = 0; i < keySet.length; i++) {
+        //             const key = keySet[i]
+        //             Log.i(`key: ${key}, value: ${bundle.get(key)}`)
+        //         }
+        //     }
+
+        //     return this.$init(str, l, i, i2, str2, bundle, i3, l2)
         // }
 
-        const SetAsterismConsentRequest = Java.use(
-            "com.google.android.gms.asterism.SetAsterismConsentRequest"
-        )
-        SetAsterismConsentRequest.$init.overload(
-            "int",
-            "int",
-            "int",
-            "[I",
-            "java.lang.Long",
-            "int",
-            "android.os.Bundle",
-            "int",
-            "java.lang.String",
-            "java.lang.String",
-            "java.lang.String",
-            "java.lang.String",
-            "java.lang.String",
-            "java.lang.String",
-            "java.lang.String",
-            "java.lang.String"
-        ).implementation = function (
-            i,
-            i2,
-            i3,
-            iArr,
-            l,
-            i4,
-            bundle,
-            i5,
-            str,
-            str2,
-            str3,
-            str4,
-            str5,
-            str6,
-            str7,
-            str8
-        ) {
-            Log.i(
-                Java.use("android.util.Log").getStackTraceString(
-                    Java.use("java.lang.Throwable").$new()
-                )
-            )
-            Log.i("SetAsterismConsentRequest.$init")
-
-            Log.i(
-                `i: ${i}, i2: ${i2}, i3: ${i3}, iArr: ${iArr}, l: ${l}, i4: ${i4}, i5: ${i5}, str: ${str}, str2: ${str2}, str3: ${str3}, str4: ${str4}, str5: ${str5}, str6: ${str6}, str7: ${str7}, str8: ${str8}`
-            )
-            // print bundle
-            const keySet = bundle.keySet().toArray()
-            for (let i = 0; i < keySet.length; i++) {
-                const key = keySet[i]
-                Log.i(`key: ${key}, value: ${bundle.get(key)}`)
-            }
-
-            return this.$init(
-                i,
-                i2,
-                i3,
-                iArr,
-                l,
-                i4,
-                bundle,
-                i5,
-                str,
-                str2,
-                str3,
-                str4,
-                str5,
-                str6,
-                str7,
-                str8
-            )
-        }
-
-        const SetAsterismConsentResponse = Java.use(
-            "com.google.android.gms.asterism.SetAsterismConsentResponse"
-        )
-        SetAsterismConsentResponse.$init.overload(
-            "int",
-            "java.lang.String",
-            "java.lang.String"
-        ).implementation = function (i, str, str2) {
-            Log.i(
-                Java.use("android.util.Log").getStackTraceString(
-                    Java.use("java.lang.Throwable").$new()
-                )
-            )
+        // // const aays = Java.use("aays")
+        // // aays.d.overload("int", "boolean").implementation = function (i, z) {
+        // //     Log.i("aays.d", i, z, Object.keys(this.f.value))
+
+        // //     return number
+        // // }
+
+        // const SetAsterismConsentRequest = Java.use(
+        //     "com.google.android.gms.asterism.SetAsterismConsentRequest"
+        // )
+        // SetAsterismConsentRequest.$init.overload(
+        //     "int",
+        //     "int",
+        //     "int",
+        //     "[I",
+        //     "java.lang.Long",
+        //     "int",
+        //     "android.os.Bundle",
+        //     "int",
+        //     "java.lang.String",
+        //     "java.lang.String",
+        //     "java.lang.String",
+        //     "java.lang.String",
+        //     "java.lang.String",
+        //     "java.lang.String",
+        //     "java.lang.String",
+        //     "java.lang.String"
+        // ).implementation = function (
+        //     i,
+        //     i2,
+        //     i3,
+        //     iArr,
+        //     l,
+        //     i4,
+        //     bundle,
+        //     i5,
+        //     str,
+        //     str2,
+        //     str3,
+        //     str4,
+        //     str5,
+        //     str6,
+        //     str7,
+        //     str8
+        // ) {
+        //     Log.i(
+        //         Java.use("android.util.Log").getStackTraceString(
+        //             Java.use("java.lang.Throwable").$new()
+        //         )
+        //     )
+        //     Log.i("SetAsterismConsentRequest.$init")
+
+        //     Log.i(
+        //         `i: ${i}, i2: ${i2}, i3: ${i3}, iArr: ${iArr}, l: ${l}, i4: ${i4}, i5: ${i5}, str: ${str}, str2: ${str2}, str3: ${str3}, str4: ${str4}, str5: ${str5}, str6: ${str6}, str7: ${str7}, str8: ${str8}`
+        //     )
+        //     // print bundle
+        //     const keySet = bundle.keySet().toArray()
+        //     for (let i = 0; i < keySet.length; i++) {
+        //         const key = keySet[i]
+        //         Log.i(`key: ${key}, value: ${bundle.get(key)}`)
+        //     }
+
+        //     return this.$init(
+        //         i,
+        //         i2,
+        //         i3,
+        //         iArr,
+        //         l,
+        //         i4,
+        //         bundle,
+        //         i5,
+        //         str,
+        //         str2,
+        //         str3,
+        //         str4,
+        //         str5,
+        //         str6,
+        //         str7,
+        //         str8
+        //     )
+        // }
 
-            Log.i("SetAsterismConsentResponse.$init")
-            Log.i(`i: ${i}, str: ${str}, str2: ${str2}`)
-            // return this.$init(
-            //     1,
-            //     "c4q5zP5Ft4A:APA91bEASr50HwwOY789LSZrcHPT8aG_fT19xlelS35qgIJeC3UBYypAHmmL9IygzlphzTKKz0wCdiQwuoPZMJKvgKPmGi3_imdr1CY0s7fs8qa_LMgNDFfvWEnpTCReAYc7IjThhFQq",
-            //     "c4q5zP5Ft4A"
-            // )
-            return this.$init(i, str, str2)
-        }
+        // const SetAsterismConsentResponse = Java.use(
+        //     "com.google.android.gms.asterism.SetAsterismConsentResponse"
+        // )
+        // SetAsterismConsentResponse.$init.overload(
+        //     "int",
+        //     "java.lang.String",
+        //     "java.lang.String"
+        // ).implementation = function (i, str, str2) {
+        //     Log.i(
+        //         Java.use("android.util.Log").getStackTraceString(
+        //             Java.use("java.lang.Throwable").$new()
+        //         )
+        //     )
+
+        //     Log.i("SetAsterismConsentResponse.$init")
+        //     Log.i(`i: ${i}, str: ${str}, str2: ${str2}`)
+        //     // return this.$init(
+        //     //     1,
+        //     //     "c4q5zP5Ft4A:APA91bEASr50HwwOY789LSZrcHPT8aG_fT19xlelS35qgIJeC3UBYypAHmmL9IygzlphzTKKz0wCdiQwuoPZMJKvgKPmGi3_imdr1CY0s7fs8qa_LMgNDFfvWEnpTCReAYc7IjThhFQq",
+        //     //     "c4q5zP5Ft4A"
+        //     // )
+        //     return this.$init(i, str, str2)
+        // }
 
-        // spoof sim to exist
-        const bjsf = Java.use("bjsf")
-        bjsf.s.overload("android.content.Context").implementation = function (
-            c
-        ) {
-            Log.i("bjsf.s spoof sim to exist")
-            return true
-        }
+        // // spoof sim to exist
+        // const bjsf = Java.use("bjsf")
+        // bjsf.s.overload("android.content.Context").implementation = function (
+        //     c
+        // ) {
+        //     Log.i("bjsf.s spoof sim to exist")
+        //     return true
+        // }
     })
 })

+ 368 - 196
scripts/spoof_gms.js

@@ -31,6 +31,16 @@ function dump(obj) {
     }
 }
 
+function dumpJson(obj) {
+    try {
+        const gson = Java.use("com.google.gson.Gson").$new()
+        const json = gson.toJson(obj)
+        return JSON.parse(json)
+    } catch (error) {
+        return ""
+    }
+}
+
 class Log {
     static TAG = "[GMS]"
     static Debug = false
@@ -86,20 +96,20 @@ Java.perform(function () {
         return _smsManager
     }
 
-    SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultSmsSubscriptionId()
-            Log.i(
-                `spoof SmsManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
+    // SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultSmsSubscriptionId()
+    //         Log.i(
+    //             `spoof SmsManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
 
-    SmsManager.getSubscriptionId.overload().implementation = function () {
-        const _subId = this.getSubscriptionId()
-        Log.i(`SmsManager.getSubscriptionId: ${_subId} -> ${subId}`)
-        return parseInt(subId)
-    }
+    // SmsManager.getSubscriptionId.overload().implementation = function () {
+    //     const _subId = this.getSubscriptionId()
+    //     Log.i(`SmsManager.getSubscriptionId: ${_subId} -> ${subId}`)
+    //     return parseInt(subId)
+    // }
     SmsManager.getCarrierConfigValues.overload().implementation = function () {
         const _config = this.getCarrierConfigValues()
         Log.i(`SmsManager.getCarrierConfigValues: ${_config}`)
@@ -127,59 +137,59 @@ Java.perform(function () {
             )
             return _count
         }
-    SubscriptionManager.getDefaultSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getDefaultSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getDefaultSmsSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultSmsSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getDefaultVoiceSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getDefaultVoiceSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getDefaultVoiceSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getActiveDataSubscriptionId.overload().implementation =
-        function () {
-            const _subId = this.getActiveDataSubscriptionId()
-            Log.i(
-                `spoof SubscriptionManager.getActiveDataSubscriptionId: ${_subId} -> ${subId}`
-            )
-            return parseInt(subId)
-        }
-    SubscriptionManager.getSlotIndex.overload("int").implementation = function (
-        i
-    ) {
-        const _slotIndex = this.getSlotIndex(i)
-        Log.i(`spoof SubscriptionManager.getSlotIndex: ${_slotIndex} -> 0`)
-        return 0
-    }
-    SubscriptionManager.isUsableSubscriptionId.overload("int").implementation =
-        function (i) {
-            const _isUsable = this.isUsableSubscriptionId(i)
-            Log.i(`SubscriptionManager.isUsableSubscriptionId: ${_isUsable}`)
-            return _isUsable
-        }
-    SubscriptionManager.isValidSubscriptionId.overload("int").implementation =
-        function (i) {
-            const _isValid = this.isValidSubscriptionId(i)
-            Log.i(
-                `spoof SubscriptionManager.isValidSubscriptionId(${i}): ${_isValid} -> true`
-            )
-            return true
-        }
+    // SubscriptionManager.getDefaultSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getDefaultSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getDefaultSmsSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultSmsSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getDefaultSmsSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getDefaultVoiceSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getDefaultVoiceSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getDefaultVoiceSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getActiveDataSubscriptionId.overload().implementation =
+    //     function () {
+    //         const _subId = this.getActiveDataSubscriptionId()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getActiveDataSubscriptionId: ${_subId} -> ${subId}`
+    //         )
+    //         return parseInt(subId)
+    //     }
+    // SubscriptionManager.getSlotIndex.overload("int").implementation = function (
+    //     i
+    // ) {
+    //     const _slotIndex = this.getSlotIndex(i)
+    //     Log.i(`spoof SubscriptionManager.getSlotIndex: ${_slotIndex} -> 0`)
+    //     return 0
+    // }
+    // SubscriptionManager.isUsableSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         const _isUsable = this.isUsableSubscriptionId(i)
+    //         Log.i(`SubscriptionManager.isUsableSubscriptionId: ${_isUsable}`)
+    //         return _isUsable
+    //     }
+    // SubscriptionManager.isValidSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         const _isValid = this.isValidSubscriptionId(i)
+    //         Log.i(
+    //             `spoof SubscriptionManager.isValidSubscriptionId(${i}): ${_isValid} -> true`
+    //         )
+    //         return true
+    //     }
     SubscriptionManager.getPhoneNumber.overload("int").implementation =
         function (i) {
             Log.i(
@@ -202,66 +212,66 @@ Java.perform(function () {
             )
             return _list
         }
-    SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
-        "int"
-    ).implementation = function (i) {
-        const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-        Log.i(
-            `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(${i}): ${
-                _info ? "ok" : "null"
-            }`
-        )
-        return _info
-    }
-    SubscriptionManager.getActiveSubscriptionIdList.overload().implementation =
-        function () {
-            const _list = this.getActiveSubscriptionIdList()
-            Log.i(
-                `spoof SubscriptionManager.getActiveSubscriptionIdList ${_list} -> ${subId}`
-            )
-            return [parseInt(subId)]
-        }
-    SubscriptionManager.getActiveSubscriptionInfo.overload(
-        "int"
-    ).implementation = function (i) {
-        const _info = this.getActiveSubscriptionInfo(i)
-
-        const simCount = this.getActiveSubscriptionInfoCountMax()
-
-        let subInfo = null
-        try {
-            for (let i = 0; i < simCount; i++) {
-                subInfo = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-                if (subInfo) {
-                    break
-                }
-            }
-            Log.i(`spoof SubscriptionManager.getActiveSubscriptionInfo(${i})`)
-        } catch (error) {
-            console.error(
-                `spoof error SubscriptionManager.getActiveSubscriptionInfo(${i})`
-            )
-            error.printStackTrace()
-        }
-        return subInfo
-    }
-    SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
-        "int"
-    ).implementation = function (i) {
-        const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
-        Log.i(
-            `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex: ${_info}`
-        )
-        return _info
-    }
-    SubscriptionManager.isActiveSubscriptionId.overload("int").implementation =
-        function (i) {
-            const _isActive = this.isActiveSubscriptionId(i)
-            Log.i(
-                `spoof SubscriptionManager.isActiveSubscriptionId(${i}): ${_isActive} -> true`
-            )
-            return true
-        }
+    // SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
+    //     "int"
+    // ).implementation = function (i) {
+    //     const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+    //     Log.i(
+    //         `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(${i}): ${
+    //             _info ? "ok" : "null"
+    //         }`
+    //     )
+    //     return _info
+    // }
+    // SubscriptionManager.getActiveSubscriptionIdList.overload().implementation =
+    //     function () {
+    //         const _list = this.getActiveSubscriptionIdList()
+    //         Log.i(
+    //             `spoof SubscriptionManager.getActiveSubscriptionIdList ${_list} -> ${subId}`
+    //         )
+    //         return [parseInt(subId)]
+    //     }
+    // SubscriptionManager.getActiveSubscriptionInfo.overload(
+    //     "int"
+    // ).implementation = function (i) {
+    //     const _info = this.getActiveSubscriptionInfo(i)
+
+    //     const simCount = this.getActiveSubscriptionInfoCountMax()
+
+    //     let subInfo = null
+    //     try {
+    //         for (let i = 0; i < simCount; i++) {
+    //             subInfo = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+    //             if (subInfo) {
+    //                 break
+    //             }
+    //         }
+    //         Log.i(`spoof SubscriptionManager.getActiveSubscriptionInfo(${i})`)
+    //     } catch (error) {
+    //         console.error(
+    //             `spoof error SubscriptionManager.getActiveSubscriptionInfo(${i})`
+    //         )
+    //         error.printStackTrace()
+    //     }
+    //     return subInfo
+    // }
+    // SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex.overload(
+    //     "int"
+    // ).implementation = function (i) {
+    //     const _info = this.getActiveSubscriptionInfoForSimSlotIndex(i)
+    //     Log.i(
+    //         `SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex: ${_info}`
+    //     )
+    //     return _info
+    // }
+    // SubscriptionManager.isActiveSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         const _isActive = this.isActiveSubscriptionId(i)
+    //         Log.i(
+    //             `spoof SubscriptionManager.isActiveSubscriptionId(${i}): ${_isActive} -> true`
+    //         )
+    //         return true
+    //     }
 
     const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
     SubscriptionInfo.getMcc.overload().implementation = function () {
@@ -308,22 +318,22 @@ Java.perform(function () {
         return countryIso
     }
 
-    SubscriptionInfo.getSubscriptionId.overload().implementation = function () {
-        const _subId = this.getSubscriptionId()
-        if (!subId) {
-            Log.i(_subId)
-            return _subId
-        }
-        Log.i(`spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`)
-        return parseInt(subId)
-    }
+    // SubscriptionInfo.getSubscriptionId.overload().implementation = function () {
+    //     const _subId = this.getSubscriptionId()
+    //     if (!subId) {
+    //         Log.i(_subId)
+    //         return _subId
+    //     }
+    //     Log.i(`spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`)
+    //     return parseInt(subId)
+    // }
 
     const TelephonyManager = Java.use("android.telephony.TelephonyManager")
-    TelephonyManager.createForSubscriptionId.overload("int").implementation =
-        function (i) {
-            Log.i(`spoof TelephonyManager.createForSubscriptionId: ${i}`)
-            return this
-        }
+    // TelephonyManager.createForSubscriptionId.overload("int").implementation =
+    //     function (i) {
+    //         Log.i(`spoof TelephonyManager.createForSubscriptionId: ${i}`)
+    //         return this
+    //     }
 
     TelephonyManager.getLine1Number.overload().implementation = function () {
         const _number = this.getLine1Number()
@@ -386,15 +396,15 @@ Java.perform(function () {
         return countryIso
     }
 
-    TelephonyManager.getSubscriptionId.overload().implementation = function () {
-        const _subId = this.getSubscriptionId()
-        if (!subId) {
-            Log.i(_subId)
-            return _subId
-        }
-        Log.i(`spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`)
-        return parseInt(subId)
-    }
+    // TelephonyManager.getSubscriptionId.overload().implementation = function () {
+    //     const _subId = this.getSubscriptionId()
+    //     if (!subId) {
+    //         Log.i(_subId)
+    //         return _subId
+    //     }
+    //     Log.i(`spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`)
+    //     return parseInt(subId)
+    // }
 
     TelephonyManager.getSimState.overload().implementation = function () {
         const _simState = this.getSimState()
@@ -469,7 +479,7 @@ Java.perform(function () {
             )
         }
 
-        return this.$init("upi-mo-sms-strict", j, idTokenRequest, bundle, list, z, i, list2)
+        return this.$init(str, j, idTokenRequest, bundle, list, z, i, list2)
     }
     const SetAsterismConsentRequest = Java.use(
         "com.google.android.gms.asterism.SetAsterismConsentRequest"
@@ -564,6 +574,163 @@ Java.perform(function () {
         return this.$init(i, str, str2)
     }
 
+    try {
+        const amac = Java.use("amac")
+        const amlo = Java.use("amlo")
+        const emiy = Java.use("emiy")
+        const emiz = Java.use("emiz")
+        const emis = Java.use("emis")
+        const fiwu = Java.use("fiwu")
+        const ambs = Java.use("ambs")
+        const emkm = Java.use("emkm")
+        const fivh = Java.use("fivh")
+        const fivk = Java.use("fivk")
+        const fivn = Java.use("fivn")
+        const emjr = Java.use("emjr")
+        const amag = Java.use("amag")
+        const ftha = Java.use("ftha")
+        const ftgy = Java.use("ftgy")
+        const fuem = Java.use("fuem")
+        const fiwt = Java.use("fiwt")
+        const TimeUnit = Java.use("java.util.concurrent.TimeUnit")
+        const ambi = Java.use("ambi")
+        const fivj = Java.use("fivj")
+        amac.o.overload("amlu", "boolean", "boolean", "fiwt").implementation =
+            function (amluVar, z, z2, fiwtVar) {
+                Log.e(
+                    ` amac.o(amluVar=${dump(
+                        amluVar
+                    )}, z=${z}, z2=${z2}, fiwtVar=${dump(fiwtVar)})`
+                )
+                try {
+                    var z3
+                    var z4
+                    const eq = fiwtVar.eQ()
+                    const arr0 = Java.array("java.lang.Object", [this.z(eq)])
+                    this._a.value.d("SetConsentRequest: %s", arr0)
+
+                    var amloVar = this._d.value
+                    var emiyVar = Java.cast(emiz.h.value.eV(), emiy)
+
+                    if (!emiyVar._b.value.fm()) {
+                        emiyVar.O()
+                    }
+                    var emizVar = Java.cast(emiyVar._b.value, emiz)
+                    emizVar.b = emkm.a(10)
+                    Log.i(emizVar, emizVar.b, emizVar.a)
+
+                    emizVar.a = emizVar.a | 1
+                    var eV = emis.d.value.eV()
+
+                    if ((fiwtVar.a.value & 2) != 0) {
+                        var fivnVar = fiwtVar.e.value
+                        if (fivnVar == null) {
+                            fivnVar = fivn.c.value
+                        }
+                        var b = fivh.b(fivnVar.a.value)
+                        if (b == 0) {
+                            z3 = false
+                        } else if (b == 3) {
+                            z3 = true
+                        } else {
+                            z3 = false
+                        }
+                        if (!eV._b.value.fm()) {
+                            eV.O()
+                        }
+                        var fbzbVar = eV._b.value
+                        var emisVar = Java.cast(fbzbVar, emis)
+                        emisVar.a |= 1
+                        emisVar.b = z3
+                        var fivnVar2 = fiwtVar.e.value
+                        if (fivnVar2 == null) {
+                            fivnVar2 = fivn.c.value
+                        }
+                        var a2 = fivk.a(fivnVar2.b.value)
+                        if (a2 == 0) {
+                            z4 = false
+                        } else if (a2 == 3) {
+                            z4 = true
+                        } else {
+                            z4 = false
+                        }
+                        if (!fbzbVar.fm()) {
+                            eV.O()
+                        }
+                        var emisVar2 = Java.cast(eV._b.value, emis)
+                        emisVar2.a |= 2
+                        emisVar2.c = z4
+                    }
+                    if (!emiyVar._b.value.fm()) {
+                        emiyVar.O()
+                    }
+                    var emizVar2 = Java.cast(emiyVar._b.value, emiz)
+                    var emisVar3 = Java.cast(eV.K(), emis)
+                    emisVar3.getClass()
+                    emizVar2.c = emisVar3
+                    emizVar2.a |= 2
+                    amloVar.A(amluVar, emjr.b(5), Java.cast(emiyVar.K(), emiz))
+
+                    var v = this.v()
+                    var akxiVar = this._c.value
+                    var j = this._e.value
+                    if (amag._a.value == null) {
+                        amag._a.value = ftha.b(
+                            ftgy._a.value,
+                            "google.internal.communications.phonedeviceverification.v1.PhoneDeviceVerification/SetConsent",
+                            fuem.a(fiwt.k.value),
+                            fuem.a(fiwu.a.value)
+                        )
+                    }
+                    // const vdg = v.d.value.g(
+                    //     amag._a.value,
+                    //     akxiVar,
+                    //     fiwtVar,
+                    //     Java.use('java.lang.Long').valueOf(j).longValue(),
+                    //     TimeUnit.MILLISECONDS.value,
+                    //     v.e.value
+                    // )
+                    // Log.i("aaaaa")
+                    // const eqres = Java.cast(vdg, fiwu).eQ()
+                    // Log.i("bbbbb")
+                    // const res = this.z(eqres)
+                    // Log.i("SetConsentResponse: ", res)
+                    // const arr = Java.array("java.lang.Object", [res])
+                    // this._a.value.d("SetConsentResponse: %s", arr)
+                    var amloVar2 = this._d.value
+                    var emiyVar2 = Java.cast(emiz.h.value.eV(), emiy)
+                    if (!emiyVar2._b.value.fm()) {
+                        emiyVar2.O()
+                    }
+                    var emizVar3 = Java.cast(emiyVar2._b.value, emiz)
+
+                    emizVar3.b = emkm.a(10)
+                    emizVar3.a |= 1
+                    amloVar2.A(
+                        amluVar,
+                        emjr.b(6),
+                        Java.cast(emiyVar2.K(), emiz)
+                    )
+                    var a3 = ambi.b().a(this._b.value.getApplicationContext())
+                    a3.n(z)
+                    a3.m(Java.use("java.lang.Boolean").valueOf(z2))
+                    var b2 = fivj.b(fiwtVar.g.value)
+                    if (b2 == 0) {
+                        b2 = 1
+                    }
+                    var a4 = fivj.a(b2)
+                    var edit = Java.cast(a3, ambs)._c.value.edit()
+                    edit.putInt("device_consent_version", a4)
+                    edit.apply()
+                    Log.i("oooooooooo")
+                } catch (e) {
+                    Log.i("2222222", e)
+                    trace()
+                }
+                // this.o(amluVar, z, z2, fiwtVar)
+            }
+    } catch (error) {}
+
     const alyx = Java.use("alyx")
     alyx.a.overload("fixf").implementation = function (fixf) {
         const b = this.a(fixf)
@@ -586,13 +753,16 @@ Java.perform(function () {
         const d = Java.cast(amlu.d.value, HashMap) // map
         const e = Java.cast(amlu.e.value, HashMap) // map
 
-        Log.e(`alyx.m(
-                a=${a}, 
-                f=${f}, 
-                g=${g ? dump(g) : null}, 
-                h=${h ? dump(h) : null}, 
-                d=${d ? dump(d) : null}, 
-                e=${e ? dump(e) : null})`)
+        Log.e(
+            `alyx.m(${JSON.stringify({
+                a,
+                f,
+                g: g ? JSON.parse(dump(g)) : null,
+                h: h ? JSON.parse(dump(h)) : null,
+                d: d ? JSON.parse(dump(d)) : null,
+                e: e ? JSON.parse(dump(e)) : null
+            })})`
+        )
 
         const res = this.m(amlu, list)
         Log.e(`alyx.m res: ${dump(res)}`)
@@ -604,16 +774,18 @@ Java.perform(function () {
         "java.lang.String",
         "java.lang.String"
     ).implementation = function (amlu, list, str, str2) {
-        trace()
-        Log.e(`alyx.r(
-            amlu=${dump(amlu)},
-            list=${dump(list)},
-            str=${str},
-            str2=${str2})`)
+        Log.e(
+            `alyx.r(${JSON.stringify({
+                amlu: dumpJson(amlu),
+                list: dumpJson(list),
+                str,
+                str2
+            })})`
+        )
         try {
-            const res = this.r(amlu, list, "upi-mo-sms-strict", str2)
-            return res
+            const res = this.r(amlu, list, str, str2)
             Log.e(`alyx.r res: ${res}`)
+            return res
         } catch (error) {
             Log.e(`alyx.r error: ${error}`)
         }
@@ -750,35 +922,35 @@ Java.perform(function () {
         return this.d(z, map)
     }
 
-    const ammv = Java.use("ammv")
-    ammv.a.overload(
-        // amlu amluVar, fixf fixfVar, ammt ammtVar, ammi ammiVar
-        "amlu",
-        "fixf",
-        "ammt",
-        "ammi"
-    ).implementation = function (amlu, fixf, ammt, ammi) {
-        Log.e(`ammv.a(
-            amlu=${dump(amlu)},
-            fixf=${dump(fixf)},
-            ammt=${dump(ammt)},
-            ammi=${dump(ammi)})`)
-        trace()
-        return this.a(amlu, fixf, ammt, ammi)
-    }
-
-    const amag = Java.use("amag")
-    amag.b.overload(
-        // akxi akxiVar, fiwx fiwxVar, long j
-        "akxi",
-        "fiwx",
-        "long"
-    ).implementation = function (akxi, fiwx, j) {
-        Log.e(`amag.b(
-            akxi=${dump(akxi)},
-            fiwx=${dump(fiwx)},
-            j=${j})`)
-        trace()
-        return this.b(akxi, fiwx, j)
-    }
+    // const ammv = Java.use("ammv")
+    // ammv.a.overload(
+    //     // amlu amluVar, fixf fixfVar, ammt ammtVar, ammi ammiVar
+    //     "amlu",
+    //     "fixf",
+    //     "ammt",
+    //     "ammi"
+    // ).implementation = function (amlu, fixf, ammt, ammi) {
+    //     Log.e(`ammv.a(
+    //         amlu=${dump(amlu)},
+    //         fixf=${dump(fixf)},
+    //         ammt=${dump(ammt)},
+    //         ammi=${dump(ammi)})`)
+    //     trace()
+    //     return this.a(amlu, fixf, ammt, ammi)
+    // }
+
+    // const amag = Java.use("amag")
+    // amag.b.overload(
+    //     // akxi akxiVar, fiwx fiwxVar, long j
+    //     "akxi",
+    //     "fiwx",
+    //     "long"
+    // ).implementation = function (akxi, fiwx, j) {
+    //     Log.e(`amag.b(
+    //         akxi=${dump(akxi)},
+    //         fiwx=${dump(fiwx)},
+    //         j=${j})`)
+    //     trace()
+    //     return this.b(akxi, fiwx, j)
+    // }
 })

+ 13 - 13
vars.json

@@ -1,15 +1,15 @@
 {
-    "mcc": "310",
-    "mnc": "241",
-    "simOperator": "310241",
-    "networkOperator": "310241",
-    "simSerialNumber": "38098098842698502503",
-    "iccId": "38098098842698502503",
-    "number": "4782426591",
-    "imei": "359028038652341",
-    "imsi": "310241127403687",
-    "countryIso": "us",
-    "subId": "58",
-    "androidId": "3edff16fb646787b",
-    "serialNumber": "e3ca4455"
+    "mcc": "255",
+    "mnc": "06",
+    "simOperator": "25506",
+    "networkOperator": "25506",
+    "simSerialNumber": "47254539375685548460",
+    "iccId": "47254539375685548460",
+    "number": "638783055",
+    "imei": "011546009466177",
+    "imsi": "255063661827038",
+    "countryIso": "ua",
+    "subId": "45",
+    "androidId": "8f0804f720128407",
+    "serialNumber": "c3ccaebf"
 }