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.
    
  
  
    
  
  
  
  
    
  
  
    
    
  
  
PushFilePreparer
  public
  
  
  
  class
  PushFilePreparer
  
  
  
  
    extends BaseTargetPreparer
  
  
  
  
  
      implements
      
        IAbiReceiver, 
      
        IDiscoverDependencies, 
      
        IInvocationContextReceiver
      
  
  
  
    
  A ITargetPreparer that attempts to push any number of files from any host path to any
 device path.
 
Should be performed *after* a new build is flashed, and *after* DeviceSetup is run (if
 enabled)
Summary
Public constructors
    PushFilePreparer
    
public PushFilePreparer ()
    
    
    
  
 
Public methods
    getAbi
    
public IAbi getAbi ()
    
    
    
  
    
 
    getPushSpecs
    
public final  getPushSpecs (ITestDevice device)
    
    
    
  Create the list of files to be pushed.
    
    | Parameters | 
|---|
      
        | device | ITestDevice | 
    
    
      
  
 
    isCleanUpEnabled
    
public boolean isCleanUpEnabled ()
    
    
    
  
    
 
    reportDependencies
    
public  reportDependencies ()
    
    
    
  
    
 
    resolveRelativeFilePath
    
public File resolveRelativeFilePath (IBuildInfo buildInfo, 
                String fileName)
    
    
    
  Resolve relative file path via IBuildInfo and test cases directories.
    
    | Parameters | 
|---|
      
        | buildInfo | IBuildInfo: the build artifact information | 
      
        | fileName | String: relative file path to be resolved | 
    
    
      | Returns | 
|---|
      
        | File | the file from the build info or test cases directories | 
    
 
    setAbi
    
public void setAbi (IAbi abi)
    
    
    
  
    
 
    setInvocationContext
    
public void setInvocationContext (IInvocationContext invocationContext)
    
    
    
  
    
    | Parameters | 
|---|
      
        | invocationContext | IInvocationContext | 
    
 
    
    
public void setUp (TestInformation testInfo)
    
    
    
  
    
    | Parameters | 
|---|
      
        | testInfo | TestInformation | 
    
      
  
 
    shouldAbortOnFailure
    
public boolean shouldAbortOnFailure ()
    
    
    
  Whether or not to abort on push failure.
    
 
    shouldRemountSystem
    
public boolean shouldRemountSystem ()
    
    
    
  
    
 
    shouldRemountVendor
    
public boolean shouldRemountVendor ()
    
    
    
  
    
 
    
    
public void tearDown (TestInformation testInfo, 
                Throwable e)
    
    
    
  
    
    | Parameters | 
|---|
      
        | testInfo | TestInformation | 
      
        | e | Throwable | 
    
      
  
 
 
 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  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."],[],[]]