public static string EdlInfo()
        {
            string cmd   = "-p " + QDCOM.EdlComNo() + " -info";
            string text  = QDCOM.Edl(cmd);
            string text2 = text.Replace("Version 2.15", "");

            return(text2.Replace("Status: 0 The operation completed successfully.", ""));
        }
        public static bool EdlConnect()
        {
            string text = QDCOM.Edl("-l");

            if (text.Contains("COM"))
            {
                return(true);
            }
            return(false);
        }
        public static string EdlEraseBySector(string PortNo, bool ufsType, string Programmer, string Startsector, string Endsector)
        {
            string cmd;

            if (ufsType)
            {
                string text = " -p " + PortNo + " -MemoryName ufs -f " + Programmer + " -e " + Startsector + Endsector;
                cmd = text;
            }
            else
            {
                string text2 = " -p " + PortNo + " -f " + Programmer + " -e " + Startsector + Endsector;
                cmd = text2;
            }
            return(QDCOM.Edl(cmd));
        }
        public static string EdlXmlFlash(string PortNo, bool ufsType, string Programmer, string XmlFile)
        {
            string cmd;

            if (ufsType)
            {
                string text = " -p " + PortNo + " -MemoryName ufs  -f " + Programmer + " -x " + XmlFile;
                cmd = text;
            }
            else
            {
                string text2 = " -p " + PortNo + " -f " + Programmer + " -x " + XmlFile;
                cmd = text2;
            }
            return(QDCOM.Edl(cmd));
        }
        public static string EdlComNo()
        {
            string       result       = "Not Detect";
            string       text         = "";
            string       s            = QDCOM.Edl("-l");
            StringReader stringReader = new StringReader(s);

            while (stringReader.Peek() != -1)
            {
                text = stringReader.ReadLine();
                if (text.Contains("COM"))
                {
                    string text2 = text.Replace("Qualcomm HS-USB QDLoader 9008", "").Replace(" ", "").Replace("(", "")
                                   .Replace(")", "");
                    if (text.Contains("COM"))
                    {
                        result = text2;
                    }
                }
            }
            return(result);
        }
        public static string EdlEraseByName(string PortNo, string Programmer, string Partition)
        {
            string cmd = " -p " + PortNo + " -f " + Programmer + " -e " + Partition;

            return(QDCOM.Edl(cmd));
        }
        public static string EdlRestore(string PortNo, string Programmer, string Partition, string FileName)
        {
            string cmd = " -p " + PortNo + " -f " + Programmer + " -b " + Partition + FileName;

            return(QDCOM.Edl(cmd));
        }
        public static string EdlBackupByName(string PortNo, string Programmer, string Partition, string OutputFileName)
        {
            string cmd = "-p " + PortNo + " -f " + Programmer + " -d " + Partition + " -o " + OutputFileName;

            return(QDCOM.Edl(cmd));
        }
 public static string EdlCommand(string arg)
 {
     return(QDCOM.Edl(arg));
 }