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.
    
  
  
    
  
  
  
  
    
  
  
    
    
  
  
IncrementalImageUtil
  public
  
  
  
  class
  IncrementalImageUtil
  
    extends Object
  
  
  
  
  
  
  
    
    | java.lang.Object | 
  
  
    
      | ↳ | com.android.tradefed.util.image.IncrementalImageUtil | 
  
  
    
  A utility to leverage the incremental image and device update.
Summary
| Public methods | 
|---|
  
  
  
    | 
        
        
        
        
        
        void | 
      allowSameBuildFlashing()
       | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      allowUnzipBaseline()
       | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      cleanAfterSetup()
      When doing some of the apply logic, we can clean up files right after setup.
        
    
 | 
  
  
  
  
    | 
        
        
        
        
        
        File | 
      getExtractedTargetDirectory()
       | 
  
  
  
  
    | 
        
        
        static
        
        
        IncrementalImageUtil | 
      initialize(ITestDevice device, IDeviceBuildInfo build, File createSnapshot, boolean isIsolatedSetup, boolean allowTrackerlessUpdate,  allowedTransition, boolean newFlow, boolean updateBootloaderFromUserspace, SnapuserdWaitPhase waitPhase, boolean useMerkleTree)
       | 
  
  
  
  
    | 
        
        
        
        
        
        boolean | 
      isSameBuildFlashingAllowed()
       | 
  
  
  
  
    | 
        
        
        static
        
        
        boolean | 
      isSnapshotInUse(ITestDevice device)
      Returns whether device is currently using snapshots or not.
        
    
 | 
  
  
  
  
    | 
        
        
        static
        
        
        boolean | 
      isSnapshotSupported(ITestDevice device, boolean useMerkle)
      Returns whether or not we can use the snapshot logic to update the device
        
    
 | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      notifyBasebadNeedsRevert()
       | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      notifyBootloaderNeedsRevert()
       | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      teardownDevice(TestInformation testInfo)
       | 
  
  
  
  
    | 
        
        
        
        
        
        boolean | 
      updateCompleted()
      Returns whether update was completed or not.
        
    
 | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      updateDevice(File currentBootloader, File currentRadio)
      Updates the device using the snapshot logic.
        
    
 | 
  
  
  
  
    | 
        
        
        
        
        
        void | 
      updateDeviceWithNewFlow(File currentBootloader, File currentRadio)
       | 
  
  
  
  
    | 
        
        
        
        
        
        boolean | 
      useUpdatedFlow()
       | 
  
Fields
    DYNAMIC_PARTITIONS_TO_DIFF
    
      
  
      
  
    
public static final  DYNAMIC_PARTITIONS_TO_DIFF
    
    
    
  
    
 
Public constructors
    IncrementalImageUtil
    
public IncrementalImageUtil (ITestDevice device, 
                File targetImage, 
                File createSnapshot, 
                boolean newFlow, 
                boolean updateBootloaderFromUserspace, 
                SnapuserdWaitPhase waitPhase, 
                File deviceMerkleTree)
    
    
    
  
    
    | Parameters | 
|---|
      
        | device | ITestDevice | 
      
        | targetImage | File | 
      
        | createSnapshot | File | 
      
        | newFlow | boolean | 
      
        | updateBootloaderFromUserspace | boolean | 
      
        | waitPhase | SnapuserdWaitPhase | 
      
        | deviceMerkleTree | File | 
    
 
Public methods
    allowSameBuildFlashing
    
public void allowSameBuildFlashing ()
    
    
    
  
 
    allowUnzipBaseline
    
public void allowUnzipBaseline ()
    
    
    
  
 
    cleanAfterSetup
    
public void cleanAfterSetup ()
    
    
    
  When doing some of the apply logic, we can clean up files right after setup.
 
    
    
public File getExtractedTargetDirectory ()
    
    
    
  
    
 
    initialize
    
public static IncrementalImageUtil initialize (ITestDevice device, 
                IDeviceBuildInfo build, 
                File createSnapshot, 
                boolean isIsolatedSetup, 
                boolean allowTrackerlessUpdate, 
                 allowedTransition, 
                boolean newFlow, 
                boolean updateBootloaderFromUserspace, 
                SnapuserdWaitPhase waitPhase, 
                boolean useMerkleTree)
    
    
    
  
    
    | Parameters | 
|---|
      
        | device | ITestDevice | 
      
        | build | IDeviceBuildInfo | 
      
        | createSnapshot | File | 
      
        | isIsolatedSetup | boolean | 
      
        | allowTrackerlessUpdate | boolean | 
      
        | allowedTransition |  | 
      
        | newFlow | boolean | 
      
        | updateBootloaderFromUserspace | boolean | 
      
        | waitPhase | SnapuserdWaitPhase | 
      
        | useMerkleTree | boolean | 
    
    
      
  
 
    isSameBuildFlashingAllowed
    
public boolean isSameBuildFlashingAllowed ()
    
    
    
  
    
 
    isSnapshotInUse
    
public static boolean isSnapshotInUse (ITestDevice device)
    
    
    
  Returns whether device is currently using snapshots or not.
    
    | Parameters | 
|---|
      
        | device | ITestDevice | 
    
    
      
  
 
    isSnapshotSupported
    
public static boolean isSnapshotSupported (ITestDevice device, 
                boolean useMerkle)
    
    
    
  Returns whether or not we can use the snapshot logic to update the device
    
    | Parameters | 
|---|
      
        | device | ITestDevice | 
      
        | useMerkle | boolean | 
    
    
      
  
 
    notifyBasebadNeedsRevert
    
public void notifyBasebadNeedsRevert ()
    
    
    
  
 
    notifyBootloaderNeedsRevert
    
public void notifyBootloaderNeedsRevert ()
    
    
    
  
 
    
    
public void teardownDevice (TestInformation testInfo)
    
    
    
  
    
    | Parameters | 
|---|
      
        | testInfo | TestInformation | 
    
      
  
 
    updateCompleted
    
public boolean updateCompleted ()
    
    
    
  Returns whether update was completed or not.
    
 
    updateDevice
    
public void updateDevice (File currentBootloader, 
                File currentRadio)
    
    
    
  Updates the device using the snapshot logic.
    
    | Parameters | 
|---|
      
        | currentBootloader | File | 
      
        | currentRadio | File | 
    
      
  
 
    updateDeviceWithNewFlow
    
public void updateDeviceWithNewFlow (File currentBootloader, 
                File currentRadio)
    
    
    
  
    
    | Parameters | 
|---|
      
        | currentBootloader | File | 
      
        | currentRadio | File | 
    
      
  
 
    useUpdatedFlow
    
public boolean useUpdatedFlow ()
    
    
    
  
    
 
 
 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  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 2025-03-19 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 2025-03-19 UTC."],[],[]]