try
{
- device.executeShellCommand("dlogutil -v long *:" + level.getPriorityLetter(), logReceiver, 0 /* timeout */); //$NON-NLS-1$
+ device.executeShellCommand("/usr/bin/dlogutil -v long *:" + level.getPriorityLetter(), logReceiver, 0 /* timeout */); //$NON-NLS-1$
} catch (Exception e)
{
Logger.error("LogTab", e);
}
public SdbShellProcess executeShellCommand(String command) throws IOException {
+ return (SdbShellProcess) executeShellCommand(command, true);
+ }
+
+ public Process executeShellCommand(String command, boolean prompt) throws IOException {
SmartDevelopmentBridge sdb = SmartDevelopmentBridge.getBridge();
if (sdb == null)
return null;
return null;
String sdbShellCmd = sdbPath + " -s " + mSerialNumber + " shell";
+ if (!prompt)
+ sdbShellCmd += " " + command;
Process pSdb = Runtime.getRuntime().exec(sdbShellCmd);
- sdbShellProcess = new SdbShellProcess(pSdb, command);
- return sdbShellProcess;
+ if (!prompt)
+ return pSdb;
+ return new SdbShellProcess(pSdb, command);
}
public void executeShellCommand(String command, IShellOutputReceiver receiver) throws TimeoutException,
FileListingService getFileListingService();
/**
- * Executes a shell command on the device and return SdbShellProcess
+ * Executes a shell command on the device interactively and return SdbShellProcess
*
* @param command the shell command to execute
* @throws IOException in case of I/O error on the connection.
SdbShellProcess executeShellCommand(String command) throws IOException;
/**
+ * Executes a shell command to the device promptly and return SdbShellProcess
+ *
+ * @param command the shell command to execute
+ * @throws IOException in case of I/O error on the connection.
+ *
+ * @see SdbShellProcess
+ */
+ public Process executeShellCommand(String command, boolean prompt) throws IOException;
+ /**
* Executes a shell command on the device, and sends the result to a <var>receiver</var>
* <p/>This is similar to calling
* <code>executeShellCommand(command, receiver, SdbPreferences.getTimeOut())</code>.