Package com.suwish.pc.adb

Examples of com.suwish.pc.adb.Command


          UIHelper.showErrorDialog(getInstance(), "Unkonw Device SerialNumber");
          return;
        }       
        try{
          String title  = DeviceHelper.getDeviceDescName(device);
          Process process = AdbManager.execCommand(new Command(new String[]{"-s",device.getSerialNumber(),"shell"}), terminalPanel);
          terminalPanel.dispose();
          terminalPanel.setProcess(process, title);
          appendTitle(title);
        }catch(Exception ex){
          UIHelper.showErrorDialog(getInstance(), ex.getMessage());
View Full Code Here


    setSize(new Dimension(300, 350));
    setLocationRelativeTo(parent);
  }
  private void initData(){
    try{
      List<String> result = StringUtils.convert(AdbManager.queryResult(new Command(AdbManager.ADB_PATH, " devices"), true), "");
      for(String value : result){
        if(StringUtils.isEmpty(value)) continue;
        System.err.println(value);
        listModel.addElement(value.replace("\t", " "));
      }
View Full Code Here

    });
  }
  private void initData(){
    if(StringUtils.isEmpty(apkPath))return;
    try{
      String value = AdbManager.queryResult(new Command(AdbManager.AAPT_PATH,
          new String[]{"dump", "badging" , StringUtils.parseCmdPath(apkPath)}), true);
      detailEditor.setText(value);
    }catch(Exception e){
      JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
      e.printStackTrace();
View Full Code Here

   * @param serialNumber
   * @return
   * @throws IOException
   */
  public static Process callShell(String serialNumber) throws IOException{
    return AdbManager.execCommand(new Command(AdbManager.ADB_PATH, " -s " + serialNumber + " shell"));
  }
View Full Code Here

   */
  public static Process callShell(String serialNumber) throws IOException{
    return AdbManager.execCommand(new Command(AdbManager.ADB_PATH, " -s " + serialNumber + " shell"));
  }
  public static String execCommand(String command) throws IOException{
    return AdbManager.queryResult(new Command(AdbManager.ADB_PATH, command), true);
   
  }
View Full Code Here

TOP

Related Classes of com.suwish.pc.adb.Command

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.