├── LICENSE ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── addon └── Volume-Key-Selector │ ├── README.md │ ├── install.sh │ └── tools │ ├── arm │ └── keycheck │ └── x86 │ └── keycheck ├── changelog.md ├── customize.sh ├── module.prop ├── post-fs-data.sh ├── uninstall.sh └── update.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 alicee98 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 v23.0+! " 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 23000 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 34 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Selinux Changer Module 2 | 3 | **Credits** 4 | * By : [@alicee98](https://t.me/yudhased) 5 | * Support Channel : [GTW Project](https://t.me/gtwprjkt) 6 | * Changelog With Feature List : [Here](https://github.com/Magisk-Modules-Alt-Repo/selinux_mode/main/changelog.md) 7 | 8 | **Warning !!** 9 | * Before Change Your Selinux Mode, Please Read This Warning Message! 10 | * Permissive Selinux Maybe Will Make Your Banking App Cant Opened. and Make Your Game Account Got 3rd Party Banned. 11 | * Do With Your Risk! 12 | * Immediately Uninstall This Module If You Don't Want Problems To Happen! 13 | -------------------------------------------------------------------------------- /addon/Volume-Key-Selector/README.md: -------------------------------------------------------------------------------- 1 | # Volume Key Selector 2 | Addon that allows using volume keys to select options in the magisk installer. 3 | 4 | ## Instructions 5 | * Call `chooseport` whenever you want to call to use volume key check. The function returns true if user selected volume up and false if volume down. It will wait 60 seconds for input by default. 6 | * Example: 7 | ```sh 8 | if chooseport; then 9 | echo "true" 10 | else 11 | echo "false" 12 | fi 13 | ``` 14 | * You can customize how many settings you want to wait for input. 15 | * Example: 16 | ```sh 17 | if chooseport 15; then 18 | echo "true" 19 | fi 20 | ``` 21 | > Will wait 15 seconds instead of the default 60 seconds. 22 | * If you want to use the **bixby button** on samsung galaxy devices, [check out this post here](https://forum.xda-developers.com/showpost.php?p=77908805&postcount=16) and modify the `install.sh` functions accordingly. 23 | 24 | ## Notes 25 | * Each volume key selector method will timeout after 60 seconds in the event of incompatibility or error. 26 | 27 | ## Credits 28 | * [keycheck binary](https://github.com/sonyxperiadev/device-sony-common-init/tree/master/keycheck) compiled by [Zackptg5](https://github.com/Zackptg5/Keycheck). 29 | -------------------------------------------------------------------------------- /addon/Volume-Key-Selector/install.sh: -------------------------------------------------------------------------------- 1 | # External Tools 2 | chmod -R 0755 $MODPATH/addon/Volume-Key-Selector/tools 3 | 4 | chooseport_legacy() { 5 | # Keycheck binary by someone755 @Github, idea for code below by Zappo @xda-developers 6 | # Calling it first time detects previous input. Calling it second time will do what we want 7 | [ "$1" ] && local delay=$1 || local delay=60 8 | local error=false 9 | while true; do 10 | timeout 0 $MODPATH/addon/Volume-Key-Selector/tools/$ARCH32/keycheck 11 | timeout $delay $MODPATH/addon/Volume-Key-Selector/tools/$ARCH32/keycheck 12 | local sel=$? 13 | if [ $sel -eq 42 ]; then 14 | return 0 15 | elif [ $sel -eq 41 ]; then 16 | return 1 17 | elif $error; then 18 | abort "Error!" 19 | else 20 | error=true 21 | echo "Try again!" 22 | fi 23 | done 24 | } 25 | 26 | chooseport() { 27 | # Original idea by chainfire and ianmacd @xda-developers 28 | [ "$1" ] && local delay=$1 || local delay=60 29 | local error=false 30 | while true; do 31 | local count=0 32 | while true; do 33 | timeout $delay /system/bin/getevent -lqc 1 2>&1 > $TMPDIR/events & 34 | sleep 0.5; count=$((count + 1)) 35 | if (`grep -q 'KEY_VOLUMEUP *DOWN' $TMPDIR/events`); then 36 | return 0 37 | elif (`grep -q 'KEY_VOLUMEDOWN *DOWN' $TMPDIR/events`); then 38 | return 1 39 | fi 40 | [ $count -gt 60 ] && break 41 | done 42 | if $error; then 43 | echo "Trying keycheck method..." 44 | export chooseport=chooseport_legacy VKSEL=chooseport_legacy 45 | chooseport_legacy $delay 46 | return $? 47 | else 48 | error=true 49 | echo "Volume key not detected, try again!" 50 | fi 51 | done 52 | } 53 | 54 | VKSEL=chooseport 55 | -------------------------------------------------------------------------------- /addon/Volume-Key-Selector/tools/arm/keycheck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/selinux_mode/dce612f6a5e5c1047f713a03796e797e9002d28e/addon/Volume-Key-Selector/tools/arm/keycheck -------------------------------------------------------------------------------- /addon/Volume-Key-Selector/tools/x86/keycheck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/selinux_mode/dce612f6a5e5c1047f713a03796e797e9002d28e/addon/Volume-Key-Selector/tools/x86/keycheck -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | ## Changelog 2 | * Selinux Changer Mode By Yudha 3 | * Worked For Audio Mod Like Dolby Atmos Or ViperFX 4 | * With 2 Mode Selinux Changer 5 | * Change Your Selinux Mode. 6 | * Included UpdateJson For Magisk 24+ Version 7 | * Installation With Volume Key. Up For Select, Down For Enter. Notes : It Will Different In Some Device! 8 | 9 | **V1** 10 | * First Realease And Published 11 | 12 | **V2** 13 | * Fix Some Bugs And Added Warning Text 14 | * Change The Methode From system.prop To post-fs-data.sh 15 | 16 | **2.5.1** 17 | * Remove Magisk Log Remover 18 | * Update The Host To Latest Version 19 | 20 | **2.5.2** 21 | * Remove Cache Cleaner Because Not the Main Function of This Module 22 | * Maybe There Will Be Many Update Versions To Come, Because This Module Need More Fix. 23 | 24 | **2.6** 25 | * Compressed The Size Of Zip 26 | * Removed Some Files 27 | 28 | **2.6.1** 29 | * Fix Problem When You Want Update This Module From MagiskApp 30 | 31 | **2.6.2** 32 | * Fix Update. 33 | 34 | **Telegram Channel Text** 35 | * Changelog Text : [Here](https://t.me/gtwprjkt/6) 36 | 37 | **Warning !!** 38 | * Before Change Your Selinux Mode, Please Read This Warning Message! 39 | * Permissive Selinux Maybe Will Make Your Banking App Cant Opened. and Make Your Game Account Got 3rd Party Banned. 40 | * Do With Your Risk! 41 | * Immediately Uninstall This Module If You Don't Want Problems To Happen! 42 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | SKIPUNZIP=1 2 | 3 | PRINT() { 4 | ui_print "Warning!" 5 | ui_print "• Before Change Your Selinux Mode, Please Read This Warning Message!" 6 | ui_print "• Permissive Selinux Maybe Will Make Your Banking App Cant Opened. and Make Your Game Account Got 3rd Party Banned." 7 | ui_print "• Do With Your Risk!" 8 | ui_print "• Immediately Uninstall This Module If You Don't Want Problems To Happen!" 9 | ui_print "" 10 | sleep 4 11 | ui_print "Selinux Changer Mode By Yudha" 12 | ui_print "• Worked For Audio Mod Like Dolby Atmos Or ViperFX," 13 | ui_print "• With 2 Mode Selinux Changer" 14 | ui_print "• Change Your Selinux Mode." 15 | ui_print "" 16 | sleep 1 17 | } 18 | 19 | EXEC() { 20 | ui_print "Installing..." 21 | sleep 1.5 22 | ui_print "- Extracting module files" 23 | unzip -o "$ZIPFILE" 'addon/*' -d $MODPATH >&2 24 | unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2 25 | unzip -o "$ZIPFILE" module.prop -d $MODPATH >&2 26 | unzip -o "$ZIPFILE" post-fs-data.sh -d $MODPATH >&2 27 | unzip -o "$ZIPFILE" uninstall.sh -d $MODPATH >&2 28 | ui_print "" 29 | sleep 1.5 30 | 31 | . $MODPATH/addon/Volume-Key-Selector/install.sh 32 | 33 | ui_print "Select Selinux Mode." 34 | ui_print " 1. Selinux Enforcing" 35 | ui_print " 2. Selinux Permissive" 36 | ui_print "" 37 | sleep 0.5 38 | 39 | A=1 40 | while true; do 41 | ui_print "$A" 42 | if $VKSEL; then 43 | A=$((A + 1)) 44 | else 45 | break 46 | fi 47 | if [ $A -gt 2 ]; then 48 | A=1 49 | fi 50 | done 51 | ui_print "Selected: $A" 52 | case $A in 53 | 1 ) TEXT1="Selinux Enforcing"; sed -i '/setenforce/s/.*/setenforce 1/' $MODPATH/post-fs-data.sh;; 54 | 2 ) TEXT1="Selinux Permissive"; sed -i '/setenforce/s/.*/setenforce 0/' $MODPATH/post-fs-data.sh;; 55 | esac 56 | ui_print "- $TEXT1" 57 | ui_print "" 58 | sleep 1 59 | 60 | rm -rf $MODPATH/addon 61 | rm -rf $MODPATH/update.json 62 | rm -rf $MODPATH/changelog.md 63 | rm -rf $MODPATH/README.md 64 | rm -rf $MODPATH/LICENSE 65 | rm -rf $MODPATH/service.sh 66 | } 67 | 68 | if [ ! "$SKIPUNZIP" = "0" ]; then 69 | set -x 70 | PRINT 71 | EXEC 72 | else 73 | set +x 74 | abort 75 | fi 76 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=selinux_mode 2 | name=Selinux Mode Changer 3 | version=2.6.2 4 | versionCode=262 5 | author=alicee98 6 | description=Change Your Selinux Mode 7 | updateJson=https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/selinux_mode/main/update.json 8 | support=https://t.me/gtwprjkt 9 | donate=https://www.paypal.com/paypalme/271820 10 | -------------------------------------------------------------------------------- /post-fs-data.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | MODDIR=${0%/*} 3 | # Selinux Changer 4 | setenforce -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | MODDIR=${0%/*} 3 | 4 | # Delete Activity Manager Tweak and use default settings 5 | settings delete global activity_manager_constants 6 | -------------------------------------------------------------------------------- /update.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.6.2", 3 | "versionCode": 262, 4 | "zipUrl": "https://github.com/Magisk-Modules-Alt-Repo/selinux_mode/releases/download/V2.6.2/Selinux-Changer.zip", 5 | "changelog": "https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/selinux_mode/main/changelog.md" 6 | } 7 | --------------------------------------------------------------------------------