Skip to content

Commit

Permalink
fix flashing issue after restore policy issue
Browse files Browse the repository at this point in the history
 * since commit: a2bd7b7
   after factory reset /data/recovery doesn't recreates in A-only devices.

 * so fixes issue flashing newer roms need access to /data/recovery

Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: I02cb67f7161571b1aa02784049231d42872a3587
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
  • Loading branch information
AndroiableDroid committed Jun 10, 2020
1 parent 314cbd5 commit 3754fab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,14 @@ void DataManager::Output_Version(void)
LOGINFO("Unable to mount '%s' to write version number.\n", Path.c_str());
return;
}

if (!TWFunc::Path_Exists(recoveryCacheDir)) {
LOGINFO("Recreating %s folder.\n", recoveryCacheDir.c_str());
if (!TWFunc::Create_Dir_Recursive(recoveryCacheDir.c_str(), S_IRWXU | S_IRWXG | S_IWGRP | S_IXGRP, 0, 0)) {
LOGERR("DataManager::Output_Version -- Unable to make %s: %s\n", recoveryCacheDir.c_str(), strerror(errno));
return;
}
}
}

std::string verPath = recoveryCacheDir + ".version";
Expand Down

0 comments on commit 3754fab

Please sign in to comment.