Exemple #1
0
        public static bool GetIsf(LogMask mask)
        {
            if (qxdm != null)
            {
                return(qxdm.GetIsf(mask));
            }

            return(false);
        }
Exemple #2
0
        public bool GetIsf(LogMask mask)
        {
            ApplyFilter(mask);

            iConfig.CommitConfig();
            iClient.PopulateClients();

            return(iClient.CopyAllClientsItems(mask.TargetFile));
        }
Exemple #3
0
 public static void GetIsfAsync(LogMask mask)
 {
     lock (maskQueue)
     {
         maskQueue.Enqueue(mask);
         if (!workThread.IsAlive)
         {
             workThread.Start();
         }
     }
 }
Exemple #4
0
        public bool GetIsf(LogMask mask)
        {
            ApplyFilter(mask);

            iConfig.CommitConfig();
            iClient.PopulateClients();

            uint filteredItemCount = iClient.CopyAllClientsItems(mask.TargetFile);

            return(filteredItemCount != 0);
        }
Exemple #5
0
        private void ApplyFilter(LogMask mask)
        {
            iConfig.ClearConfig();

            if (mask.DiagList != null && mask.DiagList.Length > 0)
            {
                iConfig.AddItem(1);//Diag response
                for (int i = 0; i < mask.DiagList.Length; i++)
                {
                    iConfig.AddDIAGResponse(mask.DiagList[i]);
                }
            }

            if (mask.LogList != null && mask.LogList.Length > 0)
            {
                iConfig.AddItem(5);//Log
                for (int i = 0; i < mask.LogList.Length; i++)
                {
                    iConfig.AddLog(mask.LogList[i]);
                }
            }

            if (mask.MsgList != null && mask.MsgList.Length > 0)
            {
                iConfig.AddItem(6);//Message
                for (int i = 0; i < mask.MsgList.Length; i++)
                {
                    iConfig.AddMessage(mask.MsgList[i], 0);
                    iConfig.AddMessage(mask.MsgList[i], 1);
                    iConfig.AddMessage(mask.MsgList[i], 2);
                    iConfig.AddMessage(mask.MsgList[i], 3);
                    iConfig.AddMessage(mask.MsgList[i], 4);
                }
            }

            if (mask.MsgList != null && mask.MsgList.Length > 0)
            {
                iConfig.AddItem(7);//String
            }

            if (mask.SubSysList != null && mask.SubSysList.Length > 0)
            {
                iConfig.AddItem(9);//sub sys dispatch response
                for (int i = 0; i < mask.SubSysList.Length; i++)
                {
                    iConfig.AddSubsysResponse(mask.SubSysList[i].SubSysID, mask.SubSysList[i].SubSysCmd);
                }
            }
        }
Exemple #6
0
        public static void DecodeIsf(string sourceIsf, BackgroundWorker bw, bool usePCTime)
        {
            Utils.InitBaseFileName(sourceIsf);
            //FileInfo fileInfo = new FileInfo(isfFile);
            long totalCount = 0;

            if (!Utils.IsValidIsf(sourceIsf))
            {
                MessageBox.Show("choose valid qxdm log");
                return;
            }

            if (bw != null)
            {
                bw.ReportProgress(1, "opening qxdm");
            }
            if (!QXDMProcessor.Start(sourceIsf))
            {
                MessageBox.Show("can't open qxdm");
                return;
            }

            if (bw != null)
            {
                bw.ReportProgress(1, "extracting isf log");
            }

            LogMask mask = new LogMask(Utils.RawIsfName);

            mask.LogList = new uint[] { 0x1098, 0x14ce,                                                                                                                                                                                                                                                         //UIM APDU
                                        0x1544, 0x138e, 0x138f, 0x1390, 0x1391, 0x1392, 0x1393, 0x1394, 0x1395, 0x1396, 0x1397, 0x1398, 0x1399, 0x139a, 0x139b, 0x139c, 0x139d, 0x139e, 0x139f, 0x13a0, 0x13a1, 0x13a2, 0x13a3, 0x13a4, 0x13a5, 0x13a6, 0x13a7, 0x13a8, 0x13a9, 0x13aa, 0x13ab, 0x13ac, 0x13ad, //QMI
                                        0xb0c0, 0xb0e2, 0xb0e3, 0xb0ec, 0xb0ed,                                                                                                                                                                                                                                 //OTA LTE
                                        0x713a, 0x7b3a, 0xd0e3, 0x412f, 0x5b2f,                                                                                                                                                                                                                                 //OTA  UMTS, TDS, W, GSM
                                        0x1004, 0x1005, 0x1006, 0x1007, 0x1008,                                                                                                                                                                                                                                 //OTA 1X
                                        0x156e, 0x1830, 0x1831, 0x1832,                                                                                                                                                                                                                                         //IMS
            };
            mask.MsgList = new uint[] { 21, 6039 };


            mask.DiagList   = new uint[] { 0, 124 };
            mask.SubSysList = new SubSysMask[] { new SubSysMask(8, 1), new SubSysMask(4, 15) };
            if (!QXDMProcessor.GetIsf(mask))
            {
                QXDMProcessor.Stop();
                MessageBox.Show("no valid log present.");
                return;
            }

            if (bw != null)
            {
                bw.ReportProgress(1, "opening apex/qcat");
            }
            if (!IsfAnalyzer.Start(usePCTime))
            {
                MessageBox.Show("need to install apex or qcat");
                QXDMProcessor.Stop();
                return;
            }

            if (bw != null)
            {
                bw.ReportProgress(1, "saving isf log to text");
            }
            if (File.Exists(Utils.RawTextName))
            {
                File.Delete(Utils.RawTextName);
            }
            if (!IsfAnalyzer.ConvetIsf2Text(Utils.RawIsfName, Utils.RawTextName))
            {
                MessageBox.Show("no valid log present in extracted isf");
                IsfAnalyzer.Stop();
                QXDMProcessor.Stop();
                return;
            }

            QXDMProcessor.Stop();
            IsfAnalyzer.Stop();
            File.Delete(Utils.RawIsfName);

            if (bw != null)
            {
                bw.ReportProgress(1, "decoding text file");
            }
            totalCount = DecodeText(Utils.RawTextName);

            string message = "total number of extracted apdu is " + totalCount;

            if (bw != null)
            {
                bw.ReportProgress(1, message);
            }
        }