├── version
├── module
├── webroot
│ └── .placeholder
├── system
│ └── bin
│ │ └── .placeholder
├── META-INF
│ └── com
│ │ └── google
│ │ └── android
│ │ ├── updater-script
│ │ └── update-binary
├── module.prop
├── cleanup.sh
├── uninstall.sh
├── action.sh
├── verify.sh
└── service.sh
├── .github
├── scripts
│ ├── .shellcheckrc
│ ├── gen_sha256sum.sh
│ ├── telegram_bot.sh
│ └── compile_zip.sh
├── ISSUE_TEMPLATE
│ ├── custom.yml
│ ├── feature_request.yml
│ └── bug_report.yml
└── workflows
│ ├── deploy-website.yml
│ └── build.yml
├── .gitignore
├── webui
├── src
│ ├── public
│ │ ├── icon.webp
│ │ ├── encore_happy.avif
│ │ ├── encore_sleeping.avif
│ │ └── config.json
│ ├── scripts
│ │ ├── block_copy.js
│ │ └── language.js
│ ├── locales
│ │ ├── languages.json
│ │ └── strings
│ │ │ ├── zh_CN.json
│ │ │ ├── ko.json
│ │ │ ├── ja.json
│ │ │ ├── ar.json
│ │ │ ├── uk.json
│ │ │ ├── jv.json
│ │ │ ├── vi.json
│ │ │ ├── en.json
│ │ │ ├── pt_BR.json
│ │ │ ├── id.json
│ │ │ ├── ru.json
│ │ │ ├── es.json
│ │ │ └── tr.json
│ └── styles
│ │ └── index.css
├── vite.config.js
├── package.json
├── .gitignore
└── tailwind.config.js
├── website
├── docs
│ ├── public
│ │ ├── logo.avif
│ │ ├── logo.webp
│ │ ├── favicon.png
│ │ ├── ogp
│ │ │ └── default.webp
│ │ ├── android-crhome.png
│ │ ├── apple-touch-icon.png
│ │ ├── Screenshot_20250520-161223_MMRL.avif
│ │ ├── robots.txt
│ │ └── api
│ │ │ └── update.json
│ ├── .vitepress
│ │ ├── theme
│ │ │ ├── index.js
│ │ │ └── custom.css
│ │ └── config.mjs
│ ├── download
│ │ ├── version
│ │ │ ├── 1.8.md
│ │ │ ├── 2.0.md
│ │ │ ├── 3.1.md
│ │ │ ├── 1.5.md
│ │ │ ├── 2.7.md
│ │ │ ├── 3.0.md
│ │ │ ├── 2.3.md
│ │ │ ├── 2.4.md
│ │ │ ├── 4.1.md
│ │ │ ├── 4.5.md
│ │ │ ├── 1.6.md
│ │ │ ├── 1.7.md
│ │ │ ├── 3.7.md
│ │ │ ├── 2.2.md
│ │ │ ├── 4.0.md
│ │ │ ├── 4.4.md
│ │ │ ├── 4.2.md
│ │ │ ├── 3.9.md
│ │ │ ├── 2.6.md
│ │ │ ├── 2.8.md
│ │ │ ├── 4.3.md
│ │ │ ├── 2.1.md
│ │ │ ├── 3.4.md
│ │ │ ├── 3.2.md
│ │ │ ├── 3.5.md
│ │ │ ├── 3.8.md
│ │ │ ├── 3.6.md
│ │ │ └── 3.3.md
│ │ └── index.md
│ ├── index.md
│ └── guide
│ │ ├── addon.md
│ │ ├── webui-and-configuration.md
│ │ ├── what-is-encore-tweaks.md
│ │ └── faq.md
├── package.json
└── .gitignore
├── jni
├── Application.mk
├── src
│ ├── Android.mk
│ ├── Dumpsys
│ │ ├── Android.mk
│ │ └── Dumpsys.hpp
│ ├── EncoreCLI
│ │ ├── Android.mk
│ │ ├── EncoreCLI.hpp
│ │ └── EncoreCLI.cpp
│ ├── GameRegistry
│ │ ├── Android.mk
│ │ └── GameRegistry.hpp
│ ├── EncoreConfig
│ │ ├── Android.mk
│ │ ├── EncoreConfig.hpp
│ │ ├── InotifyHandler.cpp
│ │ └── EncoreConfigStore.hpp
│ └── EncoreUtility
│ │ ├── Android.mk
│ │ ├── ProcessUtility.cpp
│ │ ├── FileUtility.cpp
│ │ ├── MiscUtility.cpp
│ │ ├── EncoreUtility.hpp
│ │ └── Profiler.cpp
├── README.md
├── Android.mk
├── include
│ ├── Encore.hpp
│ ├── Write2File.hpp
│ ├── ShellUtility.hpp
│ ├── ModuleProperty.hpp
│ ├── PIDTracker.hpp
│ └── EncoreLog.hpp
└── .clang-format
├── .gitmodules
├── changelog.md
├── docs
├── README_zh-CN.md
└── README_id-ID.md
├── README.md
├── scripts
└── encore_utility.sh
└── NOTICE.md
/version:
--------------------------------------------------------------------------------
1 | 4.6
2 |
--------------------------------------------------------------------------------
/module/webroot/.placeholder:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/module/system/bin/.placeholder:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/scripts/.shellcheckrc:
--------------------------------------------------------------------------------
1 | shell=bash
2 |
--------------------------------------------------------------------------------
/module/META-INF/com/google/android/updater-script:
--------------------------------------------------------------------------------
1 | #MAGISK
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
2 | obj/
3 | libs/
4 | .idea/
5 | .vscode/
6 |
--------------------------------------------------------------------------------
/webui/src/public/icon.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/webui/src/public/icon.webp
--------------------------------------------------------------------------------
/website/docs/public/logo.avif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/logo.avif
--------------------------------------------------------------------------------
/website/docs/public/logo.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/logo.webp
--------------------------------------------------------------------------------
/website/docs/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/favicon.png
--------------------------------------------------------------------------------
/jni/Application.mk:
--------------------------------------------------------------------------------
1 | APP_ABI := all
2 | APP_STL := c++_static
3 | APP_OPTIM := release
4 | APP_PLATFORM := android-24
5 |
--------------------------------------------------------------------------------
/webui/src/public/encore_happy.avif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/webui/src/public/encore_happy.avif
--------------------------------------------------------------------------------
/website/docs/public/ogp/default.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/ogp/default.webp
--------------------------------------------------------------------------------
/webui/src/public/encore_sleeping.avif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/webui/src/public/encore_sleeping.avif
--------------------------------------------------------------------------------
/website/docs/public/android-crhome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/android-crhome.png
--------------------------------------------------------------------------------
/website/docs/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/website/docs/.vitepress/theme/index.js:
--------------------------------------------------------------------------------
1 | import DefaultTheme from 'vitepress/theme'
2 | import './custom.css'
3 |
4 | export default DefaultTheme
5 |
--------------------------------------------------------------------------------
/webui/src/public/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "backHandler": false,
3 | "exitConfirm": false,
4 | "title": "Encore Tweaks",
5 | "icon": "icon.webp"
6 | }
--------------------------------------------------------------------------------
/website/docs/public/Screenshot_20250520-161223_MMRL.avif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Rem01Gaming/encore/HEAD/website/docs/public/Screenshot_20250520-161223_MMRL.avif
--------------------------------------------------------------------------------
/website/docs/public/robots.txt:
--------------------------------------------------------------------------------
1 | # Hi! are you a robot?
2 |
3 | User-agent: *
4 | Disallow: /download/version/*
5 | Allow: /
6 |
7 | Sitemap: https://encore.rem01gaming.dev/sitemap.xml
8 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "jni/external/spdlog"]
2 | path = jni/external/spdlog
3 | url = https://github.com/gabime/spdlog.git
4 | [submodule "jni/external/rapidjson"]
5 | path = jni/external/rapidjson
6 | url = https://github.com/Tencent/rapidjson.git
7 |
--------------------------------------------------------------------------------
/website/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "vitepress": "^1.6.4"
4 | },
5 | "scripts": {
6 | "dev": "vitepress dev docs",
7 | "build": "vitepress build docs",
8 | "preview": "vitepress preview docs"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/jni/src/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | include $(LOCAL_PATH)/Dumpsys/Android.mk $(LOCAL_PATH)/EncoreCLI/Android.mk $(LOCAL_PATH)/GameRegistry/Android.mk $(LOCAL_PATH)/EncoreConfig/Android.mk $(LOCAL_PATH)/EncoreUtility/Android.mk
6 |
--------------------------------------------------------------------------------
/.github/scripts/gen_sha256sum.sh:
--------------------------------------------------------------------------------
1 | #!/bin/env bash
2 |
3 | generate_checksum() {
4 | sha256sum "$1" | awk '{print $1}' >"$1.sha256"
5 | echo "Generated checksum for: $1"
6 | }
7 |
8 | find "$1" -type f | while IFS= read -r file; do
9 | generate_checksum "$file"
10 | done
11 |
--------------------------------------------------------------------------------
/module/module.prop:
--------------------------------------------------------------------------------
1 | id=encore
2 | name=Encore Tweaks
3 | version=
4 | versionCode=
5 | author=Rem01Gaming
6 | description=Special performance module for your Device.
7 | updateJson=https://encore.rem01gaming.dev/api/update.json
8 | banner=https://encore.rem01gaming.dev/ogp/default.webp
9 |
--------------------------------------------------------------------------------
/webui/src/scripts/block_copy.js:
--------------------------------------------------------------------------------
1 | function killCopy(e){
2 | return false;
3 | }
4 |
5 | function reEnable(){
6 | return true;
7 | }
8 |
9 | document.onselectstart=new Function ("return false");
10 | if (window.sidebar){
11 | document.onmousedown=killCopy;
12 | document.onclick=reEnable;
13 | }
14 |
--------------------------------------------------------------------------------
/module/cleanup.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | # shellcheck disable=SC2016
3 |
4 | MODULE_DIR="/data/adb/modules/encore"
5 | THIS_SCRIPT="/data/adb/service.d/.encore_cleanup.sh"
6 |
7 | if [ ! -d "$MODULE_DIR/disable" ]; then
8 | cat "$MODULE_DIR/module.prop.orig" >"$MODULE_DIR/module.prop"
9 | rm -f "$THIS_SCRIPT"
10 | fi
11 |
--------------------------------------------------------------------------------
/website/docs/public/api/update.json:
--------------------------------------------------------------------------------
1 | {
2 | "versionCode": 1080,
3 | "version": "4.6 (1080-2fa4940-release)",
4 | "zipUrl": "https://github.com/Rem01Gaming/encore/releases/download/4.6/encore-4.6-1080-2fa4940-release.zip",
5 | "changelog": "https://raw.githubusercontent.com/Rem01Gaming/encore/refs/heads/main/changelog.md"
6 | }
7 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/custom.yml:
--------------------------------------------------------------------------------
1 | name: Custom issue template
2 | description: WARNING! If you are reporting a bug but use this template, the issue will be closed directly.
3 | title: '[Custom]'
4 | body:
5 | - type: textarea
6 | id: description
7 | attributes:
8 | label: "Describe your problem."
9 | validations:
10 | required: true
11 |
12 |
--------------------------------------------------------------------------------
/webui/src/locales/languages.json:
--------------------------------------------------------------------------------
1 | {
2 | "ar": "العربية",
3 | "en": "English",
4 | "es": "Español",
5 | "id": "Bahasa Indonesia",
6 | "pt_BR": "Português (Brasil)",
7 | "ru": "Русский",
8 | "uk": "Українська",
9 | "ja": "日本語",
10 | "jv": "Basa Jawa",
11 | "vi": "Tiếng Việt",
12 | "zh_CN": "简体中文",
13 | "tr": "Türkçe",
14 | "ko": "한국어"
15 | }
16 |
--------------------------------------------------------------------------------
/jni/src/Dumpsys/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | ROOT_PATH := $(call my-dir)/../..
3 |
4 | include $(CLEAR_VARS)
5 | LOCAL_MODULE := Dumpsys
6 |
7 | LOCAL_SRC_FILES := Dumpsys.cpp
8 |
9 | LOCAL_C_INCLUDES := $(ROOT_PATH)/include
10 |
11 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
12 |
13 | LOCAL_CPPFLAGS += -fexceptions -std=c++23 -O0
14 | LOCAL_CPPFLAGS += -Wpedantic -Wall -Wextra -Werror -Wformat -Wuninitialized
15 |
16 | include $(BUILD_STATIC_LIBRARY)
17 |
--------------------------------------------------------------------------------
/jni/src/EncoreCLI/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | ROOT_PATH := $(call my-dir)/../..
3 |
4 | include $(CLEAR_VARS)
5 | LOCAL_MODULE := EncoreCLI
6 |
7 | LOCAL_SRC_FILES := EncoreCLI.cpp
8 |
9 | LOCAL_STATIC_LIBRARIES := GameRegistry
10 |
11 | LOCAL_C_INCLUDES := \
12 | $(ROOT_PATH)/include \
13 | $(ROOT_PATH)/external/spdlog/include
14 |
15 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
16 |
17 | LOCAL_CPPFLAGS += -fexceptions -std=c++23 -O0
18 | LOCAL_CPPFLAGS += -Wpedantic -Wall -Wextra -Werror -Wformat -Wuninitialized
19 |
20 | include $(BUILD_STATIC_LIBRARY)
21 |
--------------------------------------------------------------------------------
/module/META-INF/com/google/android/update-binary:
--------------------------------------------------------------------------------
1 | #!/sbin/sh
2 | umask 022
3 | ui_print() { echo "$1"; }
4 | require_new_magisk() {
5 | ui_print "*******************************"
6 | ui_print " Please install Magisk v20.4+! "
7 | ui_print "*******************************"
8 | exit 1
9 | }
10 | OUTFD=$2
11 | ZIPFILE=$3
12 | mount /data 2>/dev/null
13 | if ! [ -f /data/adb/magisk/util_functions.sh ]; then
14 | require_new_magisk
15 | fi
16 | . /data/adb/magisk/util_functions.sh
17 | if [ $MAGISK_VER_CODE -lt 20400 ]; then
18 | require_new_magisk
19 | fi
20 | install_module
21 | exit 0
--------------------------------------------------------------------------------
/jni/src/GameRegistry/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | ROOT_PATH := $(call my-dir)/../..
3 |
4 | include $(CLEAR_VARS)
5 | LOCAL_MODULE := GameRegistry
6 |
7 | LOCAL_SRC_FILES := GameRegistry.cpp
8 |
9 | LOCAL_C_INCLUDES := \
10 | $(ROOT_PATH)/include \
11 | $(ROOT_PATH)/external/rapidjson/include \
12 | $(ROOT_PATH)/external/spdlog/include
13 |
14 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
15 |
16 | LOCAL_CPPFLAGS += -fexceptions -std=c++23 -O0
17 | LOCAL_CPPFLAGS += -Wpedantic -Wall -Wextra -Werror -Wformat -Wuninitialized
18 |
19 | include $(BUILD_STATIC_LIBRARY)
20 |
--------------------------------------------------------------------------------
/webui/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "vite"
2 | import mkcert from "vite-plugin-mkcert";
3 | import tailwind from "tailwindcss";
4 | import autoprefixer from "autoprefixer";
5 | import { ViteMinifyPlugin } from 'vite-plugin-minify';
6 |
7 | export default defineConfig({
8 | root: './src',
9 | plugins: [
10 | ViteMinifyPlugin({}),
11 | mkcert(),
12 | ],
13 | server : {
14 | https: true,
15 | proxy: {},
16 | },
17 | css: {
18 | postcss: {
19 | plugins: [tailwind, autoprefixer],
20 | }
21 | },
22 | build: {
23 | outDir: '../dist',
24 | },
25 | })
26 |
--------------------------------------------------------------------------------
/changelog.md:
--------------------------------------------------------------------------------
1 | ## Encore Tweaks 4.6
2 |
3 | **Thanks for using Encore Tweaks!**
4 |
5 | Your continued support keeps this project going. If you enjoy the improvements and want to see more features in the future, [consider supporting the developer with a small donation](https://t.me/rem01schannel/670). Every bit helps!
6 |
7 | ### Changelog
8 |
9 | - Refactor and design changes on the WebUI
10 | - Implement WebUI X API for file read/write
11 | - WebUI translation updates
12 | - Exposes Encore's logging system to other processes/module
13 | - Add sanity check for dumpsys
14 | - Other misc changes and optimizations
15 |
--------------------------------------------------------------------------------
/jni/README.md:
--------------------------------------------------------------------------------
1 | # Encore Tweaks Daemon
2 |
3 | Before you digging into this code thinking this is some kind of scheduling module like Uperf, it's not. Encore Tweaks is a profile-style performance module, it simply applies performance tweaks as profiles and do not dinamically control the scheduling and frequencies.
4 |
5 | Encore Tweaks works by using information such as:
6 | - Currently running app (window focussed)
7 | - Screen state, whenever it's awake or not and...
8 | - Battery saver state (yes the ones on your qs)
9 |
10 | ## Workflow diagram
11 |
12 | 
13 |
--------------------------------------------------------------------------------
/webui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "encore-tweaks",
3 | "version": "1.0.0",
4 | "author": "Rem01Gaming",
5 | "license": "Apache-2.0",
6 | "type": "module",
7 | "scripts": {
8 | "dev": "vite",
9 | "build": "vite build --emptyOutDir"
10 | },
11 | "devDependencies": {
12 | "autoprefixer": "^10.4.21",
13 | "daisyui": "^4.12.24",
14 | "postcss": "^8.5.6",
15 | "svgo": "^3.3.2",
16 | "tailwindcss": "^3.4.18",
17 | "vite": "^6.3.6",
18 | "vite-plugin-minify": "^2.1.0",
19 | "vite-plugin-mkcert": "^1.17.8"
20 | },
21 | "dependencies": {
22 | "kernelsu": "^1.0.6"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/website/docs/download/version/1.8.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 1.8
7 |
8 | ## Changelog
9 | - **[HOTFIX]** Fix DRAM and CPU Bus frequency scaling for some Snapdragon devices
10 | - Add encore logo on shell notification
11 |
12 | ## Download
13 | - [Download](https://en.shrinke.me/MTq5m)
14 | - [Download (Alternative link)](https://sfl.gl/BRQMZ)
15 | - [Telegram Channel](https://rem01schannel.t.me)
16 |
17 | ::: tip Support our project
18 | Please consider support our project by not sharing direct module file
19 | :::
20 |
--------------------------------------------------------------------------------
/.github/scripts/telegram_bot.sh:
--------------------------------------------------------------------------------
1 | #!/bin/env bash
2 |
3 | msg="*$TITLE*
4 | \\#ci\\_$VERSION
5 | \`\`\`
6 | $COMMIT_MESSAGE
7 | \`\`\`
8 | [Commit]($COMMIT_URL)
9 | [Workflow run]($RUN_URL)
10 | "
11 |
12 | file="$1"
13 | thumbnail="$GITHUB_WORKSPACE/website/docs/public/logo.webp"
14 |
15 | if [ ! -f "$file" ]; then
16 | echo "error: File not found" >&2
17 | exit 1
18 | fi
19 |
20 | curl -s "https://api.telegram.org/bot$BOT_TOKEN/sendDocument" \
21 | -F document=@"$file" \
22 | -F chat_id="$CHAT_ID" \
23 | -F "disable_web_page_preview=true" \
24 | -F "parse_mode=markdownv2" \
25 | -F thumb=@"$thumbnail" \
26 | -F caption="$msg"
27 |
--------------------------------------------------------------------------------
/jni/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := encored
5 |
6 | LOCAL_C_INCLUDES := \
7 | $(LOCAL_PATH)/include \
8 | $(LOCAL_PATH)/external/rapidjson/include \
9 | $(LOCAL_PATH)/external/spdlog/include
10 |
11 | LOCAL_STATIC_LIBRARIES := Dumpsys EncoreCLI GameRegistry EncoreConfig EncoreUtility
12 |
13 | LOCAL_SRC_FILES := Main.cpp
14 |
15 | LOCAL_CPPFLAGS += -fexceptions -std=c++23 -O0 -flto
16 | LOCAL_CPPFLAGS += -Wpedantic -Wall -Wextra -Werror -Wformat -Wuninitialized
17 |
18 | LOCAL_LDFLAGS += -flto
19 |
20 | include $(BUILD_EXECUTABLE)
21 |
22 | include $(LOCAL_PATH)/src/Android.mk
23 |
--------------------------------------------------------------------------------
/webui/src/styles/index.css:
--------------------------------------------------------------------------------
1 | @import url('https://mui.kernelsu.org/internal/insets.css');
2 | @import url('https://mui.kernelsu.org/internal/colors.css');
3 |
4 | @tailwind base;
5 | @tailwind components;
6 | @tailwind utilities;
7 |
8 | .root_layout {
9 | padding-top: var(--window-inset-top, 0px);
10 | padding-bottom: var(--window-inset-bottom, 0px);
11 | }
12 |
13 | .card_border {
14 | border: 1px solid color-mix(in srgb, var(--outline) 12%, transparent);
15 | }
16 |
17 | html.modal-open {
18 | overflow: hidden;
19 | }
20 |
21 | #language_selection {
22 | max-height: 300px;
23 | overflow-y: auto;
24 | padding-right: 10px;
25 | }
26 |
--------------------------------------------------------------------------------
/jni/src/EncoreConfig/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | ROOT_PATH := $(call my-dir)/../..
3 |
4 | include $(CLEAR_VARS)
5 |
6 | LOCAL_MODULE := EncoreConfig
7 | LOCAL_SRC_FILES := InotifyHandler.cpp EncoreConfigStore.cpp
8 |
9 | LOCAL_STATIC_LIBRARIES := GameRegistry
10 |
11 | LOCAL_C_INCLUDES := \
12 | $(ROOT_PATH)/include \
13 | $(ROOT_PATH)/external/rapidjson/include \
14 | $(ROOT_PATH)/external/spdlog/include
15 |
16 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
17 |
18 | LOCAL_CPPFLAGS += -fexceptions -std=c++23 -O0
19 | LOCAL_CPPFLAGS += -Wpedantic -Wall -Wextra -Werror -Wformat -Wuninitialized
20 |
21 | include $(BUILD_STATIC_LIBRARY)
22 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.0.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.0
7 |
8 | ## Changelog
9 | - Fix random game boosting by Mobile Legends: Bang Bang
10 | - Logs more useful info
11 | - Kill more logger service (via Kill Logger on WebUI)
12 | - Clicking Encore on WebUI now will open this website
13 |
14 | ## Download
15 | - [Download](https://en.shrinke.me/zL7ft)
16 | - [Download (Alternative link)](https://sfl.gl/ht8yJ)
17 | - [Telegram Channel](https://rem01schannel.t.me)
18 |
19 | ::: tip Support our project
20 | Please consider support our project by not sharing direct module file
21 | :::
22 |
--------------------------------------------------------------------------------
/jni/src/EncoreUtility/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | ROOT_PATH := $(call my-dir)/../..
3 |
4 | include $(CLEAR_VARS)
5 | LOCAL_MODULE := EncoreUtility
6 |
7 | LOCAL_C_INCLUDES := \
8 | $(ROOT_PATH)/include \
9 | $(ROOT_PATH)/external/rapidjson/include \
10 | $(ROOT_PATH)/external/spdlog/include
11 |
12 | LOCAL_SRC_FILES := \
13 | FileUtility.cpp \
14 | MiscUtility.cpp \
15 | ProcessUtility.cpp \
16 | Profiler.cpp
17 |
18 | LOCAL_STATIC_LIBRARIES := EncoreConfig
19 |
20 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
21 |
22 | LOCAL_CPPFLAGS += -fexceptions -std=c++23 -O0
23 | LOCAL_CPPFLAGS += -Wpedantic -Wall -Wextra -Werror -Wformat -Wuninitialized
24 |
25 | include $(BUILD_STATIC_LIBRARY)
26 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.1
7 |
8 | ## Changelog
9 | - **HOTFIX**: Fix system instability on MediaTek devices when powersave mode activated.
10 | - This version is hotfix from previous version, please read [previous version changelog](/download/version/3.0).
11 |
12 | ## Download
13 | - [Download](https://shrinkme.ink/azk97zDr)
14 | - [Download (Alternative link)](https://sfl.gl/hHwU0yud)
15 | - [Telegram Channel](https://rem01schannel.t.me)
16 |
17 | ::: tip Support our project
18 | Please consider support our project by not sharing direct module file
19 | :::
20 |
--------------------------------------------------------------------------------
/website/docs/download/version/1.5.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 1.5
7 |
8 | ## Changelog
9 | - Fix performance issues on some devices due to bad I/O scheduler implementation
10 | - Mediatek: Stop enabling/disabling PPM entierly
11 | - Mediatek: Disable PPM Policy `PPM_POLICY_PWR_THRO` and `PPM_POLICY_THERMAL`
12 | - Use GPU Extension Device (GED) to tweak Mediatek's GPU frequency
13 |
14 | ## Download
15 | - [Download](https://en.shrinke.me/ghWUW8sH)
16 | - [Download (Alternative link)](https://sfl.gl/LWl3oz)
17 | - [Telegram Channel](https://rem01schannel.t.me)
18 |
19 | ::: tip Support our project
20 | Please consider support our project by not sharing direct module file
21 | :::
22 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.7.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.7
7 |
8 | ## Changelog
9 | - Instantly change governor on setting changes depending on current profile
10 | - Introduce DND on Gameplay feature
11 | - Skip mount on KSU/AP to prevent root detection
12 | - Improve WebUI error handling
13 | - Fix Unisoc SoC detection
14 | - Fix visual bug on daemon status
15 | - Other misc optimizations
16 |
17 | ## Download
18 | - [Download](https://shrinkme.ink/HmNq)
19 | - [Download (Alternative link)](https://sfl.gl/YYGIXB)
20 | - [Telegram Channel](https://rem01schannel.t.me)
21 |
22 | ::: tip Support our project
23 | Please consider support our project by not sharing direct module file
24 | :::
25 |
--------------------------------------------------------------------------------
/jni/src/EncoreConfig/EncoreConfig.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 |
21 | bool init_file_watcher(InotifyWatcher &watcher);
22 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.0.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.0
7 |
8 | ## Changelog
9 | - Handle race condition on `set_priority()` call
10 | - Remove toast notification due to causing game freeze and crash on performance profile execution
11 | - PID checking without creating file descriptor
12 | - Revert MediaTek's PPM related changes
13 | - Revert Cgroups implementation
14 | - Other misc optimizations
15 |
16 | ## Download
17 | - [Download](https://shrinkme.ink/9BfyMSI)
18 | - [Download (Alternative link)](https://sfl.gl/Mgmbvz)
19 | - [Telegram Channel](https://rem01schannel.t.me)
20 |
21 | ::: tip Support our project
22 | Please consider support our project by not sharing direct module file
23 | :::
24 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.3.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.3
7 |
8 | ## Changelog
9 | - Incorporated fixes on version 2.2
10 | - Simplify fetch PID logic
11 | - Fix possible syntax error on I/O tweaks
12 | - MediaTek: Simplify PPM policies settings logic
13 | - MediaTek: Disable more logging service (via kill logger feature)
14 | - MediaTek: Let Encore control anything without FPSGO
15 | - Other misc optimization and changes
16 |
17 | ## Download
18 | - [Download](https://shrinkme.ink/lGNW4F56)
19 | - [Download (Alternative link)](https://sfl.gl/pR8DnKp)
20 | - [Telegram Channel](https://rem01schannel.t.me)
21 |
22 | ::: tip Support our project
23 | Please consider support our project by not sharing direct module file
24 | :::
25 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.4.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.4
7 |
8 | ## Changelog
9 | - Fix service stopped due to bad fetch PID logic for `com.mobile.legends:UnityKillsMe`
10 | - Fix some weird issues when kill logger enabled
11 | - Fix some tweaks may not apply correctly
12 | - No longer bundling KSU WebUI APK
13 | - Versioning scheme changes
14 | - webui: Introduce MMRL window safe area insets
15 | - Other misc optimizations
16 |
17 | ## Download
18 | - [Download](https://shrinkme.ink/siAtnS)
19 | - [Download (Alternative link)](https://sfl.gl/DS5co)
20 | - [Telegram Channel](https://rem01schannel.t.me)
21 |
22 | ::: tip Support our project
23 | Please consider support our project by not sharing direct module file
24 | :::
25 |
--------------------------------------------------------------------------------
/website/docs/download/version/4.1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 4.1
7 |
8 | ## Changelog
9 | - Fix CPU governor defaulted as performance
10 | - Fix overheating after startup
11 | - Expose game information through /dev/encore_game_info
12 | - Reintroduce cpu_dcvs tweaks (LLCC, L3 and DDR)
13 | - Add more TCP congestion algo to use
14 | - Other misc changes and optimizations
15 |
16 | ## Download
17 | - [Download](https://github.com/Rem01Gaming/encore/releases/tag/4.1)
18 | - [Download (Alternative link)](https://dl.rem01gaming.dev/releases/encore/4.1/encore-4.1-862-cc92fbc-release.zip)
19 | - [Telegram Channel](https://rem01schannel.t.me)
20 |
21 | ::: tip Support our project
22 | Please consider support our project by not sharing direct module file
23 | :::
24 |
--------------------------------------------------------------------------------
/website/docs/download/version/4.5.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 4.5
7 |
8 | ## Changelog
9 |
10 | - Fix root detection issue on module files
11 | - Mitigate buggy thermal throttling on post-startup in old MediaTek devices
12 | - Fix random reboot and performance dip on some devices
13 | - Add module banner for KernelSU Next
14 | - Add option to create WebUI shortcut
15 | - Add back DDR tweaks for Exynos and Tensor devices
16 | - Remove MMRL from action redirect WebUI
17 | - Shrink module size even more
18 |
19 | ## Download
20 | - [Download](https://github.com/Rem01Gaming/encore/releases/tag/4.5)
21 | - [Telegram Channel](https://rem01schannel.t.me)
22 |
23 | ::: tip Support our project
24 | Please consider support our project by not sharing direct module file
25 | :::
26 |
--------------------------------------------------------------------------------
/website/docs/download/version/1.6.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 1.6
7 |
8 | ## Changelog
9 | - Fix GPU Frequencies on some Mediatek devices
10 | - Mediatek: Disable PPM Policy `PPM_POLICY_PWR_THRO` and `PPM_POLICY_THERMAL` only on performance profile
11 | - Disable more debugging and tracing
12 | - Add option to change performance profile CPU Governor in WebUI
13 | - Enable battery_saver module on powersave profile (if your kernel have it)
14 | - Fix crashes on some devices
15 |
16 | ## Download
17 | - [Download](https://en.shrinke.me/GW9faY)
18 | - [Download (Alternative link)](https://sfl.gl/ClSBX)
19 | - [Telegram Channel](https://rem01schannel.t.me)
20 |
21 | ::: tip Support our project
22 | Please consider support our project by not sharing direct module file
23 | :::
24 |
--------------------------------------------------------------------------------
/website/docs/download/version/1.7.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 1.7
7 |
8 | ## Changelog
9 | - Fix CPU Frequency lock on newer Mediatek devices
10 | - Kill `statsd` together with `logd` and `traced`
11 | - Fine tune I/O tweaks for performance profiles
12 | - Fine tune `vm.vfs_cache_pressure` value
13 | - Disable unnecessary printk logging
14 | - Incrase `read_ahead_kb` value on performance profile
15 | - module: customize.sh: Simplify installation process
16 | - module: Introduce `verify.sh` for flashable integrity checkup
17 |
18 | ## Download
19 | - [Download](https://en.shrinke.me/E2GiKQu)
20 | - [Download (Alternative link)](https://sfl.gl/o6pX3)
21 | - [Telegram Channel](https://rem01schannel.t.me)
22 |
23 | ::: tip Support our project
24 | Please consider support our project by not sharing direct module file
25 | :::
26 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.7.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.7
7 |
8 | ## Changelog
9 | - Fix compatibility with ROMs with buggy mksh shell implementation (Non compliance or out-of-date).
10 | - Revert previous powersave tweaks due to buggy mksh implementation on some ROMs.
11 | - Fix unable to fetch PID errors.
12 | - Misc changes and optimizations.
13 |
14 | ## Checksums
15 | - **MD5**: `83353ed0f1b649a5ef752f7a726bb04e`
16 | - **SHA1**: `d8ee95884380b602736de746e59e2e2d521e34e3`
17 | - **SHA256**: `4f0f1e528cb0e029ecf82ba7dc7b77dbb4bac2abaefece20fcb63eda01a255c8`
18 |
19 | ## Download
20 | - [Download](https://safefileku.com/download/niwtVI271MMZlzcP)
21 | - [Telegram Channel](https://rem01schannel.t.me)
22 |
23 | ::: tip Support our project
24 | Please consider support our project by not sharing direct module file
25 | :::
26 |
--------------------------------------------------------------------------------
/jni/src/EncoreUtility/ProcessUtility.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "EncoreUtility.hpp"
18 |
19 | uid_t get_uid_by_package_name(const std::string& package_name) {
20 | struct stat st{};
21 |
22 | if (stat(("/data/data/" + package_name).c_str(), &st) != 0) {
23 | return 0;
24 | }
25 |
26 | return st.st_uid;
27 | }
28 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.2.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.2
7 |
8 | ## Changelog
9 | - Add action script to open WebUI (Magisk only)
10 | - Daemonize service
11 | - Service code refactor for performance
12 | - Fix daemon error "unable to fetch PID"
13 | - Fix service cannot fetch low_power state
14 | - Update Gamelist (**430+ Games listed**)
15 | - Tweak I/O parameter for low latency workloads
16 | - Add support for X86 and RISCV CPUs
17 | - Notify user on every profile changes
18 | - Handle case when 'default_gov' is performance
19 | - Other misc optimization and changes
20 |
21 | ## Download
22 | - [Download](https://shrinkme.ink/FpUg0)
23 | - [Download (Alternative link)](https://sfl.gl/8D0r)
24 | - [Telegram Channel](https://rem01schannel.t.me)
25 |
26 | ::: tip Support our project
27 | Please consider support our project by not sharing direct module file
28 | :::
29 |
--------------------------------------------------------------------------------
/website/docs/download/version/4.0.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 4.0
7 |
8 | ## Changelog
9 | - Drop mksh shell due buggy behavior on some devices.
10 | - Introduce MediaTek DDR boost tweak.
11 | - Skip CPU scaling tweaks entierly when PPM node exists.
12 | - Handle write conflict on logging system properly.
13 | - Other misc changes and optimizations.
14 |
15 | ## Checksums
16 | - **MD5**: `f8b42a3bf61fdd5b9ffb3ddbd2702fb9`
17 | - **SHA1**: `98354012f04ca9e0abca861a9736005d533127cc`
18 | - **SHA256**: `f77b40ea35a9f20208139ce3021b711209d09de253c0e6db9936594291618f04`
19 |
20 | ## Download
21 | - [Download](https://shrinkme.ink/563Hoa)
22 | - [Download (Alternative link)](https://safefileku.com/download/sWewuedrvgHHLIPB)
23 | - [Telegram Channel](https://rem01schannel.t.me)
24 |
25 | ::: tip Support our project
26 | Please consider support our project by not sharing direct module file
27 | :::
28 |
--------------------------------------------------------------------------------
/website/docs/download/version/4.4.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 4.4
7 |
8 | ## Changelog
9 |
10 | - Fix UI lags in normal mode on certain older MediaTek devices
11 | - Revert startup tweak (post-fs-data) to mitigate bootloops on some devices
12 | - Introduced Device Mitigation to fix certain device specific bugs
13 | - Allow MMC to UFSHC to run on lower frequency on Lite Mode
14 | - Better and more accurate SoC recognition
15 | - Update Mandarin WebUI translation
16 | - Reduces module size to ~190kB
17 | - Disable Oplus CPU limit
18 | - Refactor and de-spaghetti the profiler code
19 | - Other misc changes and optimizations
20 |
21 | ## Download
22 | - [Download](https://github.com/Rem01Gaming/encore/releases/tag/4.4)
23 | - [Telegram Channel](https://rem01schannel.t.me)
24 |
25 | ::: tip Support our project
26 | Please consider support our project by not sharing direct module file
27 | :::
28 |
--------------------------------------------------------------------------------
/website/docs/download/version/4.2.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 4.2
7 |
8 | ## Changelog
9 |
10 | - Disable MTK PBM on performance profile
11 | - Update Vietnamese and Polish WebUI translation
12 | - Use `energy_step` for default CPU governor candidate
13 | - Remove unnecessary file creation on late_start service
14 | - Workaround for game freezes in Xiaomi peridot
15 | - Globally disable `iostats` and `add_random`
16 | - Reduce `nr_requests` to 32 on performance profile
17 | - Other misc changes and optimizations
18 |
19 | ## Download
20 | - [Download](https://github.com/Rem01Gaming/encore/releases/tag/4.2)
21 | - [Download (Alternative link)](https://dl.rem01gaming.dev/releases/encore/4.2/encore-4.2-899-84bbcb5-release.zip)
22 | - [Telegram Channel](https://rem01schannel.t.me)
23 |
24 | ::: tip Support our project
25 | Please consider support our project by not sharing direct module file
26 | :::
27 |
--------------------------------------------------------------------------------
/module/uninstall.sh:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2024-2025 Rem01Gaming
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | rm -rf /data/adb/.config/encore
18 | rm -f /data/adb/service.d/.encore_cleanup.sh
19 |
20 | need_gone="encored encore_profiler encore_utility encore_log"
21 | manager_paths="/data/adb/ap/bin /data/adb/ksu/bin"
22 |
23 | for dir in $manager_paths; do
24 | [ -d "$dir" ] && {
25 | for bin in $need_gone; do
26 | rm "$dir/$bin"
27 | done
28 | }
29 | done
30 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.9.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.9
7 |
8 | ## Changelog
9 | - Fix performance issues on some Snapdragon devices.
10 | - Revert powersave profile tweaks (again).
11 |
12 | ::: info Hotfix release
13 | This version is a hotfix to the prior release.
14 | for additional information, see the [previous release changelog](/download/version/3.8).
15 | :::
16 |
17 | ## Checksums
18 | - **MD5**: `111f3a798ca6f5b7fa35d5586b5e5061`
19 | - **SHA1**: `f502b21846b067555ee309f2b933c57a0c78336e`
20 | - **SHA256**: `51e78d3b608596281121f760b51dbf5f67ff10416d7dedc23ad8a314dfc4735c`
21 |
22 | ## Download
23 | - [Download](https://shrinkme.ink/daEPA)
24 | - [Download (Alternative link)](https://safefileku.com/download/JP6XADge6N4Xr166)
25 | - [Telegram Channel](https://rem01schannel.t.me)
26 |
27 | ::: tip Support our project
28 | Please consider support our project by not sharing direct module file
29 | :::
30 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.6.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.6
7 |
8 | ## Changelog
9 | - WebUI redesign with dynamic material you theme (dynamic theme only available on MMRL)
10 | - Handle MMRL _no-js-api_ permission
11 | - Migrate WebUI from parcel to vite
12 | - Initial support for Nvidia Tegra
13 | - Improve SoC recognition for Intel and Exynos
14 | - Disable _split lock mitigations_ (X86 only)
15 | - Introduced bypass charging feature (experimental)
16 | - Fix lag and screen glitches on newer MediaTek Dimensity devices when powersave profile enabled
17 | - Fix kernel panic on some devices
18 | - Disable Oppo/Realme cpustats
19 |
20 | ## Download
21 | - [Download](https://shrinkme.ink/TpEUd)
22 | - [Download (Alternative link)](https://sfl.gl/ZTuy)
23 | - [Telegram Channel](https://rem01schannel.t.me)
24 |
25 | ::: tip Support our project
26 | Please consider support our project by not sharing direct module file
27 | :::
28 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.8.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.8
7 |
8 | ## Changelog
9 | - Fix inaccessible `encore_utility` error on WebUI
10 | - Print WebUI stderr on a modal
11 | - Migrate prioritization logic to Cgroups cpuctl & schedtune
12 | - Fix throttling issues on legacy MediaTek devices with PPM
13 | - Disable more PPM policies
14 | - Using `PPM_POLICY_USER_LIMIT` for CPU frequency changes
15 | - Fix SoC recognition for latest Exynos devices
16 | - Using the latest Android NDK for daemon build (r28)
17 | - JavaScript and profiler code refactor
18 | - Drop bypass charging feature due unexpected behavior across devices
19 |
20 | ## Download
21 | - [Download](https://shrinkme.ink/STZJV)
22 | - [Download (Alternative link)](https://sfl.gl/OVnzZvfu)
23 | - [Telegram Channel](https://rem01schannel.t.me)
24 |
25 | ::: tip Support our project
26 | Please consider support our project by not sharing direct module file
27 | :::
28 |
--------------------------------------------------------------------------------
/website/docs/download/version/4.3.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 4.3
7 |
8 | ## Changelog
9 |
10 | - Introducing Lite Mode
11 | - Improve SoC recognition logic
12 | - Revert MTK PBM implementation due random reboot issue
13 | - Fix system instability in some Snapdragon devices
14 | - Fix SoC recognition on some Google Tensor devices
15 | - Fix Monet color theme in the latest MMRL build
16 | - Update default WebUI color theme to "purpleish"
17 | - Disable GED KPI on performance profile
18 | - Drop kill logger feature
19 | - Other misc changes and optimizations
20 |
21 | ## Download
22 | - [Download](https://github.com/Rem01Gaming/encore/releases/tag/4.3)
23 | - [Download (Alternative link)](https://dl.rem01gaming.dev/releases/encore/4.3/encore-4.3-933-36f8bbc-release.zip)
24 | - [Telegram Channel](https://rem01schannel.t.me)
25 |
26 | ::: tip Support our project
27 | Please consider support our project by not sharing direct module file
28 | :::
29 |
--------------------------------------------------------------------------------
/jni/src/EncoreCLI/EncoreCLI.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 |
22 | struct CliCommand {
23 | std::string name;
24 | std::string description;
25 | std::string usage;
26 | int min_args;
27 | int max_args;
28 | int (*handler)(const std::vector &args);
29 | };
30 |
31 | void cli_usage(const char *program_name);
32 | void cli_usage_command(const CliCommand &cmd);
33 | int encore_cli(int argc, char *argv[]);
34 |
--------------------------------------------------------------------------------
/website/docs/download/version/2.1.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 2.1
7 |
8 | ## Changelog
9 | - Fix random game boosting by **Mobile Legends: Bang Bang** (again)
10 | - **Fix CPU frequency lock on Mediatek G99 and Dimensity series and possibly other chipset**
11 | - Introduce unity fix
12 | - Add option to change Powersave CPU Governor on WebUI
13 | - Disable OnePlus opchain
14 | - Update Gamelist (**400+ Games listed**)
15 | - Use bbr2 TCP congestion if available
16 | - Specifically target internal and external storage partition for I/O Tweak
17 | - Increase I/O Read Ahead to 312KB on Performance profile for more throughput
18 | - Disable I/O add_random
19 | - Other misc optimization and changes
20 | - License change to Apache License 2.0
21 |
22 | ## Download
23 | - [Download](https://shrinkme.ink/s7yL5W)
24 | - [Download (Alternative link)](https://sfl.gl/auCiIWF6)
25 | - [Telegram Channel](https://rem01schannel.t.me)
26 |
27 | ::: tip Support our project
28 | Please consider support our project by not sharing direct module file
29 | :::
30 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.4.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.4
7 |
8 | ## Changelog
9 | - Massive project refactor and restructure
10 | - Added DRAM/Memory and CPU bus tweak for Exynos and Google Tensor
11 | - Disable PPM policy `SYS_BOOST` only on performance profile due causing weird CPU freq behavior on Redmi K40 Gaming
12 | - Optimize devfreq frequency functions
13 | - Remember WebUI language choice by user
14 | - Avoid repeated branch prediction miss on screen state and low battery fetch function
15 | - Don't stop playback media on DND mode due keyevent difference on each devices
16 | - Fix infinite loop due bad logic on gamestart check
17 | - Fix screen flicker and delay on Xiaomi Topaz and other Snapdragon devices
18 | - Fix random reboot on Realme 5i (again)
19 | - Fix random boost caused by Moba Legends (MLBB India version)
20 |
21 | ## Download
22 | - [Download](https://safefileku.com/download/qRbEXQwK1K8g290j)
23 | - [Telegram Channel](https://rem01schannel.t.me)
24 |
25 | ::: tip Support our project
26 | Please consider support our project by not sharing direct module file
27 | :::
28 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.2.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.2
7 |
8 | ## Changelog
9 | - Daemon code refactoring and optimizations
10 | - Optimize shell script execution to reduce overhead
11 | - Use Toybox for the pidof routine
12 | - Place gamelist and log file to tmpfs for faster access
13 | - Make sure only one instance runs at the same time
14 | - Improve daemon logging system
15 | - Fix random reboot on Realme 5i and other Snapdragon devices
16 | - Fix rare bug where module.prop breaks after reboot
17 | - Set default screenstate after too many failures
18 | - Add WebUI translation in 24 languages
19 | - Silence spammy SU granted toast notification on WebUI
20 | - Request KSU JavaScript API permission on MMRL
21 | - Directly grant root access from KernelSU via prctl
22 | - Other misc optimization and adjustment
23 |
24 | ## Download
25 | - [Download](https://shrinkme.ink/DGeu2Yt)
26 | - [Download (Alternative link)](https://sfl.gl/BjxAotB)
27 | - [Telegram Channel](https://rem01schannel.t.me)
28 |
29 | ::: tip Support our project
30 | Please consider support our project by not sharing direct module file
31 | :::
32 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.5.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.5
7 |
8 | ## Changelog
9 | - Remove error-fallback `dumpsys` command for screenstate fetching due massive overhead.
10 | - Implement error fallback for batery saver state fetcher.
11 | - Fix shellcheck warnings for the project's shell script.
12 | - Minimize use of the `cat` command (UUOC).
13 | - Search for more default CPU governor candidates if device's default is `performance`.
14 | - Revert touch boost implementation.
15 | - Fix lag and touch delay in Xiaomi Ginkgo and other Xiaomi devices.
16 | - Update translation for Mandarin, Japanese, Arabic and German.
17 | - Drop "Restart Daemon" button due constant misuses and bugs associated.
18 |
19 | ## Checksums
20 | - **MD5**: `2a765884e4a77dda6fb2978d2302b90d`
21 | - **SHA1**: `6fecca242622036bf723d9d00438cac1a94bf813`
22 | - **SHA256**: `b2a32b7c5e58bdcbbb9dbd7fb265887fe2052f23a56f6118df53d134ca9a24cb`
23 |
24 | ## Download
25 | - [Download](https://safefileku.com/download/WpcTvu7DgaymBdcQ)
26 | - [Telegram Channel](https://rem01schannel.t.me)
27 |
28 | ::: tip Support our project
29 | Please consider support our project by not sharing direct module file
30 | :::
31 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.8.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.8
7 |
8 | ## Changelog
9 | - Ship our own mksh shell for compatibility across different devices and ROMs.
10 | - Fix screen blackout in powersave profile on Xiaomi Redwood and certain Snapdragon devices.
11 | - "Nerf" powersave profile, reduces device frequency to 50% (DVFS) instead of lowest frequency to reduce lags.
12 | - Add back DDR and Buses powersave tweaks.
13 | - Fix encore profiler stuck to perfomance on [Magic Chess](https://play.google.com/store/apps/details?id=com.mobilechess.gp).
14 | - Handle possible race condition on logging system.
15 | - Initial support for incoming Encore Addon.
16 | - Misc changes and optimizations.
17 |
18 | ## Checksums
19 | - **MD5**: `e1164dc21e42cf3b45be6419ad0eb35a`
20 | - **SHA1**: `279f4bde8cfb8468d6423f99aa3d6e0e04ae6df8`
21 | - **SHA256**: `09d07a1f80fc77c7965f55fdb32ee9356dc38c506f2d9f6be062f6c14ba8acce`
22 |
23 | ## Download
24 | - [Download](https://shrinkme.ink/rBbEYR)
25 | - [Download (Alternative link)](https://safefileku.com/download/NbKSRCWTOVxJkaZC)
26 | - [Telegram Channel](https://rem01schannel.t.me)
27 |
28 | ::: tip Support our project
29 | Please consider support our project by not sharing direct module file
30 | :::
31 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.6.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.6
7 |
8 | ## Changelog
9 | - Using native code "pgrep" implementation.
10 | - Make boot up faster.
11 | - Drop disable CPU core on powersave profile due device specific bug on Realme 5i and Infinix GT 10 Pro.
12 | - "Nerf" powersave profile, reduces device frequency to 50% (DVFS) instead of lowest frequency to reduce lags.
13 | - Add back DDR and Buses powersave tweaks.
14 | - Customizable MediaTek PPM policies via `/data/encore/ppm_policies_mediatek`.
15 | - Code refactor and optimizations.
16 | - Fix kernel panic and freeze on some devices while powersave profile enabled.
17 | - Fix typo causing integrity check unhandled error.
18 | - Fix performance dip on some MediaTek devices.
19 | - Other misc changes and optimizations.
20 |
21 | ## Checksums
22 | - **MD5**: `7dbd2062be56f5ef46eb45b9b5a7afa3`
23 | - **SHA1**: `e761f4858fc130be42e7b89d35820cf1ec7aacf3`
24 | - **SHA256**: `3df6d3761fea4733ef45f8b995b12a50bd0000c83c25506f4579da636c62f496`
25 |
26 | ## Download
27 | - [Download](https://safefileku.com/download/H7shilh4st4pBZjB)
28 | - [Telegram Channel](https://rem01schannel.t.me)
29 |
30 | ::: tip Support our project
31 | Please consider support our project by not sharing direct module file
32 | :::
33 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: "Suggest an idea for this project"
3 | title: "[FEATURE]"
4 | labels: ["feature"]
5 | body:
6 | - type: markdown
7 | id: feature-info
8 | attributes:
9 | value: "## Feature Infomation"
10 | - type: textarea
11 | id: feature-main
12 | validations:
13 | required: true
14 | attributes:
15 | label: "Is your feature request related to a problem? Please describe."
16 | description: "A clear and concise description of what the problem is."
17 | placeholder: "I'm always frustrated when [...]"
18 | - type: textarea
19 | id: feature-solution
20 | validations:
21 | required: true
22 | attributes:
23 | label: "Describe the solution you'd like."
24 | description: "A clear and concise description of what you want to happen."
25 | - type: textarea
26 | id: feature-describe
27 | validations:
28 | required: true
29 | attributes:
30 | label: "Describe alternatives you've considered."
31 | description: "A clear and concise description of any alternative solutions or features you've considered."
32 | - type: textarea
33 | id: feature-extra
34 | validations:
35 | required: false
36 | attributes:
37 | label: "Additional context"
38 | description: "Add any other context or screenshots about the feature request here."
39 |
40 |
--------------------------------------------------------------------------------
/website/docs/download/version/3.3.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Download"
3 | description: "Download the latest version of Encore Tweaks Magisk Module here"
4 | ---
5 |
6 | # Encore Tweaks 3.3
7 |
8 | ## Changelog
9 | - Migrate daemon code to C23 standard
10 | - Daemon code refactoring and optimizations
11 | - Memory management improvement for daemon
12 | - Implement branch prediction optimization for daemon
13 | - Workaround for inexact process name PID fetch
14 | - Change GPU and DRAM frequency without touching governor
15 | - Disable touchboost in the powersave profile to save more power
16 | - Fix Pojav Launcher can't be boosted by daemon due to the inexact process name
17 | - Fix invalid frequency value settings for non MediaTek GPUs, causing low frequency to be set in performance profile
18 | - Fix random boost caused by Mobile Legends: Bang Bang (Huawei version)
19 | - Make sure new game session gets boosted when the old one killed
20 | - Force off FPSGO on performance profile
21 | - Lock value for CPU freq policies to make sure frequencies are static
22 | - Tweak more nodes of Snapdragon DRAM, CPU Bus and GPU Bus
23 | - Disable PPM policy `SYS_BOOST` by default to prevent buggy CPU freq behavior on some MediaTek devices
24 |
25 |
26 | ## Download
27 | - [Download](https://safefileku.com/download/JzsGXs12mmFqQfuL)
28 | - [Telegram Channel](https://rem01schannel.t.me)
29 |
30 | ::: tip Support our project
31 | Please consider support our project by not sharing direct module file
32 | :::
33 |
--------------------------------------------------------------------------------
/module/action.sh:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2024-2025 Rem01Gaming
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | if [ -n "$MMRL" ]; then
18 | echo "- This action script is NOT intended to run on MMRL..."
19 | echo "- Please open Encore Tweaks WebUI by clicking the module card."
20 | exit 0
21 | fi
22 |
23 | if [ -n "$MAGISKTMP" ]; then
24 | pm path io.github.a13e300.ksuwebui >/dev/null 2>&1 && {
25 | echo "- Launching WebUI in KSUWebUIStandalone..."
26 | am start -n "io.github.a13e300.ksuwebui/.WebUIActivity" -e id "encore"
27 | exit 0
28 | }
29 | pm path com.dergoogler.mmrl.webuix >/dev/null 2>&1 && {
30 | echo "- Launching WebUI in WebUI X..."
31 | am start -n "com.dergoogler.mmrl.webuix/.ui.activity.webui.WebUIActivity" -e MOD_ID "encore"
32 | exit 0
33 | }
34 | fi
35 |
36 | echo "! Install KsuWebUI for WebUI access"
37 | sleep 2
38 | am start -a android.intent.action.VIEW -d https://github.com/5ec1cff/KsuWebUIStandalone/releases
39 | exit 0
40 |
--------------------------------------------------------------------------------
/jni/include/Encore.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 |
21 | #define NOTIFY_TITLE "Encore Tweaks"
22 | #define LOG_TAG "EncoreTweaks"
23 |
24 | #define CONFIG_DIR "/data/adb/.config/encore"
25 | #define MODPATH "/data/adb/modules/encore"
26 |
27 | #define LOCK_FILE CONFIG_DIR "/.lock"
28 | #define LOG_FILE CONFIG_DIR "/encore.log"
29 | #define PROFILE_MODE CONFIG_DIR "/current_profile"
30 | #define GAME_INFO CONFIG_DIR "/gameinfo"
31 | #define CONFIG_FILE CONFIG_DIR "/config.json"
32 | #define DEFAULT_CPU_GOV CONFIG_DIR "/default_cpu_gov"
33 | #define ENCORE_GAMELIST CONFIG_DIR "/gamelist.json"
34 |
35 | #define MODULE_PROP MODPATH "/module.prop"
36 | #define MODULE_UPDATE MODPATH "/update"
37 |
38 | enum EncoreProfileMode : char {
39 | PERFCOMMON,
40 | PERFORMANCE_PROFILE,
41 | BALANCE_PROFILE,
42 | POWERSAVE_PROFILE
43 | };
44 |
45 | struct EncoreGameList {
46 | std::string package_name;
47 | bool lite_mode;
48 | bool enable_dnd;
49 | };
50 |
--------------------------------------------------------------------------------
/jni/include/Write2File.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 |
22 | /**
23 | * @brief Writes formatted content to a file, truncating it if it exists.
24 | *
25 | * This function formats a string using the provided arguments and writes it to the specified file.
26 | * The file is always truncated before writing. No file locking is performed.
27 | * @tparam Args The types of the arguments for formatting.
28 | * @param filename The path to the file to write to.
29 | * @param args The arguments to format into the string.
30 | * @return true if the write operation was successful, false otherwise.
31 | */
32 | template
33 | bool write2file(const std::string &filename, Args &&...args) {
34 | std::ostringstream oss;
35 | (oss << ... << std::forward(args));
36 |
37 | std::ofstream file(filename, std::ios::trunc);
38 | if (!file.is_open()) {
39 | return false;
40 | }
41 |
42 | file << oss.str();
43 | return file.good();
44 | }
45 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/zh_CN.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "当前配置",
5 | "kernel": "内核",
6 | "chipset": "芯片组",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "设置",
11 | "dnd_gameplay": "游戏勿扰模式",
12 | "lite_mode": "轻量模式",
13 | "device_mitigation": "设备兼容模式",
14 | "default_cpu_gov": "默认 CPU 调速器",
15 | "powersave_cpu_gov": "省电 CPU 调速器",
16 | "cpu_governor_title": "CPU调速器"
17 | },
18 | "actions": {
19 | "title": "操作",
20 | "edit_gamelist": "编辑游戏列表",
21 | "create_shortcut": "创建快捷方式",
22 | "save_logs": "保存模块日志"
23 | },
24 | "support": {
25 | "title": "支持我",
26 | "description": "Encore Tweaks 永久免费,若您愿意,可通过捐赠支持开发。"
27 | },
28 | "modal": {
29 | "dnd_title": "勿扰模式",
30 | "dnd_desc": "在玩游戏时启用勿扰模式,限制通知和电话的干扰,让您可以专心享受游戏。",
31 | "lite_mode_title": "轻量模式",
32 | "lite_mode_desc": "此选项通过允许CPU和其他组件以较低频率运行(而非持续最高频率),减少游戏过程中的过热和功耗,但可能影响整体游戏性能。",
33 | "device_mitigation_title": "设备兼容模式",
34 | "device_mitigation_desc": "通过应用特定的调整来修复某些设备特有的问题,提升兼容性与稳定性。除非设备在关闭该选项后出现问题,否则建议保持该选项关闭。",
35 | "edit_gamelist_title": "编辑游戏列表",
36 | "edit_gamelist_desc": "启动列表中的游戏或应用时,将自动应用性能配置。",
37 | "save_changes": "保存更改",
38 | "cancel_changes": "取消更改",
39 | "save_log_fail": "无法保存日志",
40 | "unauthorized_mod_title": "检测到未经授权的修改",
41 | "unauthorized_mod_desc": "该模块可能已被第三方修改。为了您的安全,请从Encore Tweaks官方网站下载官方版本。",
42 | "log_saved_desc": "日志已保存至 {0}。",
43 | "log_saved_title": "模块日志已保存"
44 | },
45 | "toast": {
46 | "reboot_to_apply": "重启设备使变更应用。",
47 | "has_shortcut": "快捷方式已存在",
48 | "gamelist_save_success": "游戏列表已成功保存"
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/.github/scripts/compile_zip.sh:
--------------------------------------------------------------------------------
1 | #!/bin/env bash
2 | # shellcheck disable=SC2035
3 |
4 | if [ -z "$GITHUB_WORKSPACE" ]; then
5 | echo "This script should only run on GitHub action!" >&2
6 | exit 1
7 | fi
8 |
9 | # Make sure we're on right directory
10 | cd "$GITHUB_WORKSPACE" || {
11 | echo "Unable to cd to GITHUB_WORKSPACE" >&2
12 | exit 1
13 | }
14 |
15 | # Put critical files and folders here
16 | need_integrity=(
17 | "module/system/bin"
18 | "module/libs"
19 | "module/META-INF"
20 | "module/service.sh"
21 | "module/uninstall.sh"
22 | "module/action.sh"
23 | "module/cleanup.sh"
24 | "module/module.prop"
25 | "module/gamelist.txt"
26 | )
27 |
28 | # Version info
29 | version="$(cat version)"
30 | version_code="$(git rev-list HEAD --count)"
31 | release_code="$(git rev-list HEAD --count)-$(git rev-parse --short HEAD)-release"
32 | sed -i "s/version=.*/version=$version ($release_code)/" module/module.prop
33 | sed -i "s/versionCode=.*/versionCode=$version_code/" module/module.prop
34 |
35 | # Copy module files
36 | cp -r ./libs module
37 | cp -r ./scripts/* module/system/bin
38 | cp gamelist.txt module
39 | cp LICENSE module
40 | cp NOTICE.md module
41 |
42 | # Remove .sh extension from scripts
43 | find module/system/bin -maxdepth 1 -type f -name "*.sh" -exec sh -c 'mv -- "$0" "${0%.sh}"' {} \;
44 |
45 | # Parse version info to module prop
46 | zipName="encore-$version-$release_code.zip"
47 | echo "zipName=$zipName" >>"$GITHUB_OUTPUT"
48 |
49 | # Generate sha256sum for integrity checkup
50 | for file in "${need_integrity[@]}"; do
51 | bash .github/scripts/gen_sha256sum.sh "$file"
52 | done
53 |
54 | # Zip the file
55 | cd ./module || {
56 | echo "Unable to cd to ./module" >&2
57 | exit 1
58 | }
59 |
60 | zip -r9 ../"$zipName" * -x *placeholder* *.map .shellcheckrc
61 | zip -z ../"$zipName" <
20 |
21 | bool create_lock_file(void) {
22 | int fd = open(LOCK_FILE, O_WRONLY | O_CREAT, 0644);
23 | if (fd == -1) {
24 | perror("open");
25 | return false;
26 | }
27 |
28 | if (flock(fd, LOCK_EX | LOCK_NB) == -1) {
29 | close(fd);
30 | return false;
31 | }
32 |
33 | return true;
34 | }
35 |
36 | bool check_dumpsys_sanity(void) {
37 | FILE* file = fopen("/system/bin/dumpsys", "rb");
38 | int ch;
39 | if (!file) {
40 | fprintf(stderr, "/system/bin/dumpsys: %s\n", strerror(errno));
41 | LOGC("/system/bin/dumpsys: {}", strerror(errno));
42 | goto insane;
43 | }
44 |
45 | ch = fgetc(file);
46 | if (ch == EOF) {
47 | if (feof(file)) {
48 | fprintf(stderr, "/system/bin/dumpsys was tampered by kill logger module\n");
49 | LOGC("/system/bin/dumpsys was tampered by kill logger module");
50 | goto insane;
51 | }
52 |
53 | fprintf(stderr, "/system/bin/dumpsys: %s\n", strerror(errno));
54 | LOGC("/system/bin/dumpsys: {}", strerror(errno));
55 | goto insane;
56 | }
57 |
58 | fclose(file);
59 | return true;
60 |
61 | insane:
62 | fclose(file);
63 | return false;
64 | }
65 |
--------------------------------------------------------------------------------
/jni/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | BasedOnStyle: LLVM
3 | Language: Cpp
4 | AccessModifierOffset: -4
5 | AlignAfterOpenBracket: AlwaysBreak
6 | AlignConsecutiveAssignments: false
7 | AlignConsecutiveDeclarations: false
8 | AlignEscapedNewlines: Right
9 | AlignOperands: true
10 | AlignTrailingComments: true
11 | AllowAllArgumentsOnNextLine: true
12 | AllowAllConstructorInitializersOnNextLine: true
13 | AllowAllParametersOfDeclarationOnNextLine: true
14 | AllowShortBlocksOnASingleLine: Empty
15 | AllowShortCaseLabelsOnASingleLine: true
16 | AllowShortFunctionsOnASingleLine: None
17 | AllowShortIfStatementsOnASingleLine: Always
18 | AllowShortLoopsOnASingleLine: true
19 | AlwaysBreakAfterReturnType: None
20 | AlwaysBreakBeforeMultilineStrings: true
21 | AlwaysBreakTemplateDeclarations: Yes
22 | BinPackArguments: true
23 | BinPackParameters: true
24 | BreakBeforeBraces: Attach
25 | BreakBeforeTernaryOperators: false
26 | BreakConstructorInitializers: BeforeComma
27 | ColumnLimit: 100
28 | CompactNamespaces: false
29 | ConstructorInitializerIndentWidth: 4
30 | ContinuationIndentWidth: 4
31 | Cpp11BracedListStyle: true
32 | DerivePointerAlignment: false
33 | FixNamespaceComments: true
34 | IndentCaseLabels: true
35 | IndentPPDirectives: BeforeHash
36 | IndentWidth: 4
37 | KeepEmptyLinesAtTheStartOfBlocks: false
38 | MaxEmptyLinesToKeep: 1
39 | NamespaceIndentation: None
40 | PointerAlignment: Right
41 | ReflowComments: Never
42 | SortIncludes: CaseSensitive
43 | SortUsingDeclarations: true
44 | SpaceAfterCStyleCast: false
45 | SpaceAfterLogicalNot: false
46 | SpaceAfterTemplateKeyword: true
47 | SpaceBeforeAssignmentOperators: true
48 | SpaceBeforeCpp11BracedList: false
49 | SpaceBeforeInheritanceColon: true
50 | SpaceBeforeParens: ControlStatements
51 | SpaceBeforeRangeBasedForLoopColon: true
52 | SpaceInEmptyParentheses: false
53 | SpacesInAngles: false
54 | SpacesInContainerLiterals: false
55 | SpacesInCStyleCastParentheses: false
56 | SpacesInParentheses: false
57 | SpacesInSquareBrackets: false
58 | Standard: Latest
59 | TabWidth: 4
60 | UseTab: Never
61 |
--------------------------------------------------------------------------------
/website/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Encore Tweaks"
3 | titleTemplate: Special performance module for your device
4 | description: "Encore Tweaks is a performace Magisk module featuring advanced App Monitoring, universal SoC support, and a WebUI for seamless configuration. It's reliable, free and open source."
5 | layout: home
6 |
7 | hero:
8 | name: Encore Tweaks
9 | text: Special performance module for your device
10 | tagline: "A no-nonsense performance module"
11 | image:
12 | src: /logo.avif
13 | alt: Encore Tweaks
14 | actions:
15 | - theme: brand
16 | text: What is Encore Tweaks?
17 | link: /guide/what-is-encore-tweaks
18 | - theme: alt
19 | text: Download Now
20 | link: /download
21 | - theme: alt
22 | text: View on GitHub
23 | link: https://github.com/Rem01Gaming/encore
24 |
25 | features:
26 | - icon: 🤖
27 | title: Fully Automatic Performance Optimization
28 | details: Encore Tweaks intelligently monitors apps and applies the optimal performance profile automatically, ensuring a smooth experience without manual configuration.
29 | - icon: 🔋
30 | title: Battery-Friendly Performance
31 | details: Encore Tweaks only activates performance scripts during gaming sessions, preserving battery life for everyday use.
32 | - icon: 📱
33 | title: Universal SoC Compatibility
34 | details: Encore Tweaks are compatible with any Android device, no matter how weird it is.
35 | - icon: 🚀
36 | title: Game-First Resource Allocation
37 | details: Encore Tweaks prioritizes gaming performance by allocating maximum CPU and I/O resources, ensuring lag-free gameplay.
38 | - icon: 🌐
39 | title: Integrated WebUI for Easy Configuration
40 | details: Encore Tweaks is the first performance module to feature a WebUI, allowing users to configure settings and manage operations with ease.
41 | - icon: 🤗
42 | title: Safe and Reliable
43 | details: With zero reported incidents of bootloops or bricked devices, Encore Tweaks is a trusted solution for performance optimization.
44 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/ko.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "현재 프로필",
5 | "kernel": "커널",
6 | "chipset": "칩셋",
7 | "androidSDK": "안드로이드 SDK"
8 | },
9 | "settings": {
10 | "title": "설정",
11 | "cpu_governor_title": "CPU 성능 모드",
12 | "dnd_gameplay": "게임 중 방해금지",
13 | "lite_mode": "라이트 모드",
14 | "device_mitigation": "디바이스 최적화",
15 | "default_cpu_gov": "기본 성능 모드",
16 | "powersave_cpu_gov": "절전 모드"
17 | },
18 | "actions": {
19 | "title": "작업",
20 | "edit_gamelist": "게임 목록 편집",
21 | "create_shortcut": "웹 UI 바로가기 만들기",
22 | "save_logs": "모듈 로그 저장"
23 | },
24 | "support": {
25 | "title": "후원하기",
26 | "description": "Encore Tweaks는 언제나 무료로 제공됩니다. 하지만 후원을 통해 관심과 감사의 마음을 표현할 수 있습니다."
27 | },
28 | "toast": {
29 | "reboot_to_apply": "변경 사항 적용을 위해 기기를 재부팅하세요.",
30 | "has_shortcut": "바로가기가 이미 존재합니다.",
31 | "gamelist_save_success": "게임 목록이 성공적으로 저장되었습니다."
32 | },
33 | "modal": {
34 | "dnd_title": "방해금지 모드",
35 | "dnd_desc": "게임 플레이 중 방해금지를 활성화합니다. 알림과 전화로 인한 방해를 최소화하여 게임에 집중할 수 있습니다.",
36 | "lite_mode_title": "라이트 모드",
37 | "lite_mode_desc": "이 옵션은 CPU와 다른 부품이 항상 최고 속도로 작동하지 않고 낮은 Hz로 동작하게 하여, 과열과 전력 소모를 줄입니다. 다만 전체 게임 성능에는 영향을 줄 수 있습니다.",
38 | "device_mitigation_title": "디바이스 최적화",
39 | "device_mitigation_desc": "특정 기기에서 발생할 수 있는 문제를 완화하고 호환성과 안정성을 높이기 위해 일부 조정을 적용합니다. 기기에서 문제가 발생할 때만 활성화하세요.",
40 | "unauthorized_mod_title": "허가되지 않은 수정 감지",
41 | "unauthorized_mod_desc": "이 모듈은 타인에 의해 수정되었을 수 있습니다. 보안을 위해 공식 Encore Tweaks 웹사이트에서 정식 버전을 다운로드하세요.",
42 | "edit_gamelist_title": "게임 목록 편집",
43 | "edit_gamelist_desc": "여기에 등록된 게임이나 앱을 실행하면 해당 성능 프로필이 자동으로 적용됩니다.",
44 | "save_changes": "변경 사항 저장",
45 | "cancel_changes": "변경 취소",
46 | "save_log_fail": "로그를 저장할 수 없습니다",
47 | "log_saved_title": "모듈 로그 저장 완료",
48 | "log_saved_desc": "로그가 {0}에 저장되었습니다."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/ja.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "現在のプロファイル",
5 | "kernel": "カーネル",
6 | "chipset": "チップセット",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "設定",
11 | "dnd_gameplay": "ゲームプレイ時にサイレントモード",
12 | "lite_mode": "ライトモード",
13 | "device_mitigation": "デバイス軽減",
14 | "default_cpu_gov": "デフォルトの CPU ガバナー",
15 | "powersave_cpu_gov": "省電力 CPU ガバナー"
16 | },
17 | "actions": {
18 | "title": "アクション",
19 | "edit_gamelist": "ゲームリストを編集",
20 | "create_shortcut": "WebUI ショートカットを作成",
21 | "save_logs": "モジュールログを保存"
22 | },
23 | "support": {
24 | "title": "サポートする",
25 | "description": "Encore Tweaks は無償で提供しています。これからもずっとです。ですが、寄付をすることで開発者への貢献に繋がります。"
26 | },
27 | "modal": {
28 | "dnd_title": "サイレントモード",
29 | "dnd_desc": "ゲームのプレイ時にサイレントモードを有効化することで、通知や通話による阻害を抑制します。邪魔をされずにお気に入りのゲームをプレイすることができます。",
30 | "lite_mode_title": "ライトモード",
31 | "lite_mode_desc": "この設定は、ゲームのプレイ時の発熱と消費電力を抑えるために CPU やその他のコンポーネントを最高周波数で常に動作させずに、低い周波数で動作できるようにします。ゲームの全体的なパフォーマンスに影響を与える可能性があります。",
32 | "device_mitigation_title": "デバイスの問題を軽減",
33 | "device_mitigation_desc": "互換性と信頼性を高めるために特定の調整を適用することで、デバイス固有の不具合を軽減します。デバイスの電源を OFF にしたときに問題が発生しない限り、この機能は無効にしておいてください。",
34 | "edit_gamelist_title": "ゲームリストを編集",
35 | "edit_gamelist_desc": "ここにリストされたゲームやアプリを起動すると、パフォーマンスプロファイルが有効化されます。",
36 | "save_changes": "変更を保存",
37 | "cancel_changes": "変更をキャンセル",
38 | "unauthorized_mod_title": "不正な変更が検出されました",
39 | "unauthorized_mod_desc": "このモジュールは第三者によって改変されている可能性があります。安全性の確保のため、Encore Tweaks の公式ウェブサイトから公式バージョンをダウンロードしてください。",
40 | "save_log_fail": "ログを保存できません",
41 | "log_saved_desc": "ログは「{0}」に保存されました。",
42 | "log_saved_title": "モジュールのログを保存しました"
43 | },
44 | "toast": {
45 | "reboot_to_apply": "変更を適用するにはデバイスを再起動してください。",
46 | "has_shortcut": "ショートカットは既に存在します。",
47 | "gamelist_save_success": "ゲームリストが正常に保存されました。"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/module/verify.sh:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2024-2025 Rem01Gaming
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | TMPDIR_FOR_VERIFY="$TMPDIR/.vunzip"
18 | mkdir "$TMPDIR_FOR_VERIFY"
19 |
20 | abort_verify() {
21 | ui_print "*********************************************************"
22 | ui_print "! $1"
23 | ui_print "! Installation aborted. The module may be corrupted."
24 | ui_print "! Please re-download and try again."
25 | abort "*********************************************************"
26 | }
27 |
28 | # extract
29 | extract() {
30 | zip=$1
31 | file=$2
32 | dir=$3
33 |
34 | file_path="$dir/$file"
35 | hash_path="$TMPDIR_FOR_VERIFY/$file.sha256"
36 |
37 | unzip -o "$zip" "$file" -d "$dir" >&2
38 | [ -f "$file_path" ] || abort_verify "$file does not exists"
39 |
40 | unzip -o "$zip" "$file.sha256" -d "$TMPDIR_FOR_VERIFY" >&2
41 | [ -f "$hash_path" ] || abort_verify "Missing checksum for $file"
42 |
43 | (echo "$(cat "$hash_path") $file_path" | sha256sum -c -s -) || abort_verify "Checksum mismatch for $file"
44 | # ui_print "- Verified $file" >&1
45 | }
46 |
47 | file="META-INF/com/google/android/update-binary"
48 | file_path="$TMPDIR_FOR_VERIFY/$file"
49 | hash_path="$file_path.sha256"
50 | unzip -o "$ZIPFILE" "META-INF/com/google/android/*" -d "$TMPDIR_FOR_VERIFY" >&2
51 | [ -f "$file_path" ] || abort_verify "$file does not exists"
52 | if [ -f "$hash_path" ]; then
53 | (echo "$(cat "$hash_path") $file_path" | sha256sum -c -s -) || abort_verify "Checksum mismatch for $file"
54 | # ui_print "- Verified $file" >&1
55 | else
56 | ui_print "- Download from Magisk app"
57 | fi
58 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug report
2 | description: Create a report to help us improve Encore Tweaks
3 | title: "[BUG]"
4 | labels: ["bug"]
5 |
6 | body:
7 | - type: checkboxes
8 | attributes:
9 | label: Please check before submitting an issue
10 | options:
11 | - label: I have searched the issues and haven't found anything relevant
12 | required: true
13 |
14 | - label: I will upload bugreport file in Encore Tweaks WebUI - Save Module Log
15 | required: true
16 |
17 | - label: I know how to reproduce the issue which may not be specific to my device
18 | required: false
19 |
20 |
21 | - type: textarea
22 | attributes:
23 | label: Describe the bug
24 | description: A clear and concise description of what the bug is
25 | validations:
26 | required: true
27 |
28 |
29 | - type: textarea
30 | attributes:
31 | label: To Reproduce
32 | description: Steps to reproduce the behaviour
33 | placeholder: |
34 | - 1. Go to '...'
35 | - 2. Click on '....'
36 | - 3. Scroll down to '....'
37 | - 4. See error
38 |
39 |
40 | - type: textarea
41 | attributes:
42 | label: Expected behavior
43 | description: A clear and concise description of what you expected to happen.
44 |
45 |
46 | - type: textarea
47 | attributes:
48 | label: Screenshots
49 | description: If applicable, add screenshots to help explain your problem.
50 |
51 |
52 | - type: textarea
53 | attributes:
54 | label: Logs
55 | description: If applicable, add crash or any other logs to help us figure out the problem.
56 |
57 |
58 | - type: textarea
59 | attributes:
60 | label: Device info
61 | value: |
62 | - Device:
63 | - OS Version:
64 | - Encore Tweaks Version:
65 | - Kernel Version:
66 | validations:
67 | required: true
68 |
69 |
70 | - type: textarea
71 | attributes:
72 | label: Additional context
73 | description: Add any other context about the problem here.
74 |
--------------------------------------------------------------------------------
/docs/README_zh-CN.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ## 关于 Encore Tweaks
11 | [English](/README.md) | [Bahasa Indonesia](/docs/README_id-ID.md) | [简体中文](/docs/README_zh-CN.md)
12 |
13 | **Encore Tweaks** 是一个动态的 Magisk 模块,旨在最大化您设备的游戏性能,同时在日常使用中智能地节省电池电量。非常适合那些要求流畅游戏体验而又不牺牲日常可用性的玩家!
14 |
15 | 有关此项目的更多信息,请访问 [Encore Tweaks 官方网站](https://encore.rem01gaming.dev/)
16 |
17 | ## 支持的 Root 管理器
18 | - [APatch](https://github.com/bmax121/APatch)
19 | - [KernelSU](https://github.com/tiann/KernelSU)
20 | - [Magisk](https://github.com/topjohnwu/Magisk) ([无 WebUI](https://github.com/topjohnwu/Magisk/issues/8609#event-15568590949)👀)
21 |
22 | ## 也支持在
23 | - [KsuWebUI](https://github.com/5ec1cff/KsuWebUIStandalone) ▶ 🌐
24 | - [MMRL](https://github.com/DerGoogler/MMRL) ▶ 🌐
25 |
26 | ## 资源
27 | - [常见问题解答](https://encore.rem01gaming.dev/guide/faq.html) - 常见问题解答
28 | - [配置指南](https://encore.rem01gaming.dev/guide/webui-and-configuration.html) - 如何配置 WebUI
29 | - [下载](https://encore.rem01gaming.dev/download) - 获取最新版本
30 |
31 | ## 社区与支持
32 | - [Telegram 频道](https://t.me/rem01schannel) - 了解最新公告
33 | - [报告问题](https://github.com/rem01gaming/encore/issues) - 发现了 bug?告诉我们!
34 | - [贡献代码](https://github.com/rem01gaming/encore/pulls) - 通过拉取请求提交改进
35 |
36 | ## 许可证
37 | Encore Tweaks 是根据 [Apache-2.0 许可证](https://www.apache.org/licenses/LICENSE-2.0) 开源的软件。
38 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build Encore Zip
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | -main
7 | workflow_dispatch:
8 | push:
9 | branches:
10 | - main
11 | paths:
12 | - '.github/workflows/build.yml'
13 | - '.github/scripts/**'
14 | - 'jni/**'
15 | - 'scripts/**'
16 | - 'module/**'
17 | - 'webui/**'
18 | - 'gamelist.txt'
19 | - 'version'
20 |
21 | # Allow only one concurrent build workflows
22 | concurrency:
23 | group: build
24 | cancel-in-progress: true
25 |
26 | jobs:
27 | build:
28 | name: Build Flashable Zip
29 | runs-on: ubuntu-latest
30 | steps:
31 | - name: Checkout
32 | uses: actions/checkout@v4.2.2
33 | with:
34 | fetch-depth: 0
35 | submodules: true
36 |
37 | - name: NDK Setup
38 | uses: nttld/setup-ndk@v1.5.0
39 | with:
40 | ndk-version: r29
41 |
42 | - name: Setup Bun
43 | uses: oven-sh/setup-bun@v2.0.2
44 |
45 | - name: Build Encore JNI
46 | run: ndk-build -j$(nproc --all)
47 |
48 | - name: Build WebUI
49 | working-directory: ./webui
50 | run: |
51 | bun install
52 | bun run build
53 | cp -r ./dist/* ../module/webroot
54 |
55 | - name: Compile Flashable Zip
56 | id: compileZip
57 | run: bash .github/scripts/compile_zip.sh
58 |
59 | - name: Upload Build Artifact
60 | uses: actions/upload-artifact@v4.6.2
61 | with:
62 | name: encore-build
63 | path: ${{ steps.compileZip.outputs.zipName }}
64 |
65 | - name: Upload To Telegram
66 | env:
67 | CHAT_ID: ${{ secrets.CHAT_ID }}
68 | BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
69 | COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
70 | COMMIT_URL: ${{ github.event.head_commit.url }}
71 | RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
72 | TITLE: Encore Tweaks
73 | run: |
74 | if [ ! -z "${{ secrets.CHAT_ID }}" ] && [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
75 | export VERSION=$(git rev-list --count HEAD)
76 | bash .github/scripts/telegram_bot.sh ${{ steps.compileZip.outputs.zipName }}
77 | else
78 | echo "Telegram bot token or chatid is undefined, please add it to repository secrets!"
79 | exit 1
80 | fi
81 |
--------------------------------------------------------------------------------
/website/docs/guide/addon.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Encore Tweaks Addon"
3 | description: "Explore the Encore Tweaks Addon for dynamic performance optimization, API integration, and seamless module collaboration."
4 | ---
5 |
6 | # Encore Tweaks Addon
7 |
8 | In addition to applying various performance tweaks dinamically, Encore Tweaks also provide API for other modules to interact and work together as profile changes.
9 |
10 | Other module can watch current profile on Encore Tweaks and then apply their own tweaks as it changes, ultimately working together with Encore Tweaks as an Add-on.
11 |
12 | ::: tip
13 | If you find that the existing API doesn't meet your needs or is inconvenient to use, you're welcome to give us suggestions [here](https://github.com/Rem01Gaming/encore/issues)!
14 | :::
15 |
16 | ::: tip Note
17 | All features are supported starting on Encore Tweaks 4.5 unless noted.
18 | :::
19 |
20 | ## File Interface
21 |
22 | ### `/data/adb/.config/encore/current_profile`
23 |
24 | **Description**: Contains the current performance profile state as a numeric value
25 |
26 | **Possible Values**:
27 |
28 | | Value | Profile Mode | Description |
29 | |-------|-----------------|--------------------------------------------|
30 | | 0 | Perfcommon | Common performance optimization on startup |
31 | | 1 | Performance | Performance mode |
32 | | 2 | Normal | Default operating mode |
33 | | 3 | PowerSave | Battery saving mode |
34 |
35 | ### `/data/adb/.config/encore/gameinfo`
36 |
37 | **Description**: Contains active game session information when games from the Encore Tweaks gamelist are running
38 |
39 | **Format**:
40 | ```
41 |
42 | ```
43 |
44 | **Special Values**:
45 | - `NULL 0 0` when no game is active
46 |
47 | ## Logging System
48 |
49 | Encore Tweaks records events and errors in `/data/adb/.config/encore/encore.log` using a format similar to logcat. While consolidating logs is advantageous for debugging purposes, it poses challenges for other addons due to potential write conflicts and format discrepancies.
50 |
51 | With the release of Encore Tweaks 4.6, Encore has provided a straightforward method for addons to log their information through `encore_log`.
52 |
53 | ```
54 | Usage: encore_log
55 | Levels: 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR, 4=FATAL
56 |
57 | Example:
58 | encore_log MyAddon 0 Hello World!
59 |
60 | To see if the info successfully logged, run 'encore_utility logcat' or use Encore Tweaks WebUI.
61 | ```
62 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/ar.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "الملف الشخصي الحالي",
5 | "kernel": "النواة",
6 | "chipset": "مجموعة الشرائح",
7 | "androidSDK": "Android SDK"
8 | },
9 | "modal": {
10 | "dnd_title": "عدم الإزعاج",
11 | "dnd_desc": "تفعيل وضع عدم الإزعاج أثناء اللعب. يحد من مقاطعات الإشعارات والمكالمات، مما يسمح لك باللعب بدون تشتيت.",
12 | "lite_mode_title": "وضع Lite",
13 | "lite_mode_desc": "يقلل هذا الخيار من ارتفاع درجة الحرارة واستهلاك الطاقة أثناء اللعب، من خلال السماح لوحدة المعالجة المركزية والمكونات الأخرى بالعمل بتردد أقل بدلاً من التشغيل المستمر على أعلى تردد. قد يؤثر ذلك على أداء اللعبة بشكل عام.",
14 | "device_mitigation_title": "تخفيف الجهاز",
15 | "device_mitigation_desc": "يعالج بعض الأخطاء الخاصة بالجهاز من خلال تطبيق تعديلات لتحسين التوافق والموثوقية. يُرجى إبقاء هذه الميزة معطلة إلا إذا واجه جهازك مشاكل عند إيقاف التشغيل.",
16 | "edit_gamelist_title": "تحرير قائمة الألعاب",
17 | "edit_gamelist_desc": "سيتم تنشيط ملف الأداء عند تشغيل أي من الألعاب والتطبيقات المدرجة هنا.",
18 | "save_changes": "حفظ التغييرات",
19 | "cancel_changes": "إلغاء التغييرات",
20 | "unauthorized_mod_title": "تم كشف تعديلات غير مصرح بها",
21 | "unauthorized_mod_desc": "تلك الإضافة قد يكون تم التعديل فيها من طرف ثالث. من أجل حمايتك قم بتحميل النسخة الرسمية من موقع Encore Tweaks الرسمي.",
22 | "save_log_fail": "فشل في حفظ السجلات",
23 | "log_saved_title": "تم حفظ سجلات الإضافة",
24 | "log_saved_desc": "تم حقظ السجلات في {0}."
25 | },
26 | "settings": {
27 | "title": "الإعدادات",
28 | "dnd_gameplay": "عدم الإزعاج أثناء اللعب",
29 | "lite_mode": "وضع Lite",
30 | "device_mitigation": "تخفيف الجهاز",
31 | "default_cpu_gov": "المنظم الافتراضي للمعالج",
32 | "powersave_cpu_gov": "منظم توفير الطاقة للمعالج",
33 | "cpu_governor_title": "مدير المعالج"
34 | },
35 | "actions": {
36 | "title": "الإجراءات",
37 | "edit_gamelist": "تحرير قائمة الألعاب",
38 | "create_shortcut": "إنشاء اختصار WebUI",
39 | "save_logs": "حفظ سجلات الوحدة"
40 | },
41 | "support": {
42 | "title": "ادعمني",
43 | "description": "Encore Tweaks مجاني وسيبقى دائمًا مجانيًا. لكن يمكنك إظهار دعمك من خلال التبرع."
44 | },
45 | "toast": {
46 | "reboot_to_apply": "قم بإعادة تشغيل جهازك لتطبيق التغييرات.",
47 | "has_shortcut": "الإختصار موجود بالفعل.",
48 | "gamelist_save_success": "تم حفظ قائمة الألعاب."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/jni/src/EncoreUtility/MiscUtility.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "EncoreUtility.hpp"
18 |
19 | #include
20 | #include
21 |
22 | void set_do_not_disturb(bool do_not_disturb) {
23 | if (do_not_disturb) {
24 | system("cmd notification set_dnd priority");
25 | } else {
26 | system("cmd notification set_dnd off");
27 | }
28 | }
29 |
30 | void notify(const char *message) {
31 | pid_t pid = fork();
32 |
33 | if (pid == 0) {
34 | if (setgid(2000) != 0 || setuid(2000) != 0) {
35 | _exit(126);
36 | }
37 |
38 | const char *args[] = {"cmd", "notification", "post", "-t",
39 | NOTIFY_TITLE, LOG_TAG, message, NULL};
40 |
41 | execvp("/system/bin/cmd", (char *const *)args);
42 | _exit(127);
43 | } else if (pid > 0) {
44 | int status;
45 | waitpid(pid, &status, 0);
46 |
47 | if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) [[unlikely]] {
48 | LOGE_TAG("Notify", "Push notification failed with status: {}", WEXITSTATUS(status));
49 | }
50 | } else {
51 | LOGE_TAG("Notify", "fork failed: {}", strerror(errno));
52 | }
53 | }
54 |
55 | void is_kanged(void) {
56 | std::vector module_properties;
57 |
58 | try {
59 | ModuleProperty::Get(MODULE_PROP, module_properties);
60 |
61 | for (const auto &property : module_properties) {
62 | if (property.key == "name" && property.value != "Encore Tweaks") {
63 | goto doorprize;
64 | }
65 |
66 | if (property.key == "author" && property.value != "Rem01Gaming") {
67 | goto doorprize;
68 | }
69 | }
70 | } catch (const std::exception &e) {
71 | LOGE_TAG("ModuleProperty", "{}", e.what());
72 | }
73 |
74 | return;
75 |
76 | doorprize:
77 | LOGC("Module modified by 3rd party, exiting");
78 | notify("Trying to rename me?");
79 | exit(EXIT_FAILURE);
80 | }
81 |
--------------------------------------------------------------------------------
/module/service.sh:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2024-2025 Rem01Gaming
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | MODDIR=$(dirname "$0")
18 | MODULE_CONFIG="/data/adb/.config/encore"
19 | CLEANUP_SCRIPT="/data/adb/service.d/.encore_cleanup.sh"
20 | CPUFREQ="/sys/devices/system/cpu/cpu0/cpufreq"
21 |
22 | # Clear old logs
23 | rm -f "$MODULE_CONFIG/encore.log"
24 |
25 | # Parse Governor to use
26 | chmod 644 "$CPUFREQ/scaling_governor"
27 | default_gov=$(cat "$CPUFREQ/scaling_governor")
28 | echo "$default_gov" >$MODULE_CONFIG/default_cpu_gov
29 |
30 | # Create cleanup script
31 | [ ! -f "$CLEANUP_SCRIPT" ] && {
32 | mkdir -p "$(dirname $CLEANUP_SCRIPT)"
33 | cp "$MODDIR/cleanup.sh" "$CLEANUP_SCRIPT"
34 | chmod +x "$CLEANUP_SCRIPT"
35 | }
36 |
37 | # Wait until boot completed
38 | while [ -z "$(getprop sys.boot_completed)" ]; do
39 | sleep 40
40 | done
41 |
42 | # Handle case when 'default_gov' is performance
43 | # Skip this routine if custom_default_cpu_gov is defined
44 | default_gov_preferred_array="
45 | scx
46 | schedhorizon
47 | walt
48 | sched_pixel
49 | sugov_ext
50 | uag
51 | schedplus
52 | energy_step
53 | schedutil
54 | interactive
55 | conservative
56 | powersave
57 | "
58 |
59 | if [ "$default_gov" == "performance" ] && [ ! -f $MODULE_CONFIG/custom_default_cpu_gov ]; then
60 | for gov in $default_gov_preferred_array; do
61 | grep -q "$gov" "$CPUFREQ/scaling_available_governors" && {
62 | echo "$gov" >$MODULE_CONFIG/default_cpu_gov
63 | default_gov="$gov"
64 | break
65 | }
66 | done
67 | fi
68 |
69 | # Revert to normal CPU governor
70 | custom_gov="$MODULE_CONFIG/custom_default_cpu_gov"
71 | [ -f "$custom_gov" ] && default_gov=$(cat "$custom_gov")
72 | echo "$default_gov" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
73 | [ ! -f $MODULE_CONFIG/powersave_cpu_gov ] && echo "$default_gov" >$MODULE_CONFIG/powersave_cpu_gov
74 |
75 | # Mitigate buggy thermal throttling on post-startup
76 | # in old MediaTek devices.
77 | ENABLE_PPM="/proc/ppm/enabled"
78 | if [ -f "$ENABLE_PPM" ]; then
79 | echo 0 >"$ENABLE_PPM"
80 | sleep 1
81 | echo 1 >"$ENABLE_PPM"
82 | fi
83 |
84 | # Start Encore Daemon
85 | encored daemon
86 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/uk.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "profile": "Поточний профіль",
4 | "kernel": "Ядро",
5 | "chipset": "Чипсет"
6 | },
7 | "settings": {
8 | "title": "Налаштування",
9 | "cpu_governor_title": "Регулятор частоти ЦП",
10 | "dnd_gameplay": "«Не турбувати» під час гри",
11 | "lite_mode": "Спрощений режим",
12 | "device_mitigation": "Зменшення навантаження пристрою",
13 | "default_cpu_gov": "Типовий регулятор частоти ЦП",
14 | "powersave_cpu_gov": "Енергозберігаючий регулятор ЦП"
15 | },
16 | "actions": {
17 | "title": "Дії",
18 | "edit_gamelist": "Редагувати список ігор",
19 | "create_shortcut": "Створити ярлик вебінтерфейсу",
20 | "save_logs": "Зберегти журнали модуля"
21 | },
22 | "support": {
23 | "title": "Підтримати мене",
24 | "description": "Encore Tweaks є і завжди буде безкоштовним для всіх. Проте ви можете підтримати проєкт, зробивши пожертву."
25 | },
26 | "toast": {
27 | "reboot_to_apply": "Перезавантажте пристрій, щоб застосувати зміни.",
28 | "has_shortcut": "Ярлик уже існує.",
29 | "gamelist_save_success": "Список ігор успішно збережено."
30 | },
31 | "modal": {
32 | "dnd_title": "Не турбувати",
33 | "dnd_desc": "Увімкнути режим «Не турбувати» під час ігор. Обмежує сповіщення та виклики, щоб ніщо не відволікало від гри.",
34 | "lite_mode_title": "Спрощений режим",
35 | "lite_mode_desc": "Ця опція зменшує перегрів і споживання енергії під час ігор, дозволяючи процесору та іншим компонентам працювати на нижчих частотах замість постійно максимальних. Це вплине на загальну продуктивність гри.",
36 | "device_mitigation_title": "Обхід проблем пристрою",
37 | "device_mitigation_desc": "Пом’якшує специфічні для пристрою помилки за допомогою налаштувань для підвищення сумісності та надійності. Залишайте цю функцію вимкненою, якщо при її вимкненні проблем не виникає.",
38 | "unauthorized_mod_title": "Виявлено несанкціоновану модифікацію",
39 | "unauthorized_mod_desc": "Модуль міг бути змінений сторонньою особою. З міркувань безпеки завантажте офіційну версію з офіційного сайту Encore Tweaks.",
40 | "edit_gamelist_title": "Редагувати список ігор",
41 | "edit_gamelist_desc": "Профіль продуктивності буде активовано під час запуску будь-якої з перелічених тут ігор або застосунків.",
42 | "save_changes": "Зберегти зміни",
43 | "cancel_changes": "Скасувати зміни",
44 | "save_log_fail": "Не вдалося зберегти журнали",
45 | "log_saved_title": "Журнали модуля збережено",
46 | "log_saved_desc": "Журнали збережено у {0}."
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/webui/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 | .pnpm-debug.log*
9 |
10 | # Diagnostic reports (https://nodejs.org/api/report.html)
11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12 |
13 | # Runtime data
14 | pids
15 | *.pid
16 | *.seed
17 | *.pid.lock
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 | *.lcov
25 |
26 | # nyc test coverage
27 | .nyc_output
28 |
29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30 | .grunt
31 |
32 | # Bower dependency directory (https://bower.io/)
33 | bower_components
34 |
35 | # node-waf configuration
36 | .lock-wscript
37 |
38 | # Compiled binary addons (https://nodejs.org/api/addons.html)
39 | build/Release
40 |
41 | # Dependency directories
42 | node_modules/
43 | jspm_packages/
44 |
45 | # Snowpack dependency directory (https://snowpack.dev/)
46 | web_modules/
47 |
48 | # TypeScript cache
49 | *.tsbuildinfo
50 |
51 | # Optional npm cache directory
52 | .npm
53 |
54 | # Optional eslint cache
55 | .eslintcache
56 |
57 | # Optional stylelint cache
58 | .stylelintcache
59 |
60 | # Microbundle cache
61 | .rpt2_cache/
62 | .rts2_cache_cjs/
63 | .rts2_cache_es/
64 | .rts2_cache_umd/
65 |
66 | # Optional REPL history
67 | .node_repl_history
68 |
69 | # Output of 'npm pack'
70 | *.tgz
71 |
72 | # Yarn Integrity file
73 | .yarn-integrity
74 |
75 | # dotenv environment variable files
76 | .env
77 | .env.development.local
78 | .env.test.local
79 | .env.production.local
80 | .env.local
81 |
82 | # parcel-bundler cache (https://parceljs.org/)
83 | .cache
84 | .parcel-cache
85 |
86 | # Next.js build output
87 | .next
88 | out
89 |
90 | # Nuxt.js build / generate output
91 | .nuxt
92 | dist
93 |
94 | # Gatsby files
95 | .cache/
96 | # Comment in the public line in if your project uses Gatsby and not Next.js
97 | # https://nextjs.org/blog/next-9-1#public-directory-support
98 | # public
99 |
100 | # vuepress build output
101 | .vuepress/dist
102 |
103 | # vuepress v2.x temp and cache directory
104 | .temp
105 | .cache
106 |
107 | # Docusaurus cache and generated files
108 | .docusaurus
109 |
110 | # Serverless directories
111 | .serverless/
112 |
113 | # FuseBox cache
114 | .fusebox/
115 |
116 | # DynamoDB Local files
117 | .dynamodb/
118 |
119 | # TernJS port file
120 | .tern-port
121 |
122 | # Stores VSCode versions used for testing VSCode extensions
123 | .vscode-test
124 |
125 | # yarn v2
126 | .yarn/cache
127 | .yarn/unplugged
128 | .yarn/build-state.yml
129 | .yarn/install-state.gz
130 | .pnp.*
131 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/jv.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "Profil Saiki",
5 | "kernel": "Kernel",
6 | "chipset": "Chipset",
7 | "androidSDK": "Android SDK"
8 | },
9 | "modal": {
10 | "dnd_title": "Mode Hening",
11 | "dnd_desc": "Aktifake mode hening nalika dolanan game. Ngalang-alangi notifikasi lan telpon supaya sampeyan bisa fokus dolanan tanpa gangguan.",
12 | "lite_mode_title": "Mode Lite",
13 | "lite_mode_desc": "Opsi iki bakal nyuda overheating lan konsumsi daya sajrone game kanthi ngidini CPU lan komponen liyane bisa mlaku kanthi frekuensi sing luwih murah tinimbang terus-terusan ing frekuensi paling dhuwur, iki bakal mengaruhi kinerja game sakabèhé.",
14 | "device_mitigation_title": "Mitigasi Piranti",
15 | "device_mitigation_desc": "Ngilangi sawetara bug khusus piranti kanthi ngetrapake pangaturan tartamtu kanggo nambah kompatibilitas lan linuwih, tetepake fitur iki dipateni kajaba piranti sampeyan ngalami masalah nalika dipateni.",
16 | "edit_gamelist_title": "Sunting Dhaptar Game",
17 | "edit_gamelist_desc": "Profil kinerja bakal diaktifake nalika game utawa aplikasi sing kadhaptar ing kene dibukak.",
18 | "save_changes": "Simpen Owahan",
19 | "cancel_changes": "Batalake Owahan",
20 | "unauthorized_mod_title": "Modifikasi tanpa wewenang dideteksi",
21 | "unauthorized_mod_desc": "Modul iki bisa uga wis diowahi dening pihak katelu. Kanggo keamanan sampeyan, mangga download versi resmi saka situs web Encore Tweaks resmi.",
22 | "save_log_fail": "Ora bisa nyimpen log",
23 | "log_saved_title": "Log Modul Disimpen",
24 | "log_saved_desc": "Log disimpen ing {0}."
25 | },
26 | "actions": {
27 | "title": "Tindakan",
28 | "edit_gamelist": "Sunting Dhaptar Game",
29 | "create_shortcut": "Gawe Pintasan WebUI",
30 | "save_logs": "Simpen Log Modul"
31 | },
32 | "support": {
33 | "description": "Encore Tweaks gratis lan bakal tetep gratis kanggo sapa wae. Nanging, sampeyan bisa nuduhake rasa peduli kanthi nyumbang.",
34 | "title": "Dukung Aku"
35 | },
36 | "settings": {
37 | "title": "Setelan",
38 | "dnd_gameplay": "DND Nalika Main",
39 | "lite_mode": "Mode Lite",
40 | "device_mitigation": "Mitigasi Piranti",
41 | "default_cpu_gov": "Governor CPU Gawan",
42 | "powersave_cpu_gov": "Governor CPU Irit Daya",
43 | "cpu_governor_title": "CPU Governor"
44 | },
45 | "toast": {
46 | "has_shortcut": "Pintasan wis ana.",
47 | "reboot_to_apply": "Reboot piranti kanggo ngetrapake owah-owahan.",
48 | "gamelist_save_success": "Dhaptar game kasil disimpen."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/vi.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "kernel": "Kernel",
5 | "profile": "Cấu hình hiện tại",
6 | "chipset": "Chipset",
7 | "androidSDK": "Android SDK"
8 | },
9 | "modal": {
10 | "dnd_title": "Không làm phiền",
11 | "dnd_desc": "Bật chế độ không làm phiền khi chơi game. Hạn chế thông báo và cuộc gọi để bạn có thể chơi mà không bị gián đoạn.",
12 | "lite_mode_title": "Chế độ Lite",
13 | "lite_mode_desc": "Tùy chọn này giúp giảm nhiệt và tiết kiệm năng lượng trong khi chơi game bằng cách cho phép CPU và các thành phần khác hoạt động ở tần số thấp hơn thay vì luôn ở tần số cao nhất. Điều này có thể ảnh hưởng đến hiệu suất tổng thể của trò chơi.",
14 | "device_mitigation_title": "Sửa lỗi thiết bị",
15 | "device_mitigation_desc": "Sửa một số lỗi của một số thiết bị đặc biệt bằng cách chỉnh vài cài đặt để tăng độ tương thích và tin cậy. Giữ tùy chọn này tắt trừ phi thiết bị của bạn gặp vấn đề.",
16 | "edit_gamelist_title": "Chỉnh sửa danh sách trò chơi",
17 | "edit_gamelist_desc": "Cấu hình hiệu suất sẽ được kích hoạt khi bất kỳ trò chơi hoặc ứng dụng nào trong danh sách này được mở.",
18 | "save_changes": "Lưu thay đổi",
19 | "cancel_changes": "Hủy thay đổi",
20 | "unauthorized_mod_title": "Đã phát hiện can thiệp bên ngoài",
21 | "save_log_fail": "Không thể lưu nhật kí",
22 | "unauthorized_mod_desc": "Module này có thể đã bị chỉnh sửa bởi một bên thứ ba. Vì an toàn của bạn, hãy tải bản chính thức từ trang web chính thức của Encore Tweaks.",
23 | "log_saved_desc": "Nhật kí được lưu tại {0}.",
24 | "log_saved_title": "Nhật ký của module đã được lưu"
25 | },
26 | "actions": {
27 | "title": "Hành động",
28 | "edit_gamelist": "Chỉnh sửa danh sách trò chơi",
29 | "create_shortcut": "Tạo lối tắt WebUI",
30 | "save_logs": "Lưu nhật ký module"
31 | },
32 | "settings": {
33 | "title": "Cài đặt",
34 | "dnd_gameplay": "DND khi chơi game",
35 | "lite_mode": "Chế độ Lite",
36 | "device_mitigation": "Sửa lỗi thiết bị",
37 | "default_cpu_gov": "Bộ điều chỉnh CPU mặc định",
38 | "powersave_cpu_gov": "Bộ điều chỉnh CPU tiết kiệm năng lượng",
39 | "cpu_governor_title": "Cơ chế tốc độ CPU"
40 | },
41 | "support": {
42 | "description": "Encore Tweaks luôn miễn phí cho tất cả mọi người. Tuy nhiên, bạn có thể ủng hộ tôi bằng cách quyên góp.",
43 | "title": "Hỗ trợ tôi"
44 | },
45 | "toast": {
46 | "reboot_to_apply": "Khởi động lại thiết bị để áp dụng các thay đổi.",
47 | "has_shortcut": "Lối tắt đã tồn tại.",
48 | "gamelist_save_success": "Đã lưu gamelist thành công."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "Current Profile",
5 | "kernel": "Kernel",
6 | "chipset": "Chipset",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "Settings",
11 | "cpu_governor_title": "CPU Governor",
12 | "dnd_gameplay": "DND on Gameplay",
13 | "lite_mode": "Lite Mode",
14 | "device_mitigation": "Device Mitigation",
15 | "default_cpu_gov": "Default CPU Governor",
16 | "powersave_cpu_gov": "Powersave CPU Governor"
17 | },
18 | "actions": {
19 | "title": "Actions",
20 | "edit_gamelist": "Edit Gamelist",
21 | "create_shortcut": "Create WebUI Shortcut",
22 | "save_logs": "Save Module Logs"
23 | },
24 | "support": {
25 | "title": "Support Me",
26 | "description": "Encore Tweaks is, and always will be, free for you, and everyone. You can however show me that you care by making a donation."
27 | },
28 | "toast": {
29 | "reboot_to_apply": "Reboot your device to apply changes.",
30 | "has_shortcut": "Shortcut already exists.",
31 | "gamelist_save_success": "Gamelist saved successfully."
32 | },
33 | "modal": {
34 | "dnd_title": "Do Not Disturb",
35 | "dnd_desc": "Enable do not disturb mode when playing games. Limits interruptions from notifications and calls, allowing you to play your favorite games without any distraction.",
36 | "lite_mode_title": "Lite Mode",
37 | "lite_mode_desc": "This option will reduces overheating and power consumption during gameplay by allowing CPU and other components to run at lower frequency rather than constantly at the highest frequency, this will affect overall game performance.",
38 | "device_mitigation_title": "Device Mitigation",
39 | "device_mitigation_desc": "Mitigate some device specific bugs by applying certain adjustments to enhance compatibility and reliability, keep this feature disabled unless your device experiences problems when it is switched off.",
40 | "unauthorized_mod_title": "Unauthorized modification detected",
41 | "unauthorized_mod_desc": "This module may have been modified by a third party. For your security, please download the official version from the official Encore Tweaks website.",
42 | "edit_gamelist_title": "Edit Gamelist",
43 | "edit_gamelist_desc": "The performance profile will be activated when any of the games and apps listed here are launched.",
44 | "save_changes": "Save Changes",
45 | "cancel_changes": "Cancel Changes",
46 | "save_log_fail": "Unable to save logs",
47 | "log_saved_title": "Module Logs Saved",
48 | "log_saved_desc": "Logs saved at {0}."
49 | }
50 | }
--------------------------------------------------------------------------------
/docs/README_id-ID.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ## Tentang Encore Tweaks
11 | [English](/README.md) | [Bahasa Indonesia](/docs/README_id-ID.md) | [简体中文](/docs/README_zh-CN.md)
12 |
13 | **Encore Tweaks** adalah modul Magisk dinamis yang dirancang untuk memaksimalkan performa gaming perangkat Anda sekaligus menghemat daya tahan baterai selama penggunaan sehari-hari. Sempurna untuk para gamer yang menginginkan gameplay yang mulus tanpa mengorbankan kegunaan sehari-hari!
14 |
15 | Info lebih lanjut tentang project ini di [Situs web resmi Encore Tweaks](https://encore.rem01gaming.dev/)
16 |
17 | ## Manajer Root yang Didukung
18 |
19 | - [APatch](https://github.com/bmax121/APatch)
20 | - [KernelSU](https://github.com/tiann/KernelSU)
21 | - [Magisk](https://github.com/topjohnwu/Magisk) ([no WebUI](https://github.com/topjohnwu/Magisk/issues/8609#event-15568590949)👀)
22 |
23 | ### Juga Didukung di
24 |
25 | - [KsuWebUI](https://github.com/5ec1cff/KsuWebUIStandalone) ▶ 🌐
26 | - [MMRL](https://github.com/DerGoogler/MMRL) ▶ 🌐
27 |
28 | ## Sumber Informasi
29 |
30 | - [FAQ](https://encore.rem01gaming.dev/guide/faq.html) - Pertanyaan umum terjawab
31 | - [Panduan Konfigurasi](https://encore.rem01gaming.dev/guide/webui-and-configuration.html) - Cara mengonfigurasi WebUI
32 | - [Download](https://encore.rem01gaming.dev/download) - Dapatkan versi terbaru
33 |
34 | ## Komunitas & Dukungan
35 |
36 | - [Telegram Channel](https://t.me/rem01schannel) - Tetap update dengan pengumuman
37 | - [Report Issues](https://github.com/rem01gaming/encore/issues) - Menemukan bug? Beri tahu kami!
38 | - [Contribute](https://github.com/rem01gaming/encore/pulls) - Kirimkan perbaikan melalui PR
39 |
40 | ## Lisensi
41 |
42 | Encore Tweaks adalah perangkat lunak open source yang dilisensikan di bawah [Apache-2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
43 |
--------------------------------------------------------------------------------
/website/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 | .pnpm-debug.log*
9 |
10 | # Diagnostic reports (https://nodejs.org/api/report.html)
11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12 |
13 | # Runtime data
14 | pids
15 | *.pid
16 | *.seed
17 | *.pid.lock
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 | *.lcov
25 |
26 | # nyc test coverage
27 | .nyc_output
28 |
29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30 | .grunt
31 |
32 | # Bower dependency directory (https://bower.io/)
33 | bower_components
34 |
35 | # node-waf configuration
36 | .lock-wscript
37 |
38 | # Compiled binary addons (https://nodejs.org/api/addons.html)
39 | build/Release
40 |
41 | # Dependency directories
42 | node_modules/
43 | jspm_packages/
44 |
45 | # Snowpack dependency directory (https://snowpack.dev/)
46 | web_modules/
47 |
48 | # TypeScript cache
49 | *.tsbuildinfo
50 |
51 | # Optional npm cache directory
52 | .npm
53 |
54 | # Optional eslint cache
55 | .eslintcache
56 |
57 | # Optional stylelint cache
58 | .stylelintcache
59 |
60 | # Microbundle cache
61 | .rpt2_cache/
62 | .rts2_cache_cjs/
63 | .rts2_cache_es/
64 | .rts2_cache_umd/
65 |
66 | # Optional REPL history
67 | .node_repl_history
68 |
69 | # Output of 'npm pack'
70 | *.tgz
71 |
72 | # Yarn Integrity file
73 | .yarn-integrity
74 |
75 | # dotenv environment variable files
76 | .env
77 | .env.development.local
78 | .env.test.local
79 | .env.production.local
80 | .env.local
81 |
82 | # parcel-bundler cache (https://parceljs.org/)
83 | .cache
84 | .parcel-cache
85 |
86 | # Next.js build output
87 | .next
88 | out
89 |
90 | # Nuxt.js build / generate output
91 | .nuxt
92 | dist
93 |
94 | # Gatsby files
95 | .cache/
96 | # Comment in the public line in if your project uses Gatsby and not Next.js
97 | # https://nextjs.org/blog/next-9-1#public-directory-support
98 | # public
99 |
100 | # vuepress build output
101 | .vuepress/dist
102 |
103 | # vuepress v2.x temp and cache directory
104 | .temp
105 | .cache
106 |
107 | # Docusaurus cache and generated files
108 | .docusaurus
109 |
110 | # Serverless directories
111 | .serverless/
112 |
113 | # FuseBox cache
114 | .fusebox/
115 |
116 | # DynamoDB Local files
117 | .dynamodb/
118 |
119 | # TernJS port file
120 | .tern-port
121 |
122 | # Stores VSCode versions used for testing VSCode extensions
123 | .vscode-test
124 |
125 | # yarn v2
126 | .yarn/cache
127 | .yarn/unplugged
128 | .yarn/build-state.yml
129 | .yarn/install-state.gz
130 | .pnp.*
131 |
132 | # tailwindcss output
133 | src/output.css
134 |
135 | # vitepress
136 | docs/.vitepress/cache
137 | docs/.vitepress/dist
138 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/pt_BR.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "Perfil Atual",
5 | "kernel": "Kernel",
6 | "chipset": "Chipset",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "Configurações",
11 | "dnd_gameplay": "Não perturbar no jogo",
12 | "lite_mode": "Modo lite",
13 | "device_mitigation": "Mitigação de dispositivo",
14 | "default_cpu_gov": "Governador padrão da CPU",
15 | "powersave_cpu_gov": "Governador de CPU economia de energia",
16 | "cpu_governor_title": "Governador de CPU"
17 | },
18 | "actions": {
19 | "title": "Ações",
20 | "edit_gamelist": "Editar lista de jogos",
21 | "create_shortcut": "Criar atalho do WebUI",
22 | "save_logs": "Gravar logs do módulo"
23 | },
24 | "support": {
25 | "title": "Apoie-me",
26 | "description": "O Encore Tweaks é e sempre será gratuito para si e todos. No entanto, pode demonstrar o seu apoio fazendo uma doação."
27 | },
28 | "modal": {
29 | "dnd_title": "Não perturbar",
30 | "dnd_desc": "Ativar o modo 'Não Perturbe' ao jogar. Isso limita interrupções de notificações e chamadas, permitindo que jogue sem distrações.",
31 | "lite_mode_title": "Modo lite",
32 | "lite_mode_desc": "Esta opção reduz o superaquecimento e o consumo de energia durante os jogos, permitindo que a CPU e outros componentes operem numa frequência mais baixa em vez de manterem a frequência máxima constantemente. Isto afetará o desempenho geral do jogo.",
33 | "device_mitigation_title": "Mitigação de dispositivo",
34 | "device_mitigation_desc": "Mitiga alguns bugs específicos de dispositivos aplicando ajustes para melhorar a compatibilidade e a confiabilidade. Mantenha esta função desativada, a menos que o seu dispositivo apresente problemas ao desligar.",
35 | "edit_gamelist_title": "Editar lista de jogos",
36 | "edit_gamelist_desc": "O perfil de desempenho será ativado quando qualquer um dos jogos e apps listadas aqui for iniciado.",
37 | "save_changes": "Gravar alterações",
38 | "cancel_changes": "Cancelar alterações",
39 | "unauthorized_mod_title": "Modificação não autorizada detetada",
40 | "unauthorized_mod_desc": "Este módulo pode ter sido modificado por outrem. Para a sua segurança, descarregue a versão oficial através do site Encore Tweaks.",
41 | "save_log_fail": "Não foi possível gravar os logs",
42 | "log_saved_desc": "Logs gravados em {0}.",
43 | "log_saved_title": "Registos gravados"
44 | },
45 | "toast": {
46 | "reboot_to_apply": "Reinicie o seu aparelho para aplicar as mudanças.",
47 | "has_shortcut": "Atalho já existe.",
48 | "gamelist_save_success": "Gamelist gravada com sucesso."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/id.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "Profil saat ini",
5 | "kernel": "Kernel",
6 | "chipset": "Chipset",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "Pengaturan",
11 | "cpu_governor_title": "CPU Governor",
12 | "dnd_gameplay": "DND Saat Bermain",
13 | "lite_mode": "Mode Lite",
14 | "device_mitigation": "Mitigasi Perangkat",
15 | "default_cpu_gov": "CPU Governor Default",
16 | "powersave_cpu_gov": "CPU Governor Hemat Daya"
17 | },
18 | "actions": {
19 | "title": "Aksi",
20 | "edit_gamelist": "Edit Daftar Permainan",
21 | "create_shortcut": "Buat Pintasan WebUI",
22 | "save_logs": "Simpan Log Modul"
23 | },
24 | "support": {
25 | "title": "Dukung Saya",
26 | "description": "Encore Tweaks akan selalu gratis untuk semua orang. Namun Anda dapat menunjukkan kepedulian Anda dengan memberikan donasi."
27 | },
28 | "toast": {
29 | "has_shortcut": "Pintasan sudah ada.",
30 | "gamelist_save_success": "Daftar permainan berhasil disimpan.",
31 | "reboot_to_apply": "Reboot perangkat Anda untuk menerapkan perubahan."
32 | },
33 | "modal": {
34 | "dnd_title": "Mode Jangan Ganggu",
35 | "dnd_desc": "Aktifkan mode jangan ganggu saat bermain game. Batasi gangguan dari notifikasi dan panggilan, sehingga Anda dapat memainkan game favorit tanpa gangguan apa pun.",
36 | "lite_mode_title": "Mode Lite",
37 | "lite_mode_desc": "Pilihan ini akan mengurangi panas berlebih dan konsumsi daya selama bermain game dengan memungkinkan CPU dan komponen lainnya berjalan pada frekuensi yang lebih daripada terus-menerus pada frekuensi tertinggi. Ini akan memengaruhi performa game secara keseluruhan.",
38 | "device_mitigation_title": "Mitigasi Perangkat",
39 | "device_mitigation_desc": "Memitigasi beberapa bug khusus perangkat dengan menerapkan penyesuaian tertentu untuk meningkatkan kompatibilitas dan keandalan, tetap nonaktifkan fitur ini kecuali jika perangkat Anda mengalami masalah saat dimatikan.",
40 | "edit_gamelist_title": "Edit Daftar Permainan",
41 | "edit_gamelist_desc": "Profil kinerja akan diaktifkan ketika salah satu permainan dan aplikasi yang tercantum di sini diluncurkan.",
42 | "save_changes": "Simpan Perubahan",
43 | "cancel_changes": "Batalkan Perubahan",
44 | "unauthorized_mod_desc": "Modul ini mungkin telah dimodifikasi oleh pihak ketiga. Demi keamanan Anda, silakan unduh versi resmi dari situs web resmi Encore Tweaks.",
45 | "save_log_fail": "Tidak dapat menyimpan log",
46 | "unauthorized_mod_title": "Modifikasi tidak sah terdeteksi",
47 | "log_saved_title": "Log Modul Disimpan",
48 | "log_saved_desc": "Log disimpan di {0}."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/jni/src/Dumpsys/Dumpsys.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 |
26 | #include
27 |
28 | struct RecentAppList {
29 | std::string package_name;
30 | bool visible;
31 | };
32 |
33 | struct DumpsysWindowDisplays {
34 | bool screen_awake;
35 | std::vector recent_app;
36 | };
37 |
38 | struct DumpsysPower {
39 | bool screen_awake;
40 | bool is_plugged;
41 | bool battery_saver;
42 | bool battery_saver_sticky;
43 | };
44 |
45 | namespace Dumpsys {
46 |
47 | /**
48 | * @brief Retrieves window display information by parsing `dumpsys window displays`.
49 | *
50 | * This function executes `dumpsys window displays` and parses its output to determine
51 | * the screen's awake state and a list of recent applications.
52 | *
53 | * @param result A reference to a DumpsysWindowDisplays struct to store the parsed information.
54 | * @throws std::runtime_error if popen fails or if required information cannot be found in the dumpsys output.
55 | */
56 | void WindowDisplays(DumpsysWindowDisplays &result);
57 |
58 | /**
59 | * @brief Retrieves power-related information by parsing `dumpsys power`.
60 | *
61 | * This function executes `dumpsys power` and parses its output to determine
62 | * the screen's awake state, whether the device is plugged in, and the status
63 | * of battery saver modes.
64 | *
65 | * @param result A reference to a DumpsysPower struct to store the parsed information.
66 | * @throws std::runtime_error if popen fails or if required information cannot be found in the dumpsys output.
67 | */
68 | void Power(DumpsysPower &result);
69 |
70 | /**
71 | * @brief Gets the Process ID (PID) of an application by its package name.
72 | *
73 | * This function executes `dumpsys activity top` and searches for the line
74 | * corresponding to the given package name to extract its PID.
75 | *
76 | * @param package_name The package name of the application to find.
77 | * @return The PID of the application if found.
78 | * @throws std::runtime_error if popen fails, the package is not found, or the PID cannot be extracted.
79 | */
80 | pid_t GetAppPID(const std::string &package_name);
81 |
82 | } // namespace Dumpsys
83 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "Текущий профиль",
5 | "kernel": "Ядро",
6 | "chipset": "Чипсет",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "Настройки",
11 | "dnd_gameplay": "DND в геймплее",
12 | "lite_mode": "Режим Lite",
13 | "device_mitigation": "Смягчение проблем устройства",
14 | "default_cpu_gov": "CPU Governor по умолчанию",
15 | "powersave_cpu_gov": "Энергосберегающий CPU Governor",
16 | "cpu_governor_title": "Управление процессором"
17 | },
18 | "actions": {
19 | "title": "Действия",
20 | "edit_gamelist": "Редактировать список игр",
21 | "create_shortcut": "Создать ярлык WebUI",
22 | "save_logs": "Сохранить логи модуля"
23 | },
24 | "support": {
25 | "title": "Поддержите меня",
26 | "description": "Encore Tweaks всегда был и будет бесплатным для вас и для всех. Однако вы можете показать свою поддержку, сделав пожертвование."
27 | },
28 | "modal": {
29 | "dnd_title": "Не беспокоить",
30 | "dnd_desc": "Включает режим «Не беспокоить» во время игры, что ограничивает прерывания от уведомлений и звонков, позволяя вам наслаждаться любимыми играми без отвлекающих факторов.",
31 | "lite_mode_title": "Режим Lite",
32 | "lite_mode_desc": "Эта опция снижает перегрев и энергопотребление во время игры, позволяя процессору и другим компонентам работать на более низкой частоте, а не постоянно на максимальной. Это может повлиять на общую производительность игры.",
33 | "device_mitigation_title": "Смягчение проблем устройства",
34 | "device_mitigation_desc": "Устраняет некоторые ошибки, специфичные для устройства, применяя определённые настройки для улучшения совместимости и надежности. Оставьте эту функцию выключенной, если ваше устройство не испытывает проблем при выключении.",
35 | "edit_gamelist_title": "Редактировать список игр",
36 | "edit_gamelist_desc": "Профиль производительности будет активирован при запуске любой из указанных игр и приложений.",
37 | "save_changes": "Сохранить изменения",
38 | "cancel_changes": "Отменить изменения",
39 | "unauthorized_mod_title": "Обнаружена несанкционированная модификация",
40 | "unauthorized_mod_desc": "Этот модуль мог быть изменен третьей стороной. Для вашей безопасности, пожалуйста, загрузите официальную версию с официального сайта Encore Tweaks.",
41 | "log_saved_title": "Сохранение журналов модулей",
42 | "log_saved_desc": "Журналы сохраняются по адресу {0}.",
43 | "save_log_fail": "Невозможно сохранить логи"
44 | },
45 | "toast": {
46 | "reboot_to_apply": "Перезагрузите своё устройство, чтобы изменения вступили в силу.",
47 | "has_shortcut": "Ярлык уже существует.",
48 | "gamelist_save_success": "Список игр успешно сохранен."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/es.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "chipset": "Chipset",
4 | "profile": "Perfil Actual",
5 | "module": "Encore Tweaks",
6 | "kernel": "Núcleo del sistema",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "device_mitigation": "Mitigación de Dispositivo",
11 | "lite_mode": "Modo Lite",
12 | "default_cpu_gov": "Gobernador de CPU Predeterminado",
13 | "title": "Configuraciones",
14 | "dnd_gameplay": "No Molestar en juegos",
15 | "powersave_cpu_gov": "Gobernador de CPU para Ahorro de Batería",
16 | "cpu_governor_title": "Gobernador de CPU"
17 | },
18 | "modal": {
19 | "lite_mode_title": "Modo Lite",
20 | "dnd_title": "No Molestar",
21 | "device_mitigation_title": "Mitigación de dispositivo",
22 | "edit_gamelist_desc": "El perfil de rendimiento se activará cuando se inicie cualquiera de los juegos y aplicaciones listados aquí.",
23 | "save_changes": "Guardar Cambios",
24 | "cancel_changes": "Cancelar Cambios",
25 | "edit_gamelist_title": "Modificar lista de juegos",
26 | "dnd_desc": "Activa el modo No Molestar mientras juegas. Limita las interrupciones de notificaciones y llamadas, permitiéndote jugar a tus juegos favoritos sin distracciones.",
27 | "lite_mode_desc": "Esta opción reducirá el sobrecalentamiento y el consumo de energía durante el juego al permitir que la CPU y otros componentes funcionen a una frecuencia más baja en lugar de frecuencia altas constantemente; esto afectará el rendimiento general de los juegos.",
28 | "device_mitigation_desc": "Mitiga algunos errores específicos del dispositivo aplicando ciertos ajustes para mejorar la compatibilidad y confiabilidad. Mantén esta función deshabilitada a menos que tu dispositivo experimente problemas cuando esté apagado.",
29 | "save_log_fail": "No se pudieron guardar los registros",
30 | "unauthorized_mod_title": "Modificación no autorizada detectada",
31 | "unauthorized_mod_desc": "Este módulo pudo haber sido modificado por un tercero. Por tu seguridad, descarga la versión oficial del sitio web oficial de Encore Tweaks.",
32 | "log_saved_desc": "Registros guardados en {0}.",
33 | "log_saved_title": "Registros del módulo guardados"
34 | },
35 | "actions": {
36 | "edit_gamelist": "Modificar Lista de Juegos",
37 | "title": "Acciones",
38 | "save_logs": "Guardar Registros de Módulo",
39 | "create_shortcut": "Crear Atajo para WebUI"
40 | },
41 | "support": {
42 | "description": "Encore Tweaks es, y siempre será, gratuito para ti y para todos. Sin embargo, puedes mostrar interés haciendo una donación.",
43 | "title": "Apóyame"
44 | },
45 | "toast": {
46 | "has_shortcut": "Ya existe un atajo.",
47 | "gamelist_save_success": "Lista de juegos guardada satisfactoriamente.",
48 | "reboot_to_apply": "Reinicia tu dispositivo para aplicar los cambios."
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/website/docs/guide/webui-and-configuration.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "WebUI Configuration Guide"
3 | description: "Learn how to configure Encore Tweaks settings via Module WebUI for optimized performance on Android devices."
4 | ---
5 |
6 | # Module WebUI and Configuration
7 |
8 | The **Encore Tweaks** module offers a variety of performance-tuning settings accessible through the [Module WebUI](https://kernelsu.org/guide/module-webui.html)—a feature of **KernelSU** that allows modules to build interactive HTML, CSS, and JavaScript interfaces. This WebUI makes it easy for users to configure Encore Tweaks without needing to manually edit configuration files.
9 |
10 | While **KernelSU** and **APatch** support WebUI natively in their managers, **Magisk** does not. If you're using Magisk, you can still access the WebUI using the [KSU WebUI APK](https://t.me/rem01schannel/636) or [WebUI X](https://play.google.com/store/apps/details?id=com.dergoogler.mmrl.wx).
11 |
12 | ::: details Preview of Encore Tweaks WebUI
13 | 
14 | :::
15 |
16 | ## Configuration Options
17 |
18 | ### Kill Logger
19 | Stops system logging services to reduce background activity and performance overhead.
20 |
21 | ::: tip Deprecated
22 | This feature has been removed in version 4.3 and later due to root detection issues.
23 | :::
24 |
25 | ::: warning
26 | Do **NOT** enable this if you're debugging ROMs or apps. It disables system logging entirely, which may cause issues with apps that rely on `logd`.
27 | :::
28 |
29 | ### DND on Gameplay
30 | Automatically enables **Do Not Disturb** mode while gaming to block notifications and interruptions, ensuring an uninterrupted experience.
31 |
32 | ### Device Mitigation
33 | Mitigate some device specific bugs by applying certain adjustments to enhance compatibility and reliability, keep this feature disabled unless your device experiences problems when it is switched off.
34 |
35 | ### Lite Mode
36 | This setting will minimize overheating and reduce power usage while gaming by allowing the CPU and other parts to operate at lower frequencies instead of always running at peak performance; however, this choice will impact the overall performance of the game.
37 |
38 | ### Default CPU Governor
39 | Sets the CPU governor used in the **Normal** profile. The governor determines how the CPU scales frequency based on system load, affecting both power efficiency and performance.
40 |
41 | ### Powersave CPU Governor
42 | Defines the CPU governor for the **Powersave** profile, optimized for battery life. If not explicitly set, it will use the default CPU governor.
43 |
44 | ### Edit Gamelist
45 | Allows you to manage a list of games and performance-demanding apps. When any listed app is launched, Encore Tweaks automatically switches to the **Performance** profile.
46 |
47 | ### Create WebUI Shortcut
48 | Allows you to create a shortcut to Encore Tweaks WebUI, WebUI X is required.
49 |
50 | ### Save Logs
51 | Stores Encore daemon logs in internal storage for troubleshooting purposes. These logs can help diagnose issues or confirm profile behavior.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ## About Encore Tweaks
11 | [English](/README.md) | [Bahasa Indonesia](/docs/README_id-ID.md) | [简体中文](/docs/README_zh-CN.md)
12 |
13 | **Encore Tweaks** is a dynamic Magisk module designed to maximize your device's gaming performance while intelligently preserving battery life during everyday use. Perfect for gamers who demand smooth gameplay without compromising daily usability!
14 |
15 | More info about this project on [Official Encore Tweaks website](https://encore.rem01gaming.dev/)
16 |
17 | ## Supported Root Managers
18 |
19 | - [APatch](https://github.com/bmax121/APatch)
20 | - [KernelSU](https://github.com/tiann/KernelSU)
21 | - [Magisk](https://github.com/topjohnwu/Magisk) ([no WebUI](https://github.com/topjohnwu/Magisk/issues/8609#event-15568590949)👀)
22 |
23 | ### Also Supported on
24 |
25 | - [KsuWebUI](https://github.com/5ec1cff/KsuWebUIStandalone) ▶ 🌐
26 | - [MMRL](https://github.com/DerGoogler/MMRL) ▶ 🌐
27 |
28 | ## Resources
29 |
30 | - [FAQ](https://encore.rem01gaming.dev/guide/faq.html) - Common questions answered
31 | - [Configuration Guide](https://encore.rem01gaming.dev/guide/webui-and-configuration.html) - How to configure the WebUI
32 | - [Download](https://encore.rem01gaming.dev/download) - Get the latest version
33 |
34 | ## Community & Support
35 |
36 | - [Telegram Channel](https://t.me/rem01schannel) - Stay updated with announcements
37 | - [Report Issues](https://github.com/rem01gaming/encore/issues) - Found a bug? Let us know!
38 | - [Contribute](https://github.com/rem01gaming/encore/pulls) - Submit improvements via PR
39 |
40 | ## Translation
41 |
42 | Interested in translating Encore Tweaks? We use Weblate to crowdsource translations, so anyone can create an account and contribute!
43 |
44 | Visit our translation project [here](https://hosted.weblate.org/projects/encore-tweaks/).
45 |
46 | ### Translation status
47 |
48 | 
49 |
50 | ## License
51 |
52 | Encore Tweaks is open-sourced software licensed under the [Apache-2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
53 |
--------------------------------------------------------------------------------
/jni/src/EncoreUtility/EncoreUtility.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 |
24 | #include
25 | #include
26 | #include
27 |
28 | /**
29 | * @brief Creates and locks a file to ensure single instance execution.
30 | *
31 | * Attempts to create a lock file and acquire an exclusive, non-blocking lock on it.
32 | * @return true if the lock file was created and locked successfully, false otherwise.
33 | */
34 | bool create_lock_file(void);
35 |
36 | /**
37 | * @brief Checks if the /system/bin/dumpsys executable is sane.
38 | *
39 | * This function performs a basic sanity check on the dumpsys binary to ensure it has not been
40 | * tampered with (e.g., emptied by a kill logger module).
41 | * @return true if the dumpsys binary appears to be sane, false otherwise.
42 | */
43 | bool check_dumpsys_sanity(void);
44 |
45 | /**
46 | * @brief Retrieves the UID of a given package name by checking its data directory.
47 | *
48 | * @param package_name The package name of the application (e.g., "com.termux").
49 | * @return The UID of the package if found, otherwise 0.
50 | */
51 | uid_t get_uid_by_package_name(const std::string& package_name);
52 |
53 | /**
54 | * @brief Posts a notification via shell.
55 | *
56 | * @param message The message content of the notification.
57 | * @note It is only intended for use in an Android environment.
58 | */
59 | void notify(const char* message);
60 |
61 | /**
62 | * @brief Sets the do not disturb mode via shell.
63 | *
64 | * @param do_not_disturb True to enable DND mode, false to disable.
65 | * @note It is only intended for use in an Android environment.
66 | */
67 | void set_do_not_disturb(bool do_not_disturb);
68 |
69 | /**
70 | * @brief Verifies the module's integrity.
71 | *
72 | * This function checks the `module.prop` file for specific 'name' and 'author'
73 | * fields to ensure the module has not been modified or redistributed by
74 | * unauthorized third parties. If the check fails, it logs a critical error,
75 | * sends a notification, and terminates the program.
76 | */
77 | void is_kanged(void);
78 |
79 | /**
80 | * @brief Sets all environment variables for the profiler
81 | * @param lite_mode Whether lite mode is enabled from gameregistry
82 | */
83 | void set_profiler_env_vars(bool lite_mode);
84 |
85 | void run_perfcommon(void);
86 | void apply_performance_profile(bool lite_mode, std::string game_pkg, pid_t game_pid);
87 | void apply_balance_profile();
88 | void apply_powersave_profile();
89 |
--------------------------------------------------------------------------------
/webui/src/locales/strings/tr.json:
--------------------------------------------------------------------------------
1 | {
2 | "common": {
3 | "module": "Encore Tweaks",
4 | "profile": "Geçerli Profil",
5 | "kernel": "Çekirdek",
6 | "chipset": "Yonga Seti",
7 | "androidSDK": "Android SDK"
8 | },
9 | "settings": {
10 | "title": "Ayarlar",
11 | "dnd_gameplay": "Oyun Sırasında Rahatsız Etme",
12 | "lite_mode": "Hafif Mod",
13 | "device_mitigation": "Cihaz Düzeltme",
14 | "default_cpu_gov": "Varsayılan CPU Yöneticisi",
15 | "powersave_cpu_gov": "Güç Tasarrufu CPU Yöneticisi",
16 | "cpu_governor_title": "CPU Denetleyici"
17 | },
18 | "actions": {
19 | "title": "Eylemler",
20 | "edit_gamelist": "Oyun Listesini Düzenle",
21 | "create_shortcut": "WebUI Kısayolu Oluştur",
22 | "save_logs": "Modül Günlüklerini Kaydet"
23 | },
24 | "support": {
25 | "title": "Beni Destekle",
26 | "description": "Encore Tweaks, sizler ve herkes için her zaman ücretsizdir ve ücretsiz kalacaktır. Ancak, bir bağış yaparak bana destek olduğunuzu gösterebilirsiniz."
27 | },
28 | "toast": {
29 | "reboot_to_apply": "Değişiklikleri uygulamak için cihazınızı yeniden başlatın.",
30 | "has_shortcut": "Kısayol zaten mevcut.",
31 | "gamelist_save_success": "Oyun listesi başarıyla kaydedildi."
32 | },
33 | "modal": {
34 | "dnd_title": "Rahatsız Etme",
35 | "dnd_desc": "Oyun oynarken rahatsız etmeme modunu etkinleştirin. Bildirimler ve aramalar nedeniyle kesintileri sınırlandırarak favori oyunlarınızı dikkatiniz dağılmadan oynayabilirsiniz.",
36 | "lite_mode_title": "Hafif Mod",
37 | "lite_mode_desc": "Bu seçenek, oyun sırasında aşırı ısınmayı ve güç tüketimini azaltmak için CPU ve diğer bileşenlerin sürekli en yüksek frekansta çalışmak yerine daha düşük frekansta çalışmasını sağlar. Bu, genel oyun performansını etkileyebilir.",
38 | "device_mitigation_title": "Cihaz Düzeltme",
39 | "device_mitigation_desc": "Bazı cihazlara özgü hataları azaltmak için belirli düzenlemeler uygulayarak uyumluluğu ve güvenilirliği artırır. Cihazınız kapalıyken sorun yaşamadıkça bu özelliği devre dışı bırakın.",
40 | "shortcut_unavailable_title": "Kısayol Kullanılamıyor",
41 | "shortcut_unavailable_desc": "WebUI kısayol API'si yalnızca WebUI X motorunda kullanılabilir. Lütfen MMRL veya KernelSU Next gibi WebUI X destekli bir yönetici kullanın.",
42 | "unauthorized_mod_title": "Yetkisiz Değişiklik Tespit Edildi",
43 | "unauthorized_mod_desc": "Bu modül, üçüncü bir taraf tarafından değiştirilmiş olabilir. Güvenliğiniz için lütfen resmi Encore Tweaks web sitesinden resmi sürümü indirin.",
44 | "edit_gamelist_title": "Oyun Listesini Düzenle",
45 | "edit_gamelist_desc": "Burada listelenen oyunlar veya uygulamalar başlatıldığında performans profili etkinleştirilecektir.",
46 | "save_changes": "Değişiklikleri Kaydet",
47 | "cancel_changes": "Değişiklikleri İptal Et",
48 | "gamelist_fetch_fail": "Oyun listesi alınamadı",
49 | "gamelist_save_fail": "Oyun listesi kaydedilemedi",
50 | "save_log_fail": "Günlükler kaydedilemedi",
51 | "log_saved_desc": "Günlükler {0} konumuna kaydedildi.",
52 | "log_saved_title": "Modül Günlükleri Kaydedildi"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/jni/src/GameRegistry/GameRegistry.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | #include "Encore.hpp"
26 | #include "EncoreLog.hpp"
27 |
28 | class GameRegistry {
29 | private:
30 | std::unordered_map game_packages_;
31 | mutable std::shared_mutex mutex_;
32 |
33 | public:
34 | /**
35 | * @brief Loads game list from JSON file
36 | * @param filename Path to the JSON file
37 | * @return True if successful, false otherwise
38 | */
39 | bool load_from_json(const std::string &filename);
40 |
41 | /**
42 | * @brief Populates game list from base file and saves as JSON
43 | * @param gamelist Output JSON file path
44 | * @param baselist Input base file path
45 | * @return True if successful, false otherwise
46 | */
47 | static bool populate_from_base(const std::string &gamelist, const std::string &baselist);
48 |
49 | /**
50 | * @brief Updates the game registry with new game list data
51 | * @param new_list The new list of games to register
52 | */
53 | void update_gamelist(const std::vector &new_list);
54 |
55 | /**
56 | * @brief Finds a game by package name
57 | * @param package_name The package name to search for
58 | * @return Optional containing the game if found, empty if not found
59 | */
60 | std::optional find_game(const std::string &package_name) const;
61 |
62 | /**
63 | * @brief Finds a game by package name (pointer version for performance)
64 | * @param package_name The package name to search for
65 | * @return Pointer to the game if found, nullptr if not found
66 | */
67 | const EncoreGameList *find_game_ptr(const std::string &package_name) const;
68 |
69 | /**
70 | * @brief Checks if a package is registered as a game
71 | * @param package_name The package name to check
72 | * @return True if the package is a registered game
73 | */
74 | bool is_game_registered(const std::string &package_name) const;
75 |
76 | /**
77 | * @brief Gets the number of registered games
78 | * @return The number of games in the registry
79 | */
80 | size_t size() const;
81 |
82 | /**
83 | * @brief Gets all registered game package names
84 | * @return Vector of all package names
85 | */
86 | std::vector get_all_package_names() const;
87 |
88 | private:
89 | /**
90 | * @brief Validates a game entry before adding to registry
91 | * @param game The game entry to validate
92 | * @return True if the entry is valid
93 | */
94 | bool validate_game_entry(const EncoreGameList &game) const;
95 | };
96 |
97 | extern GameRegistry game_registry;
98 |
--------------------------------------------------------------------------------
/jni/include/ShellUtility.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 |
23 | #include
24 | #include
25 |
26 | /**
27 | * @brief Opens a process by creating a pipe, forking, and invoking execvp.
28 | *
29 | * This function is a replacement for `popen` that directly takes a vector of strings
30 | * as arguments, avoiding the need for shell interpretation. This is safer as it
31 | * prevents shell injection vulnerabilities. The function creates a pipe, forks the
32 | * process, and in the child process, executes the command specified by `args`.
33 | * The standard output of the child process is redirected to the pipe. The parent
34 | * process receives a `FILE*` stream to read from the child's standard output.
35 | *
36 | * @param args A vector of strings where the first element is the command to execute
37 | * and subsequent elements are its arguments.
38 | * @return A `std::unique_ptr` that wraps the file stream
39 | * for reading the child's stdout. The file is automatically closed when the
40 | * unique_ptr goes out of scope. Returns a null-holding unique_ptr on failure.
41 | */
42 | inline std::unique_ptr popen_direct(const std::vector &args) {
43 | int pipefd[2];
44 | if (pipe(pipefd) == -1) {
45 | return {nullptr, fclose};
46 | }
47 |
48 | pid_t pid = fork();
49 | if (pid == -1) {
50 | close(pipefd[0]);
51 | close(pipefd[1]);
52 | return {nullptr, fclose};
53 | }
54 |
55 | if (pid == 0) { // Child
56 | close(pipefd[0]);
57 | dup2(pipefd[1], STDOUT_FILENO);
58 | close(pipefd[1]);
59 |
60 | std::vector cargs;
61 | for (const auto &arg : args) {
62 | cargs.push_back(const_cast(arg.c_str()));
63 | }
64 | cargs.push_back(nullptr);
65 |
66 | execvp(cargs[0], cargs.data());
67 | _exit(127);
68 | } else { // Parent
69 | close(pipefd[1]);
70 | return {fdopen(pipefd[0], "r"), fclose};
71 | }
72 | }
73 |
74 | /**
75 | * @brief Executes a shell command with formatted arguments.
76 | *
77 | * This function is a wrapper around the standard `system()` call, providing `printf`-like
78 | * formatting for constructing the command string.
79 | *
80 | * @param format A format string as you would use with `printf`.
81 | * @param ... Additional arguments to be formatted into the command string.
82 | * @return The return value of the `system()` call.
83 | */
84 | inline int systemv(const char* format, ...) {
85 | char command[512];
86 | va_list args;
87 | va_start(args, format);
88 | vsnprintf(command, sizeof(command), format, args);
89 | va_end(args);
90 | return system(command);
91 | }
92 |
--------------------------------------------------------------------------------
/jni/src/EncoreConfig/InotifyHandler.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "EncoreConfig.hpp"
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 |
24 | enum WatchContext {
25 | WATCH_CONTEXT_GAMELIST,
26 | WATCH_CONTEXT_CONFIG,
27 | };
28 |
29 | void on_json_modified(
30 | const struct inotify_event *event, const std::string &path, int context,
31 | void *additional_data) {
32 | (void)additional_data;
33 |
34 | auto OnGamelistModified = [&](const std::string &path) -> void {
35 | LOGD_TAG("InotifyHandler", "Callback OnGamelistModified reached");
36 | game_registry.load_from_json(path);
37 | };
38 |
39 | auto OnConfigModified = [&](const std::string &path) -> void {
40 | LOGD_TAG("InotifyHandler", "Callback OnConfigModified reached");
41 |
42 | if (!config_store.reload()) {
43 | LOGW_TAG("InotifyHandler", "Failed to reload config from {}", path);
44 | return;
45 | }
46 |
47 | // Apply new log level
48 | auto prefs = config_store.get_preferences();
49 | EncoreLog::set_log_level(prefs.log_level);
50 | };
51 |
52 | // After the JSON was closed for writing
53 | if (event->mask & IN_CLOSE_WRITE) {
54 | switch (context) {
55 | case WATCH_CONTEXT_GAMELIST: OnGamelistModified(path); break;
56 | case WATCH_CONTEXT_CONFIG: OnConfigModified(path); break;
57 | default: break;
58 | }
59 | }
60 | }
61 |
62 | bool init_file_watcher(InotifyWatcher &watcher) {
63 | try {
64 | // Initialize config store first
65 | if (!config_store.load_config()) {
66 | LOGE_TAG("EncoreConfig", "Failed to load config file");
67 | return false;
68 | }
69 |
70 | // Apply log level from config
71 | auto prefs = config_store.get_preferences();
72 | EncoreLog::set_log_level(prefs.log_level);
73 |
74 | // Set up file watchers
75 | InotifyWatcher::WatchReference gamelist_ref{
76 | ENCORE_GAMELIST, on_json_modified, WATCH_CONTEXT_GAMELIST, nullptr};
77 |
78 | InotifyWatcher::WatchReference config_ref{
79 | CONFIG_FILE, on_json_modified, WATCH_CONTEXT_CONFIG, nullptr};
80 |
81 | if (!watcher.addFile(gamelist_ref)) {
82 | LOGE_TAG("InotifyWatcher", "Failed to add gamelist watch");
83 | return false;
84 | }
85 |
86 | if (!watcher.addFile(config_ref)) {
87 | LOGE_TAG("InotifyWatcher", "Failed to add config watch");
88 | return false;
89 | }
90 |
91 | watcher.start();
92 | return true;
93 | } catch (const std::runtime_error &e) {
94 | std::string error_msg = e.what();
95 | LOGE_TAG("InotifyWatcher", "{}", error_msg);
96 | return false;
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/webui/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ["./src/**/*.{html,js,ts,jsx,tsx}"],
4 | theme: {
5 | extend: {
6 | colors: {
7 | /* App Base Colors */
8 | "primary": "var(--primary, #ffb0ccff)",
9 | "on-primary": "var(--onPrimary, #541d35ff)",
10 | "primary-container": "var(--primaryContainer, #6f334bff)",
11 | "on-primary-container": "var(--onPrimaryContainer, #ffd9e4ff)",
12 | "inverse-primary": "var(--inversePrimary, #8b4a63ff)",
13 | "secondary": "var(--secondary, #e2bdc8ff)",
14 | "on-secondary": "var(--onSecondary, #422932ff)",
15 | "secondary-container": "var(--secondaryContainer, #5a3f48ff)",
16 | "on-secondary-container": "var(--onSecondaryContainer, #ffd9e4ff)",
17 | "tertiary": "var(--tertiary, #f0bc95ff)",
18 | "on-tertiary": "var(--onTertiary, #48290dff)",
19 | "tertiary-container": "var(--tertiaryContainer, #623f21ff)",
20 | "on-tertiary-container": "var(--onTertiaryContainer, #ffdcc4ff)",
21 | "background": "var(--background, #1c1014ff)",
22 | "on-background": "var(--onBackground, #f2dde2ff)",
23 | "surface": "var(--surface, #1c1014ff)",
24 | "tonal-surface": "var(--tonalSurface, #28181dff)",
25 | "on-surface": "var(--onSurface, #f2dde2ff)",
26 | "surface-variant": "var(--surfaceVariant, #514347ff)",
27 | "on-surface-variant": "var(--onSurfaceVariant, #d5c2c6ff)",
28 | "surface-tint": "var(--surfaceTint, #ffb0ccff)",
29 | "inverse-surface": "var(--inverseSurface, #f2dde2ff)",
30 | "inverse-on-surface": "var(--inverseOnSurface, #392d31ff)",
31 | "error": "var(--error, #f2b8b5ff)",
32 | "on-error": "var(--onError, #601410ff)",
33 | "error-container": "var(--errorContainer, #8c1d18ff)",
34 | "on-error-container": "var(--onErrorContainer, #f9dedcff)",
35 | "outline": "var(--outline, #9d8c91ff)",
36 | "outline-variant": "var(--outlineVariant, #514347ff)",
37 | "scrim": "var(--scrim, #000000ff)",
38 |
39 | "surface-bright": "var(--surfaceBright, #433639ff)",
40 | "surface-dim": "var(--surfaceDim, #1c1014ff)",
41 | "surface-container": "var(--surfaceContainer, #281c20ff)",
42 | "surface-container-high": "var(--surfaceContainerHigh, #33272aff)",
43 | "surface-container-highest": "var(--surfaceContainerHighest, #3e3135ff)",
44 | "surface-container-low": "var(--surfaceContainerLow, #23191cff)",
45 | "surface-container-lowest": "var(--surfaceContainerLowest, #18090fff)",
46 |
47 | /* Filled Tonal Button Colors */
48 | "filled-tonal-button-content-color": "var(--filledTonalButtonContentColor, #ffd9e4ff)",
49 | "filled-tonal-button-container-color": "var(--filledTonalButtonContainerColor, #5a3f48ff)",
50 | "filled-tonal-button-disabled-content-color": "var(--filledTonalButtonDisabledContentColor, #f2dde261)",
51 | "filled-tonal-button-disabled-container-color": "var(--filledTonalButtonDisabledContainerColor, #f2dde21f)",
52 |
53 | /* Filled Card Colors */
54 | "filled-card-content-color": "var(--filledCardContentColor, #f2dde2ff)",
55 | "filled-card-container-color": "var(--filledCardContainerColor, #3e3135ff)",
56 | "filled-card-disabled-content-color": "var(--filledCardDisabledContentColor, #f2dde261)",
57 | "filled-card-disabled-container-color": "var(--filledCardDisabledContainerColor, #45383cff)",
58 | },
59 | },
60 | },
61 | plugins: [require("daisyui")],
62 | };
63 |
--------------------------------------------------------------------------------
/website/docs/guide/what-is-encore-tweaks.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "What is Encore Tweaks?"
3 | description: "Encore Tweaks is an performance Magisk module designed to boost device performance for gaming while preserving battery life during regular use."
4 | ---
5 |
6 | # What is Encore Tweaks?
7 | Encore Tweaks is a Magisk Module created to enhance device performance during gaming sessions, while keeping battery life optimized for normal use. With **fully automatic performance profiles** and **wide compatibility** across various SoCs, Encore Tweaks adapts dynamically to boost your device's performance when it matters most.
8 |
9 | ## Why Encore Tweaks?
10 |
11 | ### Automatic Performance Profiles
12 | No need to manually adjust performance settings; Encore Tweaks automatically switches profiles based on app usage, allowing you to focus on what matters.
13 |
14 | ### Battery-Friendly Performance
15 | Encore Tweaks only activates performance scripts during gaming sessions, preserving battery life for everyday use. Encore Tweaks also can cut your power consumption on battery saver mode.
16 |
17 | ### It Works Everywhere
18 | Encore Tweaks are compatible with any Android device, no matter how weird it is. Supporting Snapdragon, MediaTek, Exynos, Google Tensor, Tegra, and even Unisoc, with custom optimizations tailored for each.
19 |
20 | ### Game-First Resource Allocation
21 | Encore Tweaks prioritizes gaming performance by allocating maximum CPU and I/O resources, ensuring lag-free gameplay.
22 |
23 | ### Safe and Reliable
24 | Zero brick or bootloop related incidents was reported from the beginning of release, Encore Tweaks also have been tested in multiple devices to ensure its reliability across different devices.
25 |
26 | ## How Encore Tweaks Works
27 | Encore Tweaks works like a automated profiling system, it's dynamically adjusts your device's performance based on real-time data, such as the currently running app, screen state (awake or not), and battery saver mode. Using this information, it seamlessly switches between different profiles to optimize performance or save power as needed.
28 |
29 | ### Profiles Overview
30 |
31 | #### Performance Profile
32 | - **Activation**: Automatically enabled when an app or game listed in the **Gamelist** is launched and screen was awake.
33 | - **Purpose**: Ensures maximum responsiveness and stability during intensive tasks. Sets **CPU**, **GPU**, and **DRAM** frequencies to their highest frequency and prioritizes **CPU** and **I/O** resources for Game to minimize lag and jitter.
34 |
35 | ---
36 |
37 | #### Powersave Profile
38 | - **Activation**: Automatically enabled when the device is in **Battery Saver Mode** (except while charging).
39 | - **Purpose**: Maximizes power efficiency for extended battery life, limits non-essential component frequencies to their lowest frequency.
40 |
41 | ---
42 |
43 | #### Normal Profile
44 | - **Activation**: Applied when neither Performance nor Powersave conditions are met.
45 | - **Purpose**: Allows the device to operate under default system behavior without any special tweaks.
46 |
47 | ## Installation
48 | 1. [Download Encore Tweaks](/download) from the official page.
49 | 2. Flash it via **Magisk/KernelSU/APatch**.
50 | 3. Reboot your device, and you're ready to go!
51 |
52 | ## Configuration
53 | Encore Tweaks provides a user-friendly WebUI for managing settings and adjusting preferences. For details, visit the [Module WebUI and Configuration Guide](/guide/webui-and-configuration).
54 |
55 | ## FAQ
56 | Have a question? Check out our [FAQ page](/guide/faq). If you still have questions, join our Telegram Group [@rem01shideout](https://t.me/rem01shideout).
57 |
--------------------------------------------------------------------------------
/website/docs/guide/faq.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Frequently Asked Questions"
3 | description: "Answers to frequently asked questions about Encore Tweaks, covering device compatibility, configuration, activation, and troubleshooting."
4 | ---
5 |
6 | # Frequently Asked Questions
7 |
8 | Find answers to common questions about using Encore Tweaks, including setup, supported devices, troubleshooting, and more.
9 |
10 | ## Does Encore Tweaks support my device?
11 | Encore Tweaks is compatible with a wide range of devices, including those using Mediatek, Snapdragon, Google Tensor, Exynos, Tegra, and Unisoc chipsets. Even if your device doesn't use one of these chipsets, you may still be able to use Encore Tweaks.
12 |
13 | ## Where's the Encore Tweaks app?
14 | Encore Tweaks never had an App for UI configuration, you maybe meant the [Module WebUI](/guide/webui-and-configuration).
15 |
16 | ## How I can change the performance profile manually?
17 | For now, Encore Tweaks doesn't have manual profile selection. however Encore Tweaks service will change performance profile automatically for you so you don't have to tune anything.
18 |
19 | ## Do Encore Tweaks impact battery life?
20 | While playing game Encore Tweaks will comsume more power, but on normal usage this module will not consume more power. you can also cut your power consumption by using powersave profile by Encore Tweaks (with enabling battery saver mode).
21 |
22 | ## How can I configure Encore Tweaks?
23 | Encore Tweaks offers a user-friendly WebUI for adjusting settings and preferences. For detailed instructions, check out the [Module WebUI and Configuration Guide](/guide/webui-and-configuration).
24 |
25 | ## How do I activate Encore Tweaks?
26 | Encore Tweaks automatically runs on boot, so you don't need to start it manually.
27 |
28 | ## Is Encore Tweaks a scheduler module similar to Uperf?
29 | No, Encore Tweaks works in more traditional way compared to Uperf, it's never meant to be a scheduler such as Uperf and Tritium nor integrated with Scene and other managers.
30 |
31 | ## Does Encore Tweaks require a BusyBox module?
32 | No, Encore Tweaks does not require a BusyBox module.
33 |
34 | ## Why I can't open Encore Tweaks WebUI? (only showing white page or inoperable)
35 | This mainly caused by your ROM WebView version is too old, to fix this [update your WebView](https://play.google.com/store/apps/details?id=com.google.android.webview) to the latest version.
36 |
37 | ## Why are some games randomly boosting even when they’re closed?
38 | Some games attend to run on background hence causing random boosts. to prevent random boosts, force stop the affected games and restrict them from running in the background. If needed, you can also remove them from gamelist.
39 |
40 | ## How can I access WebUI?
41 | - **KernelSU or APatch Users**: Click "open" in the module card to access the WebUI.
42 | - **Magisk Users**: Native WebUI support isn't available in Magisk. Use [KSU WebUI APK](https://t.me/rem01schannel/636) or [MMRL](https://github.com/DerGoogler/MMRL) to access the WebUI if needed.
43 |
44 | ## What should I do if I find a bug or issue in Encore Tweaks?
45 | Report any issues or bugs [here](https://github.com/Rem01Gaming/encore/issues).
46 |
47 | ## Can I use Encore Tweaks with other performance modules?
48 | We do not recommend using Encore Tweaks alongside other performance modules, as they are likely to conflict. This includes modules like YAKT, Magnetar, RiProG AI, Mtkfest, and Mtkvest. However, Thermal Killer and Thermal mod modules can be safely used alongside Encore Tweaks.
49 |
50 | ## How can I add games to the Gamelist?
51 | You can add games to the Gamelist via the WebUI, you can find the guide [here](/guide/webui-and-configuration).
52 |
--------------------------------------------------------------------------------
/jni/include/ModuleProperty.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024-2025 Rem01Gaming
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include