Skip to content

Commit

Permalink
19.1.0 (TANGO)
Browse files Browse the repository at this point in the history
Changelog

- Added KernelSU Support
- Fixed ML Algorithm
- Fixed Frequency Scaling
- Fixed Config Interpreter
- Fixed Refresh Rate on Boot
- Fixed Installation on Other Managers
- Updated Module Updater to v4.0
- Miscellaneous Fixes and Improvements

Signed-off-by: Kyliekyler <siosonkylebrandon@gmail.com>
  • Loading branch information
Kyliekyler committed Feb 20, 2023
1 parent 99d864d commit c22e5e4
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 75 deletions.
57 changes: 1 addition & 56 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -14,72 +14,17 @@ umask 022
ui_print() { echo "$1"; }

require_new_magisk() {
ui_print "- PLEASE INSTALL MAGISK V23+!"
ui_print "- PLEASE INSTALL MAGISK VERSION 23 OR NEWER!"
exit 1
}

# shellcheck disable=SC2034
OUTFD=$2
ZIPFILE=$3

mount /data 2> /dev/null

[ -f "/data/adb/magisk/util_functions.sh" ] || require_new_magisk
# shellcheck disable=SC1091
. /data/adb/magisk/util_functions.sh
[ "$MAGISK_VER_CODE" -lt "23000" ] && require_new_magisk

install_module() {
if ! $BOOTMODE; then
recovery_actions > /dev/null 2>&1
ui_print "- ABORTING..."
abort " INSTALLATION FROM RECOVERY NOT SUPPORTED"
fi

rm -rf $TMPDIR
mkdir -p $TMPDIR
chcon u:object_r:system_file:s0 $TMPDIR
cd $TMPDIR || abort "- UNABLE TO CHANGE DIRECTORY"

ensure_bb
mount_partitions > /dev/null 2>&1
boot_actions

unzip -o "$ZIPFILE" module.prop -d $TMPDIR >&2
[ ! -f $TMPDIR/module.prop ] && abort "- UNABLE TO EXTRACT ZIP FILE!"

RDM=$(tr < /dev/urandom -cd 'A-F0-9' | head -c 8)
sed -i "s/.*id=.*/id=$RDM/" $TMPDIR/module.prop
[ -f "/data/.mcore" ] && mv -f /data/.mcore /data/.ncore

MODDIRNAME=modules_update
MODULEROOT=$NVBASE/$MODDIRNAME
MODID=$(grep_prop id $TMPDIR/module.prop)
MODPATH=$MODULEROOT/$MODID

rm -rf $MODPATH
mkdir -p $MODPATH

unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2

set_perm_recursive $MODPATH 0 0 0755 0644
set_perm_recursive $MODPATH/install 0 0 0755 0755
set_perm_recursive $MODPATH/system/bin 0 2000 0755 0755
set_perm_recursive $MODPATH/system/xbin 0 2000 0755 0755
set_perm_recursive $MODPATH/system/system_ext/bin 0 2000 0755 0755
set_perm_recursive $MODPATH/system/vendor/bin 0 2000 0755 0755 u:object_r:vendor_file:s0

[ -f "$MODPATH/install" ] && $MODPATH/install

rm -rf \
$MODPATH/LICENSE $MODPATH/install \
$MODPATH/*.json $MODPATH/*.md \
$MODPATH/.git* $MODPATH/resources* \
$MODPATH/dependencies* 2> /dev/null

cd /
rm -rf $TMPDIR
}

install_module
exit 0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ MAGNETAR is an all-in-one kernel tweaker that aims to provide an optimal experie
MAGNETAR requires the following to function properly:

- [![API 21+](https://img.shields.io/badge/API-21%2B-3DDC84.svg?style=flat&logo=android)](https://www.android.com/)
- [![Arch aarch64](https://img.shields.io/badge/Arch-aarch64-0091BD.svg?style=flat&logo=arm)](https://www.arm.com/)
- [![Magisk 23](https://img.shields.io/badge/Magisk-23%2B-00B39B.svg?style=flat&logo=magisk)](https://github.com/topjohnwu/Magisk)
- [![ARM arm64](https://img.shields.io/badge/ARM-arm64-0091BD.svg?style=flat&logo=arm)](https://www.arm.com/)
- [![Magisk 23+](https://img.shields.io/badge/Magisk-23%2B-00B39B.svg?style=flat&logo=magisk)](https://github.com/topjohnwu/Magisk) [![KernelSU 10575+](https://img.shields.io/badge/KernelSU-10575%2B-1E110D.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADABAMAAACg8nE0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEUjGBUlGhdDOjdEOzgoHRovJSL8+/v///8vJCL4+PgkGRbMZBB8AAAAAWJLR0QHFmGI6wAAAKdJREFUeNrt3KENwmAQhuEiSAgKwwQkDFBIGIAFWkFSXdGmmqS1GFZAMyoLVFzOkf95F3jMffaqSlKJbU6XWNcksB2XWE8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlATsPkOsPgns349YbRKQ1jsGL6/7JoFzcDvTKwncguufGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUBNyD3wnqQxKQ9N/9AIPxN3LnzrAfAAAAAElFTkSuQmCC)](https://github.com/tiann/KernelSU)

Once the system has been verified to meet MAGNETAR requirements, it can be flashed on magisk manager and then rebooted to take effect.

Expand Down
19 changes: 7 additions & 12 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
## Changelog

- Added Custom Config Viewer
- Added Loop Interpreter for Custom Config
- Adjusted Tuning Profile
- Allowed Regular Users to Use Game Mode
- Fixed Slow Config Detection
- Fixed Endurance+ Mode for MIUI
- Fixed ML Null Training Data
- Fixed Feature Support Checking at Kernel Change
- Improved Daemon
- Removed Per-App Profile for Regular Users
- Removed Beta Update Channel
- Updated Dependencies to 64bit
- Added KernelSU Support
- Fixed ML Algorithm
- Fixed Frequency Scaling
- Fixed Config Interpreter
- Fixed Refresh Rate on Boot
- Fixed Installation on Other Managers
- Updated Module Updater to v4.0
- Miscellaneous Fixes and Improvements
Binary file modified install
Binary file not shown.
74 changes: 74 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# _____ __________ _____ ____ _____ _________
# | | _ | __| | | __|_ _| _ | __ |
# | | | | | | | | | | __| | | | | -|
# |_|_|_|_|__|_____|_|___|____| |_| |_|__|_|__|
# by Kyliekyler © 2019-2023

#===========================================================================//
# GIVE PROPER CREDITS IF YOU USE THE PART OF IT IN YOUR WORK, THANKS!
#===========================================================================//

require_new_magisk() {
ui_print "- PLEASE INSTALL MAGISK VERSION 23 OR NEWER!"
exit 1
}

require_new_ksu() {
ui_print "- PLEASE INSTALL KERNELSU VERSION 10575 OR NEWER!"
exit 1
}

on_install() {
if ! $BOOTMODE; then
recovery_actions > /dev/null 2>&1
abort "- INSTALLATION FROM RECOVERY NOT SUPPORTED!"
fi

if [ -n "$KSU_KERNEL_VER_CODE" ] && [ "$KSU_KERNEL_VER_CODE" -lt "10575" ]; then
require_new_ksu
elif [ "$MAGISK_VER_CODE" -lt "23000" ]; then
require_new_magisk
fi

[ "$ARCH" = "arm64" ] || abort "- $(awk -v var="$ARCH" 'BEGIN{print toupper(var)}') NOT SUPPORTED!"

rm -rf $TMPDIR
mkdir -p $TMPDIR
chcon u:object_r:system_file:s0 $TMPDIR
cd $TMPDIR || abort "- UNABLE TO CHANGE DIRECTORY"

ensure_bb
mount_partitions > /dev/null 2>&1
boot_actions

unzip -o "$ZIPFILE" module.prop -d $TMPDIR >&2
[ ! -f $TMPDIR/module.prop ] && abort "- UNABLE TO EXTRACT ZIP FILE!"

rm -rf $MODPATH

RDM=$(tr < /dev/urandom -cd 'A-F0-9' | head -c 8)
sed -i "s/.*id=.*/id=$RDM/" $TMPDIR/module.prop

MODID=$(grep_prop id $TMPDIR/module.prop)
MODPATH=$MODULEROOT/$MODID

mkdir -p $MODPATH

unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2

set_perm_recursive $MODPATH 0 0 0755 0644
set_perm_recursive $MODPATH/install 0 0 0755 0755

[ -f "$MODPATH/install" ] && $MODPATH/install "$MODPATH"

rm -rf \
$MODPATH/LICENSE $MODPATH/install* \
$MODPATH/*.json $MODPATH/*.md \
$MODPATH/.git* $MODPATH/resources* \
$MODPATH/dependencies* 2> /dev/null

cd /
rm -rf $TMPDIR

exit 0
}
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=MAGNETAR
name=MAGNETAR
version=19.0.0 (SIERRA)
versionCode=190000
version=19.1.0 (TANGO)
versionCode=190100
author=Kyliekyler
description=Device Performance Optimizer — Aims To Provide An Optimal Experience At Every Usage Scenario
updateJson=https://raw.githubusercontent.com/Kyliekyler/MAGNETAR/pre-release/update.json
Binary file modified resources.xz
Binary file not shown.
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "SIERRA ",
"versionCode": 190000,
"zipUrl": "https://github.com/Kyliekyler/MAGNETAR-UPDATER/releases/download/v3.0/MAGNETAR-UPDATER.zip",
"version": "TANGO ",
"versionCode": 190100,
"zipUrl": "https://github.com/Kyliekyler/MAGNETAR-UPDATER/releases/download/v4.0/MAGNETAR-UPDATER.zip",
"changelog": "https://raw.githubusercontent.com/Kyliekyler/MAGNETAR/pre-release/changelog.md"
}

0 comments on commit c22e5e4

Please sign in to comment.