public static synchronized void initializePatcher(Context context) {
    extractPatcher(context);

    if (sPC == null) {
      sPC = new PatcherConfig();
      sPC.setDataDirectory(getTargetDirectory(context).getAbsolutePath());
      sPC.setTempDirectory(context.getCacheDir().getAbsolutePath());
    }
  }
  public static synchronized Device getCurrentDevice(Context context, PatcherConfig pc) {
    String realCodename = RomUtils.getDeviceCodename(context);

    Device device = null;
    for (Device d : pc.getDevices()) {
      for (String codename : d.getCodenames()) {
        if (realCodename.equals(codename)) {
          device = d;
          break;
        }
      }
      if (device != null) {
        break;
      }
    }

    return device;
  }