create block map for all update packages on /data
Always create the block map for packages on /data; don't only look at the encryptable/encrypted flags. Bug: 17395453 Change-Id: Iaa7643a32898328277841e324305b9419a9e071c
This commit is contained in:
+9
-12
@@ -160,8 +160,6 @@ char* parse_recovery_command_file()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
char temp[1024];
|
char temp[1024];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE* f = fopen(RECOVERY_COMMAND_FILE, "r");
|
FILE* f = fopen(RECOVERY_COMMAND_FILE, "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -405,16 +403,15 @@ int main(int argc, char** argv)
|
|||||||
ALOGI("encryptable: %s\n", encryptable ? "yes" : "no");
|
ALOGI("encryptable: %s\n", encryptable ? "yes" : "no");
|
||||||
ALOGI(" encrypted: %s\n", encrypted ? "yes" : "no");
|
ALOGI(" encrypted: %s\n", encrypted ? "yes" : "no");
|
||||||
|
|
||||||
if (!encryptable) {
|
// Recovery supports installing packages from 3 paths: /cache,
|
||||||
// If the file is on a filesystem that doesn't support
|
// /data, and /sdcard. (On a particular device, other locations
|
||||||
// encryption (eg, /cache), then leave it alone.
|
// may work, but those are three we actually expect.)
|
||||||
//
|
//
|
||||||
// TODO: change this to be !encrypted -- if the file is on
|
// On /data we want to convert the file to a block map so that we
|
||||||
// /data but /data isn't encrypted, we don't need to use the
|
// can read the package without mounting the partition. On /cache
|
||||||
// block map mechanism. We do for now so as to get more
|
// and /sdcard we leave the file alone.
|
||||||
// testing of it (since most dogfood devices aren't
|
if (strncmp(path, "/data/", 6) != 0) {
|
||||||
// encrypted).
|
// path does not start with "/data/"; leave it alone.
|
||||||
|
|
||||||
unlink(RECOVERY_COMMAND_FILE_TMP);
|
unlink(RECOVERY_COMMAND_FILE_TMP);
|
||||||
} else {
|
} else {
|
||||||
ALOGI("writing block map %s", map_file);
|
ALOGI("writing block map %s", map_file);
|
||||||
|
|||||||
Reference in New Issue
Block a user