Skip to content
Snippets Groups Projects
initialize.sh 2.03 KiB
Newer Older
  • Learn to ignore specific revisions
  • zycromerz's avatar
    zycromerz committed
    #!/system/bin/sh
    #
    
    zycromerz's avatar
    zycromerz committed
    # Copyright (C) 2022 ZyCromerZ
    
    zycromerz's avatar
    zycromerz committed
    # SPDX-License-Identifier: GPL-3.0-or-later
    #
    
    ## just get somethings
    
    zycromerz's avatar
    zycromerz committed
    MiD="$(cat /system/etc/ZyC-Core/info/modules_id.info)"
    
    zycromerz's avatar
    zycromerz committed
    MPATH="$(cat /system/etc/ZyC-Core/info/magisk_path)/$MiD"
    
    zycromerz's avatar
    zycromerz committed
    PMConfig="$MPATH/system/etc/ZyC-Core/configs"
    
    zycromerz's avatar
    zycromerz committed
    LOGs=$MPATH/system/etc/ZyC-Core/info/logs.log
    LOGsE=$MPATH/system/etc/ZyC-Core/info/logs_error.log
    RLOGsE=$MPATH/system/etc/ZyC-Core/info/logs_error.log
    
    # MODULE_STATUS="$(cat $MPATH/system/etc/ZyC-Core/configs/status.conf)"
    MODULE_STATUS="1"
    
    zycromerz's avatar
    zycromerz committed
    
    
    zycromerz's avatar
    zycromerz committed
    MALIGPU="n"
    TypeGpu='Undetected / Unknow'
    
    zycromerz's avatar
    zycromerz committed
    if [[ -d /sys/class/kgsl/kgsl-3d0 ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU="/sys/class/kgsl/kgsl-3d0"
        TypeGpu="Adreno"
    
    zycromerz's avatar
    zycromerz committed
    elif [[ -d /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0 ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0"
        TypeGpu="Adreno"
    
    zycromerz's avatar
    zycromerz committed
    elif [[ -d /sys/devices/soc/*.qcom,kgsl-3d0/kgsl/kgsl-3d0 ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU="/sys/devices/soc/*.qcom,kgsl-3d0/kgsl/kgsl-3d0"
        TypeGpu="Adreno"
    
    zycromerz's avatar
    zycromerz committed
    elif [[ -d /sys/devices/soc.0/*.qcom,kgsl-3d0/kgsl/kgsl-3d0 ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU="/sys/devices/soc.0/*.qcom,kgsl-3d0/kgsl/kgsl-3d0"
        TypeGpu="Adreno"
    
    zycromerz's avatar
    zycromerz committed
    elif [[ -d /sys/devices/platform/*.gpu/devfreq/*.gpu ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU=/sys/devices/platform/*.gpu/devfreq/*.gpu
    
    zycromerz's avatar
    zycromerz committed
    elif [[ -d /sys/devices/platform/*.mali ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU=/sys/devices/platform/*.mali
        MALIGPU="y"
        TypeGpu="Mali"
    
    zycromerz's avatar
    zycromerz committed
    elif [[ -d /sys/class/misc/mali0 ]]; then
    
    zycromerz's avatar
    zycromerz committed
        NyariGPU=/sys/class/misc/mali0
        MALIGPU="y"
        TypeGpu="Mali"
    else
        NyariGPU='';
    
    zycromerz's avatar
    zycromerz committed
    fi
    
    
    TypeCpu="$(cat /proc/cpuinfo | grep Hardware | awk -F ": " '{print $2}')"
    # if [[ "$TypeCpu" == *"Qualcomm Technologies, Inc"* ]];then
    #     TypeCpu=${TypeCpu/"Qualcomm Technologies, Inc "/""}
    # fi
    # if [[ "$TypeCpu" == *"/"* ]];then
    #     TypeCpu="$(echo $TypeCpu | awk -F "/" '{print $1}')"
    # fi
    
    ## misc
    
    zycromerz's avatar
    zycromerz committed
    GoTurbo="0"
    
    zycromerz's avatar
    zycromerz committed
    GoNormal="0"
    
    StopScanGameList="n"
    
    LastDropCache=""
    
    ScreenState="on"
    
    zycromerz's avatar
    zycromerz committed
    CurrentDisplayStatus="on"
    
    CPUFREQLOCKSTATUS="n"
    
    CPUFREQLOCKSTATUSSLEEP="n"
    ThermalServiceStatus="Y"