def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("Open Vision information")) OpenVisionInformationText = _("Open Vision information") + "\n" OpenVisionInformationText += "\n" if config.misc.OVupdatecheck.value is True: try: if boxbranding.getVisionVersion().startswith("10"): ovurl = "https://raw.githubusercontent.com/OpenVisionE2/openvision-development-platform/python3/meta-openvision/conf/distro/revision.conf" else: ovurl = "https://raw.githubusercontent.com/OpenVisionE2/openvision-oe/develop/meta-openvision/conf/distro/revision.conf" ovresponse = urllib.request.urlopen(ovurl) ovrevision = ovresponse.read().decode() ovrevisionupdate = ovrevision.split('r')[1][:3] except Exception as e: ovrevisionupdate = _("Requires internet connection") else: ovrevisionupdate = _("Disabled in configuration") if fileExists("/etc/openvision/visionversion"): visionversion = open("/etc/openvision/visionversion", "r").read().strip() OpenVisionInformationText += _("Open Vision version: ") + visionversion + "\n" else: OpenVisionInformationText += _("Open Vision version: ") + boxbranding.getVisionVersion() + "\n" if fileExists("/etc/openvision/visionrevision"): visionrevision = open("/etc/openvision/visionrevision", "r").read().strip() OpenVisionInformationText += _("Open Vision revision: ") + visionrevision + " " + _("(Latest revision on github: ") + str(ovrevisionupdate) + ")" + "\n" else: OpenVisionInformationText += _("Open Vision revision: ") + boxbranding.getVisionRevision() + " " + _("(Latest revision on github: ") + str(ovrevisionupdate) + ")" + "\n" if fileExists("/etc/openvision/visionlanguage"): visionlanguage = open("/etc/openvision/visionlanguage", "r").read().strip() OpenVisionInformationText += _("Open Vision language: ") + visionlanguage + "\n" OpenVisionInformationText += _("Open Vision module: ") + about.getVisionModule() + "\n" OpenVisionInformationText += _("Flash type: ") + about.getFlashType() + "\n" OpenVisionInformationText += "\n" boxrctype = getBoxRCType() if boxrctype is not None and boxrctype != "unknown": OpenVisionInformationText += _("Factory RC type: ") + boxrctype + "\n" if boxrctype is not None and boxrctype == "unknown": if fileExists("/usr/bin/remotecfg"): OpenVisionInformationText += _("RC type: ") + _("Amlogic remote") + "\n" elif fileExists("/usr/sbin/lircd"): OpenVisionInformationText += _("RC type: ") + _("LIRC remote") + "\n" OpenVisionInformationText += _("Open Vision RC type: ") + boxbranding.getRCType() + "\n" OpenVisionInformationText += _("Open Vision RC name: ") + boxbranding.getRCName() + "\n" OpenVisionInformationText += _("Open Vision RC ID number: ") + boxbranding.getRCIDNum() + "\n" OpenVisionInformationText += "\n" if SystemInfo["HiSilicon"]: OpenVisionInformationText += _("HiSilicon dedicated information") + "\n" grab = os.popen("opkg list-installed | grep -- -grab | cut -f4 -d'-'").read().strip() if grab != "" and grab != "r0": OpenVisionInformationText += _("Grab: ") + grab + "\n" hihalt = os.popen("opkg list-installed | grep -- -hihalt | cut -f4 -d'-'").read().strip() if hihalt != "": OpenVisionInformationText += _("Halt: ") + hihalt + "\n" libs = os.popen("opkg list-installed | grep -- -libs | cut -f4 -d'-'").read().strip() if libs != "": OpenVisionInformationText += _("Libs: ") + libs + "\n" partitions = os.popen("opkg list-installed | grep -- -partitions | cut -f4 -d'-'").read().strip() if partitions != "": OpenVisionInformationText += _("Partitions: ") + partitions + "\n" reader = os.popen("opkg list-installed | grep -- -reader | cut -f4 -d'-'").read().strip() if reader != "": OpenVisionInformationText += _("Reader: ") + reader + "\n" showiframe = os.popen("opkg list-installed | grep -- -showiframe | cut -f4 -d'-'").read().strip() if showiframe != "": OpenVisionInformationText += _("Showiframe: ") + showiframe + "\n" OpenVisionInformationText += "\n" OpenVisionInformationText += _("Image architecture: ") + boxbranding.getImageArch() + "\n" if boxbranding.getImageFolder() != "": OpenVisionInformationText += _("Image folder: ") + boxbranding.getImageFolder() + "\n" if boxbranding.getImageFileSystem() != "": OpenVisionInformationText += _("Image file system: ") + boxbranding.getImageFileSystem() + "\n" OpenVisionInformationText += _("Image: ") + boxbranding.getImageDistro() + "\n" OpenVisionInformationText += _("Feed URL: ") + boxbranding.getFeedsUrl() + "\n" OpenVisionInformationText += _("Compiled by: ") + boxbranding.getDeveloperName() + "\n" OpenVisionInformationText += _("Build date: ") + about.getBuildDateString() + "\n" OpenVisionInformationText += _("OE: ") + boxbranding.getImageBuild() + "\n" OpenVisionInformationText += "\n" if boxbranding.getImageFPU() != "": OpenVisionInformationText += _("FPU: ") + boxbranding.getImageFPU() + "\n" if boxbranding.getImageArch() == "aarch64": if boxbranding.getHaveMultiLib() == "True": OpenVisionInformationText += _("MultiLib: ") + _("Yes") + "\n" else: OpenVisionInformationText += _("MultiLib: ") + _("No") + "\n" OpenVisionInformationText += "\n" if boxbranding.getMachineMtdBoot() != "": OpenVisionInformationText += _("MTD boot: ") + boxbranding.getMachineMtdBoot() + "\n" if boxbranding.getMachineMtdRoot() != "": OpenVisionInformationText += _("MTD root: ") + boxbranding.getMachineMtdRoot() + "\n" if boxbranding.getMachineMtdKernel() != "": OpenVisionInformationText += _("MTD kernel: ") + boxbranding.getMachineMtdKernel() + "\n" if boxbranding.getMachineRootFile() != "": OpenVisionInformationText += _("Root file: ") + boxbranding.getMachineRootFile() + "\n" if boxbranding.getMachineKernelFile() != "": OpenVisionInformationText += _("Kernel file: ") + boxbranding.getMachineKernelFile() + "\n" if boxbranding.getMachineMKUBIFS() != "": OpenVisionInformationText += _("MKUBIFS: ") + boxbranding.getMachineMKUBIFS() + "\n" if boxbranding.getMachineUBINIZE() != "": OpenVisionInformationText += _("UBINIZE: ") + boxbranding.getMachineUBINIZE() + "\n" OpenVisionInformationText += "\n" if fileExists("/proc/device-tree/amlogic-dt-id"): devicetid = open("/proc/device-tree/amlogic-dt-id", "r").read().strip() OpenVisionInformationText += _("Device id: ") + devicetid + "\n" if fileExists("/proc/device-tree/le-dt-id"): giventid = open("/proc/device-tree/le-dt-id", "r").read().strip() OpenVisionInformationText += _("Given device id: ") + giventid + "\n" self["AboutScrollLabel"] = ScrollLabel(OpenVisionInformationText) self["key_red"] = Button(_("Close")) self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
print("getHaveSCART%s<" %boxbranding.getHaveSCART()) print("getHaveSCARTYUV%s<" %boxbranding.getHaveSCARTYUV()) print("getHaveDVI%s<" %boxbranding.getHaveDVI()) print("getHaveMiniTV%s<" %boxbranding.getHaveMiniTV()) print("getHaveHDMIinHD%s<" %boxbranding.getHaveHDMIinHD()) print("getHaveHDMIinFHD%s<" %boxbranding.getHaveHDMIinFHD()) print("getHaveWOL%s<" %boxbranding.getHaveWOL()) print("getHaveWWOL%s<" %boxbranding.getHaveWWOL()) print("getHaveTranscoding1%s<" %boxbranding.getHaveTranscoding1()) print("getHaveTranscoding2%s<" %boxbranding.getHaveTranscoding2()) print("getHaveCI%s<" %boxbranding.getHaveCI()) print("getOpenFIXVersion=%s<" %boxbranding.getOpenFIXVersion()) print("getOpenFIXRevision=%s<" %boxbranding.getOpenFIXRevision()) print("getDeveloperName=%s<" %boxbranding.getDeveloperName()) print("getBoxBrand=%s<" %boxbranding.getBoxBrand()) print("getMachineMtdBoot=%s<" %boxbranding.getMachineMtdBoot()) print("getForceMode=%s<" %boxbranding.getForceMode()) print("getImageFPU=%s<" %boxbranding.getImageFPU()) print("getHaveSmallFlash=%s<" %boxbranding.getHaveSmallFlash()) print("getHaveMiddleFlash=%s<" %boxbranding.getHaveMiddleFlash()) print("getHaveTranscoding=%s<" %boxbranding.getHaveTranscoding()) print("getHaveMultiTranscoding=%s<" %boxbranding.getHaveMultiTranscoding()) print("getHaveMultiLib=%s<" %boxbranding.getHaveMultiLib()) print("getHaveSVIDEO=%s<" %boxbranding.getHaveSVIDEO()) print("getBlindscanBin=%s<" %boxbranding.getBlindscanBin()) print("getSoCFamily=%s<" %boxbranding.getSoCFamily()) print("getHaveVFDSymbol=%s<" %boxbranding.getHaveVFDSymbol()) print("getKernelVersion=%s<" %boxbranding.getKernelVersion()) print("getRCType=%s<" %boxbranding.getRCType()) print("getRCName=%s<" %boxbranding.getRCName()) print("getRCIDNum=%s<" %boxbranding.getRCIDNum())
import os from os import path import glob import struct from Components.Console import Console from boxbranding import getBoxBrand, getImageDistro, getImageVersion, getImageFileSystem, getImageFolder, getMachineMtdKernel, getMachineKernelFile, getMachineMtdBoot, getMachineMtdRoot, getMachineRootFile, getMachineMKUBIFS, getMachineUBINIZE OMB_GETBOXTYPE = getBoxType() OMB_GETBRANDOEM = getBoxBrand() OMB_GETIMAGEDISTRO = getImageDistro() OMB_GETIMAGEVERSION = getImageVersion() OMB_GETIMAGEFILESYSTEM = getImageFileSystem() # needed OMB_GETIMAGEFOLDER = getImageFolder() # needed OMB_GETMACHINEMTDKERNEL = getMachineMtdKernel() OMB_GETMACHINEKERNELFILE = getMachineKernelFile() # needed OMB_GETMACHINEMTDBOOT = getMachineMtdBoot() OMB_GETMACHINEMTDROOT = getMachineMtdRoot() OMB_GETMACHINEROOTFILE = getMachineRootFile() # needed OMB_GETMACHINEMKUBIFS = getMachineMKUBIFS() OMB_GETMACHINEUBINIZE = getMachineUBINIZE() class OMBManagerInstall(Screen): skin = """ <screen position="360,150" size="560,400"> <widget name="info" position="10,10" size="540,50" font="Regular;18" zPosition="1" /> <widget source="list"