Skip to content

Commit

Permalink
tree: Initial support for Linux
Browse files Browse the repository at this point in the history
Signed-off-by: Rem01Gaming <[email protected]>
  • Loading branch information
Rem01Gaming committed Oct 8, 2024
1 parent a6f9769 commit 050553a
Show file tree
Hide file tree
Showing 33 changed files with 105 additions and 85 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ all:
@echo "make install : Install directly to your termux"
@echo "make uninstall : Uninstall from your termux"
@echo "make install-dependence : Install needed dependencines"
@echo "make pack-deb : Build deb package"

install:
cp ./src/* $(PREFIX)/bin
Expand Down
29 changes: 16 additions & 13 deletions share/database_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/origami-sudo bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,7 +16,7 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

database_path="/data/origami-kernel/okm.db"
database_path="$HOME/.okm/okm.db"

sql_query() {
echo "$1" | sqlite3 $database_path
Expand Down Expand Up @@ -76,17 +76,20 @@ execstoredcmd() {
}

init_execstoredcmd() {
header_info=(
"[] DEVICE: $(getprop "ro.product.system.model")"
"[] MANUFACTURER: $VENDOR"
"[] CPU: $chipset"
"[] GPU: $gpu"
"[] KERNEL VERSION: $(uname -r)"
"[] UPTIME: $(uptime -p)"
"[] ANDROID VERSION: ${ANDROID}"
"[] SELINUX: $(getenforce)"
"[] ENTROPY: ${ENTROPY}"
)
header_info=()
[ $ANDROID ] && header_info+=(
"[] DEVICE: $(getprop ro.product.system.model)"
"[] MANUFACTURER: $VENDOR"
"[] SELINUX: $(getenforce)"
"[] ANDROID VERSION: $ANDROID_VER"
)
header_info+=(
"[] CPU: $chipset"
"[] GPU: $gpu"
"[] KERNEL VERSION: $(uname -r)"
"[] UPTIME: $(uptime -p)"
"[] ENTROPY: ${ENTROPY}"
)
header "Main Menu"
echo -e "\n"

Expand Down
2 changes: 1 addition & 1 deletion share/init_run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
10 changes: 9 additions & 1 deletion share/menu_helper.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -161,6 +161,14 @@ stop_throbber() {
echo -ne "\r\033[K" # Clear the line
}

open_link() {
if [ $ANDROID ]; then
/system/bin/am start -a android.intent.action.VIEW -d "$1" >/dev/null 2>&1 &
else
xdg-open "$1"
fi
}

unset_headvar() {
unset options
unset header_info
Expand Down
2 changes: 1 addition & 1 deletion share/settings.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/origami-sudo bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/battery/battery_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
8 changes: 4 additions & 4 deletions share/utils/cpu/cpu_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -17,9 +17,9 @@
# Copyright (C) 2023-2024 Rem01Gaming

if [[ $soc == Mediatek ]]; then
source /data/data/com.termux/files/usr/share/origami-kernel/utils/cpu/mtk_cpumisc.sh
source $PREFIX/share/origami-kernel/utils/cpu/mtk_cpumisc.sh
elif [[ $soc == Qualcomm ]]; then
source /data/data/com.termux/files/usr/share/origami-kernel/utils/cpu/qcom_cpubus.sh
source $PREFIX/share/origami-kernel/utils/cpu/qcom_cpubus.sh
fi

cpu_cluster_handle() {
Expand Down Expand Up @@ -256,7 +256,7 @@ cpu_menu() {
"[] CPU CCI mode: $(cat /proc/cpufreq/cpufreq_cci_mode)")
options="$options\nMediatek Power mode"
fi

if [ -f /sys/devices/system/cpu/sched/sched_boost ]; then
options="$options\nMediatek Sched Boost"
fi
Expand Down
2 changes: 1 addition & 1 deletion share/utils/cpu/mtk_cpumisc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/cpu/qcom_cpubus.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/disp/disp_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/dram/dram_devfreq.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
6 changes: 3 additions & 3 deletions share/utils/dram/dram_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,8 +16,8 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

source /data/data/com.termux/files/usr/share/origami-kernel/utils/dram/mtk_dram.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/dram/dram_devfreq.sh
source $PREFIX/share/origami-kernel/utils/dram/mtk_dram.sh
source $PREFIX/share/origami-kernel/utils/dram/dram_devfreq.sh

dram_menu() {
if [ ! -z $dram_devfreq_path ]; then
Expand Down
2 changes: 1 addition & 1 deletion share/utils/dram/mtk_dram.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/adreno_idler.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
6 changes: 3 additions & 3 deletions share/utils/gpu/gpu_devfreq.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,8 +16,8 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/simple_gpu_algo.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/adreno_idler.sh
source $PREFIX/share/origami-kernel/utils/gpu/simple_gpu_algo.sh
source $PREFIX/share/origami-kernel/utils/gpu/adreno_idler.sh

gpu_devfreq_set_freq() {
if [[ $1 == "-exec" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/gpu_generic.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/gpu_omap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/gpu_qcom_kgsl2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/gpu_qcom_kgsl3.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/gpu_tegra.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/gpu_tensor.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
20 changes: 10 additions & 10 deletions share/utils/gpu/gpu_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,15 +16,15 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_devfreq.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/mtk_gpufreq.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/mtk_gpufreqv2.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_tegra.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_tensor.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_omap.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_qcom_kgsl2.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_qcom_kgsl3.sh
source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/gpu_generic.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_devfreq.sh
source $PREFIX/share/origami-kernel/utils/gpu/mtk_gpufreq.sh
source $PREFIX/share/origami-kernel/utils/gpu/mtk_gpufreqv2.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_tegra.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_tensor.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_omap.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_qcom_kgsl2.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_qcom_kgsl3.sh
source $PREFIX/share/origami-kernel/utils/gpu/gpu_generic.sh

gpu_menu() {
if [ -z $gpu_node_id ]; then
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/mtk_ged.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions share/utils/gpu/mtk_gpufreq.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,7 +16,7 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/mtk_ged.sh
source $PREFIX/share/origami-kernel/utils/gpu/mtk_ged.sh

mtk_gpufreq_lock_freq() {
local freq=$(fzf_select "0 $gpu_available_freqs" "Set frequency for GPU (NO DVFS): ")
Expand Down
4 changes: 2 additions & 2 deletions share/utils/gpu/mtk_gpufreqv2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,7 +16,7 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

source /data/data/com.termux/files/usr/share/origami-kernel/utils/gpu/mtk_ged.sh
source $PREFIX/share/origami-kernel/utils/gpu/mtk_ged.sh

mtk_gpufreqv2_lock_freq() {
local freq=$(fzf_select "$gpu_available_freqs" "Set frequency for GPU (NO DVFS): ")
Expand Down
2 changes: 1 addition & 1 deletion share/utils/gpu/simple_gpu_algo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/memory/memory_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/misc/misc_devfreq.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions share/utils/misc/misc_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand All @@ -16,7 +16,7 @@
#
# Copyright (C) 2023-2024 Rem01Gaming

source /data/data/com.termux/files/usr/share/origami-kernel/utils/misc/misc_devfreq.sh
source $PREFIX/share/origami-kernel/utils/misc/misc_devfreq.sh

thermal_gov_set() {
if [[ $1 == "-exec" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion share/utils/net/net_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion share/utils/sched/sched_util.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/data/data/com.termux/files/usr/bin/bash
#!/bin/env bash
# This file is part of Origami Kernel Manager.
#
# Origami Kernel Manager is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit 050553a

Please sign in to comment.