├── LICENSE ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── build.sh ├── build ├── Risk-1.8.080824-release.zip ├── Risk-1.8.080824.zip ├── Risk-1.9.080824-release.zip ├── Risk-2.0.100824-release.zip ├── Risk-2.1.110824-release.zip ├── Risk-2.2.270824-release.zip └── Risk-2.3.011024-release.zip ├── changelog.md ├── excluded_apps.txt ├── install.sh ├── module.prop ├── screenshot ├── img.jpg ├── img1.jpg └── img2.jpg ├── service.sh ├── system.prop ├── system └── bin │ ├── lmkd_status │ ├── rish │ ├── rish_shizuku.dex │ └── risk ├── uninstall.sh └── update.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024-2025 Raka Abdi Reza Maulana Putra 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | ################# 4 | # Initialization 5 | ################# 6 | 7 | umask 022 8 | 9 | # echo before loading util_functions 10 | ui_print() { echo "$1"; } 11 | 12 | require_new_magisk() { 13 | ui_print "*******************************" 14 | ui_print " Please install Magisk v20.4+! " 15 | ui_print "*******************************" 16 | exit 1 17 | } 18 | 19 | ######################### 20 | # Load util_functions.sh 21 | ######################### 22 | 23 | OUTFD=$2 24 | ZIPFILE=$3 25 | 26 | mount /data 2>/dev/null 27 | 28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 29 | . /data/adb/magisk/util_functions.sh 30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 34 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Risk 2 | 3 | Is a Magisk Module for Clean RAM Cache And Stop Background Apps, Google Apps, Third Party Apps Before Playing Games, To Get More Free RAM 4 | 5 | ## Preview 6 | 7 | ![screenshot](https://raw.githubusercontent.com/rakarmp/Risk/main/screenshot/img.jpg) 8 | 9 | ![screenshot](https://raw.githubusercontent.com/rakarmp/Risk/main/screenshot/img1.jpg) 10 | 11 | ![screenshot](https://raw.githubusercontent.com/rakarmp/Risk/main/screenshot/img2.jpg) 12 | 13 | ## How To Use 14 | 15 | Risk Can be used using [Magisk](https://github.com/topjohnwu/Magisk) or [KernelSu](https://github.com/tiann/KernelSU) 16 | 17 | 1. Download Zip Build In [Here](https://github.com/rakarmp/Risk/tree/main/build) 18 | 2. Flash To Magisk Manager 19 | 3. Reboot Your Device 20 | 4. Open Termux App, You Can Download Termux [Here](https://www.apkmirror.com/apk/fredrik-fornwall/termux-fdroid-version/termux-fdroid-version-0-119-0-beta-1-release/termux-f-droid-version-0-119-0-beta-1-android-apk-download/download/?key=a1ef8c3eb4c8ec3722c8f11ede607b6292c6f4c2) 21 | 5. Follow Command `su -c risk` Below: 22 | 23 | ```bash 24 | # Exec And Follow Menu The Emergent 25 | # If You Use KernelSu Enable SuperUser 26 | # In KernelSu App Give Su Permission For Termux 27 | 28 | $ su -c risk 29 | ``` 30 | 31 | ## Ignore Apps 32 | 33 | Risks can exclude applications if they are listed in the txt file at this path: `/sdcard/Android/Risk/excluded_apps.txt` 34 | 35 | ```txt 36 | // This Comment 37 | // Sign // Will not be executed 38 | com.termux 39 | jackpal.androidterm 40 | com.google.android.gms 41 | com.google.android.gsf 42 | ``` 43 | 44 | 45 | ## Why Must Risk? 46 | 47 | ### Improved Device Performance 48 | 49 | By stopping unnecessary applications and clearing RAM cache, Risk helps in freeing up system resources. This can lead to a noticeable improvement in device performance, making it faster and more responsive. 50 | 51 | ### Enhanced Battery Life 52 | 53 | Running multiple applications in the background can drain battery life significantly. By stopping third-party and google apps, Risk reduces the load on the CPU and other hardware components, leading to enhanced battery life. 54 | 55 | ### Optimized Memory Usage 56 | 57 | Clearing the RAM cache using the  pm trim-caches  command and  drop_caches  mechanism ensures that unused memory is freed up. Risk helps in optimizing memory usage, allowing other applications to run more efficiently. 58 | 59 | ### Reduced System Lag 60 | 61 | Background applications and cached data can cause system lag and slow down the overall performance of the device. By stopping these applications and clearing the cache, Risk helps in reducing system lag and ensuring smoother operation. 62 | 63 | ## ! Warning 64 | 65 | Please be careful if you use custom mode with the option to stop system applications, because it can cause the device to reboot by itself. 66 | 67 | ## Links 68 | 69 | Go to [here](https://github.com/rakarmp/Risk/tree/main/build) to download Risk™ build. -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | get_build_date() { 4 | date +%d%m%y 5 | } 6 | 7 | version="2.3" 8 | build_date=$(get_build_date) 9 | output_file="Risk-${version}.${build_date}-release.zip" 10 | 11 | zip -r $output_file uninstall.sh system.prop service.sh README.md module.prop LICENSE install.sh excluded_apps.txt system/ META-INF/ 12 | 13 | if [ $? -eq 0 ]; then 14 | echo "Build successful: $output_file" 15 | else 16 | echo "Build failed" 17 | fi 18 | -------------------------------------------------------------------------------- /build/Risk-1.8.080824-release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-1.8.080824-release.zip -------------------------------------------------------------------------------- /build/Risk-1.8.080824.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-1.8.080824.zip -------------------------------------------------------------------------------- /build/Risk-1.9.080824-release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-1.9.080824-release.zip -------------------------------------------------------------------------------- /build/Risk-2.0.100824-release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-2.0.100824-release.zip -------------------------------------------------------------------------------- /build/Risk-2.1.110824-release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-2.1.110824-release.zip -------------------------------------------------------------------------------- /build/Risk-2.2.270824-release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-2.2.270824-release.zip -------------------------------------------------------------------------------- /build/Risk-2.3.011024-release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/build/Risk-2.3.011024-release.zip -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | Changelog 2 | 3 | ## v.2.3 4 | 5 | - New Feature 6 | - Downscale per package 7 | - Resolution Changer 8 | - Monolith Compile 9 | - Bug Fix And Improvement 10 | - Add .log For Monolith Compile 11 | 12 | 13 | ## v.2.2 14 | 15 | - Fix LMK Adjusment Doesn't work 16 | - Deleted Adj Value Has a Problem 17 | - Freeze App Third Party (Need Test) 18 | 19 | ## v.2.1 20 | 21 | - Add LMKD, LMK Status 22 | - New Custom Menu Stop Social Media App 23 | - Impement Identity Social Media App 24 | - Small Change ETC. 25 | 26 | ## v.2.0 27 | 28 | - Fix For ROM Not Support Using Shizuku (HOTFIX) 29 | - Implement rish Shizuku for ROM Not Support 30 | - Add LMKD, LMK Adjusment 31 | 32 | ## v.1.9 33 | 34 | - Add Ignore Apps Like systemui etc. 35 | - Enter New Line Install.sh 36 | - Added excluded_apps.txt in /sdcard/Android/Risk 37 | - Added Ignore jackpal.androidterm 38 | 39 | ## v.1.8 40 | 41 | - Bump Version 1.6 to 1.8 42 | - Fix Read Case -------------------------------------------------------------------------------- /excluded_apps.txt: -------------------------------------------------------------------------------- 1 | // This Is Comment 2 | // Add Ignore Apps In Here 3 | 4 | com.termux 5 | jackpal.androidterm 6 | com.google.android.gms 7 | com.google.android.gsf 8 | com.android.vending 9 | com.android.systemui 10 | com.android.phone 11 | com.android.providers.contacts 12 | com.android.settings 13 | com.android.packageinstaller 14 | com.android.providers.media 15 | com.android.bluetooth 16 | com.android.phone 17 | com.android.server.wifi 18 | com.android.inputdevices 19 | com.android.location.fused 20 | com.google.android.gsf.login 21 | android 22 | com.android.nfc 23 | com.google.android.location 24 | com.android.devicepolicy -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy 4 | # of this software and associated documentation files (the "Software"), to deal 5 | # in the Software without restriction, including without limitation the rights 6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | # copies of the Software, and to permit persons to whom the Software is 8 | # furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | # THE SOFTWARE. 20 | # 21 | SKIPMOUNT=false 22 | PROPFILE=true 23 | POSTFSDATA=false 24 | LATESTARTSERVICE=true 25 | REPLACE_EXAMPLE=" 26 | /system/app/Youtube 27 | /system/priv-app/SystemUI 28 | /system/priv-app/Settings 29 | /system/framework 30 | " 31 | REPLACE=" 32 | " 33 | RISK_DIR="/sdcard/Android" 34 | TERMUX_DIR="/data/data/com.termux/files/usr" 35 | ui_print " " 36 | ui_print " ╔═══╗───╔╗" 37 | ui_print " ║╔═╗║───║║" 38 | ui_print " ║╚═╝╠╦══╣║╔╗" 39 | ui_print " ║╔╗╔╬╣══╣╚╝╝" 40 | ui_print " ║║║╚╣╠══║╔╗╗" 41 | ui_print " ╚╝╚═╩╩══╩╝╚╝" 42 | ui_print " " 43 | if [ "$KSU" == true ]; then 44 | ui_print " KernelSu Ver: $KSU_VER" 45 | ui_print " KernelSu Ver Code: $KSU_VER_CODE" 46 | ui_print " KernelSu Kernel Ver Code: $KSU_KERNEL_VER_CODE" 47 | else 48 | ui_print " Magisk Ver: $MAGISK_VER" 49 | ui_print " Magisk Ver Code: $MAGISK_VER_CODE" 50 | fi 51 | ui_print " " 52 | sleep 1 53 | ui_print " Risk is a magisk module open source" 54 | ui_print " project, you can view the entire code" 55 | ui_print " to make sure there is no malware or" 56 | ui_print " viruses that harm your device." 57 | sleep 1 58 | ui_print " " 59 | ui_print " You can add applications that you don't" 60 | ui_print " want to stop in the path :" 61 | ui_print " - /sdcard/Android/Risk/excluded_apps.txt" 62 | ui_print " " 63 | ui_print " If Risk is not supported, use Shizuku Download" 64 | ui_print " on Playstore" 65 | ui_print " " 66 | sleep 1 67 | ui_print "- Setup Risk Permission" 68 | unzip -o "$ZIPFILE" 'excluded_apps.txt' -d $MODPATH >&2 69 | unzip -o "$ZIPFILE" 'service.sh' -d $MODPATH >&2 70 | unzip -o "$ZIPFILE" 'system.prop' -d $MODPATH >&2 71 | unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2 72 | mkdir $RISK_DIR/Risk 73 | cp $MODPATH/excluded_apps.txt $RISK_DIR/Risk 74 | chmod +x "$MODPATH/system/bin/risk" 75 | touch $RISK_DIR/Risk/risk.log 76 | 77 | 78 | set_permissions() { 79 | set_perm_recursive $MODPATH 0 0 0755 0644 80 | set_perm_recursive $MODPATH/system/bin 0 0 0777 0755 81 | } -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=riskr 2 | name=Risk - RAM Cache Apps Cleaner 3 | version=2.3-011024 4 | set=2.3-011024 5 | versionCode=437011024 6 | author=Zyarexx @Telegram 7 | description=Clean RAM Cache And Stop Background Apps, Google Apps, Third Party Apps Before Playing Games, To Get More Free RAM | Termux Menu : su -c risk 8 | updateJson=https://raw.githubusercontent.com/rakarmp/Risk/main/update.json -------------------------------------------------------------------------------- /screenshot/img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/screenshot/img.jpg -------------------------------------------------------------------------------- /screenshot/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/screenshot/img1.jpg -------------------------------------------------------------------------------- /screenshot/img2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/screenshot/img2.jpg -------------------------------------------------------------------------------- /service.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | MODDIR=${0%/*} 3 | wait_until_login() { 4 | while [[ `getprop sys.boot_completed` -ne 1 && -d "/sdcard" ]] 5 | do 6 | sleep 2 7 | done 8 | local test_file="/sdcard/.PERMISSION_TEST" 9 | touch "$test_file" 10 | while [ ! -f "$test_file" ]; do 11 | touch "$test_file" 12 | sleep 2 13 | done 14 | rm "$test_file" 15 | } 16 | 17 | wait_until_login 18 | sleep 5 19 | setprop persist.security.adbinput 1 -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/system.prop -------------------------------------------------------------------------------- /system/bin/lmkd_status: -------------------------------------------------------------------------------- 1 | No Mode Choice -------------------------------------------------------------------------------- /system/bin/rish: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | BASEDIR=$(dirname "$0") 3 | DEX="$BASEDIR"/rish_shizuku.dex 4 | 5 | if [ ! -f "$DEX" ]; then 6 | echo "Cannot find $DEX, please check the tutorial in Shizuku app" 7 | exit 1 8 | fi 9 | 10 | if [ $(getprop ro.build.version.sdk) -ge 34 ]; then 11 | if [ -w $DEX ]; then 12 | echo "On Android 14+, app_process cannot load writable dex." 13 | echo "Attempting to remove the write permission..." 14 | chmod 400 $DEX 15 | fi 16 | if [ -w $DEX ]; then 17 | echo "Cannot remove the write permission of $DEX." 18 | echo "You can copy to file to terminal app's private directory (/data/data/, so that remove write permission is possible" 19 | exit 1 20 | fi 21 | fi 22 | 23 | # Replace "PKG" with the application id of your terminal app 24 | [ -z "$RISH_APPLICATION_ID" ] && export RISH_APPLICATION_ID="com.termux" 25 | /system/bin/app_process -Djava.class.path="$DEX" /system/bin --nice-name=rish rikka.shizuku.shell.ShizukuShellLoader "$@" 26 | -------------------------------------------------------------------------------- /system/bin/rish_shizuku.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rakarmp/Risk/a4ba82a5883822bf8c41af44c2792a08f101f695/system/bin/rish_shizuku.dex -------------------------------------------------------------------------------- /system/bin/risk: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Risk - Module Magisk - Clean RAM Cache And Foce Stop Application By Category 3 | RED='\033[0;31m' 4 | 5 | GREEN='\033[0;32m' 6 | 7 | YELLOW='\033[0;33m' 8 | 9 | BLUE='\033[0;34m' 10 | 11 | NC='\033[0m' 12 | # MIT License 13 | # 14 | # Copyright (c) 2024 rakarmp 15 | # 16 | # Permission is hereby granted, free of charge, to any person obtaining a copy 17 | # of this software and associated documentation files (the "Software"), to deal 18 | # in the Software without restriction, including without limitation the rights 19 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | # copies of the Software, and to permit persons to whom the Software is 21 | # furnished to do so, subject to the following conditions: 22 | # 23 | # The above copyright notice and this permission notice shall be included in 24 | # all copies or substantial portions of the Software. 25 | # 26 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 32 | # THE SOFTWARE. 33 | EXCLUDED_APPS_FILE="/sdcard/Android/Risk/excluded_apps.txt" 34 | DEVICE_RAM=$(grep "MemTotal" /proc/meminfo | awk '{print $2}') 35 | DEVICE_CPU=$(grep "processor" /proc/cpuinfo | wc -l) 36 | KERNEL=$(uname -a) 37 | ANDROID=$(getprop ro.build.version.release) 38 | VER=$(grep "set" /data/adb/modules/riskr/module.prop | cut -d'=' -f2) 39 | MODPATH="/data/adb/modules/riskr" 40 | 41 | LMKD_LOW=1001 42 | LMKD_MEDIUM=800 43 | LMKD_CRITICAL=0 44 | LMKD_CRITICAL_UPGRADE=false 45 | LMKD_UPGRADE_PRESSURE=100 46 | LMKD_DOWNGRADE_PRESSURE=100 47 | LMKD_KILL_HEAVIEST_TASK=true 48 | 49 | check_support() { 50 | cp /data/adb/modules/riskr/system/bin/rish /data/data/com.termux/files/usr/bin/ 51 | cp /data/adb/modules/riskr/system/bin/rish_shizuku.dex /data/data/com.termux/files/usr/bin/ 52 | if ! pm list packages > /dev/null 2>&1; then 53 | echo "" 54 | echo -e "${RED}ROM Not Support, Please Type${NC} ${YELLOW}'rish'${NC} ${RED}First In Your Termux${NC}" 55 | echo -e "${RED} If You Not Have Shizuku, Please Download In Playstore${NC}" 56 | echo -e "${RED}And Start Shizuku For Root${NC}" 57 | echo "" 58 | exit 0 59 | fi 60 | } 61 | 62 | 63 | load_excluded_apps() { 64 | EXCLUDED_APPS=() 65 | while IFS= read -r line; do 66 | # Skip lines starting with // 67 | if ! echo "$line" | grep -q "^//"; then 68 | EXCLUDED_APPS+=("$line") 69 | fi 70 | done < "$EXCLUDED_APPS_FILE" 71 | } 72 | 73 | # Load excluded apps 74 | load_excluded_apps 75 | 76 | trim() { 77 | pm trim-caches 999G 78 | echo 3 > /proc/sys/vm/drop_caches 79 | echo -e "${GREEN}RAM Cache Cleared${NC}" 80 | } 81 | 82 | is_excluded() { 83 | local app=$1 84 | for excluded_app in "${EXCLUDED_APPS[@]}"; do 85 | if [ "$app" == "$excluded_app" ]; then 86 | return 0 87 | fi 88 | done 89 | return 1 90 | } 91 | 92 | lmksed() { 93 | echo "ro.lmk.low=$LMKD_LOW" > $MODPATH/system.prop 94 | echo "ro.lmk.medium=$LMKD_MEDIUM" >> $MODPATH/system.prop 95 | echo "ro.lmk.critical=$LMKD_CRITICAL" >> $MODPATH/system.prop 96 | echo "ro.lmk.critical_upgrade=$LMKD_CRITICAL_UPGRADE" >> $MODPATH/system.prop 97 | echo "ro.lmk.upgrade_pressure=$LMKD_UPGRADE_PRESSURE" >> $MODPATH/system.prop 98 | echo "ro.lmk.downgrade_pressure=$LMKD_DOWNGRADE_PRESSURE" >> $MODPATH/system.prop 99 | echo "ro.lmk.kill_heaviest_task=$LMKD_KILL_HEAVIEST_TASK" >> $MODPATH/system.prop 100 | } 101 | 102 | sosmed() { 103 | category="$1" 104 | clear 105 | echo -e "${YELLOW}Risk Mode -> $mode${NC}" 106 | trim 107 | echo -e "${YELLOW}Stopping category apps -> $category${NC}" 108 | 109 | running_apps="" 110 | 111 | if [ "$category" = "sosmed" ] || [ "$category" = "all" ]; then 112 | social_apps="com.facebook.katana com.facebook.lite com.instagram.android com.twitter.android com.twitter.android.lite com.snapchat.android com.whatsapp com.whatsapp.w4b com.tiktok org.telegram.messenger org.telegram.messenger.web org.thunderdog.challegram com.michatapp.im com.ss.android.ugc.trill com.zhiliaoapp.musically com.zhiliaoapp.musically.go com.instagram.lite" 113 | installed_social_apps="" 114 | for app in $social_apps; do 115 | if pm list packages | grep -q "$app"; then 116 | installed_social_apps="$installed_social_apps $app" 117 | fi 118 | done 119 | running_apps="$installed_social_apps" 120 | fi 121 | 122 | for app in $running_apps; do 123 | package_name=$(echo "$app" | sed 's/package://') 124 | if ! is_excluded "$package_name"; then 125 | echo -e "${RED}Stopping $package_name${NC}" 126 | am force-stop "$package_name" 127 | else 128 | echo -e "${BLUE}Skipping $package_name (exception)${NC}" 129 | fi 130 | done 131 | exit 0 132 | } 133 | 134 | stop_apps() { 135 | category="$1" 136 | clear 137 | echo -e "${YELLOW}Risk Mode -> $mode${NC}" 138 | trim 139 | echo -e "${YELLOW}Stopping category apps -> $category${NC}" 140 | 141 | running_apps=$(pm list packages -3) 142 | if [ "$category" = "google" ] || [ "$category" = "all" ]; then 143 | running_apps="$running_apps $(pm list packages | grep 'com.google')" 144 | fi 145 | if [ "$category" = "system" ] || [ "$category" = "all" ]; then 146 | running_apps="$running_apps $(pm list packages -s)" 147 | fi 148 | 149 | for app in $running_apps; do 150 | package_name=$(echo "$app" | sed 's/package://') 151 | if ! is_excluded "$package_name"; then 152 | echo -e "${RED}Stop $package_name${NC}" 153 | am force-stop "$package_name" 154 | else 155 | echo -e "${BLUE}Skipping $package_name (exception)${NC}" 156 | fi 157 | done 158 | exit 0 159 | } 160 | 161 | clean_third_party_apps() { 162 | clear 163 | echo -e "${YELLOW}Cleaning third-party apps cache${NC}" 164 | echo "" 165 | third_party_apps=$(pm list packages -3 | sed 's/package://') 166 | 167 | for app in $third_party_apps; do 168 | echo -e "${RED}Cleaning cache for $app${NC}" 169 | pm trim-caches 100M 170 | done 171 | echo "" 172 | exit 0 173 | } 174 | 175 | custom_menu() { 176 | while true; do 177 | echo -e "${BLUE}Select the application category you want to stop:${NC}" 178 | echo "1. Third party applications" 179 | echo "2. Google Apps" 180 | echo "3. System applications" 181 | echo "4. All applications" 182 | echo "5. Social Media" 183 | echo "0. Return to main menu" 184 | printf "Options: " 185 | read -r choice 186 | 187 | case $choice in 188 | 1) 189 | stop_apps "third_party" 190 | ;; 191 | 2) 192 | stop_apps "google" 193 | ;; 194 | 3) 195 | stop_apps "system" 196 | ;; 197 | 4) 198 | stop_apps "all" 199 | ;; 200 | 5) 201 | sosmed "sosmed" 202 | ;; 203 | 0) 204 | clear 205 | return 206 | ;; 207 | *) 208 | echo -e "${RED}Invalid Selection. Are You Blind?${NC}" 209 | ;; 210 | esac 211 | done 212 | } 213 | 214 | check_lmk_support() { 215 | if [ ! -d "/sys/module/lowmemorykiller" ]; then 216 | echo "" 217 | echo "${RED}Your Kernel Not Support LMK${NC}" 218 | echo "" 219 | exit 0 220 | fi 221 | } 222 | 223 | lmkd_menu() { 224 | LMKD_STATUS=$(cat $MODPATH/system/bin/lmkd_status) 225 | while true; do 226 | echo " " 227 | echo -e "${YELLOW}DEVICE RAM -> $DEVICE_RAM${NC}" 228 | echo -e "${YELLOW}DEVICE CPU -> $DEVICE_CPU${NC}" 229 | echo -e "${YELLOW}LMKD STATUS -> $LMKD_STATUS${NC}" 230 | echo " " 231 | echo -e "${BLUE}LMKD Available Mode:${NC}" 232 | echo "1. Easy ${YELLOW}(NEED REBOOT)${NC}" 233 | echo " Suitable for daily use" 234 | echo " which is not too intensive." 235 | echo "2. Medium ${YELLOW}(NEED REBOOT)${NC}" 236 | echo " Suitable for daily use " 237 | echo " intensive ones, such as playing games or " 238 | echo " use applications that require " 239 | echo " high resource." 240 | echo "3. Hard ${YELLOW}(NEED REBOOT)${NC}" 241 | echo " Suitable for very use " 242 | echo " intensive, like playing a very game" 243 | echo " heavy or using applications that " 244 | echo " require very high resources." 245 | echo "4. Reset LMKD ${YELLOW}(NEED REBOOT)${NC}" 246 | echo "5. Return to main menu" 247 | printf "Options: " 248 | read -r MODE 249 | 250 | case $MODE in 251 | 1) 252 | clear 253 | sleep 1 254 | LMKD_LOW=1500 255 | echo -e "${RED}LMKD LOW SET TO --> $LMKD_LOW${NC}" 256 | LMKD_MEDIUM=1000 257 | echo -e "${RED}LMKD MEDIUM SET TO --> $LMKD_MEDIUM${NC}" 258 | LMKD_CRITICAL=0 259 | echo -e "${RED}LMKD CRITICAL SET TO --> $LMKD_CRITICAL${NC}" 260 | LMKD_CRITICAL_UPGRADE=false 261 | echo -e "${RED}LMKD CRITICAL UPGRADE SET TO --> $LMKD_CRITICAL_UPGRADE${NC}" 262 | LMKD_UPGRADE_PRESSURE=50 263 | echo -e "${RED}LMKD CRITICAL PRESSURE SET TO --> $LMKD_CRITICAL_PRESSURE${NC}" 264 | LMKD_DOWNGRADE_PRESSURE=50 265 | echo -e "${RED}LMKD DOWNGRADE PRESSURE SET TO --> $LMKD_DOWNGRADE_PRESSURE${NC}" 266 | LMKD_KILL_HEAVIEST_TASK=false 267 | echo -e "${RED}LMKD KILL HEAVIEST TASK SET TO --> $LMKD_KILL_HEAVIEST_TASK${NC}" 268 | lmksed 269 | echo "Easy" > $MODPATH/system/bin/lmkd_status 270 | sleep 1 271 | echo " " 272 | echo -e "${YELLOW}NEED REBOOT TO APPLY LMKD${NC}" 273 | echo " " 274 | exit 0 275 | ;; 276 | 2) 277 | clear 278 | sleep 1 279 | LMKD_LOW=1001 280 | echo -e "${RED}LMKD LOW SET TO --> $LMKD_LOW${NC}" 281 | LMKD_MEDIUM=800 282 | echo -e "${RED}LMKD MEDIUM SET TO --> $LMKD_MEDIUM${NC}" 283 | LMKD_CRITICAL=0 284 | echo -e "${RED}LMKD CRITICAL SET TO --> $LMKD_CRITICAL${NC}" 285 | LMKD_CRITICAL_UPGRADE=false 286 | echo -e "${RED}LMKD CRITICAL UPGRADE SET TO --> $LMKD_CRITICAL_UPGRADE${NC}" 287 | LMKD_UPGRADE_PRESSURE=100 288 | echo -e "${RED}LMKD CRITICAL PRESSURE SET TO --> $LMKD_CRITICAL_PRESSURE${NC}" 289 | LMKD_DOWNGRADE_PRESSURE=100 290 | echo -e "${RED}LMKD DOWNGRADE PRESSURE SET TO --> $LMKD_DOWNGRADE_PRESSURE${NC}" 291 | LMKD_KILL_HEAVIEST_TASK=true 292 | echo -e "${RED}LMKD KILL HEAVIEST TASK SET TO --> $LMKD_KILL_HEAVIEST_TASK${NC}" 293 | lmksed 294 | echo "Medium" > $MODPATH/system/bin/lmkd_status 295 | sleep 1 296 | echo " " 297 | echo -e "${YELLOW}NEED REBOOT TO APPLY LMKD${NC}" 298 | echo " " 299 | exit 0 300 | ;; 301 | 3) 302 | clear 303 | sleep 1 304 | LMKD_LOW=500 305 | echo -e "${RED}LMKD LOW SET TO --> $LMKD_LOW${NC}" 306 | LMKD_MEDIUM=300 307 | echo -e "${RED}LMKD MEDIUM SET TO --> $LMKD_MEDIUM${NC}" 308 | LMKD_CRITICAL=0 309 | echo -e "${RED}LMKD CRITICAL SET TO --> $LMKD_CRITICAL${NC}" 310 | LMKD_CRITICAL_UPGRADE=true 311 | echo -e "${RED}LMKD CRITICAL UPGRADE SET TO --> $LMKD_CRITICAL_UPGRADE${NC}" 312 | LMKD_UPGRADE_PRESSURE=200 313 | echo -e "${RED}LMKD CRITICAL PRESSURE SET TO --> $LMKD_CRITICAL_PRESSURE${NC}" 314 | LMKD_DOWNGRADE_PRESSURE=200 315 | echo -e "${RED}LMKD DOWNGRADE PRESSURE SET TO --> $LMKD_DOWNGRADE_PRESSURE${NC}" 316 | LMKD_KILL_HEAVIEST_TASK=true 317 | echo -e "${RED}LMKD KILL HEAVIEST TASK SET TO --> $LMKD_KILL_HEAVIEST_TASK${NC}" 318 | lmksed 319 | echo "Hard" > $MODPATH/system/bin/lmkd_status 320 | sleep 1 321 | echo " " 322 | echo -e "${YELLOW}NEED REBOOT TO APPLY LMKD${NC}" 323 | echo " " 324 | exit 0 325 | ;; 326 | 4) 327 | clear 328 | rm $MODPATH/system.prop 329 | touch $MODPATH/system.prop 330 | echo "No Mode Choice" > $MODPATH/system/bin/lmkd_status 331 | sleep 1 332 | echo " " 333 | echo -e "${YELLOW}NEED REBOOT TO APPLY LMKD${NC}" 334 | echo " " 335 | exit 0 336 | ;; 337 | 5) 338 | clear 339 | return 340 | ;; 341 | *) 342 | echo "Are You Blind?" 343 | exit 1 344 | ;; 345 | esac 346 | done 347 | } 348 | 349 | lmkset() { 350 | LMK="/sys/module/lowmemorykiller/parameters" 351 | chmod +w $LMK/minfree > /dev/null 2>&1 352 | echo "$Front,$Visible,$Second,$Hidden,$content,$empty" > $LMK/minfree > /dev/null 2>&1 353 | } 354 | 355 | set_lmk_minfree() { 356 | RAM=$(grep MemTotal /proc/meminfo | awk '{print $2}') 357 | RAM=$((RAM / 1024)) # Konversi ke MB 358 | 359 | case $1 in 360 | easy) 361 | clear 362 | echo "${RED}LMK minfree set to easy mode${NC}" 363 | Front=$((($RAM*1/100)*1024/4)) 364 | Visible=$((($RAM*1/100)*1024/4)) 365 | Second=$((($RAM*3/100)*1024/4)) 366 | Hidden=$((($RAM*6/100)*1024/4)) 367 | content=$((($RAM*7/100)*1024/4)) 368 | empty=$((($RAM*8/100)*1024/4)) 369 | lmkset 370 | sleep 1 371 | exit 0 372 | ;; 373 | medium) 374 | clear 375 | echo "${RED}LMK minfree set to medium mode${NC}" 376 | Front=$((($RAM*2/100)*1024/4)) 377 | Visible=$((($RAM*2/100)*1024/4)) 378 | Second=$((($RAM*4/100)*1024/4)) 379 | Hidden=$((($RAM*7/100)*1024/4)) 380 | content=$((($RAM*8/100)*1024/4)) 381 | empty=$((($RAM*9/100)*1024/4)) 382 | lmkset 383 | sleep 1 384 | exit 0 385 | ;; 386 | hard) 387 | clear 388 | echo "${RED}LMK minfree set to hard mode${NC}" 389 | Front=$((($RAM*3/100)*1024/4)) 390 | Visible=$((($RAM*3/100)*1024/4)) 391 | Second=$((($RAM*5/100)*1024/4)) 392 | Hidden=$((($RAM*8/100)*1024/4)) 393 | content=$((($RAM*9/100)*1024/4)) 394 | empty=$((($RAM*10/100)*1024/4)) 395 | lmkset 396 | sleep 1 397 | exit 0 398 | ;; 399 | *) 400 | return 401 | ;; 402 | esac 403 | } 404 | 405 | lmk_menu() { 406 | LMK_STATUS="No Mode Choice" 407 | while true; do 408 | echo " " 409 | echo -e "${YELLOW}DEVICE RAM -> $DEVICE_RAM${NC}" 410 | echo -e "${YELLOW}DEVICE CPU -> $DEVICE_CPU${NC}" 411 | echo -e "${YELLOW}LMK STATUS -> $LMK_STATUS${NC}" 412 | echo " " 413 | echo -e "${BLUE}LMK Available Mode:${NC}" 414 | echo "1. Easy" 415 | echo " Suitable for daily use" 416 | echo " which is not too intensive." 417 | echo "2. Medium" 418 | echo " Suitable for daily use " 419 | echo " intensive ones, such as playing games or " 420 | echo " use applications that require " 421 | echo " high resource." 422 | echo "3. Hard" 423 | echo " Suitable for very use " 424 | echo " intensive, like playing a very game" 425 | echo " heavy or using applications that " 426 | echo " require very high resources." 427 | echo "4. Return to main menu" 428 | printf "Options: " 429 | read -r choice 430 | case $choice in 431 | 1) 432 | set_lmk_minfree easy 433 | LMK_STATUS="Easy" 434 | ;; 435 | 2) 436 | set_lmk_minfree medium 437 | LMK_STATUS="Medium" 438 | ;; 439 | 3) 440 | set_lmk_minfree hard 441 | LMK_STATUS="Hard" 442 | ;; 443 | 4) 444 | clear 445 | return 446 | ;; 447 | *) 448 | echo "Are You Blind?" 449 | ;; 450 | esac 451 | done 452 | } 453 | 454 | freeze_apps() { 455 | clear 456 | echo -e "${YELLOW}Freezing third-party apps${NC}" 457 | 458 | third_party_apps=$(pm list packages -3 | sed 's/package://') 459 | 460 | echo "" 461 | index=1 462 | declare -A app_map > /dev/null 2>&1 463 | for app in $third_party_apps; do 464 | app_name=$(pm list packages -f | grep "$app" | sed 's/.*=//' | sed 's/package://') 465 | app_map[$index]=$app 466 | if pm list packages -d | grep -q "$app"; then 467 | echo -e "${YELLOW}${index}. $app${NC} - ${RED}(Frozen)${NC}" 468 | else 469 | echo -e "${YELLOW}${index}. $app${NC} - ${GREEN}(Active)${NC}" 470 | fi 471 | index=$((index + 1)) 472 | done 473 | 474 | echo " " 475 | echo "Enter the number of the app you want to freeze (or type 'exit' to quit 'back' to return home)" 476 | printf "Type:" 477 | read -r app_number 478 | 479 | if [ "$app_number" = "exit" ]; then 480 | clear 481 | echo "By Madafaka" 482 | clear 483 | exit 0 484 | elif [ -n "${app_map[$app_number]}" ]; then 485 | clear 486 | sleep 1 487 | package_name=${app_map[$app_number]} 488 | echo -e "${RED}Freezing $package_name${NC}" 489 | pm disable-user --user 0 "$package_name" > /dev/null 2>&1 490 | echo "" 491 | elif [ "$app_number" = "back" ]; then 492 | clear 493 | return 494 | else 495 | echo -e "${BLUE}Are You Blind?${NC}" 496 | fi 497 | 498 | exit 0 499 | } 500 | 501 | unfreeze_apps() { 502 | clear 503 | echo -e "${YELLOW}Unfreezing third-party apps${NC}" 504 | 505 | third_party_apps=$(pm list packages -3 | sed 's/package://') 506 | 507 | echo "" 508 | index=1 509 | declare -A app_map > /dev/null 2>&1 510 | for app in $third_party_apps; do 511 | app_name=$(pm list packages -f | grep "$app" | sed 's/.*=//' | sed 's/package://') 512 | app_map[$index]=$app 513 | if pm list packages -d | grep -q "$app"; then 514 | echo -e "${YELLOW}${index}. $app${NC} - ${RED}(Frozen)${NC}" 515 | else 516 | echo -e "${YELLOW}${index}. $app${NC} - ${GREEN}(Active)${NC}" 517 | fi 518 | index=$((index + 1)) 519 | done 520 | 521 | echo " " 522 | echo "Enter the number of the app you want to unfreeze (or type 'exit' to quit 'back' to return home):" 523 | printf "Type:" 524 | read -r app_number 525 | if [ "$app_number" = "exit" ]; then 526 | echo "Exiting..." 527 | exit 0 528 | elif [ -n "${app_map[$app_number]}" ]; then 529 | clear 530 | sleep 1 531 | package_name=${app_map[$app_number]} 532 | echo -e "${GREEN}Unfreezing $package_name${NC}" 533 | pm enable "$package_name" > /dev/null 2>&1 534 | echo "" 535 | elif [ "$app_number" = "back" ]; then 536 | clear 537 | return 538 | else 539 | echo -e "${BLUE}Are You Blind?${NC}" 540 | fi 541 | 542 | exit 0 543 | } 544 | 545 | game_overlay_downscale() { 546 | echo "" 547 | echo "" 548 | printf "\e[101m\e[1;77mNOTE!\e[0m\n" 549 | echo "" 550 | echo "${YELLOW}You can only enter 1 package, if you want another package, enter this menu again${NC}" 551 | echo "" 552 | echo "" 553 | echo -ne "Enter Package Name: " 554 | read -s ofpsg 555 | echo "How much Downscale do you want?" 556 | echo -ne "Recommendation 1.0 to 0.5 : " 557 | read -s ofpsga 558 | device_config put game_overlay $ofpsg mode=2,downscaleFactor=$ofpsga:mode=3,downscaleFactor=$ofpsga > /dev/null 2>&1 559 | sleep 1 560 | echo "" 561 | echo "Done! more information check ${YELLOW}https://developer.android.com/games/gamemode/gamemode-interventions${NC}" 562 | exit 0 563 | } 564 | 565 | check_android_version() { 566 | local version=$(getprop ro.build.version.release) 567 | local major_version=$(echo $version | cut -d. -f1) 568 | 569 | if [ "$major_version" -lt 12 ]; then 570 | echo "Your Android Version Not Support" 571 | exit 572 | fi 573 | } 574 | 575 | get_current_resolution() { 576 | wm size | awk '{print $3}' 577 | } 578 | 579 | get_physical_resolution() { 580 | dumpsys display | grep 'PhysicalDisplayInfo' | awk -F'[{}]' '{print $2}' | awk '{print $1 "x" $3}' | sed 's/,//' | head -n 1 581 | } 582 | 583 | get_current_density() { 584 | wm density | awk '{print $3}' | head -n 1 585 | } 586 | 587 | set_resolution() { 588 | local resolution=$1 589 | wm size $resolution 590 | } 591 | 592 | set_density() { 593 | local density=$1 594 | wm density $density 595 | } 596 | 597 | reset_resolution() { 598 | wm size reset 599 | wm density reset 600 | } 601 | 602 | recommend_resolution() { 603 | local current_res=$1 604 | local width=$(echo $current_res | cut -d'x' -f1) 605 | local height=$(echo $current_res | cut -d'x' -f2) 606 | local new_width=$((width / 2)) 607 | local new_height=$((height / 2)) 608 | echo "${new_width}x${new_height}" 609 | } 610 | 611 | recommend_density() { 612 | local current_density=$1 613 | local new_density=$((current_density / 2)) 614 | echo "$new_density" 615 | } 616 | 617 | calculate_density() { 618 | local physical_res=$1 619 | local new_res=$2 620 | local current_density=$3 621 | 622 | local physical_width=$(echo $physical_res | cut -d'x' -f1) 623 | local physical_height=$(echo $physical_res | cut -d'x' -f2) 624 | local new_width=$(echo $new_res | cut -d'x' -f1) 625 | local new_height=$(echo $new_res | cut -d'x' -f2) 626 | 627 | local width_ratio=$(echo "scale=2; $new_width / $physical_width" | bc) 628 | local height_ratio=$(echo "scale=2; $new_height / $physical_height" | bc) 629 | 630 | local avg_ratio=$(echo "scale=2; ($width_ratio + $height_ratio) / 2" | bc) 631 | local new_density=$(echo "scale=0; $current_density * $avg_ratio" | bc) 632 | 633 | echo "$new_density" 634 | } 635 | 636 | resolution_changer() { 637 | while true; do 638 | clear 639 | echo "Screen Resolution Changer" 640 | echo "=========================" 641 | current_res=$(get_current_resolution) 642 | physical_res=$(get_physical_resolution) 643 | current_density=$(get_current_density) 644 | echo "Current Resolution: $current_res" 645 | echo "Physical Resolution: $physical_res" 646 | echo "Current Density: $current_density" 647 | 648 | recommended_res=$(recommend_resolution $physical_res) 649 | recommended_density=$(recommend_density $current_density) 650 | echo "Recommended Lower Resolution: $recommended_res" 651 | echo "Recommended Lower Density: $recommended_density" 652 | 653 | echo "1. Set Recommended Resolution and Density" 654 | echo "2. Set Custom Resolution and Automatic Density" 655 | echo "3. Reset Resolution and Density" 656 | echo "4. Exit" 657 | echo -n "Choose an option: " 658 | read choice 659 | 660 | case $choice in 661 | 1) 662 | set_resolution $recommended_res 663 | set_density $recommended_density 664 | echo "Resolution set to $recommended_res" 665 | echo "Density set to $recommended_density" 666 | ;; 667 | 2) 668 | echo -n "Enter custom resolution (e.g., 1280x720): " 669 | read custom_res 670 | custom_density=$(calculate_density $physical_res $custom_res $current_density) 671 | set_resolution $custom_res 672 | set_density $custom_density 673 | echo "Resolution set to $custom_res" 674 | echo "Density set to $custom_density" 675 | ;; 676 | 3) 677 | reset_resolution 678 | echo "Resolution and density reset to default" 679 | ;; 680 | 4) 681 | exit 0 682 | ;; 683 | *) 684 | echo "Invalid option, please try again." 685 | ;; 686 | esac 687 | echo -n "Press any key to continue..." 688 | read -n 1 689 | done 690 | } 691 | 692 | monolith_compile() { 693 | MODE="speed-profile" 694 | MLOG="/sdcard/Android/Risk/risk.log" 695 | package_list=$(pm list packages) 696 | 697 | compile_command="pm compile -a" 698 | [ "$1" = "-f" ] && compile_command+=" -f" 699 | 700 | echo "$(date '+%Y-%m-%d %H:%M:%S') >>> Compiling packages" >> "$MLOG" 701 | $compile_command -m "$MODE" 702 | 703 | echo "$(date '+%Y-%m-%d %H:%M:%S') >>> Compiling layouts" >> "$MLOG" 704 | $compile_command --compile-layouts 705 | 706 | echo "$(date '+%Y-%m-%d %H:%M:%S') >>> Compiling secondary dex files" >> "$MLOG" 707 | $compile_command --secondary-dex -m "$MODE" 708 | 709 | echo "$(date '+%Y-%m-%d %H:%M:%S') >>> Reconciling secondary dex files" >> "$MLOG" 710 | for package in $package_list; do 711 | clear 712 | pm reconcile-secondary-dex-files "$package" 713 | done 714 | 715 | echo "$(date '+%Y-%m-%d %H:%M:%S') >>> Done" >> "$MLOG" 716 | exit 0 717 | } 718 | 719 | main_menu() { 720 | while true; do 721 | echo " " 722 | echo "${BLUE}╔═══╗───╔╗${NC}" 723 | echo "${BLUE}║╔═╗║───║║${NC}" 724 | echo "${BLUE}║╚═╝╠╦══╣║╔╗${NC}" 725 | echo "${BLUE}║╔╗╔╬╣══╣╚╝╝${NC}" 726 | echo "${BLUE}║║║╚╣╠══║╔╗╗${NC}" 727 | echo "${BLUE}╚╝╚═╩╩══╩╝╚╝ CONTROL IS YOURS${NC}" 728 | echo " " 729 | echo "${BLUE}RISK VERSION -> ${VER}${NC}" 730 | echo " " 731 | echo "${BLUE}ANDROID VERSION -> ${ANDROID}${NC}" 732 | echo "${BLUE}KERNEL -> ${KERNEL}:${NC}" 733 | echo " " 734 | echo "${BLUE}Select mode:${NC}" 735 | echo "1. Safe ${YELLOW}(stop third party apps only)${NC}" 736 | echo "2. Aggressive ${YELLOW}(stop third party apps and Google)${NC}" 737 | echo "3. Custom ${YELLOW}(select the application category you want to stop)${NC}" 738 | echo "4. LMKD Adjusment A10+" 739 | echo "5. LMK minfree Adjusment ${YELLOW}(If Your Kernel Support)${NC}" 740 | echo "6. Clean Cache ${YELLOW}(Only Third Party Apps)${NC}" 741 | echo "7. Freeze App ${YELLOW}(Third Party Apps)${NC}" 742 | echo "8. Unfreeze App" 743 | echo "9. Downscale ${YELLOW}(Work On Android 12+)${NC}" 744 | echo "10. Resolution Changer" 745 | echo "11. Monolith Compile ${YELLOW}(Compile Apps With Reconcile)${NC}" 746 | echo "0. Exit" 747 | echo "99. Force Exit Termux" 748 | printf "Options: " 749 | read -r choice 750 | 751 | case $choice in 752 | 1) 753 | check_support 754 | mode="Safe" 755 | stop_apps "third_party" 756 | ;; 757 | 2) 758 | check_support 759 | mode="Aggresive" 760 | stop_apps "google" 761 | ;; 762 | 3) 763 | clear 764 | check_support 765 | custom_menu 766 | mode="Custom" 767 | ;; 768 | 4) 769 | clear 770 | lmkd_menu 771 | ;; 772 | 5) 773 | clear 774 | check_lmk_support 775 | lmk_menu 776 | ;; 777 | 6) 778 | clear 779 | check_support 780 | clean_third_party_apps 781 | ;; 782 | 7) 783 | clear 784 | check_support 785 | freeze_apps 786 | ;; 787 | 8) 788 | clear 789 | check_support 790 | unfreeze_apps 791 | ;; 792 | 9) 793 | clear 794 | check_support 795 | check_android_version 796 | game_overlay_downscale 797 | ;; 798 | 10) 799 | clear 800 | check_support 801 | resolution_changer 802 | ;; 803 | 11) 804 | clear 805 | check_support 806 | monolith_compile 807 | ;; 808 | 0) 809 | clear 810 | echo "Bye, Madafaka...." 811 | sleep 0.5 812 | clear 813 | exit 0 814 | ;; 815 | 99) 816 | clear 817 | echo "Bye, Madafaka...." 818 | sleep 0.5 819 | am force-stop com.termux 820 | 821 | ;; 822 | *) 823 | clear 824 | echo "${RED}Are You Blind?.${NC}" 825 | ;; 826 | esac 827 | done 828 | } 829 | clear 830 | main_menu 831 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy 4 | # of this software and associated documentation files (the "Software"), to deal 5 | # in the Software without restriction, including without limitation the rights 6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | # copies of the Software, and to permit persons to whom the Software is 8 | # furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | # THE SOFTWARE. 20 | # 21 | RISK_DIR="/sdcard/Android" 22 | rm -rf $RISK_DIR/Risk -------------------------------------------------------------------------------- /update.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "v2.3", 3 | "versionCode": 437011024, 4 | "zipUrl": "https://github.com/rakarmp/Risk/raw/main/build/Risk-2.3.011024-release.zip", 5 | "changelog": "https://github.com/rakarmp/Risk/raw/main/changelog.md" 6 | } --------------------------------------------------------------------------------