Class DexBulkItemRenamer

java.lang.Object
com.pnfsoftware.jeb.core.units.code.android.DexBulkItemRenamer

public class DexBulkItemRenamer extends Object
A bulk renamer for dex items such as classes, fields, and methods. This item can be used directly or by issuing a Actions.AUTO_RENAME_ALL action via the dex unit's execution facility.
  • Field Details

    • TARGET_FLAG_CLASSES

      public static final int TARGET_FLAG_CLASSES
      See Also:
    • TARGET_FLAG_FIELDS

      public static final int TARGET_FLAG_FIELDS
      See Also:
    • TARGET_FLAG_METHODS

      public static final int TARGET_FLAG_METHODS
      See Also:
    • TARGET_ALL

      public static final int TARGET_ALL
      See Also:
    • POLICY_ASCII_PRINT

      public static final int POLICY_ASCII_PRINT
      strict: accept only printable, non-WSP ascii
      See Also:
    • POLICY_ASCII_ALPHANUM

      public static final int POLICY_ASCII_ALPHANUM
      very strict: accept only printable, non-WSP ascii
      See Also:
    • POLICY_NOTHING

      public static final int POLICY_NOTHING
      impossibly strict: accept nothing
      See Also:
  • Constructor Details

    • DexBulkItemRenamer

      public DexBulkItemRenamer(IDexUnit dex, int targets, int policy, String filter)
      Parameters:
      dex - the target dex unit
      targets - a combination of TARGET_FLAG_xxx to determine which kind of items may be renamed
      policy - one of POLICY_xxx to determine which names items may be candidate for renaming
      filter - an optional 'start of signature' filter, e.g. Lcom/foo/ would only rename items in the com.foo.** packages and subpackages
  • Method Details

    • getCountOfCandidates

      public int getCountOfCandidates()
    • getCountOfExamined

      public int getCountOfExamined()
    • getCountOfRenames

      public int getCountOfRenames()
    • getCountOfFailures

      public int getCountOfFailures()
    • process

      public boolean process(boolean interruptible, boolean notifyChanges)
      Parameters:
      interruptible -
      notifyChanges -
      Returns:
      true if the method completed, false if it was interrupted