예제 #1
0
        private void IsEdl()
        {
            mode = "";
            string line = "";

            edl = false;
            var x = Miuidl.Devices();

            if (x.Length >= 0)
            {
                using (StringReader s = new StringReader(x))
                {
                    while (s.Peek() != -1)
                    {
                        line = s.ReadLine();
                        if (line.IndexOf("9008") != -1)
                        {
                            mode = line.Substring(0, line.Length - 8);
                            mode = mode.Substring(line.IndexOf("9008"));
                            edl  = true;
                            Miuidl.GetGPT();
                        }
                        else if (line.IndexOf("900E") != -1)
                        {
                            mode = line.Substring(0, line.Length - 8);
                            mode = mode.Substring(line.IndexOf("900E"));
                        }
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Make RawProgram0.xml
        /// </summary>
        /// <remarks><paramref name="path"/> should be a device partition name</remarks>
        /// <param name="path">persist</param>
        public void MakeRaw(string path)
        {
            var fullpath = path + "rawprogram0.xml";

            if (!File.Exists(fullpath))
            {
                File.Create(fullpath).Close();
            }
            fs = new FileStream(fullpath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite);
            sw = new StreamWriter(fs);
            sw.WriteLine(Miuidl.MakeRawProgram());
            sw.Close();
            fs.Close();
        }
예제 #3
0
 /// <summary>
 /// Updates Internal Device List
 /// </summary>
 /// <remarks>Call this before checking for Devices, or setting a new Device, for most updated results</remarks>
 public void UpdateDeviceList()
 {
     connectedDevices.Clear();
     if (SN(AdbCmd.Devices().Replace("List of devices attached", "")).Length > 0 || SN(Fastboot.Devices()).Length > 0)
     {
         IsConnected = true;
     }
     else if (Miuidl.Port().Length > 0)
     {
         connectedDevices.Add(Miuidl.Port());
         IsConnected = true;
     }
     else
     {
         IsConnected = false;
     }
 }
예제 #4
0
 private void EdlEraseThread()
 {
     Miuidl.ExecuteMiuidlCommandNoReturn(Miuidl.MiuidlFlashCommand(EdlErasecommand));
 }
예제 #5
0
        private void EdlBackupThread()
        {
            var z = Miuidl.ExecuteMiuidlCommand(Miuidl.MiuidlFlashCommand(EdlBackupCommand));

            Logger.w(z, "bacup", EdlBackupCommand);
        }
예제 #6
0
        private void EdlFlasherThread()
        {
            var res = Miuidl.ExecuteMiuidlCommand(Miuidl.MiuidlFlashCommand(imgedl));

            Logger.w(res, "EDL IMG FLASHER Thread", null);
        }
예제 #7
0
 private void EdlRawFlasherThread()
 {
     Miuidl.ExecuteMiuidlCommand(Miuidl.MiuidlFlashCommand(rawprogram));
 }