xiongzhu 11 meses atrás
pai
commit
1a30cfbad2

+ 9 - 1
app/src/main/java/com/example/modifier/repo/SpoofedSimInfoRepo.kt

@@ -185,10 +185,18 @@ class SpoofedSimInfoRepo private constructor(private val context: Context) {
                     context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
                     context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
                 val apduChannel = ApduChannel(telephonyManager, SIMView.AID_CUSTOM)
                 val apduChannel = ApduChannel(telephonyManager, SIMView.AID_CUSTOM)
                 apduChannel.select(SIMView.FID_MF)
                 apduChannel.select(SIMView.FID_MF)
-
                 apduChannel.select(SIMView.FID_EF_ICCID)
                 apduChannel.select(SIMView.FID_EF_ICCID)
                 apduChannel.writeBinary(SimEncoder.encICCID(spoofedSimInfo.iccid))
                 apduChannel.writeBinary(SimEncoder.encICCID(spoofedSimInfo.iccid))
 
 
+                apduChannel.select(SIMView.FID_MF)
+                apduChannel.select(SIMView.FID_DF_TELECOM)
+                apduChannel.select(SIMView.FID_EF_MSISDN)
+                apduChannel.writeRecord(
+                    1, SimEncoder.encMSISDN(spoofedSimInfo.number)
+                        .padStart(56, 'F')
+                )
+
+                apduChannel.select(SIMView.FID_MF)
                 apduChannel.select(SIMView.FID_DF_GSM)
                 apduChannel.select(SIMView.FID_DF_GSM)
                 apduChannel.select(SIMView.FID_EF_IMSI)
                 apduChannel.select(SIMView.FID_EF_IMSI)
                 apduChannel.writeBinary(SimEncoder.encIMSI(spoofedSimInfo.imsi))
                 apduChannel.writeBinary(SimEncoder.encIMSI(spoofedSimInfo.imsi))