Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
         
       
     
  
  
  
  
  
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
  
  
ProcessUtil
  public
  
  
  
  class
  ProcessUtil
  
    extends Object
  
  
  
  
  
  
  
    
    | java.lang.Object | 
  
  
    
      | ↳ | com.android.tradefed.util.ProcessUtil | 
  
  
    
Summary
| Public methods | 
|---|
  
  
  
    | 
        
        
        static
        
        
        Process | 
      createSshTunnel(String remoteHost, int localPort, int remotePort, File sshPrivateKeyPath, String user, File sshTunnelLog, IRunUtil runUtil)
      Create an ssh tunnel to a given remote host and return the process.
        
    
 | 
  
Constants
    DEFAULT_ADB_PORT
    
      
  
      
  
    
public static final int DEFAULT_ADB_PORT
    
    
    
  
    
      Constant Value:
      
          5555
          (0x000015b3)
      
    
 
Fields
    DEFAULT_LOCAL_HOST
    
      
  
      
  
    
public static final String DEFAULT_LOCAL_HOST
    
    
    
  
    
 
Public constructors
    ProcessUtil
    
public ProcessUtil ()
    
    
    
  
 
Public methods
    createSshTunnel
    
public static Process createSshTunnel (String remoteHost, 
                int localPort, 
                int remotePort, 
                File sshPrivateKeyPath, 
                String user, 
                File sshTunnelLog, 
                IRunUtil runUtil)
    
    
    
  Create an ssh tunnel to a given remote host and return the process.
    
    | Parameters | 
|---|
      
        | remoteHost | String: the hostname/ip of the remote tcp ip Android device. | 
      
        | localPort | int: the port of the local tcp ip device. | 
      
        | remotePort | int: the port of the remote tcp ip device. | 
      
        | sshPrivateKeyPath | File | 
      
        | user | String | 
      
        | sshTunnelLog | File | 
      
        | runUtil | IRunUtil | 
    
    
      | Returns | 
|---|
      
        | Process | Processof the ssh command. | 
    
 
 
 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2024-08-13 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-13 UTC."],[],[]]