Class NativeDepsUnpacker

java.lang.Object
com.facebook.soloader.NativeDepsUnpacker

public final class NativeDepsUnpacker extends Object
Unpacks native deps file from APK to disk. Only needed when native deps are compressed in the APK. The file is extracted on first start, and replaced if the file is corrupt or the APK changes.
  • Method Details

    • getNativeDepsFilePath

      public static File getNativeDepsFilePath(android.content.Context context)
    • getNativeDepsDir

      public static File getNativeDepsDir(android.content.Context context)
    • ensureNativeDepsAvailable

      public static void ensureNativeDepsAvailable(android.content.Context context) throws IOException
      Makes sure that the native deps file has been extracted from the APK to disk so it can be used to load libraries. If either the file hasn't been extracted, the extracted file is corrupt, or the APK changed, the file will be extracted from the APK. If the file was already extracted, this is a no-op. If extraction fails, an IOException will be thrown.
      Parameters:
      context - application context
      Throws:
      IOException - IOException