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: TeamWin@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
  • Loading branch information
AndroiableDroid committed Jun 9, 2020
1 parent 314cbd5 commit bcbe94e
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 @@ -1103,6 +1103,14 @@ void DataManager::Output_Version(void)
}
}

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";
if (TWFunc::Path_Exists(verPath)) {
unlink(verPath.c_str());
Expand Down

0 comments on commit bcbe94e

Please sign in to comment.