Loading src/Helpers/Build.php +10 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ private $filePath = ''; private $buildProp = ''; private $uid = null; private $size = ''; /** * Constructor of the Build class. Loading Loading @@ -83,6 +84,7 @@ $this->model = $this->getBuildPropValue( 'ro.lineage.device' ) ?? $this->getBuildPropValue( 'ro.cm.device' ) ?? ( $tokens[1] == 'cm' ? $tokens[6] : $tokens[5] ); $this->version = $tokens[2]; $this->uid = hash( 'sha256', $this->timestamp.$this->model.$this->apiLevel, false ); $this->size = filesize($this->filePath); $position = strrpos( $physicalPath, '/builds/full' ); if ( $position === FALSE ) Loading Loading @@ -162,6 +164,14 @@ /* Getters */ /** * Get filesize of the current build * @return string filesize in bytes */ public function getSize() { return $this->size; } /** * Get a unique id of the current build * @return string A unique id Loading src/Helpers/Builds.php +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ 'datetime' => $build->getTimestamp(), 'version' => $build->getVersion(), 'id' => $build->getUid(), 'size' => $build->getSize(), )); } Loading Loading
src/Helpers/Build.php +10 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ private $filePath = ''; private $buildProp = ''; private $uid = null; private $size = ''; /** * Constructor of the Build class. Loading Loading @@ -83,6 +84,7 @@ $this->model = $this->getBuildPropValue( 'ro.lineage.device' ) ?? $this->getBuildPropValue( 'ro.cm.device' ) ?? ( $tokens[1] == 'cm' ? $tokens[6] : $tokens[5] ); $this->version = $tokens[2]; $this->uid = hash( 'sha256', $this->timestamp.$this->model.$this->apiLevel, false ); $this->size = filesize($this->filePath); $position = strrpos( $physicalPath, '/builds/full' ); if ( $position === FALSE ) Loading Loading @@ -162,6 +164,14 @@ /* Getters */ /** * Get filesize of the current build * @return string filesize in bytes */ public function getSize() { return $this->size; } /** * Get a unique id of the current build * @return string A unique id Loading
src/Helpers/Builds.php +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ 'datetime' => $build->getTimestamp(), 'version' => $build->getVersion(), 'id' => $build->getUid(), 'size' => $build->getSize(), )); } Loading