Remove randomness from Magisk

This commit is contained in:
topjohnwu
2023-06-14 17:05:49 -07:00
parent 9d6f6764cb
commit d7d0a44693
7 changed files with 19 additions and 58 deletions

View File

@@ -190,17 +190,13 @@ static void extract_files(bool sbin) {
}
void MagiskInit::parse_config_file() {
uint64_t seed = 0;
parse_prop_file("/data/.backup/.magisk", [&](auto key, auto value) -> bool {
if (key == "PREINITDEVICE") {
preinit_dev = value;
} else if (key == "RANDOMSEED") {
value.remove_prefix(2); // 0x
seed = parse_uint64_hex(value);
return false;
}
return true;
});
get_rand(&seed);
}
#define ROOTMIR MIRRDIR "/system_root"