コード例 #1
0
        public void Reboot()
        {
            iDevice id = Devices[0];
            IntPtr  currDevice;
            string  currUdid = id.Udid;

            LibiMobileDevice.iDeviceError returnCode = LibiMobileDevice.NewDevice(out currDevice, currUdid);
            IntPtr ldService;
            IntPtr lockdownClient;

            Lockdown.LockdownError lockdownReturnCode = Lockdown.Start(currDevice, out lockdownClient, out ldService);
            IntPtr diagService;
            IntPtr diagClient;

            iDiagnostics.diagnostics_relay_error_t dre = iDiagnostics.diagnostics_relay_client_start_service(currDevice, out diagClient, out diagService);
            iDiagnostics.diagnostics_relay_restart(diagClient, iDiagnostics.DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS);
            iDiagnostics.diagnostics_relay_client_free(diagClient);
            Lockdown.FreeClient(lockdownClient);
            Lockdown.FreeService(ldService);
            LibiMobileDevice.idevice_free(currDevice);
        }
コード例 #2
0
        public void Sleep()
        {
            iDevice id = Devices[0];
            IntPtr  currDevice;
            string  currUdid = id.Udid;

            LibiMobileDevice.iDeviceError returnCode = LibiMobileDevice.NewDevice(out currDevice, currUdid);
            IntPtr ldService;
            IntPtr lockdownClient;

            Lockdown.LockdownError lockdownReturnCode = Lockdown.Start(currDevice, out lockdownClient, out ldService);
            IntPtr diagService;
            IntPtr diagClient;

            iDiagnostics.diagnostics_relay_error_t dre = iDiagnostics.diagnostics_relay_client_start_service(currDevice, out diagClient, out diagService);
            iDiagnostics.diagnostics_relay_sleep(diagClient);
            iDiagnostics.diagnostics_relay_client_free(diagClient);
            Lockdown.FreeClient(lockdownClient);
            Lockdown.FreeService(ldService);
            LibiMobileDevice.idevice_free(currDevice);
        }