code: private static List<String> tryLoadInstantRunDexFile(ApplicationInfo applicationInfo) {
          List<String> instantRunSourcePaths = new ArrayList<>();
  
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && null != applicationInfo.splitSourceDirs) {
              // add the split apk, normally for InstantRun, and newest version.
              instantRunSourcePaths.addAll(Arrays.asList(applicationInfo.splitSourceDirs));
              Log.d(Consts.TAG, "Found InstantRun support");
          } else {
              try {
                  // This man is reflection from Google instant run sdk, he will tell me where the dex files go.
                  Class pathsByInstantRun = Class.forName("com.android.tools.fd.runtime.Paths");
                  Method getDexFileDirectory = pathsByInstantRun.getMethod("getDexFileDirectory", String.class);
                  String instantRunDexPath = (String) getDexFileDirectory.invoke(null, applicationInfo.packageName);
  
                  File instantRunFilePath = new File(instantRunDexPath);
                  if (instantRunFilePath.exists() && instantRunFilePath.isDirectory()) {
                      File[] dexFile = instantRunFilePath.listFiles();
                      for (File file : dexFile) {
                          if (null != file && file.exists() && file.isFile() && file.getName().endsWith(".dex")) {
                              instantRunSourcePaths.add(file.getAbsolutePath());
                          }
                      }
                      Log.d(Consts.TAG, "Found InstantRun support");
                  }
  
              } catch (Exception e) {
                  Log.e(Consts.TAG, "InstantRun support error, " + e.getMessage());
              }
          }
  
          return instantRunSourcePaths;
      }
docs: Get instant run dex path, used to catch the branch usingApkSplits=false.