Loading src/Helpers/Build.php +11 −11 Original line number Diff line number Diff line Loading @@ -71,12 +71,12 @@ LINEAGE => [SIGNED] (ex. signed) ) */ preg_match_all('/(cm|lineage|eelo|e)-([0-9\.]+)-\D?-?([\d_]+)?-([\w+]+)-([A-Za-z0-9]+)?-?([\w+]+)?/', $fileName, $tokens); preg_match_all('/(e)-([0-9\.]+)-?((alpha|beta|rc)(\.\d)?)?-\D-?([\d_]+)?-([\w+]+)-([A-Za-z0-9]+)?-?([\w+]+)?/', $fileName, $tokens); $this->filePath = (substr($physicalPath, -1) === '/') ? $physicalPath . $fileName : $physicalPath . '/' . $fileName; $tokens = $this->formatTokens($tokens); $this->migrationFilePath = $physicalPath . '/migration_paths.json'; $this->channel = $this->_getChannel(str_replace(range(0, 9), '', $tokens[4]), $tokens[1], $tokens[2]); $this->channel = $this->_getChannel(str_replace(range(0, 9), '', $tokens[7]), $tokens[1], $tokens[2]); $this->filename = $fileName; // Try to load the build.prop from two possible paths: Loading @@ -88,7 +88,7 @@ $this->timestamp = intval($this->getBuildPropValue('ro.build.date.utc') ?? filemtime($this->filePath)); $this->incremental = $this->getBuildPropValue('ro.build.version.incremental') ?? ''; $this->apiLevel = $this->getBuildPropValue('ro.build.version.sdk') ?? ''; $this->model = $this->getBuildPropValue('ro.lineage.device') ?? $this->getBuildPropValue('ro.cm.device') ?? ($tokens[1] == 'cm' ? $tokens[6] : $tokens[5]); $this->model = $this->getBuildPropValue('ro.lineage.device') ?? $this->getBuildPropValue('ro.cm.device') ?? ($tokens[1] == 'cm' ? $tokens[9] : $tokens[8]); $this->version = $tokens[2]; $this->displayVersion = $this->getBuildPropValue('ro.cm.display.version') ?? $this->getBuildPropValue('ro.lineage.display.version') ?? ''; $this->androidVersion = $this->getBuildPropValue('ro.build.version.release') ?? ''; Loading Loading
src/Helpers/Build.php +11 −11 Original line number Diff line number Diff line Loading @@ -71,12 +71,12 @@ LINEAGE => [SIGNED] (ex. signed) ) */ preg_match_all('/(cm|lineage|eelo|e)-([0-9\.]+)-\D?-?([\d_]+)?-([\w+]+)-([A-Za-z0-9]+)?-?([\w+]+)?/', $fileName, $tokens); preg_match_all('/(e)-([0-9\.]+)-?((alpha|beta|rc)(\.\d)?)?-\D-?([\d_]+)?-([\w+]+)-([A-Za-z0-9]+)?-?([\w+]+)?/', $fileName, $tokens); $this->filePath = (substr($physicalPath, -1) === '/') ? $physicalPath . $fileName : $physicalPath . '/' . $fileName; $tokens = $this->formatTokens($tokens); $this->migrationFilePath = $physicalPath . '/migration_paths.json'; $this->channel = $this->_getChannel(str_replace(range(0, 9), '', $tokens[4]), $tokens[1], $tokens[2]); $this->channel = $this->_getChannel(str_replace(range(0, 9), '', $tokens[7]), $tokens[1], $tokens[2]); $this->filename = $fileName; // Try to load the build.prop from two possible paths: Loading @@ -88,7 +88,7 @@ $this->timestamp = intval($this->getBuildPropValue('ro.build.date.utc') ?? filemtime($this->filePath)); $this->incremental = $this->getBuildPropValue('ro.build.version.incremental') ?? ''; $this->apiLevel = $this->getBuildPropValue('ro.build.version.sdk') ?? ''; $this->model = $this->getBuildPropValue('ro.lineage.device') ?? $this->getBuildPropValue('ro.cm.device') ?? ($tokens[1] == 'cm' ? $tokens[6] : $tokens[5]); $this->model = $this->getBuildPropValue('ro.lineage.device') ?? $this->getBuildPropValue('ro.cm.device') ?? ($tokens[1] == 'cm' ? $tokens[9] : $tokens[8]); $this->version = $tokens[2]; $this->displayVersion = $this->getBuildPropValue('ro.cm.display.version') ?? $this->getBuildPropValue('ro.lineage.display.version') ?? ''; $this->androidVersion = $this->getBuildPropValue('ro.build.version.release') ?? ''; Loading