added a bypass for INSTALL_FAILED_VERSION_DOWNGRADE

This commit is contained in:
Shane Harris
2022-08-05 07:57:05 +02:00
parent c38e48769a
commit aac4f76723
+2 -2
View File
@@ -647,8 +647,8 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
}
let er = e.message ? e.message : e.code ? e.code : e.reason ? e.reason : e.toString();
if (
er.indexOf('INSTALL_FAILED_UPDATE_INCOMPATIBLE') > -1 &&
er.indexOf('com.oculus.environment.prod.') > -1
(er.includes('INSTALL_FAILED_UPDATE_INCOMPATIBLE') && er.includes('com.oculus.environment.prod.')) ||
er.includes('INSTALL_FAILED_VERSION_DOWNGRADE')
) {
let match = er.match(/([A-Za-z]*[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*/gm);
await this.adbCommand('uninstall', { serial: this.deviceSerial, packageName: match[0] });