Beispiel #1
0
        private void buttonExBusybox_Click(object sender, EventArgs e)
        {
            bool adbState = mCmd.excuteCmdGetAdbState();

            if (!adbState)
            {
                MessageBox.Show(Enums.Error.ADB, Enums.Title.ERROR);
                return;
            }

            CmdOption option = new CmdOption(1);

            option.path[0]       = Enums.Path.PATH_SRC + Enums.ThirdAppFileName.BUSYBOX;
            option.dst[0]        = Enums.AndroidPath.SYSTEM_BIN + Enums.ThirdAppFileName.BUSYBOX;
            option.permission[0] = Enums.LinuxPermission.RWX_RWX_RWX;
            mThreadCmd.startCmdUpdateThread(option, mProgressBarUpdate);
        }
Beispiel #2
0
        //Thread get devices state
        public void getDeviceState()
        {
            mCmd.excuteCmdAdbStartServer();
            while (bThreadDeviceStateWork)
            {
                while (bThreadDeviceStateContinue)
                {
                    int  state    = (int)Enums.ConnectState.STATE_NONE_CONNECT;
                    bool adbState = mCmd.excuteCmdGetAdbState();
                    if (adbState)
                    {
                        state |= (int)Enums.ConnectState.STATE_ADB_CONNECT;
                    }
                    //exit quickly
                    if (bThreadDeviceStateWork == false)
                    {
                        break;
                    }
                    Thread.Sleep(2000);
                    bool fastbootState = mCmd.excuteCmdGetFastState();
                    if (fastbootState)
                    {
                        state |= (int)Enums.ConnectState.STATE_FAST_CONNECT;
                    }

                    mSyn.Post(displayDeviceState, state);
                    if (bThreadDeviceStateWork == false)
                    {
                        break;
                    }
                    Thread.Sleep(1000);
                }
                mSyn.Post(displayDeviceState, Enums.ConnectState.STATE_FLASH);
                Thread.Sleep(1000);
            }
        }
Beispiel #3
0
        private void buttonExBusybox_Click(object sender, EventArgs e)
        {
            bool adbState = mCmd.excuteCmdGetAdbState();

            if (!adbState)
            {
                MessageBox.Show(Enums.Error.ADB, Enums.Title.ERROR);
                return;
            }
            bool state = mCmd.excuteCmdUpdate(PATH_SRC + Enums.ThirdAppFileName.BUSYBOX, Enums.AndroidPath.SYSTEM_BIN + Enums.ThirdAppFileName.BUSYBOX, Enums.LinuxPermission.RWX_RWX_RWX);

            if (state == false)
            {
                MessageBox.Show(Enums.Error.INSTALL, Enums.Title.ERROR);
            }
        }