public class FullBackup extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FullBackup.BackupScheme |
Modifier and Type | Field and Description |
---|---|
static String |
APK_TREE_TOKEN |
static String |
APPS_PREFIX |
static String |
CACHE_TREE_TOKEN |
static String |
CONF_TOKEN_INTENT_EXTRA |
static String |
DATABASE_TREE_TOKEN |
static String |
DEVICE_CACHE_TREE_TOKEN |
static String |
DEVICE_DATABASE_TREE_TOKEN |
static String |
DEVICE_FILES_TREE_TOKEN |
static String |
DEVICE_NO_BACKUP_TREE_TOKEN |
static String |
DEVICE_ROOT_TREE_TOKEN |
static String |
DEVICE_SHAREDPREFS_TREE_TOKEN |
static String |
FILES_TREE_TOKEN |
static String |
FULL_BACKUP_INTENT_ACTION |
static String |
FULL_RESTORE_INTENT_ACTION |
static String |
MANAGED_EXTERNAL_TREE_TOKEN |
static String |
NO_BACKUP_TREE_TOKEN |
static String |
OBB_TREE_TOKEN |
static String |
ROOT_TREE_TOKEN |
static String |
SHARED_PREFIX |
static String |
SHARED_STORAGE_TOKEN |
static String |
SHAREDPREFS_TREE_TOKEN |
Constructor and Description |
---|
FullBackup() |
Modifier and Type | Method and Description |
---|---|
static int |
backupToTar(String packageName,
String domain,
String linkdomain,
String rootpath,
String path,
FullBackupDataOutput output) |
static FullBackup.BackupScheme |
getBackupSchemeForTest(Context context) |
static void |
restoreFile(ParcelFileDescriptor data,
long size,
int type,
long mode,
long mtime,
File outFile)
Copy data from a socket to the given File location on permanent storage.
|
public static final String APK_TREE_TOKEN
public static final String OBB_TREE_TOKEN
public static final String ROOT_TREE_TOKEN
public static final String FILES_TREE_TOKEN
public static final String NO_BACKUP_TREE_TOKEN
public static final String DATABASE_TREE_TOKEN
public static final String SHAREDPREFS_TREE_TOKEN
public static final String CACHE_TREE_TOKEN
public static final String DEVICE_ROOT_TREE_TOKEN
public static final String DEVICE_FILES_TREE_TOKEN
public static final String DEVICE_NO_BACKUP_TREE_TOKEN
public static final String DEVICE_DATABASE_TREE_TOKEN
public static final String DEVICE_SHAREDPREFS_TREE_TOKEN
public static final String DEVICE_CACHE_TREE_TOKEN
public static final String MANAGED_EXTERNAL_TREE_TOKEN
public static final String SHARED_STORAGE_TOKEN
public static final String APPS_PREFIX
public static final String SHARED_PREFIX
public static final String FULL_BACKUP_INTENT_ACTION
public static final String FULL_RESTORE_INTENT_ACTION
public static final String CONF_TOKEN_INTENT_EXTRA
public static int backupToTar(String packageName, String domain, String linkdomain, String rootpath, String path, FullBackupDataOutput output)
public static FullBackup.BackupScheme getBackupSchemeForTest(Context context)
public static void restoreFile(ParcelFileDescriptor data, long size, int type, long mode, long mtime, File outFile) throws IOException
type
parameter indicates that the result should be a directory,
the socket parameter may be null
; even if it is valid, no data will be
read from it in this case.
If the mode
argument is negative, then the resulting output file will not
have its access mode or last modification time reset as part of this operation.
data
- Socket supplying the data to be copied to the output file. If the
output is a directory, this may be null
.size
- Number of bytes of data to copy from the socket to the file. At least
this much data must be available through the data
parameter.type
- Must be either BackupAgent.TYPE_FILE
for ordinary file data
or BackupAgent.TYPE_DIRECTORY
for a directory.mode
- Unix-style file mode (as used by the chmod(2) syscall) to be set on
the output file or directory. group/all rwx modes are stripped even if set
in this parameter. If this parameter is negative then neither
the mode nor the mtime values will be applied to the restored file.mtime
- A timestamp in the standard Unix epoch that will be imposed as the
last modification time of the output file. if the mode
parameter is
negative then this parameter will be ignored.outFile
- Location within the filesystem to place the data. This must point
to a location that is writeable by the caller, preferably using an absolute path.IOException