0% found this document useful (0 votes)
10 views4 pages

tweaks Brvnt Combo

The document outlines a script for optimizing device performance through various tweaks, including network settings, rendering, UI animations, touch sensitivity, memory management, hardware balance, and FPS stabilization. Each section of the script applies specific system commands to enhance functionality and responsiveness. The script also includes logging features to track the application of these tweaks.

Uploaded by

atarebels
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

tweaks Brvnt Combo

The document outlines a script for optimizing device performance through various tweaks, including network settings, rendering, UI animations, touch sensitivity, memory management, hardware balance, and FPS stabilization. Each section of the script applies specific system commands to enhance functionality and responsiveness. The script also includes logging features to track the application of these tweaks.

Uploaded by

atarebels
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

-- ★━━━━━━━ [ EvKyCl ] — Evaa | Kyroo | Clara ━━━━━━━★

-- NierOfVoid Next (0015.5) — Daily Tweaks Engine


-- Fungsi: Internet, UI, RAM, Touch, Scheduler, Fstrim, Background, HW Balance

local function log(msg)


local log_path = "/storage/emulated/0/Documents/LogNierOfVoid/tweaks.log"
local f = io.open(log_path, "a")
if f then
f:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. msg .. "\n")
f:close()
end
end

-- 1. Network & WiFi


local function tweak_network()
os.execute("settings put global captive_portal_mode 0")
os.execute("settings put global captive_portal_use_https 1")
os.execute("settings put global wifi_scan_throttle_enabled 0")
os.execute("settings put global wifi_networks_available_notification_on 0")
os.execute("settings put global wifi_sleep_policy 2")
log("✅ Network & WiFi tweaks applied")
end

-- 🎨 2. Rendering & Scheduler


local function tweak_rendering()
os.execute("setprop debug.hwui.renderer skiaglthreaded")
os.execute("echo ondemand >
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor")
os.execute("echo ondemand >
/sys/devices/system/cpu/cpufreq/policy4/scaling_governor")
os.execute("echo ondemand >
/sys/devices/system/cpu/cpufreq/policy6/scaling_governor")
os.execute("echo 0 > /proc/sys/kernel/sched_latency_ns")
os.execute("echo NO_GENTLE_FAIR_SLEEPERS > /sys/kernel/debug/sched_features")
log("✅ Rendering, scheduler, and governor tweaks applied")
end

-- 🧼 3. UI Animation & Cleanup


local function tweak_ui()
os.execute("settings put global window_animation_scale 0.5")
os.execute("settings put global transition_animation_scale 0.5")
os.execute("settings put global animator_duration_scale 1.0")
os.execute("setprop debug.hwui.show_dirty_regions false")
os.execute("setprop debug.hwui.skip_empty_damage true")
os.execute("setprop debug.hwui.use_buffer_age false")
os.execute("setprop debug.hwui.use.partial_updates false")
os.execute("setprop debug.hwui.use_gpu_pixel_buffers false")
log("✅ UI animation & cleanup applied")
end

-- 🧊 4. Touch & Input


local function tweak_touch()
os.execute("settings put secure multi_press_timeout 300")
os.execute("settings put secure long_press_timeout 300")
os.execute("settings put global block_untrusted_touches 0")
os.execute("settings put system pointer_speed 7")
os.execute("settings put system high_touch_polling_rate_enable 1")
os.execute("settings put system high_touch_sensitivity_enable 1")
local edge_system = { "edge_pressure", "edge_size", "edge_type" }
for _, row in ipairs(edge_system) do
os.execute("settings put system " .. row .. " 0")
end

local edge_global = { "edge_mode_state_title", "pref_edge_handgrip" }


for _, row in ipairs(edge_global) do
os.execute("settings put global " .. row .. " false")
end

local tp = "/proc/touchpanel"
local touch_flags = {
{ "1", tp .. "/game_switch_enable" },
{ "1", tp .. "/oppo_tp_direction" },
{ "0", tp .. "/oppo_tp_limit_enable" },
{ "0", tp .. "/oplus_tp_limit_enable" },
{ "1", tp .. "/oplus_tp_direction" }
}
for _, pair in ipairs(touch_flags) do
os.execute("echo " .. pair[1] .. " > " .. pair[2])
end

local bump = io.popen("find /sys -type f -name bump_sample_rate")


local bump_list = bump:read("*a")
bump:close()
for path in string.gmatch(bump_list, "[^\r\n]+") do
os.execute("echo 1 > " .. path)
end

local boost_paths = {
"/sys/module/msm_performance/parameters/touchboost",
"/sys/power/pnpmgr/touch_boost",
"/proc/perfmgr/tchbst/user/usrtch",
"/proc/perfmgr/tchbst/kernel/tb_enable",
"/sys/devices/virtual/touch/touch_boost",
"/sys/module/msm_perfmon/parameters/touch_boost_enable"
}
for _, path in ipairs(boost_paths) do
os.execute("echo 1 > " .. path)
end

local modes = { "7035", "8002", "11000", "13060", "14005" }


for _, val in ipairs(modes) do
os.execute("echo " .. val .. " > /sys/class/touch/switch/set_touchscreen")
end

local tids = io.popen("ps -Tp $(pidof -s system_server) -o tid,cmd | grep -E


'InputDispatcher|InputReader' | awk '{print $1}'")
local tid_list = tids:read("*a")
tids:close()
for tid in string.gmatch(tid_list, "%d+") do
os.execute("busybox renice -n -20 -p " .. tid)
os.execute("busybox chrt -f -p 99 " .. tid)
end

log("✅ Touch & scrolling tweaks applied (NgenTouch style)")


end

-- 🧠 5. RAM, ZRAM, ZSWAP, I/O


local function tweak_memory()
os.execute("setprop dalvik.vm.heapsize 512m")
os.execute("setprop dalvik.vm.heapgrowthlimit 256m")
os.execute("setprop dalvik.vm.heapstartsize 8m")
os.execute("echo 3 > /proc/sys/vm/drop_caches")

os.execute("echo 768M > /sys/block/zram0/disksize")


os.execute("echo lz4 > /sys/block/zram0/comp_algorithm")
os.execute("echo 100 > /proc/sys/vm/swappiness")
os.execute("echo 1 > /sys/module/zswap/parameters/enabled")
os.execute("echo lz4 > /sys/module/zswap/parameters/compressor")
os.execute("echo 1 > /sys/module/zswap/parameters/max_pool_percent")

local blocks = { "sda", "sdb", "sdc", "mmcblk0", "mmcblk1" }


for _, blk in ipairs(blocks) do
local base = "/sys/block/" blk
os.execute("echo noop > " base "/queue/scheduler")
os.execute("echo 0 > " base "/queue/add_random")
os.execute("echo 1 > " base .. "/queue/nomerges")
os.execute("echo 1 > " base "/queue/rq_affinity")
os.execute("echo 128 > " base "/queue/nr_requests")
end

log("✅ RAM, ZRAM, ZSWAP, and I/O tweaks applied")


end

-- 🧩 6. HW Balance
local function tweak_hw()
os.execute("echo 1 > /sys/module/msm_thermal/core_control/enabled")
os.execute("echo 1 > /sys/devices/system/cpu/cpu0/online")
os.execute("echo 1 > /sys/devices/system/cpu/cpu4/online")
os.execute("setprop debug.hwui.texture_cache_size 96")
os.execute("setprop debug.hwui.layer_cache_size 64")
log("✅ HW balance tweaks applied")
end

-- 🧼 7. Fstrim — Dynamic Block Detection


local function run_fstrim()
local fstrim_log = "/storage/emulated/0/Documents/LogNierOfVoid/fstrim.log"
local f = io.open(fstrim_log, "a")
if f then
f:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. "Running fstrim\n")
f:close()
end

-- Partisi utama yang aman untuk fstrim


local partitions = { "/data", "/cache", "/system", "/mnt/vendor/persist",
"/metadata" }
for _, part in ipairs(partitions) do
if io.open(part) then
os.execute("fstrim " .. part)
end
end

-- Deteksi block device dan apply discard_max_bytes


local blk_detect = io.popen("find /sys/block -maxdepth 1 -type d | grep -E 'sda|
sdb|sdc|mmcblk|nvme'")
local blk_list = blk_detect:read("*a")
blk_detect:close()
for blk in string.gmatch(blk_list, "[^\r\n]+") do
local trim_path = blk .. "/queue/discard_max_bytes"
if io.open(trim_path) then
os.execute("echo 2147483648 > " .. trim_path)
end
end

log("✅ Fstrim and block discard tweaks applied")


end

-- 8. Fps Stabilizer
local function tweak_fps()
-- FPS limit & stability
os.execute("setprop debug.ro.fps_enable 1")
os.execute("setprop debug.ro.fps.capsmin 90fps")
os.execute("setprop debug.ro.fps.capsmax 120fps")
os.execute("setprop debug.ro.persist.sys.NV_FPSLIMIT 120")

-- Refresh rate hints


os.execute("settings put system peak_refresh_rate 120")
os.execute("settings put system min_refresh_rate 90")

log("✅ FPS & refresh rate tweaks applied")


end

tweak_network()
tweak_rendering()
tweak_ui()
tweak_touch()
tweak_memory()
tweak_hw()
tweak_fps()
run_fstrim()
log("✅ All tweaks executed successfully ")

You might also like