diff --git a/README.md b/README.md index 2b22dd6..3aac1f7 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ https://github.com/yc9559/uperf/releases - `balance`均衡模式,比原厂略流畅的同时略省电 - `powersave`卡顿模式,保证基本流畅的同时尽可能降低功耗 - `performance`费电模式,保证费电的同时多一点流畅度 - - `fast`性能模式,相对于均衡模式更佳激进 + - `fast`性能模式,相对于均衡模式更加激进 3. 重启 #### 启动完成后切换性能模式 @@ -61,7 +61,7 @@ https://github.com/yc9559/uperf/releases 执行`sh /data/powercfg.sh balance`,其中`balance`是想要切换到的性能模式名称。 方法2: -安装[Scene 5](https://www.coolapk.com/apk/com.omarea.vtools)为APP绑定对应的性能模式。 +安装[Scene](https://www.coolapk.com/apk/com.omarea.vtools)为APP绑定对应的性能模式。 ## 常见问题 @@ -139,8 +139,8 @@ Uperf支持如下几种情景识别: 本程序采用了跟安卓系统框架获取触摸信号一样的方式,监听位于/dev/input的设备,解析来自触摸屏的报点信息,可以获取到最基本的手指触摸到屏幕和手指离开屏幕的事件。根据一段连续的报点信息可以得到手指滑动的距离以及离开屏幕时末端速度,由此可以推断是点击操作还是滑动操作,以及根据末端速度推算APP滚动的持续时间。 -#### 重负载跟踪与限制(已经弃用) -**由于和其它分析出现冲突,已经弃用** +#### 重负载跟踪与限制 + 因为不在安卓框架层插入Hook无法确切知道APP正在启动,因此本程序在Hint开始后,用主动轮询的方式更新所有CPU核心的使用率和运行频率得到系统整体负载。`系统整体负载 = sum(efficiency(i) * (load_pct(i) / 100) * (freq_mhz(i) / 1000))`,其中`i`为CPU核心ID。如果整体负载高于`heavyLoad`,那么把当前Hint切换到重负载Hint。重负载Hint的响应性能很好但耗电也偏多,本程序会持续监测系统负载,如果整体负载低于阈值,提前结束耗电的重负载Hint。对于负载不是那么高的APP热启动,甚至不会触发重负载,不像高通Boost框架不管负载多少强行拉满CPU持续2s。此外,这样的检测不仅涵盖了APP冷热启动,还涵盖了例如点击进入微信朋友圈这样的短时重负载场景。本功能的能耗开销也是在非常低的0.6ms/100ms(Cortex-A55@1.0g)。下图为微信热启动Hint状态切换与持续时间。 ![微信热启动](media/wechat_resume.png) @@ -186,7 +186,7 @@ Sfanalysis是一个独立于Uperf的模块,注入到surfaceflinger进行修改 ### 写入器 写入器基本功能是把目标字符串值写入到`sysfs`节点,除此以外,Uperf还内建了多种写入器实现了其他功能和更加紧凑的参数序列。在切换动作时,Uperf会比对与上一动作参数值的差异,跳过写入重复的值来减少自身功耗开销。Uperf支持的`knob`有如下几种类型: -- `string`,最基础的写入器。效果等同于`echo "val" > /path`。 **注意:为了提升性能,不会和echo一样清空原有内容** +- `string`,最基础的写入器。效果等同于`echo "val" > /path`。 - `percluster`,分集群紧凑型写入器。使用配置文件中`platform/clusterCpuId`的CPU序号替换`path`中的`%d`,各个值由逗号分隔,使得按集群做区分的值更加紧凑,改善可读性。 - `percpu`,分核心紧凑型写入器。根据配置文件中`platform/efficiency`的列表长度,生成CPU序号替换`path`中的`%d`,各个值由逗号分隔,使得按CPU核心做区分的值更加紧凑,改善可读性。 - `cpufreq`,`percluster`写入器的变种。大部分功能相同,不同的是写入值=设定值*100000,缩短了频率参数序列的长度,以及带有写入失败重试以处理新的最低频率高于原有的最高频率。 @@ -559,4 +559,4 @@ UFS节能开关的`sysfs`节点路径为`/sys/devices/platform/soc/1d84000.ufshc 如果你实在愿意,下面是感谢云讨饭通道(备注写上你的ID和来源平台): -![](media/alipay-qr.png) +![](media/alipay-qr.png) \ No newline at end of file diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..95d0bb9 --- /dev/null +++ b/changelog.md @@ -0,0 +1,48 @@ +# 更新日志 + +## DEV 22.04.23 + +- 增加 系统动画主动探针 +- 增加 CPU采样器负载预测 +- 增加 与系统用户态性能控制器协同调度 +- 增加 桌面启动器自动识别 +- 增加 适配谷歌tensor/天玑810 +- 改进 提高手势操作跟手性 +- 改进 减少SfAnalysis误报 +- 修复 识别上下文的任务调度器规则匹配错误 +- 修复 联发科PPM接口适配 +- 修复 破音问题 +- 修复 部分平台功耗模型 + +## DEV 22.04.09 + +- 增加大量平台初步适配 +- 改进Unity游戏和吃鸡游戏抖动 +- 改进弹幕2倍速视频流畅度 +- 更新部分平台功耗模型 +- 日志后缀名更换为txt + +## DEV 22.04.04 + +- 插件式软件架构 + - 使用C++重新开发 + - 功能模块解耦,易扩展 +- 感知能耗的CPU调频器 + - 用户态使能全平台统一体验 + - 单核高性能,多核高能效 + - 20-100hz基础采样率,快响应低开销 +- 识别上下文的任务调度器 + - UI放大核,非关键放小核 + - 全数据驱动,正则匹配 + - 花费50%开发时间调试的默认规则 +- 动态sysfs写入 + - 用户态性能控制器基石功能 + - 实现更加简约高效 +- SfAnalysis + - 预测掉帧并在发生前拉升CPU + - 改进的帧反馈以及模糊匹配 + - patch方式无需更改SELinux状态 + - 独立选装,但是强烈推荐 +- SsAnalysis + - 跟系统线程放置器斗智斗勇 + - 独立选装,但是强烈推荐 diff --git a/magisk/META-INF/com/google/android/update-binary b/magisk/META-INF/com/google/android/update-binary index 28b48e5..112eb28 100644 --- a/magisk/META-INF/com/google/android/update-binary +++ b/magisk/META-INF/com/google/android/update-binary @@ -1,33 +1,151 @@ #!/sbin/sh -################# -# Initialization -################# +TMPDIR=/dev/tmp +MOUNTPATH=/dev/magisk_img +# Default permissions umask 022 +# Initial cleanup +rm -rf $TMPDIR 2>/dev/null +mkdir -p $TMPDIR + # echo before loading util_functions ui_print() { echo "$1"; } require_new_magisk() { - ui_print "*******************************" - ui_print " Please install Magisk v20.4+! " - ui_print "*******************************" + ui_print "***********************************" + ui_print " Please install the latest Magisk! " + ui_print "***********************************" exit 1 } -######################### -# Load util_functions.sh -######################### +imageless_magisk() { + [ $MAGISK_VER_CODE -gt 18100 ] + return $? +} + +########################################################################################## +# Environment +########################################################################################## OUTFD=$2 ZIPFILE=$3 mount /data 2>/dev/null -[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk -. /data/adb/magisk/util_functions.sh -[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk +# Load utility functions +if [ -f /data/adb/magisk/util_functions.sh ]; then + . /data/adb/magisk/util_functions.sh + NVBASE=/data/adb +else + require_new_magisk +fi + +# Preperation for flashable zips +setup_flashable + +# Mount partitions +mount_partitions + +# Detect version and architecture +api_level_arch_detect + +# Setup busybox and binaries +$BOOTMODE && boot_actions || recovery_actions + +########################################################################################## +# Preparation +########################################################################################## + +# Extract common files +unzip -oj "$ZIPFILE" module.prop install.sh uninstall.sh 'common/*' -d $TMPDIR >&2 + +[ ! -f $TMPDIR/install.sh ] && abort "! Unable to extract zip file!" +# Load install script +. $TMPDIR/install.sh + +if imageless_magisk; then + $BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules + MODULEROOT=$NVBASE/$MODDIRNAME +else + $BOOTMODE && IMGNAME=magisk_merge.img || IMGNAME=magisk.img + IMG=$NVBASE/$IMGNAME + request_zip_size_check "$ZIPFILE" + mount_magisk_img + MODULEROOT=$MOUNTPATH +fi + +MODID=`grep_prop id $TMPDIR/module.prop` +MODPATH=$MODULEROOT/$MODID + +print_modname + +ui_print "******************************" +ui_print "Powered by Magisk (@topjohnwu)" +ui_print "******************************" + +########################################################################################## +# Install +########################################################################################## + +# Create mod paths +rm -rf $MODPATH 2>/dev/null +mkdir -p $MODPATH + +on_install + +# Remove placeholder +rm -f $MODPATH/system/placeholder 2>/dev/null + +# Custom uninstaller +[ -f $TMPDIR/uninstall.sh ] && cp -af $TMPDIR/uninstall.sh $MODPATH/uninstall.sh + +# Auto Mount +if imageless_magisk; then + $SKIPMOUNT && touch $MODPATH/skip_mount +else + $SKIPMOUNT || touch $MODPATH/auto_mount +fi + +# prop files +$PROPFILE && cp -af $TMPDIR/system.prop $MODPATH/system.prop + +# Module info +cp -af $TMPDIR/module.prop $MODPATH/module.prop +if $BOOTMODE; then + # Update info for Magisk Manager + if imageless_magisk; then + mktouch $NVBASE/modules/$MODID/update + cp -af $TMPDIR/module.prop $NVBASE/modules/$MODID/module.prop + else + mktouch /sbin/.magisk/img/$MODID/update + cp -af $TMPDIR/module.prop /sbin/.magisk/img/$MODID/module.prop + fi +fi + +# post-fs-data mode scripts +$POSTFSDATA && cp -af $TMPDIR/post-fs-data.sh $MODPATH/post-fs-data.sh + +# service mode scripts +$LATESTARTSERVICE && cp -af $TMPDIR/service.sh $MODPATH/service.sh + +# Handle replace folders +for TARGET in $REPLACE; do + mktouch $MODPATH$TARGET/.replace +done + +ui_print "- Setting permissions" +set_permissions + +########################################################################################## +# Finalizing +########################################################################################## + +cd / +imageless_magisk || unmount_magisk_img +$BOOTMODE || recovery_cleanup +rm -rf $TMPDIR $MOUNTPATH -install_module +ui_print "- Done" exit 0 diff --git a/magisk/META-INF/com/google/android/updater-script b/magisk/META-INF/com/google/android/updater-script index 492be83..11d5c96 100644 --- a/magisk/META-INF/com/google/android/updater-script +++ b/magisk/META-INF/com/google/android/updater-script @@ -1 +1 @@ -#MAGISK \ No newline at end of file +#MAGISK diff --git a/magisk/post-fs-data.sh b/magisk/common/post-fs-data.sh similarity index 95% rename from magisk/post-fs-data.sh rename to magisk/common/post-fs-data.sh index 6199264..bdc8cf9 100644 --- a/magisk/post-fs-data.sh +++ b/magisk/common/post-fs-data.sh @@ -22,5 +22,3 @@ if [ -f "$MODDIR/flag/need_recuser" ]; then else true >$MODDIR/flag/need_recuser fi - -sh $MODDIR/script/powercfg_early.sh diff --git a/magisk/service.sh b/magisk/common/service.sh similarity index 99% rename from magisk/service.sh rename to magisk/common/service.sh index 1a663a8..8f90250 100644 --- a/magisk/service.sh +++ b/magisk/common/service.sh @@ -26,5 +26,4 @@ crash_recuser() { } (crash_recuser &) - sh $BASEDIR/script/initsvc.sh diff --git a/magisk/common/system.prop b/magisk/common/system.prop new file mode 100644 index 0000000..524c581 --- /dev/null +++ b/magisk/common/system.prop @@ -0,0 +1,7 @@ +# This file will be read by resetprop +# Example: Change dpi +# ro.sf.lcd_density=320 + +# headroom for GC +dalvik.vm.heapminfree=8m +dalvik.vm.heapmaxfree=12m diff --git a/magisk/customize.sh b/magisk/customize.sh deleted file mode 100644 index a138990..0000000 --- a/magisk/customize.sh +++ /dev/null @@ -1,143 +0,0 @@ -########################################################################################## -# Config Flags -########################################################################################## -#ui_print "- Extracting module files" -#unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >/dev/null -# Set to true if you do *NOT* want Magisk to mount -# any files for you. Most modules would NOT want -# to set this flag to true -SKIPMOUNT=false - -$BOOTMODE || abort "! Uperf cannot be installed in recovery." -[ $ARCH == "arm64" ] || abort "! Uperf ONLY support arm64 platform." - -ui_print "- Extracting module files" -unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >/dev/null - -# Set to true if you need to load system.prop -PROPFILE=true - -# Set to true if you need post-fs-data script -POSTFSDATA=true - -# Set to true if you need late_start service script -LATESTARTSERVICE=true - -#Use our custom setup script -SKIPUNZIP=1 - -########################################################################################## -# Replace list -########################################################################################## - -# List all directories you want to directly replace in the system -# Check the documentations for more info why you would need this - -# Construct your list in the following format -# This is an example -# REPLACE_EXAMPLE=" -# /system/app/Youtube -# /system/priv-app/SystemUI -# /system/priv-app/Settings -# /system/framework -# " - -# Construct your own list here -REPLACE="" - -########################################################################################## -# -# Function Callbacks -# -# The following functions will be called by the installation framework. -# You do not have the ability to modify update-binary, the only way you can customize -# installation is through implementing these functions. -# -# When running your callbacks, the installation framework will make sure the Magisk -# internal busybox path is *PREPENDED* to PATH, so all common commands shall exist. -# Also, it will make sure /data, /system, and /vendor is properly mounted. -# -########################################################################################## -########################################################################################## -# -# The installation framework will export some variables and functions. -# You should use these variables and functions for installation. -# -# ! DO NOT use any Magisk internal paths as those are NOT public API. -# ! DO NOT use other functions in util_functions.sh as they are NOT public API. -# ! Non public APIs are not guranteed to maintain compatibility between releases. -# -# Available variables: -# -# MAGISK_VER (string): the version string of current installed Magisk -# MAGISK_VER_CODE (int): the version code of current installed Magisk -# BOOTMODE (bool): true if the module is currently installing in Magisk Manager -# MODPATH (path): the path where your module files should be installed -# TMPDIR (path): a place where you can temporarily store files -# ZIPFILE (path): your module's installation zip -# ARCH (string): the architecture of the device. Value is either arm, arm64, x86, or x64 -# IS64BIT (bool): true if $ARCH is either arm64 or x64 -# API (int): the API level (Android version) of the device -# -# Availible functions: -# -# ui_print -# print to console -# Avoid using 'echo' as it will not display in custom recovery's console -# -# abort -# print error message to console and terminate installation -# Avoid using 'exit' as it will skip the termination cleanup steps -# -# set_perm [context] -# if [context] is empty, it will default to "u:object_r:system_file:s0" -# this function is a shorthand for the following commands -# chown owner.group target -# chmod permission target -# chcon context target -# -# set_perm_recursive [context] -# if [context] is empty, it will default to "u:object_r:system_file:s0" -# for all files in , it will call: -# set_perm file owner group filepermission context -# for all directories in (including itself), it will call: -# set_perm dir owner group dirpermission context -# -########################################################################################## - -# Set what you want to display when installing your module -# print_modname() { -# # use setup_uperf.sh/uperf_print_banner -# return -# } - -# Copy/extract your module files into $MODPATH in on_install. - -on_install() { - - # use universal setup.sh - sh $MODPATH/script/setup.sh - [ "$?" != "0" ] && abort - - # use once - rm $MODPATH/setup_uperf.sh - rm $MODPATH/customize.sh -} - -# Only some special files require specific permissions -# This function will be called after on_install is done -# The default permissions should be good enough for most cases -set_permissions() { - # Here are some examples: - # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 - # set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0 - # set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0 - # set_perm $MODPATH/system/lib/libart.so 0 0 0644 - chmod 755 $MODPATH/bin/* - chmod 755 $MODPATH/*.sh - chmod 755 $MODPATH/*script*/*.sh - return -} -# You can add more functions to assist your custom script code -on_install -set_permissions diff --git a/magisk/module.prop b/magisk/module.prop index 9dfc857..a50dc39 100644 --- a/magisk/module.prop +++ b/magisk/module.prop @@ -1,7 +1,7 @@ id=uperf name=Uperf -version=v3(22.04.09) +version=v3(22.04.23) versionCode=3 author=Matt Yang description=Userspace performance controller for android. Repo: https://github.com/yc9559/uperf/ -minMagisk=17000 +updateJson=https://github.com/yc9559/uperf/raw/master/version.json diff --git a/magisk/script/initsvc.sh b/magisk/script/initsvc.sh index b311e3b..06c23ba 100644 --- a/magisk/script/initsvc.sh +++ b/magisk/script/initsvc.sh @@ -25,6 +25,7 @@ $BIN_PATH/busybox/busybox --install -s $BIN_PATH/busybox # support vtools cp -af $SCRIPT_PATH/vtools_powercfg.sh /data/powercfg.sh cp -af $SCRIPT_PATH/vtools_powercfg.sh /data/powercfg-base.sh +cp -af $SCRIPT_PATH/powercfg.json /data/powercfg.json chmod 755 /data/powercfg.sh chmod 755 /data/powercfg-base.sh echo "sh $SCRIPT_PATH/powercfg_main.sh \"\$1\"" >>/data/powercfg.sh @@ -32,8 +33,6 @@ echo "sh $SCRIPT_PATH/powercfg_main.sh \"\$1\"" >>/data/powercfg.sh wait_until_login sh $SCRIPT_PATH/powercfg_once.sh -#Scene 3rd Scheduler Adapter Config -cat $SCRIPT_PATH/powercfg.json >/data/powercfg.json # raise inotify limit in case file sync existed lock_val "1048576" /proc/sys/fs/inotify/max_queued_events diff --git a/magisk/script/libcommon.sh b/magisk/script/libcommon.sh index 87202ed..49c48bd 100644 --- a/magisk/script/libcommon.sh +++ b/magisk/script/libcommon.sh @@ -23,9 +23,10 @@ lock_val() { for p in $2; do if [ -f "$p" ]; then - chmod 0666 "$p" 2>/dev/null + chown root:root "$p" + chmod 0666 "$p" echo "$1" >"$p" - chmod 0444 "$p" 2>/dev/null + chmod 0444 "$p" fi done } @@ -34,7 +35,7 @@ lock_val() { mutate() { for p in $2; do if [ -f "$p" ]; then - chmod 0666 "$p" 2>/dev/null + chmod 0666 "$p" echo "$1" >"$p" fi done @@ -43,7 +44,8 @@ mutate() { # $1:file path lock() { if [ -f "$1" ]; then - chmod 0444 "$1" 2>/dev/null + chown root:root "$p" + chmod 0444 "$1" fi } diff --git a/magisk/script/libpowercfg.sh b/magisk/script/libpowercfg.sh index 539a330..0bbf027 100644 --- a/magisk/script/libpowercfg.sh +++ b/magisk/script/libpowercfg.sh @@ -76,18 +76,6 @@ set_corectl_param() { done } -# $1:upmigrate $2:downmigrate $3:group_upmigrate $4:group_downmigrate -set_sched_migrate() { - for d in kernel walt; do - lock_val "$2" /proc/sys/$d/sched_downmigrate - lock_val "$1" /proc/sys/$d/sched_upmigrate - lock_val "$2" /proc/sys/$d/sched_downmigrate - lock_val "$4" /proc/sys/$d/sched_group_downmigrate - lock_val "$3" /proc/sys/$d/sched_group_upmigrate - lock_val "$4" /proc/sys/$d/sched_group_downmigrate - done -} - # stop before updating cfg perfhal_stop() { for i in 0 1 2 3 4; do diff --git a/magisk/script/libsysinfo.sh b/magisk/script/libsysinfo.sh index a75fe54..fc63d82 100644 --- a/magisk/script/libsysinfo.sh +++ b/magisk/script/libsysinfo.sh @@ -38,18 +38,7 @@ get_nr_core() { # $1:cpuid get_maxfreq() { - local fpath="/sys/devices/system/cpu/cpu$1/cpufreq/cpuinfo_max_freq" - local maxfreq="0" - - if [ ! -f "$fpath" ]; then - echo "" - return - fi - - for f in $(cat $fpath); do - [ "$f" -gt "$maxfreq" ] && maxfreq="$f" - done - echo "$maxfreq" + echo "$(cat "/sys/devices/system/cpu/cpu$1/cpufreq/cpuinfo_max_freq")" } is_aarch64() { @@ -100,83 +89,15 @@ _get_msm8916_type() { esac } -_get_msm8952_type() { - case "$(get_socid)" in - "264" | "289") - echo "msm8952" - ;; - *) - if [ "$(get_nr_core)" == "8" ]; then - echo "sdm652" - else - echo "sdm650" - fi - ;; - esac -} -_get_mt6833_type() { - local b_max - b_max="$(_get_maxfreq 7)" - if [ "$b_max" -ge 2300000 ]; then - echo "mtd810" - else - echo "mtd700" - fi -} -_get_mt6853_type() { - local b_max - b_max="$(get_maxfreq 6)" - if [ "$b_max" -gt 2200000 ]; then - echo "mtd800u" - else - echo "mtd720" - fi -} - -_get_mt6873_type() { - local b_max - b_max="$(get_maxfreq 4)" - if [ "$b_max" -gt 2500000 ]; then - echo "mtd820" - else - echo "mtd800" - fi -} -_get_mt6885_type() { - local b_max - b_max="$(get_maxfreq 4)" - if [ "$b_max" -gt 2500000 ]; then - echo "mtd1000" - else - echo "mtd1000l" - fi -} -_get_mt6893_type() { - local b_max - b_max="$(get_maxfreq 7)" - if [ "$b_max" -gt 2700000 ]; then - echo "mtd1200" - else - echo "mtd1100" - fi -} -_get_mt6895_type() { - local b_max - b_max="$(get_maxfreq 7)" - if [ "$b_max" -gt 2800000 ]; then - echo "mtd8100" - else - echo "mtd8000" - fi -} - _get_lahaina_type() { - local b_max - b_max="$(get_maxfreq 7)" - if [ "$b_max" -gt 2600000 ]; then + if [ "$(get_maxfreq 7)" -gt 2600000 ]; then echo "sdm888" else - echo "sdm780" + if [ "$(get_maxfreq 4)" -gt 2300000 ]; then + echo "sdm778" + else + echo "sdm780" + fi fi } @@ -185,7 +106,8 @@ get_config_name() { case "$1" in "taro") echo "sdm8g1" ;; "lahaina") echo "$(_get_lahaina_type)" ;; - "shima") echo "sdm775" ;; + "shima") echo "$(_get_lahaina_type)" ;; + "yupik") echo "$(_get_lahaina_type)" ;; "kona") echo "sdm865" ;; # 865, 870 "msmnile") echo "sdm855" ;; # 855, 860 "sdm845") echo "sdm845" ;; @@ -194,21 +116,22 @@ get_config_name() { "sdm710") echo "sdm710" ;; "msm8916") echo "$(_get_msm8916_type)" ;; "msm8939") echo "sdm616" ;; - "msm8952") echo "$(_get_msm8952_type)" ;; - "msm8953") echo "sdm625" ;; # 625, 626 - "msm8953pro") echo "sdm625" ;; # 625, 626 - "sdm660") echo "sdm660" ;; # 660, 636 - "sdm636") echo "sdm660" ;; # 660, 636 - "trinket") echo "sdm665" ;; + "msm8953") echo "sdm625" ;; # 625 + "msm8953pro") echo "sdm625" ;; # 626 + "sdm660") echo "sdm660" ;; + "sdm636") echo "sdm660" ;; + "trinket") echo "sdm665" ;; # sdm665 "bengal") echo "sdm665" ;; # sdm662 "msm8976") echo "sdm652" ;; "msm8956") echo "sdm650" ;; "msm8998") echo "sdm835" ;; "msm8996") echo "sdm820" ;; "msm8996pro") echo "sdm820" ;; + "exynos2200") echo "e2200" ;; "exynos2100") echo "e2100" ;; "exynos1080") echo "e1080" ;; "exynos990") echo "e990" ;; + "universal2200") echo "e2200" ;; "universal2100") echo "e2100" ;; "universal1080") echo "e1080" ;; "universal990") echo "e990" ;; @@ -220,20 +143,20 @@ get_config_name() { "universal7420") echo "e7420" ;; "mt6768") echo "mtg80" ;; # Helio P65(mt6768)/G70(mt6769v)/G80(mt6769t)/G85(mt6769z) "mt6785") echo "mtg90t" ;; - "mt6833p") echo "$(_get_mt6833_type)" ;; # D810 - "mt6833v") echo "$(_get_mt6833_type)" ;; # D810 - "mt6833") echo "$(_get_mt6833_type)" ;; # D810 - "mt6853") echo "$(_get_mt6853_type)" ;; - "mt6873") echo "$(_get_mt6873_type)" ;; - "mt6875") echo "$(_get_mt6873_type)" ;; - "mt6885") echo "$(_get_mt6885_type)" ;; - "mt6889") echo "$(_get_mt6885_type)" ;; - "mt6891") echo "mtd1100" ;; # D1100 - "mt6893") echo "$(_get_mt6893_type)" ;; # D1100 & D1200 & D1300 - "mt6877") echo "$(_get_mt6877_type)" ;; # D900 & D920 - "mt6833") echo "$(_get_mt6833_type)" ;; # D810 & D700 - "mt6895") echo "$(_get_mt6895_type)" ;; # D8000 & D8100 - "mt6983") echo "mtd9000" ;; # D9000 + "mt6833") echo "mtd720" ;; + "mt6833p") echo "mtd720" ;; # Dimensity 810 + "mt6833v") echo "mtd720" ;; # Dimensity 810 + "mt6853") echo "mtd720" ;; + "mt6873") echo "mtd820" ;; + "mt6875") echo "mtd820" ;; + "mt6877") echo "mtd920" ;; + "mt6885") echo "mtd1000" ;; + "mt6889") echo "mtd1000" ;; + "mt6891") echo "mtd1100" ;; + "mt6893") echo "mtd1200" ;; + "mt6895") echo "mtd8100" ;; + "mt6983") echo "mtd9000" ;; + "gs101") echo "gs101" ;; *) echo "unsupported" ;; esac } diff --git a/magisk/script/powercfg.json b/magisk/script/powercfg.json index 3d89507..d837271 100644 --- a/magisk/script/powercfg.json +++ b/magisk/script/powercfg.json @@ -1,8 +1,8 @@ { - "name": "Uperf v3", + "name": "Uperf", "author": "Matt Yang", - "version": "v3,22.04.09", - "versionCode": 20220409, + "version": "v3(22.04.23)", + "versionCode": 3, "features": { "strict": true, "pedestal": true diff --git a/magisk/script/powercfg_early.sh b/magisk/script/powercfg_early.sh deleted file mode 100644 index c3e2b8f..0000000 --- a/magisk/script/powercfg_early.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/system/bin/sh -# -# Copyright (C) 2021-2022 Matt Yang -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -BASEDIR="$(dirname $(readlink -f "$0"))" -. $BASEDIR/libcommon.sh - -# prohibit mi_thermald use cpu thermal interface -chmod 0444 /sys/devices/virtual/thermal/thermal_message/cpu_limits -chmod 0444 /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq -killall mi_thermald - -# xiaomi vip-task scheduler override -chmod 0444 /dev/migt -lock_val "0" "/sys/module/migt/parameters/*" -lock_val "1" "/sys/module/migt/parameters/*disable*" - -# ioctl interface used by vendor.mediatek.hardware.mtkpower@1.0-service -chmod 0000 /proc/perfmgr/eara_ioctl -chmod 0000 /proc/perfmgr/eas_ioctl -chmod 0000 /proc/perfmgr/xgff_ioctl - -# why MTK system_server place surfaceflinger into this cgroup? -chmod 0444 /dev/cpuset/system-background/tasks diff --git a/magisk/script/powercfg_once.sh b/magisk/script/powercfg_once.sh index 91ef6c0..9ef2692 100644 --- a/magisk/script/powercfg_once.sh +++ b/magisk/script/powercfg_once.sh @@ -44,41 +44,35 @@ unify_cgroup() { # work with uperf/ContextScheduler change_task_cgroup "surfaceflinger" "top-app" "cpuset" - change_task_cgroup "system_server" "top-app" "cpuset" + change_task_cgroup "system_server" "foreground" "cpuset" + change_thread_cgroup "system_server" "^android." "" "cpuset" + change_thread_cgroup "system_server" "^Binder" "" "cpuset" + change_task_cgroup "composer|allocator" "foreground" "cpuset" change_task_cgroup "android.hardware.media|android.hardware.audio" "top-app" "cpuset" - change_task_cgroup "kswapd0|kcompactd0|ion-pool-" "foreground" "cpuset" change_task_cgroup "netd|audioserver" "background" "cpuset" change_task_cgroup "vendor.mediatek.hardware" "background" "cpuset" change_task_cgroup "aal_sof|kfps|dsp_send_thread|vdec_ipi_recv|mtk_drm_disp_id|hif_thread|main_thread|mali_kbase_|ged_" "background" "cpuset" change_task_cgroup "pp_event|crtc_" "background" "cpuset" } -unify_cpufreq() { - # no msm_performance limit - set_cpufreq_min "0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0" - set_cpufreq_max "0:9999000 1:9999000 2:9999000 3:9999000 4:9999000 5:9999000 6:9999000 7:9999000" - - # stop sched core_ctl - set_corectl_param "enable" "0:0 2:0 4:0 6:0 7:0" - - # clear cpu load scale factor - for i in 0 1 2 3 4 5 6 7 8 9; do - lock_val "0" /sys/devices/system/cpu/cpu$i/sched_load_boost - done -} - unify_sched() { - # disable sched global placement boost + # reduce migration for d in kernel walt; do - lock_val "0" /proc/sys/$d/sched_boost - lock_val "0" /proc/sys/$d/sched_force_lb_enable - lock_val "0" /proc/sys/$d/sched_walt_rotate_big_tasks - lock_val "0" /proc/sys/$d/sched_stask_to_big + mutate "30" /proc/sys/$d/sched_downmigrate + mutate "90" /proc/sys/$d/sched_upmigrate + mutate "30" /proc/sys/$d/sched_downmigrate + mutate "30 30" /proc/sys/$d/sched_downmigrate + mutate "90 90" /proc/sys/$d/sched_upmigrate + mutate "30 30" /proc/sys/$d/sched_downmigrate + mutate "30" /proc/sys/$d/sched_group_downmigrate + mutate "90" /proc/sys/$d/sched_group_upmigrate + mutate "30" /proc/sys/$d/sched_group_downmigrate done - # 90/60 - set_sched_migrate "90" "60" "90" "60" - set_sched_migrate "90 90" "60 60" "90" "60" + # clear cpu load scale factor + for i in 0 1 2 3 4 5 6 7 8 9; do + mutate "0" /sys/devices/system/cpu/cpu$i/sched_load_boost + done } disable_hotplug() { @@ -97,6 +91,9 @@ disable_hotplug() { lock_val "0" /sys/module/autosmp/parameters/enabled lock_val "0" /sys/kernel/zen_decision/enabled + # stop sched core_ctl + set_corectl_param "enable" "0:0 2:0 4:0 6:0 7:0" + # bring all cores online for i in 0 1 2 3 4 5 6 7 8 9; do lock_val "1" /sys/devices/system/cpu/cpu$i/online @@ -111,6 +108,10 @@ disable_kernel_boost() { lock_val "0" "/sys/module/msm_performance/parameters/*" lock_val "0" "/proc/sys/walt/input_boost/*" + # no msm_performance limit + set_cpufreq_min "0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0" + set_cpufreq_max "0:9999000 1:9999000 2:9999000 3:9999000 4:9999000 5:9999000 6:9999000 7:9999000" + # MediaTek # policy_status # [0] PPM_POLICY_PTPOD: Meature PMIC buck currents @@ -125,22 +126,15 @@ disable_kernel_boost() { # [9] PPM_POLICY_SYS_BOOST: disabled # [10] PPM_POLICY_HICA: ? # Usage: echo <1(enable)/0(disable)> > /proc/ppm/policy_status - lock_val "0" /proc/ppm/enabled - # used by uperf - # mutate "6 1" /proc/ppm/policy_status + # use cpufreq interface with PPM_POLICY_HARD_USER_LIMIT enabled, thanks to helloklf@github + lock_val "1" /proc/ppm/enabled + lock_val "6 1" /proc/ppm/policy_status + lock_val "0" /proc/perfmgr/tchbst/user/usrtch + lock "/proc/ppm/policy/*" # Samsung mutate "0" "/sys/class/input_booster/*" - # Samsung EPIC interfaces, used by uperf - # mutate "0" /dev/cluster0_freq_min - # mutate "0" /dev/cluster1_freq_min - # mutate "0" /dev/cluster2_freq_min - # lock_val "0" /dev/bus_throughput - # lock_val "0" /dev/gpu_freq_min - # Samsung /kernel/sched/ems/... - mutate "0" /sys/kernel/ems/eff_mode - # Oneplus lock_val "N" "/sys/module/control_center/parameters/*" lock_val "0" /sys/module/aigov/parameters/enable @@ -156,6 +150,12 @@ disable_kernel_boost() { } disable_userspace_boost() { + # xiaomi vip-task scheduler override + chmod 0000 /dev/migt + for f in /sys/module/migt/parameters/*; do + chmod 0000 $f + done + # xiaomi perfservice stop vendor.perfservice stop miuibooster @@ -167,34 +167,65 @@ disable_userspace_boost() { # Qualcomm perfd stop perfd 2>/dev/null + # work with uperf/ContextScheduler + lock_val "0" /sys/module/mtk_fpsgo/parameters/boost_affinity + lock_val "0" /sys/kernel/fpsgo/fbt/switch_idleprefer + # Qualcomm&MTK perfhal - # keep perfhal running with empty config file in magisk mode - [ ! -f "$FLAG_PATH/enable_perfhal_stub" ] && perfhal_stop + perfhal_stop + + # libperfmgr + stop vendor.power-hal-1-0 + stop vendor.power-hal-1-1 + stop vendor.power-hal-1-2 + stop vendor.power-hal-1-3 + stop vendor.power-hal-aidl +} - # MTK - # stop fpsgo - # yes, it will automatically respawn, don't let it die - killall vendor.mediatek.hardware.mtkpower@1.0-service +restart_userspace_boost() { + # Qualcomm&MTK perfhal + perfhal_start + + # libperfmgr + start vendor.power-hal-1-0 + start vendor.power-hal-1-1 + start vendor.power-hal-1-2 + start vendor.power-hal-1-3 + start vendor.power-hal-aidl } -disable_aggressive_thermal() { +disable_userspace_thermal() { # prohibit mi_thermald use cpu thermal interface - # yes, kill twice - chmod 0444 /sys/devices/virtual/thermal/thermal_message/cpu_limits + for i in 0 2 4 6 7; do + lock_val "cpu$i 9999999" /sys/devices/virtual/thermal/thermal_message/cpu_limits + done chmod 0444 /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq +} + +restart_userspace_thermal() { + # yes, let it respawn killall mi_thermald } clear_log -log "PATH=$PATH" -log "sh=$(which sh)" +exec &>$LOG_FILE +echo "PATH=$PATH" +echo "sh=$(which sh)" +# set permission +disable_kernel_boost +disable_hotplug +unify_sched + +disable_userspace_thermal +restart_userspace_thermal disable_userspace_boost +restart_userspace_boost + +# unify value disable_kernel_boost disable_hotplug -unify_cpufreq unify_sched -disable_aggressive_thermal # make sure that all the related cpu is online rebuild_process_scan_cache diff --git a/magisk/script/setup.sh b/magisk/script/setup.sh index d196bae..920949f 100644 --- a/magisk/script/setup.sh +++ b/magisk/script/setup.sh @@ -15,8 +15,6 @@ # limitations under the License. # -# Runonce after boot, to speed up the transition of power modes in powercfg - BASEDIR="$(dirname $(readlink -f "$0"))" . $BASEDIR/pathinfo.sh . $BASEDIR/libsysinfo.sh @@ -30,12 +28,9 @@ abort() { # $1:file_node $2:owner $3:group $4:permission $5:secontext set_perm() { - local con chown $2:$3 $1 chmod $4 $1 - con=$5 - [ -z $con ] && con=u:object_r:system_file:s0 - chcon $con $1 + chcon $5 $1 } # $1:directory $2:owner $3:group $4:dir_permission $5:file_permission $6:secontext @@ -48,17 +43,11 @@ set_perm_recursive() { done } -set_permissions() { - set_perm_recursive $BIN_PATH 0 0 0755 0755 u:object_r:system_file:s0 - set_perm_recursive $MODULE_PATH/system/vendor/etc 0 0 0755 0644 u:object_r:vendor_configs_file:s0 - set_perm_recursive $MODULE_PATH/zygisk 0 0 0755 0644 u:object_r:system_file:s0 -} - install_uperf() { + echo "- Finding platform specified config" echo "- ro.board.platform=$(getprop ro.board.platform)" echo "- ro.product.board=$(getprop ro.product.board)" - chmod 444 /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo* - chmod 444 /sys/devices/system/cpu/cpufreq/policy*/cpuinfo* + local target local cfgname target="$(getprop ro.board.platform)" @@ -72,65 +61,21 @@ install_uperf() { abort "! Target [$target] not supported." fi + echo "- Uperf config is located at $USER_PATH" mkdir -p $USER_PATH mv -f $USER_PATH/uperf.json $USER_PATH/uperf.json.bak cp -f $MODULE_PATH/config/$cfgname.json $USER_PATH/uperf.json [ ! -e "$USER_PATH/perapp_powermode.txt" ] && cp $MODULE_PATH/config/perapp_powermode.txt $USER_PATH/perapp_powermode.txt rm -rf $MODULE_PATH/config - echo "- Uperf config is located at $USER_PATH" -} -install_powerhal_stub() { - # do not place empty json if it doesn't exist in system - # vendor/etc/powerhint.json: android perf hal - # vendor/etc/powerscntbl.cfg: mediatek perf hal (android 9) - # vendor/etc/powerscntbl.xml: mediatek perf hal (android 10+) - # vendor/etc/perf/commonresourceconfigs.json: qualcomm perf hal resource - # vendor/etc/perf/targetresourceconfigs.json: qualcomm perf hal resource overrides - local perfcfgs - perfcfgs=" - vendor/etc/powerhint.json - vendor/etc/powerscntbl.cfg - vendor/etc/powerscntbl.xml - vendor/etc/power_app_cfg.xml - vendor/etc/perf/commonresourceconfigs.xml - vendor/etc/perf/targetresourceconfigs.xml - " - for f in $perfcfgs; do - if [ ! -f "/$f" ]; then - rm "$MODULE_PATH/system/$f" - else - true >$FLAG_PATH/enable_perfhal_stub - fi - done -} -#grep_prop comes from https://github.com/topjohnwu/Magisk/blob/master/scripts/util_functions.sh#L30 -grep_prop() { - local REGEX="s/^$1=//p" - shift - local FILES=$@ - [ -z "$FILES" ] && FILES='/system/build.prop' - cat $FILES 2>/dev/null | dos2unix | sed -n "$REGEX" | head -n 1 + set_perm_recursive $BIN_PATH 0 0 0755 0755 u:object_r:system_file:s0 } -# get module version -module_version="$(grep_prop version $MODULE_PATH/module.prop)" -# get module name -module_name="$(grep_prop name $MODULE_PATH/module.prop)" -# get module id -module_id="$(grep_prop id $MODULE_PATH/module.prop)" -# get module author -module_author="$(grep_prop author $MODULE_PATH/module.prop)" - echo "" echo "* Uperf https://github.com/yc9559/uperf/" -echo "* Author: $module_author" -echo "* Version: $module_version" +echo "* Author: Matt Yang" +echo "* Version: v3(22.04.23)" echo "" echo "- Installing uperf" install_uperf - -echo "- Installing perfhal stub" -install_powerhal_stub -set_permissions diff --git a/magisk/system.prop b/magisk/system.prop deleted file mode 100644 index 8e6af47..0000000 --- a/magisk/system.prop +++ /dev/null @@ -1,11 +0,0 @@ -# This file will be read by resetprop -# Example: Change dpi -# ro.sf.lcd_density=320 - -#Why MIUI love usap???? -#Maybe useful in some time, but it was not enabled by OEMs before -#Now only Redmi K50 Series enabled it by default? -# persist.sys.usap_pool_enabled=false - -# headroom for GC -dalvik.vm.heapminfree=2m diff --git a/magisk/system/vendor/etc/perf/commonresourceconfigs.xml b/magisk/system/vendor/etc/perf/commonresourceconfigs.xml deleted file mode 100644 index 451afd3..0000000 --- a/magisk/system/vendor/etc/perf/commonresourceconfigs.xml +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/magisk/system/vendor/etc/perf/targetresourceconfigs.xml b/magisk/system/vendor/etc/perf/targetresourceconfigs.xml deleted file mode 100644 index e1e38be..0000000 --- a/magisk/system/vendor/etc/perf/targetresourceconfigs.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/magisk/system/vendor/etc/power_app_cfg.xml b/magisk/system/vendor/etc/power_app_cfg.xml deleted file mode 100644 index 313274a..0000000 --- a/magisk/system/vendor/etc/power_app_cfg.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/magisk/system/vendor/etc/powercontable.xml b/magisk/system/vendor/etc/powercontable.xml deleted file mode 100644 index 9de2470..0000000 --- a/magisk/system/vendor/etc/powercontable.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/magisk/system/vendor/etc/powerhint.json b/magisk/system/vendor/etc/powerhint.json deleted file mode 100644 index acc9d83..0000000 --- a/magisk/system/vendor/etc/powerhint.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Nodes": [ - { - "Name": "PMQoSCpuDmaLatency", - "Path": "/dev/cpu_dma_latency", - "Values": ["44", "1000"], - "Type": "File", - "DefaultIndex": 1, - "ResetOnInit": true, - "HoldFd": true - } - ], - "Actions": [ - { - "PowerHint": "LAUNCH", - "Node": "PMQoSCpuDmaLatency", - "Duration": 1, - "Value": "44", - "ValueIndex": 0 - } - ] -} diff --git a/magisk/system/vendor/etc/powerscntbl.cfg b/magisk/system/vendor/etc/powerscntbl.cfg deleted file mode 100644 index c979836..0000000 --- a/magisk/system/vendor/etc/powerscntbl.cfg +++ /dev/null @@ -1,21 +0,0 @@ -CMD_SET_OPP_DDR, MTK_POWER_HINT_ACT_SWITCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_PACK_SWITCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_LAUNCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_EXT_LAUNCH, 1 -CMD_SET_OPP_DDR, MTK_POWER_HINT_PROCESS_CREATE, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_GAME_LAUNCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_APP_ROTATE, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_PMS_INSTALL, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_GALLERY_BOOST, 1 -CMD_SET_SCREEN_OFF_STATE, MTK_POWER_HINT_WFD, 2 -CMD_SET_OPP_DDR, MTK_POWER_HINT_WIPHY_SPEED_DL, 0 -CMD_SET_WIPHY_CAM, MTK_POWER_HINT_WIPHY_SPEED_DL, 1 -CMD_SET_OPP_DDR, MTK_POWER_HINT_SPORTS, 0 -CMD_SET_FSBT_SOFT_FPS, MTK_POWER_HINT_SPORTS, 60, 60 -CMD_SET_FBT_BHR_OPP, MTK_POWER_HINT_SPORTS, 15 -CMD_SET_SCHED_BOOST, MTK_POWER_HINT_SPORTS, 1 -CMD_SET_CPUFREQ_CCI_MODE, MTK_POWER_HINT_SPORTS, 1 -CMD_SET_SCREEN_OFF_STATE, MTK_POWER_HINT_SPORTS, 2 -CMD_SET_EARA_BENCH, MTK_POWER_HINT_SPORTS, 1 -CMD_SET_SCHEDPLUS_DOWN_THROTTLE_NS, MTK_POWER_HINT_SPORTS, 1000000 -CMD_SET_SCHEDPLUS_SYNC_FLAG, MTK_POWER_HINT_SPORTS, 1 diff --git a/magisk/system/vendor/etc/powerscntbl.xml b/magisk/system/vendor/etc/powerscntbl.xml deleted file mode 100644 index ee1a0e1..0000000 --- a/magisk/system/vendor/etc/powerscntbl.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/magisk/uninstall.sh b/magisk/uninstall.sh index 8024a04..514f07e 100644 --- a/magisk/uninstall.sh +++ b/magisk/uninstall.sh @@ -1,4 +1,23 @@ -#!/vendor/bin/sh +#!/system/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MR author: railjty +USER_PATH=/sdcard/Android/yc/uperf + wait_until_login() { # in case of /data encryption is disabled while [ "$(getprop sys.boot_completed)" != "1" ]; do @@ -14,13 +33,18 @@ wait_until_login() { done rm "$test_file" } + on_remove() { wait_until_login - rm -rf /sdcard/yc/uperf/ /data/adb/modules/uperf /data/adb/modules_update/uperf - chmod 666 /data/powercfg* - rm -rf /data/powercfg* - rm -rf /sdcard/yc/uperf #not remove dfps config - rm -rf /sdcard/Android/yc/uperf + # keep user perapp config + cp -af $USER_PATH/perapp_powermode.txt /sdcard/ + rm -rf $USER_PATH + mkdir -p $USER_PATH + mv /sdcard/perapp_powermode.txt $USER_PATH/ + + rm -f /data/powercfg* } + +# do not block boot (on_remove &) diff --git a/version.json b/version.json new file mode 100644 index 0000000..8df3259 --- /dev/null +++ b/version.json @@ -0,0 +1,6 @@ +{ + "versionCode": 3, + "version": "v3(22.04.23)", + "zipUrl": "https://github.com/yc9559/uperf/releases/download/dev-22.04.23/uperf-dev-22.04.23.zip", + "changelog": "https://github.com/yc9559/uperf/raw/master/changelog.md" +}