Files
tononixOS_application_krnlu…/lib/libAndroidDevices.php

37 lines
925 B
PHP

<?php
class AndroidDevice
{
/**
* @name __getBootSlot
* @param void
* @description Attempts to determine the current bootslot for Treble compatibile devices.
* @return false The system is not a treble compatible device
* @return a|b System Bootslot
*/
public static function __getBootSlot()
{
if(empty(`which getprop`))
{
return false;
}
$bootSlot = trim(`getprop ro.boot.slot_suffix`);
if(empty($bootSlot))
{
return false;
}
return $bootSlot;
}
public static function __getDeviceInfo()
{
if(empty(`which getprop`))
{
return false;
}
$device = array("device_name" => trim(`getprop ro.product.vendor.name`),
"device_manufacturer" => trim(`getprop ro.product.vendor.manufacturer`));
return $device;
}
}