Commit 4ba06182 authored by nkk71's avatar nkk71
Browse files

Remove range_sha1 check on block partition(s)

* some installer-scripts are using "if range_sha1("/dev/block/platform/msm_sdcc.1/by-name/system",...) == "<sha1_hash>" then ..." which obviously breaks multirom rom flashing to secondary since this condition will always be false
* workaround -> remove the check and let it always be true
parent 09e43081
......@@ -520,6 +520,33 @@ bool EdifyHacker::writeToFile(const std::string& path)
for(std::list<EdifyElement*>::iterator itr = m_elements.begin(); itr != m_elements.end(); ++itr)
(*itr)->write(f);
fclose(f);
{
// get rid of 'range_sha1' checks on
// the system partition used by newer
// installer-scripts, such as CM13 & other
// Andorid 6 (Marshmallow) builds
// i'm sure there's a more elegant way
// but this will have to suffice for the
// time being
char strSEDcmd[250];
#define SED_CMD "sed -i "
#define SED_P1 "'s/"
#define SED_P2 "range_sha1.*(.*\\/dev\\/block\\/.*).*==.*\".*\""
#define SED_P3 "/"
#define SED_P4 "\\/sbin\\/true"
#define SED_P5 "/'"
#define SED_FULL SED_CMD SED_P1 SED_P2 SED_P3 SED_P4 SED_P5
sprintf (strSEDcmd, "echo About to execute:%s %s", SED_FULL, path.c_str());
system (strSEDcmd);
sprintf (strSEDcmd, "%s %s", SED_FULL, path.c_str());
system (strSEDcmd);
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment