public static int resolve(String host) throws IOException {
  Socket localSocket=new Socket(ADB_HOST,ADB_PORT);
  DataInputStream dis=new DataInputStream(localSocket.getInputStream());
  OutputStream os=localSocket.getOutputStream();
  int count_read=0;
  if (localSocket == null || dis == null || os == null)   return -1;
  String cmd="dns:" + host;
  if (!sendAdbCmd(dis,os,cmd))   return -1;
  count_read=dis.readInt();
  localSocket.close();
  return count_read;
}

public static int resolve ( String host ) throws IOException { Socket localSocket = new Socket ( ADB_HOST , ADB_PORT ) ; DataInputStream dis = new DataInputStream ( localSocket . getInputStream ( ) ) ; OutputStream os = localSocket . getOutputStream ( ) ; int count_read = 0 ; if ( localSocket == null || dis == null || os == null ) return - 1 ; String cmd = "dns:" + host ; if ( ! sendAdbCmd ( dis , os , cmd ) ) return - 1 ; count_read = dis . readInt ( ) ; localSocket . close ( ) ; return count_read ; }
resolve dns name into ip address
