code: public static List<String> getSourcePaths() throws PackageManager.NameNotFoundException, IOException {
          ApplicationInfo applicationInfo = getPackageManager().getApplicationInfo(getPackageName(), 0);
          File sourceApk = new File(applicationInfo.sourceDir);
          File dexDir = new File(applicationInfo.dataDir, SECONDARY_FOLDER_NAME);
          File instantRunDir = new File(applicationInfo.dataDir, INSTANT_RUN_DEX_DIR_PATH); //default instant-run dir
  
          List<String> sourcePaths = new ArrayList<>();
          sourcePaths.add(applicationInfo.sourceDir); //add the default apk path
  
          if (instantRunDir.exists()) { //check if app using instant run
              for(final File dexFile : instantRunDir.listFiles()) { //add all sources from instan-run
                  sourcePaths.add(dexFile.getAbsolutePath());
              }
          }
  
          //the prefix of extracted file, ie: test.classes
          String extractedFilePrefix = sourceApk.getName() + EXTRACTED_NAME_EXT;
          //the total dex numbers
          int totalDexNumber = getMultiDexPreferences().getInt(KEY_DEX_NUMBER, 1);
  
          for (int secondaryNumber = 2; secondaryNumber <= totalDexNumber; secondaryNumber++) {
              //for each dex file, ie: test.classes2.zip, test.classes3.zip...
              String fileName = extractedFilePrefix + secondaryNumber + EXTRACTED_SUFFIX;
              File extractedFile = new File(dexDir, fileName);
              if (extractedFile.isFile()) {
                  sourcePaths.add(extractedFile.getAbsolutePath());
                  //we ignore the verify zip part
              }
          }
  
          return sourcePaths;
      }
docs: get all the dex path
  
  @return all the dex path, including the ones in the newly added instant-run folder
  @throws PackageManager.NameNotFoundException
  @throws IOException