Package com.facebook.soloader
Class BackupSoSource
java.lang.Object
com.facebook.soloader.SoSource
com.facebook.soloader.DirectorySoSource
com.facebook.soloader.UnpackingSoSource
com.facebook.soloader.BackupSoSource
- All Implemented Interfaces:
AsyncInitSoSource,RecoverableSoSource
SoSource that extracts zipped libraries from an APK to the filesystem. This is a
workaround for a known OS bug where the unpacking of non-asset zipped libraries at install time
results in corrupted libraries (e.g. bad elf magic, or truncated files).-
Nested Class Summary
Nested classes/interfaces inherited from class com.facebook.soloader.UnpackingSoSource
UnpackingSoSource.Dso -
Field Summary
Fields inherited from class com.facebook.soloader.DirectorySoSource
ON_LD_LIBRARY_PATH, RESOLVE_DEPENDENCIESFields inherited from class com.facebook.soloader.SoSource
LOAD_FLAG_ALLOW_IMPLICIT_PROVISION, LOAD_FLAG_ALLOW_SOURCE_CHANGE, LOAD_FLAG_MIN_CUSTOM_FLAG, LOAD_RESULT_IMPLICITLY_PROVIDED, LOAD_RESULT_LOADED, LOAD_RESULT_NOT_FOUND, PREPARE_FLAG_ALLOW_ASYNC_INIT, PREPARE_FLAG_DISABLE_FS_SYNC_JOB, PREPARE_FLAG_FORCE_REFRESH, PREPARE_FLAG_SKIP_BACKUP_SO_SOURCE -
Constructor Summary
ConstructorsConstructorDescriptionBackupSoSource(android.content.Context context, String name) BackupSoSource(android.content.Context context, String name, boolean resolveDependencies) -
Method Summary
Modifier and TypeMethodDescriptiongetName()intloadLibrary(String soName, int loadFlags, android.os.StrictMode.ThreadPolicy threadPolicy) Load a shared library library into this process.booleanpeekAndPrepareSoSource(String soName, int prepareFlags) voidprepare(int flags) Verify or refresh the state of the shared library store.recover(android.content.Context context) toString()Return the class name of the actual instance.Methods inherited from class com.facebook.soloader.UnpackingSoSource
getLibraryPath, getSoSourceAbis, getSoStorePath, setSoSourceAbis, waitUntilInitCompletedMethods inherited from class com.facebook.soloader.DirectorySoSource
addToLdLibraryPath, getLibraryDependencies, getSoFileByName, setExplicitDependencyResolution, unpackLibrary
-
Constructor Details
-
BackupSoSource
-
BackupSoSource
-
-
Method Details
-
getName
- Overrides:
getNamein classDirectorySoSource- Returns:
- the name of this SoSource for logging purposes
-
loadLibrary
public int loadLibrary(String soName, int loadFlags, android.os.StrictMode.ThreadPolicy threadPolicy) throws IOException Description copied from class:SoSourceLoad a shared library library into this process. This routine is independent ofSoSource.loadLibrary(java.lang.String, int, android.os.StrictMode.ThreadPolicy).- Overrides:
loadLibraryin classDirectorySoSource- Parameters:
soName- Name of library to loadloadFlags- Zero or more of the LOAD_FLAG_XXX constants.threadPolicy- Strict Mode policy- Returns:
- One of the LOAD_RESULT_XXX constants.
- Throws:
IOException- IOException
-
prepare
Description copied from class:UnpackingSoSourceVerify or refresh the state of the shared library store.- Overrides:
preparein classUnpackingSoSource- Throws:
IOException
-
peekAndPrepareSoSource
- Throws:
IOException
-
getDsosBaseApk
- Overrides:
getDsosBaseApkin classUnpackingSoSource- Throws:
IOException
-
recover
- Specified by:
recoverin interfaceRecoverableSoSource
-
toString
Description copied from class:SoSourceReturn the class name of the actual instance. Useful for debugging.- Overrides:
toStringin classDirectorySoSource- Returns:
- the instance class name
-