Port Wallace Toolbox and Project Lycan Qualcomm features to engmenu
This commit is contained in:
1 parent
8ae2dd3b39
commit
6d31efd796
20 files changed
+2021
-132
No files matched your search
+840
-126
File diff suppressed because it is too large.
Load diff
@@ -2596,12 +2596,31 @@ inline DeviceImeis queryDeviceImeis() {
|
||||
return cachedDuress;
|
||||
}
|
||||
|
||||
const char* kOverrideImeiFile = "/tmp/bananarchy_imei_override";
|
||||
std::string ovrImei1;
|
||||
std::string ovrImei2;
|
||||
{
|
||||
std::ifstream oin(kOverrideImeiFile);
|
||||
std::string oline;
|
||||
while (std::getline(oin, oline)) {
|
||||
if (oline.rfind("IMEI1=", 0) == 0) {
|
||||
ovrImei1 = trimStr(oline.substr(6));
|
||||
} else if (oline.rfind("IMEI2=", 0) == 0) {
|
||||
ovrImei2 = trimStr(oline.substr(6));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cached.imei1.empty() && !cached.imei2.empty()) {
|
||||
if (!ovrImei1.empty()) cached.imei1 = ovrImei1;
|
||||
if (!ovrImei2.empty()) cached.imei2 = ovrImei2;
|
||||
return cached;
|
||||
}
|
||||
|
||||
DeviceImeis res = cached;
|
||||
queryQrtrDmsImeis(res);
|
||||
if (!ovrImei1.empty()) res.imei1 = ovrImei1;
|
||||
if (!ovrImei2.empty()) res.imei2 = ovrImei2;
|
||||
|
||||
if (res.imei1.empty() || res.imei2.empty()) {
|
||||
std::string helperOut = runCaptureCmd(
|
||||
|
||||
Reference in new issue
Block a user