Loading src/Helpers/Build.php +11 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ // Try to load the build.prop from two possible paths: // - builds/CURRENT_ZIP_FILE.zip/system/build.prop // - builds/CURRENT_ZIP_FILE.zip.prop ( which must exist ) $this->buildProp = explode( "\n", @file_get_contents('zip://'.$this->filePath.'#system/build.prop') ?? @file_get_contents($filePath.'.prop') ); $this->buildProp = explode( "\n", @file_get_contents($this->getPropFilePath())); // Try to fetch build.prop values. In some cases, we can provide a fallback, in other a null value will be given $this->timestamp = intval( $this->getBuildPropValue( 'ro.build.date.utc' ) ?? filemtime($this->filePath) ); $this->incremental = $this->getBuildPropValue( 'ro.build.version.incremental' ) ?? ''; Loading Loading @@ -258,6 +258,16 @@ /* Utility / Internal */ /** * Return the correct prop file path (depending of version) * @return boolean */ private function getPropFilePath() { return file_exists($this->filePath.'.prop') ? $this->filePath.'.prop' : 'zip://'.$this->filePath.'#system/build.prop'; } /** * Remove trailing dashes * @param type $token The string where to do the operation Loading Loading
src/Helpers/Build.php +11 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ // Try to load the build.prop from two possible paths: // - builds/CURRENT_ZIP_FILE.zip/system/build.prop // - builds/CURRENT_ZIP_FILE.zip.prop ( which must exist ) $this->buildProp = explode( "\n", @file_get_contents('zip://'.$this->filePath.'#system/build.prop') ?? @file_get_contents($filePath.'.prop') ); $this->buildProp = explode( "\n", @file_get_contents($this->getPropFilePath())); // Try to fetch build.prop values. In some cases, we can provide a fallback, in other a null value will be given $this->timestamp = intval( $this->getBuildPropValue( 'ro.build.date.utc' ) ?? filemtime($this->filePath) ); $this->incremental = $this->getBuildPropValue( 'ro.build.version.incremental' ) ?? ''; Loading Loading @@ -258,6 +258,16 @@ /* Utility / Internal */ /** * Return the correct prop file path (depending of version) * @return boolean */ private function getPropFilePath() { return file_exists($this->filePath.'.prop') ? $this->filePath.'.prop' : 'zip://'.$this->filePath.'#system/build.prop'; } /** * Remove trailing dashes * @param type $token The string where to do the operation Loading