|
|
@@ -31,6 +31,8 @@ import com.example.modifier.utils.SimEncoder
|
|
|
import com.example.modifier.utils.genICCID
|
|
|
import com.example.modifier.utils.genIMEI
|
|
|
import com.example.modifier.utils.genIMSI
|
|
|
+import com.example.modifier.utils.genMacAddress
|
|
|
+import com.example.modifier.utils.genSerialNo
|
|
|
import com.example.modifier.utils.getContext
|
|
|
import com.example.modifier.utils.hasPermission
|
|
|
import com.example.modifier.utils.isOldVersion
|
|
|
@@ -65,6 +67,9 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
val AVAILABLE = booleanPreferencesKey("available")
|
|
|
val CARRIER_ID = stringPreferencesKey("carrier_id")
|
|
|
val CARRIER_NAME = stringPreferencesKey("carrier_name")
|
|
|
+ val SERIAL_NO = stringPreferencesKey("serial_no")
|
|
|
+ val MAC = stringPreferencesKey("mac")
|
|
|
+ val BSSID = stringPreferencesKey("bssid")
|
|
|
}
|
|
|
|
|
|
private val simInfoFlow = context.simInfoDataStore.data.map {
|
|
|
@@ -80,6 +85,9 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
val available = it[PreferencesKeys.AVAILABLE] ?: false
|
|
|
val carrierId = it[PreferencesKeys.CARRIER_ID] ?: ""
|
|
|
val carrierName = it[PreferencesKeys.CARRIER_NAME] ?: ""
|
|
|
+ val serialNo = it[PreferencesKeys.SERIAL_NO] ?: ""
|
|
|
+ val mac = it[PreferencesKeys.MAC] ?: ""
|
|
|
+ val bssid = it[PreferencesKeys.BSSID] ?: ""
|
|
|
SpoofedSimInfo(
|
|
|
numberId = numberId,
|
|
|
number = number,
|
|
|
@@ -92,7 +100,10 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
areaCode = areaCode,
|
|
|
available = available,
|
|
|
carrierId = carrierId,
|
|
|
- carrierName = carrierName
|
|
|
+ carrierName = carrierName,
|
|
|
+ serialNo = serialNo,
|
|
|
+ mac = mac,
|
|
|
+ bssid = bssid
|
|
|
)
|
|
|
}
|
|
|
|
|
|
@@ -109,7 +120,10 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
areaCode = "",
|
|
|
available = false,
|
|
|
carrierId = "",
|
|
|
- carrierName = ""
|
|
|
+ carrierName = "",
|
|
|
+ serialNo = "",
|
|
|
+ mac = "",
|
|
|
+ bssid = "",
|
|
|
)
|
|
|
)
|
|
|
|
|
|
@@ -140,6 +154,9 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
it[PreferencesKeys.AVAILABLE] = spoofedSimInfo.available
|
|
|
it[PreferencesKeys.CARRIER_ID] = spoofedSimInfo.carrierId
|
|
|
it[PreferencesKeys.CARRIER_NAME] = spoofedSimInfo.carrierName
|
|
|
+ it[PreferencesKeys.SERIAL_NO] = spoofedSimInfo.serialNo
|
|
|
+ it[PreferencesKeys.MAC] = spoofedSimInfo.mac
|
|
|
+ it[PreferencesKeys.BSSID] = spoofedSimInfo.bssid
|
|
|
}
|
|
|
try {
|
|
|
if (ROOT_ACCESS) {
|
|
|
@@ -286,6 +303,9 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
put("country", spoofedSimInfo.country)
|
|
|
put("carrier_id", spoofedSimInfo.carrierId)
|
|
|
put("carrier_name", spoofedSimInfo.carrierName)
|
|
|
+ put("serial_no", spoofedSimInfo.serialNo)
|
|
|
+ put("mac", spoofedSimInfo.mac)
|
|
|
+ put("bssid", spoofedSimInfo.bssid)
|
|
|
}
|
|
|
val base64 = Base64.encode(jsonObject.toString().toByteArray(), Base64.DEFAULT)
|
|
|
.toString(Charsets.UTF_8)
|
|
|
@@ -326,7 +346,10 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
areaCode = "1",
|
|
|
available = false,
|
|
|
carrierId = "1779",
|
|
|
- carrierName = "Cricket Wireless"
|
|
|
+ carrierName = "Cricket Wireless",
|
|
|
+ serialNo = genSerialNo(),
|
|
|
+ mac = genMacAddress(),
|
|
|
+ bssid = genMacAddress()
|
|
|
),
|
|
|
suspend = false
|
|
|
)
|
|
|
@@ -353,7 +376,10 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
|
|
|
areaCode = "1",
|
|
|
available = false,
|
|
|
carrierId = "1",
|
|
|
- carrierName = "T-Mobile"
|
|
|
+ carrierName = "T-Mobile",
|
|
|
+ serialNo = genSerialNo(),
|
|
|
+ mac = genMacAddress(),
|
|
|
+ bssid = genMacAddress()
|
|
|
)
|
|
|
)
|
|
|
}
|