Repository navigation
Expand file tree
/
Copy pathcustomize.sh
More file actions
51 lines (46 loc) · 2.16 KB
/
Copy pathcustomize.sh
File metadata and controls
51 lines (46 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/system/bin/sh
# =========================================
# Requirement: the kernel must expose sched_lib_mask_force
# =========================================
SCHED_OK=0
for f in /proc/sys/*/sched_lib_mask_force; do
[ -f "$f" ] && { SCHED_OK=1; break; }
done
if [ "$SCHED_OK" != "1" ]; then
ui_print ""
ui_print "[!] /proc/sys/*/sched_lib_mask_force not found"
ui_print "[!] This kernel is not supported by UnityFix"
abort "[!] Installation cancelled"
fi
# Keep the cores chosen with the previous version (it was stored in service.sh)
CFG=/data/adb/unityfix
OLD=/data/adb/modules/unityfix/service.sh
mkdir -p "$CFG"
if [ ! -f "$CFG/mask" ] && [ -f "$OLD" ]; then
v=$(sed -n 's/^echo "\([0-9]*\)" > \/proc\/sys\/kernel\/sched_lib_mask_force.*/\1/p' "$OLD" | head -n1)
case "$v" in
255|240|192|128) echo "$v" > "$CFG/mask" ;;
esac
fi
uptime=$(cut -d. -f1 /proc/uptime) memory=$(cat /proc/meminfo|tr -s \ )
# FUNCIÓN SIMPLIFICADA - SIEMPRE IMPRIME
a() {
sleep 0.01
echo "$@"
}
echo ""
echo "▒█░▒█ █▀▀▄ ░▀░ ▀▀█▀▀ █░░█ ▒█▀▀▀ ░▀░ █░█ "
echo "▒█░▒█ █░░█ ▀█▀ ░░█░░ █▄▄█ ▒█▀▀▀ ▀█▀ ▄▀▄ "
echo "░▀▄▄▀ ▀░░▀ ▀▀▀ ░░▀░░ ▄▄▄█ ▒█░░░ ▀▀▀ ▀░▀"
echo ""
a "· OS: Android $(getprop ro.build.version.release)"
a "· Model: $(getprop ro.product.manufacturer) $(getprop ro.product.model)"
a "· Kernel: $(uname -r|cut -f1,2,3 -d-)"
a "· Uptime: $((uptime/3600)) hour, $((uptime%3600/60)) mins"
a "· Resolution:$(wm size|cut -d: -f2)"
a "· Terminal: $(cmd activity stack list|grep 0,0.*visible=true|tr -d ' '|cut -f1 -d/|cut -f2 -d:)"
a "· CPU: $(getprop ro.soc.manufacturer) $(getprop ro.soc.model) ($(grep proc /proc/cpuinfo|wc -l)) @ $(cat /sys/devices/system/cpu/cpufreq/*/cpuinfo_max_freq|tail -n1|awk '{printf("%.3f\n",$1/1000000)}')GHz"
a "· Memory: $((($(echo "$memory"|grep MemTotal|cut -f2 -d\ )-$(echo "$memory"|grep MemAvailable|cut -f2 -d\ ))/1024))MiB / $(($(echo "$memory"|grep MemTotal|cut -f2 -d\ )/1024))MiB"
echo ""
echo "+ By @LeanHijosdesusMadres"
echo ""