xiongzhu 11 ماه پیش
والد
کامیت
ab86a09b6a
2فایلهای تغییر یافته به همراه12 افزوده شده و 6 حذف شده
  1. 1 1
      app/build.gradle
  2. 11 5
      app/src/main/java/com/example/modifier/repo/SpoofedSimInfoRepo.kt

+ 1 - 1
app/build.gradle

@@ -24,7 +24,7 @@ android {
         applicationId "com.example.modifier"
         minSdk 33
         targetSdk 34
-        versionCode 161
+        versionCode 162
         versionName "1.0.1"
         archivesBaseName = "modifier-${versionCode}"
 

+ 11 - 5
app/src/main/java/com/example/modifier/repo/SpoofedSimInfoRepo.kt

@@ -170,7 +170,12 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
             } else {
                 if (suspend == true) {
                     suspendPackage(PACKAGE_GMS, PACKAGE_MESSAGING)
+                    shellRun(
+                        PACKAGE_GMS.kill(),
+                        PACKAGE_MESSAGING.kill()
+                    )
                 }
+
                 val plmn = spoofedSimInfo.mcc + spoofedSimInfo.mnc
                 val plmnHex = SimEncoder.encPLMN(spoofedSimInfo.mcc + spoofedSimInfo.mnc)
                 val plmnwactHex = SimEncoder.encPLMNwAcT("$plmn:4000,$plmn:8000,$plmn:0080")
@@ -222,12 +227,13 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
                 apduChannel.close()
 
                 telephonyManager.rebootModem()
-                delay(10000)
-                shellRun(
-                    PACKAGE_GMS.kill(),
-                    PACKAGE_MESSAGING.kill()
-                )
+                delay(5000)
+
                 if (suspend == true) {
+                    shellRun(
+                        PACKAGE_GMS.kill(),
+                        PACKAGE_MESSAGING.kill()
+                    )
                     resumePackage(PACKAGE_GMS, PACKAGE_MESSAGING)
                 }
             }