sdm660: whyred: libinit: Set product model dynamically
Change-Id: I4f67e7025ea2a3b566fd7871e9f86dfa93c79c2a
This commit is contained in:
parent
10e587e287
commit
cfc35d0d26
1 changed files with 18 additions and 0 deletions
|
@ -94,4 +94,22 @@ void vendor_load_persist_properties()
|
||||||
property_override_dual("ro.product.model", "ro.vendor.product.model", "MI PAD 4");
|
property_override_dual("ro.product.model", "ro.vendor.product.model", "MI PAD 4");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (product.find("whyred") != std::string::npos) {
|
||||||
|
|
||||||
|
std::ifstream fin;
|
||||||
|
std::string buf;
|
||||||
|
|
||||||
|
fin.open("/proc/cmdline");
|
||||||
|
while (std::getline(fin, buf, ' '))
|
||||||
|
if (buf.find("androidboot.hwc") != std::string::npos)
|
||||||
|
break;
|
||||||
|
fin.close();
|
||||||
|
|
||||||
|
if (buf.find("CN") != std::string::npos || buf.find("Global") != std::string::npos) {
|
||||||
|
property_override_dual("ro.product.model", "ro.vendor.product.model", "Redmi Note 5");
|
||||||
|
} else {
|
||||||
|
property_override_dual("ro.product.model", "ro.vendor.product.model", "Redmi Note 5 Pro");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue