├── assets
├── toolkit
│ ├── run
│ ├── zip
│ ├── toybox
│ ├── busybox
│ ├── adb
│ └── install_busybox.sh
├── kr-script
│ ├── adb_tool
│ │ ├── adb
│ │ ├── value_ip.sh
│ │ ├── value_port.sh
│ │ ├── option_app.sh
│ │ ├── shell.sh
│ │ ├── set_adb.sh
│ │ ├── summary_adb.sh
│ │ ├── adb_remote_get.sh
│ │ ├── adb_remote_summary.sh
│ │ ├── adb_remote_set.sh
│ │ ├── set_app.sh
│ │ └── config.xml
│ ├── icons
│ │ ├── mcc.png
│ │ ├── qq.png
│ │ ├── wifi.png
│ │ ├── github.png
│ │ ├── magisk.png
│ │ ├── shell.png
│ │ ├── coolapk.png
│ │ ├── download.png
│ │ ├── refresh.png
│ │ ├── setting.png
│ │ ├── toucher.png
│ │ ├── app_backup.png
│ │ ├── qq_channel.png
│ │ ├── AlipayGphone.png
│ │ └── super_backup.png
│ ├── about
│ │ ├── delete_data.sh
│ │ ├── coolapk_app.sh
│ │ ├── coolapk_frame.sh
│ │ ├── qq_group_chat.sh
│ │ ├── alipaygphone.sh
│ │ ├── qq_channel.sh
│ │ ├── visible_set.sh
│ │ ├── visible.sh
│ │ ├── update.sh
│ │ ├── update_log.sh
│ │ ├── annunciate.sh
│ │ └── config.xml
│ ├── module_control
│ │ ├── dfps
│ │ │ ├── read_default_rule.sh
│ │ │ ├── read_off_screen_rule.sh
│ │ │ ├── coolapk.sh
│ │ │ ├── set_rules.sh
│ │ │ ├── summary.sh
│ │ │ ├── useSfBackdoor.sh
│ │ │ ├── default_rule.sh
│ │ │ ├── off_screen_rule.sh
│ │ │ ├── settings.xml
│ │ │ └── apps.sh
│ │ ├── qti
│ │ │ ├── coolapk.sh
│ │ │ ├── summary.sh
│ │ │ ├── get_algorithm.sh
│ │ │ ├── get_zram_size.sh
│ │ │ ├── set_algorithm.sh
│ │ │ ├── set_zram_size.sh
│ │ │ ├── algorithm.sh
│ │ │ ├── settings.xml
│ │ │ ├── apps.sh
│ │ │ └── config.xml
│ │ ├── asguard
│ │ │ ├── coolapk.sh
│ │ │ ├── summary.sh
│ │ │ ├── exswitch.sh
│ │ │ ├── settings.xml
│ │ │ └── WriteConfig.sh
│ │ ├── asopt
│ │ │ ├── coolapk.sh
│ │ │ ├── reboot.sh
│ │ │ ├── summary.sh
│ │ │ ├── settings.xml
│ │ │ └── config.xml
│ │ ├── fas-rs
│ │ │ ├── coolapk.sh
│ │ │ ├── set_rules.sh
│ │ │ ├── summary_keep_std.sh
│ │ │ ├── summary.sh
│ │ │ ├── summary_userspace_governor.sh
│ │ │ ├── set_keep_std.sh
│ │ │ ├── summary_apps.sh
│ │ │ ├── summary_app_list.sh
│ │ │ ├── set_userspace_governor.sh
│ │ │ ├── get_keep_std.sh
│ │ │ ├── get_userspace_governor.sh
│ │ │ ├── default_mode.sh
│ │ │ ├── value_fast_fas_boost.sh
│ │ │ ├── value_balance_fas_boost.sh
│ │ │ ├── value_performance_fas_boost.sh
│ │ │ ├── value_powersave_fas_boost.sh
│ │ │ ├── value_fast_use_performance_governor.sh
│ │ │ ├── value_balance_use_performance_governor.sh
│ │ │ ├── value_performance_use_performance_governor.sh
│ │ │ ├── value_powersave_use_performance_governor.sh
│ │ │ ├── set_fast.sh
│ │ │ ├── set_balance.sh
│ │ │ ├── set_powersave.sh
│ │ │ ├── set_performance.sh
│ │ │ ├── settings.xml
│ │ │ ├── apps.sh
│ │ │ ├── config.xml
│ │ │ └── mode_settings.xml
│ │ ├── feas
│ │ │ ├── coolapk.sh
│ │ │ ├── set_rules.sh
│ │ │ ├── qualcomm.sh
│ │ │ ├── mtk.sh
│ │ │ ├── qualcomm_feas.sh
│ │ │ ├── set_on-off.sh
│ │ │ ├── summary.sh
│ │ │ ├── get_on-off.sh
│ │ │ ├── summary_mtk_fpsgo_enable.sh
│ │ │ ├── summary_qualcomm_perfmgr_enable.sh
│ │ │ ├── summary_mtk_perfmgr_enable.sh
│ │ │ ├── settings.xml
│ │ │ ├── mtk_feas.sh
│ │ │ ├── apps.sh
│ │ │ └── config.xml
│ │ ├── ram
│ │ │ ├── coolapk.sh
│ │ │ ├── get_ram.sh
│ │ │ ├── summary_ram.sh
│ │ │ ├── summary.sh
│ │ │ ├── raccourcis.xml
│ │ │ ├── get_avail_mem_percent.sh
│ │ │ ├── set_avail_mem_percent.sh
│ │ │ ├── set_ram.sh
│ │ │ ├── settings.xml
│ │ │ ├── set.sh
│ │ │ ├── apps.sh
│ │ │ └── config.xml
│ │ ├── uperf
│ │ │ ├── coolapk.sh
│ │ │ ├── default_rule.sh
│ │ │ ├── off_screen_rule.sh
│ │ │ ├── set_mode.sh
│ │ │ ├── summary.sh
│ │ │ ├── default_mode.sh
│ │ │ ├── read_default_rule.sh
│ │ │ ├── read_off_screen_rule.sh
│ │ │ ├── settings.xml
│ │ │ ├── apps.sh
│ │ │ └── config.xml
│ │ ├── A1Memory
│ │ │ ├── coolapk.sh
│ │ │ ├── detection_process.sh
│ │ │ ├── get_appSleep_bg.sh
│ │ │ ├── get_appSleep_top.sh
│ │ │ ├── get_appSleep_idle.sh
│ │ │ ├── summary_log_level.sh
│ │ │ ├── summary_freed_change.sh
│ │ │ ├── summary_freed_level.sh
│ │ │ ├── summary_a1Memory_oomAdj.sh
│ │ │ ├── summary_memThreshold_value.sh
│ │ │ ├── summary_afterTopChange_sleep.sh
│ │ │ ├── summary_meminfo_updateTime.sh
│ │ │ ├── summary_model_inlineHook.sh
│ │ │ ├── summary.sh
│ │ │ ├── apps.sh
│ │ │ ├── set_appSleep_bg.sh
│ │ │ ├── set_log_level.sh
│ │ │ ├── set_appSleep_top.sh
│ │ │ ├── set_freed_change.sh
│ │ │ ├── set_appSleep_idle.sh
│ │ │ ├── set_freed_level.sh
│ │ │ ├── set_a1Memory_oomAdj.sh
│ │ │ ├── set_memThreshold_value.sh
│ │ │ ├── set_afterTopChange_sleep.sh
│ │ │ ├── get_hookFunc_kill.sh
│ │ │ ├── set_meminfo_updateTime.sh
│ │ │ ├── get_clever_enable.sh
│ │ │ ├── get_freed_enable.sh
│ │ │ ├── get_whiteList_smart.sh
│ │ │ ├── set_model_inlineHook.sh
│ │ │ ├── get_a1Memory_enable.sh
│ │ │ ├── get_appSleep_enable.sh
│ │ │ ├── get_crazyKill_enable.sh
│ │ │ ├── get_whiteList_system.sh
│ │ │ ├── summary_appSleep_idle.sh
│ │ │ ├── get_memThreshold_enable.sh
│ │ │ ├── get_whiteList_optional.sh
│ │ │ ├── get_initInjection_enable.sh
│ │ │ ├── summary_hookFunc_kill.sh
│ │ │ ├── summary_freed_enable.sh
│ │ │ ├── summary_a1Memory_enable.sh
│ │ │ ├── summary_appSleep_enable.sh
│ │ │ ├── summary_clever_enable.sh
│ │ │ ├── summary_whiteList_smart.sh
│ │ │ ├── summary_crazyKill_enable.sh
│ │ │ ├── summary_whiteList_system.sh
│ │ │ ├── get_hookFunc_pidfd_send_signal.sh
│ │ │ ├── summary_memThreshold_enable.sh
│ │ │ ├── summary_whiteList_optional.sh
│ │ │ ├── get_hookFunc___android_log_print.sh
│ │ │ ├── summary_initInjection_enable.sh
│ │ │ ├── summary_appSleep_bg.sh
│ │ │ ├── summary_appSleep_top.sh
│ │ │ ├── summary_hookFunc_pidfd_send_signal.sh
│ │ │ ├── summary_hookFunc___android_log_print.sh
│ │ │ ├── set_hookFunc_kill.sh
│ │ │ ├── set_freed_enable.sh
│ │ │ ├── set_clever_enable.sh
│ │ │ ├── set_whiteList_smart.sh
│ │ │ ├── set_a1Memory_enable.sh
│ │ │ ├── set_appSleep_enable.sh
│ │ │ ├── set_crazyKill_enable.sh
│ │ │ ├── set_whiteList_system.sh
│ │ │ ├── set_memThreshold_enable.sh
│ │ │ ├── set_whiteList_optional.sh
│ │ │ ├── set_initInjection_enable.sh
│ │ │ ├── set_hookFunc_pidfd_send_signal.sh
│ │ │ ├── set_hookFunc___android_log_print.sh
│ │ │ ├── child_processes_list.sh
│ │ │ ├── child_processes.sh
│ │ │ └── settings.xml
│ │ ├── perapp-rs
│ │ │ ├── coolapk.sh
│ │ │ ├── set_offscreen_mode.sh
│ │ │ ├── set_onscreen_mode.sh
│ │ │ ├── fast.sh
│ │ │ ├── set_fast.sh
│ │ │ ├── balance.sh
│ │ │ ├── powersave.sh
│ │ │ ├── set_balance.sh
│ │ │ ├── set_powersave.sh
│ │ │ ├── performance.sh
│ │ │ ├── set_performance.sh
│ │ │ ├── summary.sh
│ │ │ ├── value_onscreen_mode.sh
│ │ │ ├── value_offscreen_mode.sh
│ │ │ ├── summary_onscreen_mode.sh
│ │ │ ├── summary_offscreen_mode.sh
│ │ │ ├── settings.xml
│ │ │ └── config.xml
│ │ ├── Bypass_Charge
│ │ │ ├── coolapk.sh
│ │ │ ├── summary_bypass_charge.sh
│ │ │ ├── summary.sh
│ │ │ ├── summary_screen_on_bypass_charge.sh
│ │ │ ├── summary_powered_on_performance_enhancements.sh
│ │ │ ├── set_bypass_charge.sh
│ │ │ ├── get_bypass_charge.sh
│ │ │ ├── set_screen_on_bypass_charge.sh
│ │ │ ├── get_screen_on_bypass_charge.sh
│ │ │ ├── get_bypass_charge_current.sh
│ │ │ ├── get_powered_on_performance_enhancements.sh
│ │ │ ├── get_start_bypass_charge_battery_capacity.sh
│ │ │ ├── set_powered_on_performance_enhancements.sh
│ │ │ ├── set_bypass_charge_current.sh
│ │ │ ├── settings.xml
│ │ │ ├── set_start_bypass_charge_battery_capacity.sh
│ │ │ ├── apps.sh
│ │ │ └── config.xml
│ │ ├── MiuiVariableThermal
│ │ │ ├── coolapk.sh
│ │ │ ├── get_switch_bypass_power_supply.sh
│ │ │ ├── apps.sh
│ │ │ ├── set_thermal_scene.sh
│ │ │ ├── set_bypass_supply_temp.sh
│ │ │ ├── set_switch_bypass_power_supply.sh
│ │ │ ├── value_thermal_scene_time.sh
│ │ │ ├── set_current_txt.sh
│ │ │ ├── set_thermal_app.sh
│ │ │ ├── set_fps.sh
│ │ │ ├── set_global_main_switch.sh
│ │ │ ├── set_thermal_charge.sh
│ │ │ ├── get_bypass_supply_level.sh
│ │ │ ├── summary.sh
│ │ │ ├── set_current_max.sh
│ │ │ ├── get_current_txt.sh
│ │ │ ├── get_thermal_app.sh
│ │ │ ├── get_global_main_switch.sh
│ │ │ ├── get_thermal_charge.sh
│ │ │ ├── set_bypass_level_time.sh
│ │ │ ├── value_current_max.sh
│ │ │ ├── get_current_max.sh
│ │ │ ├── value_bypass_supply_level.sh
│ │ │ ├── set_bypass_supply_level.sh
│ │ │ ├── summary_bypass_supply_level.sh
│ │ │ ├── value_fps.sh
│ │ │ ├── get_bypass_supply_temp.sh
│ │ │ ├── set_thermal_scene_time.sh
│ │ │ ├── value_bypass_level_time.sh
│ │ │ ├── get_bypass_level_time.sh
│ │ │ ├── get_fps.sh
│ │ │ ├── get_thermal_scene_time.sh
│ │ │ ├── raccourcis.xml
│ │ │ ├── get_thermal_scene.sh
│ │ │ └── settings.xml
│ │ └── QuantitativeStopCharging_switch
│ │ │ ├── coolapk.sh
│ │ │ ├── get_switch_quantitative_stop_charging.sh
│ │ │ ├── set_delay_function.sh
│ │ │ ├── set_switch_quantitative_stop_charging.sh
│ │ │ ├── set_stop_charging_temperature.sh
│ │ │ ├── set_restore_charging_temperature.sh
│ │ │ ├── get_delay_function.sh
│ │ │ ├── get_restore_charging_power.sh
│ │ │ ├── set_full_and_then_stop.sh
│ │ │ ├── get_stop_charging_the_battery_level.sh
│ │ │ ├── summary.sh
│ │ │ ├── get_stop_charging_temperature.sh
│ │ │ ├── set_automatic_insertion_and_removal.sh
│ │ │ ├── set_temperature_mode.sh
│ │ │ ├── get_restore_charging_temperature.sh
│ │ │ ├── get_full_and_then_stop.sh
│ │ │ ├── get_temperature_mode.sh
│ │ │ ├── set_restore_charging_power.sh
│ │ │ ├── get_automatic_insertion_and_removal.sh
│ │ │ ├── set_stop_charging_the_battery_level.sh
│ │ │ ├── value_restore_charging_power.sh
│ │ │ ├── value_stop_charging_the_battery_level.sh
│ │ │ ├── summary_restore_charging_power.sh
│ │ │ ├── summary_stop_charging_the_battery_level.sh
│ │ │ ├── raccourcis.xml
│ │ │ ├── settings.xml
│ │ │ └── config.xml
│ ├── other_tool
│ │ ├── get_doze.sh
│ │ ├── set_doze.sh
│ │ ├── battery
│ │ │ ├── battery_capacity_summary.sh
│ │ │ └── battery_capacity.sh
│ │ ├── shell.sh
│ │ ├── doze_clear.sh
│ │ ├── emmc
│ │ │ ├── emmc_detail.sh
│ │ │ └── emmc_summary.sh
│ │ ├── wifi.sh
│ │ ├── config.xml
│ │ └── ufs
│ │ │ └── ufs_summary.sh
│ ├── magisk_tool
│ │ ├── sync_dir
│ │ │ ├── main
│ │ │ │ ├── module.prop
│ │ │ │ ├── main.sh
│ │ │ │ └── service.sh
│ │ │ ├── summary_sync_dir.sh
│ │ │ ├── value_sync_dir.sh
│ │ │ └── set_sync_dir.sh
│ │ └── config.xml
│ └── backup_tool
│ │ ├── mirror_partition_extract.sh
│ │ ├── mirror_partition_brush_in.sh
│ │ ├── block_device_name.sh
│ │ └── config.xml
├── kr-script.conf
└── executor.sh
├── annunciate
└── README.md
/assets/toolkit/run:
--------------------------------------------------------------------------------
1 | source $PAGE_WORK_DIR/$1 $2 $3 $4 $5
--------------------------------------------------------------------------------
/assets/toolkit/zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/toolkit/zip
--------------------------------------------------------------------------------
/assets/toolkit/toybox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/toolkit/toybox
--------------------------------------------------------------------------------
/assets/toolkit/busybox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/toolkit/busybox
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/adb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/adb_tool/adb
--------------------------------------------------------------------------------
/assets/kr-script/icons/mcc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/mcc.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/qq.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/wifi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/wifi.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/github.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/magisk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/magisk.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/shell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/shell.png
--------------------------------------------------------------------------------
/assets/kr-script/about/delete_data.sh:
--------------------------------------------------------------------------------
1 | pm clear $PACKAGE_NAME
2 | am start -n $PACKAGE_NAME/$PACKAGE_NAME.SplashActivity
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/value_ip.sh:
--------------------------------------------------------------------------------
1 | grep "ip" "$START_DIR/kr-script/adb_tool/ip_port" | awk -F 'ip=' '{print $2}'
--------------------------------------------------------------------------------
/assets/kr-script/icons/coolapk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/coolapk.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/download.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/refresh.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/setting.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/toucher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/toucher.png
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/value_port.sh:
--------------------------------------------------------------------------------
1 | grep "port" "$START_DIR/kr-script/adb_tool/ip_port" | awk -F 'port=' '{print $2}'
--------------------------------------------------------------------------------
/assets/kr-script/icons/app_backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/app_backup.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/qq_channel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/qq_channel.png
--------------------------------------------------------------------------------
/assets/kr-script/about/coolapk_app.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/3131820"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/about/coolapk_frame.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/734809"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/icons/AlipayGphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/AlipayGphone.png
--------------------------------------------------------------------------------
/assets/kr-script/icons/super_backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/svip-s/MCC/HEAD/assets/kr-script/icons/super_backup.png
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/read_default_rule.sh:
--------------------------------------------------------------------------------
1 | awk '/^\*/ {sub(/^\*/, ""); print}' /sdcard/Android/yc/dfps/dfps.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/read_off_screen_rule.sh:
--------------------------------------------------------------------------------
1 | awk '/^\-/ {sub(/^\-/, ""); print}' /sdcard/Android/yc/dfps/dfps.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/557898"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asguard/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/919184"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asopt/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/602573"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/557898"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/3469701"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/3469701"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/1721862"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/557898"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/default_rule.sh:
--------------------------------------------------------------------------------
1 | sed -i "s/^\* .*/\* $default_rule/" /sdcard/Android/yc/uperf/perapp_powermode.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/off_screen_rule.sh:
--------------------------------------------------------------------------------
1 | sed -i "s/^- .*/- $off_screen_rule/" /sdcard/Android/yc/uperf/perapp_powermode.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/20588477"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/3469701"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/1842370"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/1373784"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/set_offscreen_mode.sh:
--------------------------------------------------------------------------------
1 | sed -i "/^offscreen_mode/ s/= .*/= \"$offscreen_mode\"/" /sdcard/Android/perapp-rs/config.toml
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/set_onscreen_mode.sh:
--------------------------------------------------------------------------------
1 | sed -i "/^onscreen_mode/ s/= .*/= \"$onscreen_mode\"/" /sdcard/Android/perapp-rs/config.toml
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/detection_process.sh:
--------------------------------------------------------------------------------
1 | if pgrep -x "HC_memory" > /dev/null
2 | then
3 | echo "正在运行中…"
4 | else
5 | echo "未运行"
6 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/coolapk.sh:
--------------------------------------------------------------------------------
1 | link="coolmarket://u/1373784"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/get_doze.sh:
--------------------------------------------------------------------------------
1 | dumpsys deviceidle | grep -q Enabled=true
2 | A=$?
3 | if [[ $A = 0 ]]; then
4 | echo 1
5 | else
6 | echo 0
7 | fi
8 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/set_rules.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$app_package_name " ]; then exit 1
2 | fi
3 | sed -i -E "s|(^$app_package_name )[[:blank:]]*(.*)|\1$target_fps|" /data/feas.conf
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/set_doze.sh:
--------------------------------------------------------------------------------
1 | if [[ $state -eq 1 ]]; then
2 | dumpsys deviceidle enable
3 | elif [[ $state -eq 0 ]]; then
4 | dumpsys deviceidle disable
5 | fi
6 |
7 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/qualcomm.sh:
--------------------------------------------------------------------------------
1 | baseband=$(getprop ro.baseband)
2 | if [[ "$baseband" == "msm" || "$baseband" == "mdm" ]]; then
3 | echo 1
4 | else
5 | echo 0
6 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_switch_bypass_power_supply.sh:
--------------------------------------------------------------------------------
1 | if [ -f "/data/adb/modules/MiuiVariableThermal/on_bypass" ]; then
2 | echo "1"
3 | else
4 | echo "0"
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/battery/battery_capacity_summary.sh:
--------------------------------------------------------------------------------
1 | #查看当前电池容量
2 | dc=$(cat /sys/class/power_supply/battery/charge_full)
3 | charge_full=$(($dc / 1000))
4 | echo "剩余容量 ${charge_full}mAh"
--------------------------------------------------------------------------------
/assets/kr-script/about/qq_group_chat.sh:
--------------------------------------------------------------------------------
1 | link="mqqapi://card/show_pslcard?src_type=internal&version=1&uin=979817842&card_type=group&source=qrcode"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/sync_dir/main/module.prop:
--------------------------------------------------------------------------------
1 | id=mcc_sync_dir
2 | name=MCC - Sync Directory
3 | version=Android
4 | versionCode=1
5 | author=mcc
6 | description=MCC创建,把任意目录实时同步到Download文件夹
7 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/set_rules.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$app_package_name " ]; then exit 1
2 | fi
3 | sed -i -E "s|(^$app_package_name )[[:blank:]]*(.*)|\1$target_fps|" /sdcard/Android/yc/dfps/dfps.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/apps.sh:
--------------------------------------------------------------------------------
1 | apps=$(echo "$apps" | tr '\n' '|' | sed 's/|$//')
2 | sed -i "s/^app_list=.*/app_list=${apps}/" /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_thermal_scene.sh:
--------------------------------------------------------------------------------
1 | sed -i "/^thermal_scene=.*/s/thermal_scene=.*/thermal_scene=$on_screen $off_screen/" /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/mtk.sh:
--------------------------------------------------------------------------------
1 | platform=`getprop ro.board.platform | grep mt`
2 | if [[ "$platform" != "" ]] && [[ ! -d /proc/ppm ]] && [[ -d /proc/gpufreqv2 ]]
3 | then
4 | echo 1
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/qualcomm_feas.sh:
--------------------------------------------------------------------------------
1 | path=/sys/module/perfmgr/parameters/perfmgr_enable
2 | chmod 777 $path
3 | echo $state > $path
4 | if [[ "$state" == "1" ]]; then
5 | chmod 444 $path
6 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/set_mode.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$app_package_name " ]; then exit 1
2 | fi
3 | sed -i -E "s|(^$app_package_name )[[:blank:]]*(.*)|\1$set_mode|" /sdcard/Android/yc/uperf/perapp_powermode.txt
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/option_app.sh:
--------------------------------------------------------------------------------
1 | echo "Scene|Scene ADB模式"
2 | echo "HeiYu|黑阈"
3 | echo "XiaoHeiWu|小黑屋"
4 | echo "Shizuku"
5 | echo "IceBox|冰箱"
6 | echo "KFMark|使用快否激活器激活「快否」"
7 | echo "PermissionDog|权限狗 AppOps"
8 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_switch_quantitative_stop_charging.sh:
--------------------------------------------------------------------------------
1 | if [ -f "/data/adb/modules/QuantitativeStopCharging_switch/off_qsc" ]; then
2 | echo "0"
3 | else
4 | echo "1"
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/set_rules.sh:
--------------------------------------------------------------------------------
1 | if [ -z "\"$app_package_name\" = " ]; then exit 1
2 | fi
3 | sed -i -E "s|(^\"$app_package_name\" = )[[:blank:]]*(.*)|\1$target_fps|" /data/media/0/Android/fas-rs/games.toml
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/get_ram.sh:
--------------------------------------------------------------------------------
1 | script_name="/data/adb/modules/ram/ram.sh"
2 | lastID=$(pgrep -f "$script_name")
3 | if [ "$lastID" != "" ]; then
4 | echo -e "1"
5 |
6 | else
7 | echo -e "0"
8 |
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asopt/reboot.sh:
--------------------------------------------------------------------------------
1 | if [[ $reboot -eq 1 ]]; then
2 | echo "即将在5秒后自动重启,开始倒计时……"
3 | for i in $(seq 1 -1 1); do
4 | echo $i
5 | sleep 1
6 | done
7 | echo "即将重启"
8 | reboot
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/set_on-off.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\($ Performance governor = \).*/\1false/' /data/feas.conf
3 | else
4 | sed -i 's/\($ Performance governor = \).*/\1true/' /data/feas.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/sync_dir/summary_sync_dir.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | FILE_PATH="/data/adb/modules/mcc_sync_dir/main.sh"
4 |
5 | content=$(grep "^sync_dir " "$FILE_PATH" | awk -F"'" '{print $2}' | tr '\n' ' ')
6 |
7 | echo "已同步:$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_bypass_supply_temp.sh:
--------------------------------------------------------------------------------
1 | sed -i "/^bypass_supply_temp=.*/s/bypass_supply_temp=.*/bypass_supply_temp=$opening_temperature $closing_temperature/" /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/fast.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/media/0/Android/perapp-rs/config.toml"
2 |
3 | awk -F'[][]' '/^\[fast\]/{flag=1; next} /^\[/{flag=0} flag && /list/{$1=""; gsub(/[" ,]/, "\n"); print}' "$file_path" | sed '/^$/d'
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/set_fast.sh:
--------------------------------------------------------------------------------
1 | apps=$(echo -e "$apps" | sed ':a;N;$!ba;s/\n/", "/g' | sed 's/^/"/;s/$/"/')
2 |
3 | sed -i '/^\[fast\]/,/list =/ s/list = \[.*\]/list = ['"$apps"']/g' /data/media/0/Android/perapp-rs/config.toml
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_switch_bypass_power_supply.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | rm -f "/data/adb/modules/MiuiVariableThermal/on_bypass"
3 | else
4 | touch "/data/adb/modules/MiuiVariableThermal/on_bypass"
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/balance.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/media/0/Android/perapp-rs/config.toml"
2 |
3 | awk -F'[][]' '/^\[balance\]/{flag=1; next} /^\[/{flag=0} flag && /list/{$1=""; gsub(/[" ,]/, "\n"); print}' "$file_path" | sed '/^$/d'
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/summary_ram.sh:
--------------------------------------------------------------------------------
1 | script_name="/data/adb/modules/ram/ram.sh"
2 | lastID=$(pgrep -f "$script_name")
3 | if [ "$lastID" != "" ]; then
4 | echo -e "运行状态:正在运行中…"
5 |
6 | else
7 | echo -e "运行状态:未运行"
8 |
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/shell.sh:
--------------------------------------------------------------------------------
1 | shell="$START_DIR/kr-script/adb_tool/shell"
2 | echo "$CMD" >$shell
3 |
4 | echo -e "- 当前输入的命令:\n"
5 | cat $shell
6 | echo -e "\n----------\n"
7 | echo -e "- 执行结果:\n"
8 | . $shell
9 | echo -e "\n----------\n"
10 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/powersave.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/media/0/Android/perapp-rs/config.toml"
2 |
3 | awk -F'[][]' '/^\[powersave\]/{flag=1; next} /^\[/{flag=0} flag && /list/{$1=""; gsub(/[" ,]/, "\n"); print}' "$file_path" | sed '/^$/d'
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/set_balance.sh:
--------------------------------------------------------------------------------
1 | apps=$(echo -e "$apps" | sed ':a;N;$!ba;s/\n/", "/g' | sed 's/^/"/;s/$/"/')
2 |
3 | sed -i '/^\[balance\]/,/list =/ s/list = \[.*\]/list = ['"$apps"']/g' /data/media/0/Android/perapp-rs/config.toml
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/set_powersave.sh:
--------------------------------------------------------------------------------
1 | apps=$(echo -e "$apps" | sed ':a;N;$!ba;s/\n/", "/g' | sed 's/^/"/;s/$/"/')
2 |
3 | sed -i '/^\[powersave\]/,/list =/ s/list = \[.*\]/list = ['"$apps"']/g' /data/media/0/Android/perapp-rs/config.toml
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_appSleep_bg.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | bg_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"bg":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$bg_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_appSleep_top.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | top_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"top":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$top_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/performance.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/media/0/Android/perapp-rs/config.toml"
2 |
3 | awk -F'[][]' '/^\[performance\]/{flag=1; next} /^\[/{flag=0} flag && /list/{$1=""; gsub(/[" ,]/, "\n"); print}' "$file_path" | sed '/^$/d'
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/set_performance.sh:
--------------------------------------------------------------------------------
1 | apps=$(echo -e "$apps" | sed ':a;N;$!ba;s/\n/", "/g' | sed 's/^/"/;s/$/"/')
2 |
3 | sed -i '/^\[performance\]/,/list =/ s/list = \[.*\]/list = ['"$apps"']/g' /data/media/0/Android/perapp-rs/config.toml
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/shell.sh:
--------------------------------------------------------------------------------
1 | shell="$START_DIR/kr-script/other_tool/shell"
2 | echo "$CMD" >$shell
3 |
4 | echo -e "- 当前输入的命令:\n"
5 | cat $shell
6 | echo -e "\n----------\n"
7 | echo -e "- 执行结果:\n"
8 | . $shell
9 | echo -e "\n----------\n"
10 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_appSleep_idle.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | idle_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"idle":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$idle_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_log_level.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | level_value=$(awk -F'[:,]' '/"log":/,/}/{if(/"level":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$level_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_delay_function.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | replacement="power_stop_time=${delay_function}"
3 | sed -i "/^power_stop_time=/s/.*/$replacement/" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/doze_clear.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | for item in `dumpsys deviceidle whitelist`
4 | do
5 | app=`echo "$item" | cut -f2 -d ','`
6 | echo "deviceidle whitelist -$app"
7 | dumpsys deviceidle whitelist -$app
8 | done
9 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_freed_change.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | change_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"change":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$change_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_freed_level.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | level_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"level":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$level_value"
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/set_adb.sh:
--------------------------------------------------------------------------------
1 | echo "ip=$ip" >"$START_DIR/kr-script/adb_tool/ip_port"
2 | echo "port=$port" >>"$START_DIR/kr-script/adb_tool/ip_port"
3 | echo "- 当前输入IP:$ip"
4 | echo "- 当前输入端口:$port"
5 | echo "- 当出现USB授权弹窗时,请确定USB调试,授权过的无需再次授权"
6 | adb connect $ip:$port
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/summary_keep_std.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="keep_std"
3 | content=$(awk -F ' = ' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_a1Memory_oomAdj.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | oomAdj_value=$(awk -F'[:,]' '/"a1Memory":/,/}/{if(/"oomAdj":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$oomAdj_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_memThreshold_value.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | value_value=$(awk -F'[:,]' '/"memThreshold":/,/}/{if(/"value":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$value_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_afterTopChange_sleep.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | sleep_value=$(awk -F'[:,]' '/"afterTopChange":/,/}/{if(/"sleep":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$sleep_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/value_thermal_scene_time.sh:
--------------------------------------------------------------------------------
1 | awk -F'[ =]+' '/^thermal_scene_time=/ {
2 | if ($2 == 0 && $3 == 0) {
3 | printf("0");
4 | } else {
5 | printf("1");
6 | }
7 | }' /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/ram/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_meminfo_updateTime.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | updateTime_value=$(awk -F'[:,]' '/"meminfo":/,/}/{if(/"updateTime":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$updateTime_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_model_inlineHook.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | inlineHook_value=$(awk -F'[:,]' '/"model":/,/}/{if(/"inlineHook":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | echo "$inlineHook_value"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_switch_quantitative_stop_charging.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | touch "/data/adb/modules/QuantitativeStopCharging_switch/off_qsc"
3 | else
4 | rm -f "/data/adb/modules/QuantitativeStopCharging_switch/off_qsc"
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/yc_dfps/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/uperf/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_current_txt.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(current_txt=\).*/\10/' /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i 's/\(current_txt=\).*/\11/' /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_thermal_app.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(thermal_app=\).*/\10/' /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i 's/\(thermal_app=\).*/\11/' /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/fas_rs/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/summary_userspace_governor.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="userspace_governor"
3 | content=$(awk -F ' = ' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/Feashelper/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/qti-mem-opt/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/toolkit/adb:
--------------------------------------------------------------------------------
1 | export HOME="$START_DIR/kr-script/adb_tool"
2 | work_path="$HOME/.android"
3 | if [[ ! -d "$work_path" ]]; then
4 | mkdir -p "$work_path"
5 | chown $APP_USER_ID:$APP_USER_ID "$work_path"
6 | fi
7 |
8 | exec "$START_DIR/kr-script/adb_tool/adb" "$@"
9 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/Hc_memory/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/summary_bypass_charge.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_term="suto.bypass_charge"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_stop_charging_temperature.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | replacement="temperature_switch_stop=${stop_charging_temperature}"
3 | sed -i "/^temperature_switch_stop=/s/.*/$replacement/" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asguard/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/huzeASGuard/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/perapp_rs/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/Bypass_Charge/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_fps.sh:
--------------------------------------------------------------------------------
1 | if [ $switch -eq 1 ]; then
2 | sed -i "/^fps=.*/s/fps=.*/fps=$game_scenes $ordinary_scenes/" /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i "s/^fps=.*/fps=0 0/" /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_global_main_switch.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(global_switch=\).*/\10/' /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i 's/\(global_switch=\).*/\11/' /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_thermal_charge.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(thermal_charge=\).*/\10/' /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i 's/\(thermal_charge=\).*/\11/' /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asopt/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/asoul_affinity_opt/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/get_on-off.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "Performance governor"; then
4 | if [ "${line#*=}" = " true" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/feas.conf
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/summary_adb.sh:
--------------------------------------------------------------------------------
1 | adb devices | sed -e 's/device$/ 设备已连接/g' -e 's/offline$/ 设备已离线/g' -e 's/unauthorized$/ 没有允许授权USB调试/g'
2 | Number=`adb devices | grep -v -i 'List of .*' | wc -l`
3 | if [[ "$Number" -gt 2 ]]; then
4 | echo "$a"
5 | fi
6 | echo
7 | kill -2 $$
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_restore_charging_temperature.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | replacement="temperature_switch_start=${restore_charging_temperature}"
3 | sed -i "/^temperature_switch_start=/s/.*/$replacement/" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/useSfBackdoor.sh:
--------------------------------------------------------------------------------
1 | useSfBackdoor=$(grep '/useSfBackdoor' /sdcard/Android/yc/dfps/dfps.txt | awk '{print $2}')
2 |
3 | if [ "$useSfBackdoor" -eq 0 ]; then
4 | echo "PEAK_REFRESH_RATE"
5 | elif [ "$useSfBackdoor" -eq 1 ]; then
6 | echo "Surfaceflinger backdoor"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/set_keep_std.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/media/0/Android/fas-rs/games.toml"
2 |
3 | if [[ ${state} == 0 ]]; then
4 | sed -i "/^keep_std =/s/.*/keep_std = false/" "$file_path"
5 | elif [[ ${state} == 1 ]]; then
6 | sed -i "/^keep_std =/s/.*/keep_std = true/" "$file_path"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_bypass_supply_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | search_term="bypass_supply_level"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/default_rule.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$default_rule" ]; then
2 | echo '无效的操作' 1>&2
3 | else
4 | awk -v text="$default_rule" '/^\*/ {sub(/\*.*/, "* " text)} 1' /sdcard/Android/yc/dfps/dfps.txt > temp_file
5 | mv temp_file /sdcard/Android/yc/dfps/dfps.txt
6 | echo '好了~'
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/summary_screen_on_bypass_charge.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_term="suto.screen_on_bypass_charge"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/MiuiVariableThermal/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/off_screen_rule.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$off_screen_rule" ]; then
2 | echo '无效的操作' 1>&2
3 | else
4 | awk -v text="$off_screen_rule" '/^-/ {sub(/-.*/, "- " text)} 1' /sdcard/Android/yc/dfps/dfps.txt > temp_file
5 | mv temp_file /sdcard/Android/yc/dfps/dfps.txt
6 | echo '好了~'
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/apps.sh:
--------------------------------------------------------------------------------
1 | list_file="/sdcard/Android/HChai/HC_memory/名单列表.conf"
2 | sed -i '/^WHITE/d' $list_file
3 | echo "$apps" | while IFS= read -r app; do
4 | echo "WHITE '$app'"
5 | awk '{print} !count && /^{/{print "WHITE '$app'"; count++}' $list_file > tmpfile && mv tmpfile $list_file
6 | done
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_appSleep_bg.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | bg_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"bg":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"appSleep": {/,/},/s/"bg": '"\"$bg_value\""'/\"bg\": '"\"$bg\""'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_current_max.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | replacement="current_max=${current_max}"
3 | if [[ $switch -eq 1 ]]; then
4 | sed -i "/^current_max=/s/.*/$replacement/" "$file"
5 | else
6 | sed -i "s/^\(current_max=\).*/\10/" "$file"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/about/alipaygphone.sh:
--------------------------------------------------------------------------------
1 | link="alipays://platformapi/startapp?saId=10000007&qrcode=%68%74%74%70%73%3A%2F%2F%71%72%2E%61%6C%69%70%61%79%2E%63%6F%6D%2F%66%6B%78%31%39%31%39%37%71%6F%6D%79%64%73%6B%66%70%78%77%73%31%37%30%3F%5F%73%3D%77%65%62%2D%6F%74%68%65%72"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_log_level.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | level_value=$(awk -F'[:,]' '/"log":/,/}/{if(/"level":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"log": {/,/},/s/"level": '"\"$level_value\""'/\"level\": '"\"$level\""'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_delay_function.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_stop_time"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_appSleep_top.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | top_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"top":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"appSleep": {/,/},/s/"top": '"\"$top_value\""'/\"top\": '"\"$top\""'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_freed_change.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | change_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"change":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"freed": {/,/},/s/"change": '"$change_value"'/\"change\": '"$change"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_restore_charging_power.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_start"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/summary_apps.sh:
--------------------------------------------------------------------------------
1 | sed -n '/\[game_list\]/,/\[powersave\]/p' /data/media/0/Android/fas-rs/games.toml > /data/media/0/Android/fas-rs/temporary_file
2 | grep -Eo '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/media/0/Android/fas-rs/temporary_file
3 | rm "/data/media/0/Android/fas-rs/temporary_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_appSleep_idle.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | idle_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"idle":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"appSleep": {/,/},/s/"idle": '"\"$idle_value\""'/\"idle\": '"\"$idle\""'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_freed_level.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | level_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"level":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"freed": {/,/},/s/"level": '"\"$level_value\""'/\"level\": '"\"$level\""'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_full_and_then_stop.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(charge_full=\).*/\10/' /data/adb/modules/QuantitativeStopCharging_switch/config.conf
3 | else
4 | sed -i 's/\(charge_full=\).*/\11/' /data/adb/modules/QuantitativeStopCharging_switch/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/summary_app_list.sh:
--------------------------------------------------------------------------------
1 | sed -n '/\[game_list\]/,/\[powersave\]/p' /data/media/0/Android/fas-rs/games.toml > /data/media/0/Android/fas-rs/temporary_file
2 | grep -E '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/media/0/Android/fas-rs/temporary_file
3 | rm "/data/media/0/Android/fas-rs/temporary_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_a1Memory_oomAdj.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | oomAdj_value=$(awk -F'[:,]' '/"a1Memory":/,/}/{if(/"oomAdj":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"a1Memory": {/,/},/s/"oomAdj": '"$oomAdj_value"'/\"oomAdj\": '"$oomAdj"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/summary_powered_on_performance_enhancements.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_term="suto.powered_on_performance_enhancements"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_stop_charging_the_battery_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_stop"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/summary.sh:
--------------------------------------------------------------------------------
1 | module_prop="/data/adb/modules/QuantitativeStopCharging_switch/module.prop"
2 |
3 | if [ -f "$module_prop" ]; then
4 | installed_version=$(grep '^version=' "$module_prop" | cut -d'=' -f2)
5 | echo "已安装,模块版本:$installed_version"
6 | else
7 | echo "未安装"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_memThreshold_value.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | value_value=$(awk -F'[:,]' '/"memThreshold":/,/}/{if(/"value":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"memThreshold": {/,/},/s/"value": '"$value_value"'/\"value\": '"$value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_current_txt.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "current_txt"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_thermal_app.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "thermal_app"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_stop_charging_temperature.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="temperature_switch_stop"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_automatic_insertion_and_removal.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(power_reset=\).*/\10/' /data/adb/modules/QuantitativeStopCharging_switch/config.conf
3 | else
4 | sed -i 's/\(power_reset=\).*/\11/' /data/adb/modules/QuantitativeStopCharging_switch/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_temperature_mode.sh:
--------------------------------------------------------------------------------
1 | if [[ ${state} -eq 0 ]]; then
2 | sed -i 's/\(temperature_switch=\).*/\10/' /data/adb/modules/QuantitativeStopCharging_switch/config.conf
3 | else
4 | sed -i 's/\(temperature_switch=\).*/\11/' /data/adb/modules/QuantitativeStopCharging_switch/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/adb_remote_get.sh:
--------------------------------------------------------------------------------
1 | stared=`ps | grep adbd`
2 | stared2=`ps -ef | grep adbd`
3 | port=`getprop service.adb.tcp.port`
4 |
5 | if [[ ! -n "$port" ]]
6 | then
7 | echo 0
8 | return
9 | fi
10 |
11 | if [[ -n "$stared" ]] || [[ -n "$stared2" ]]; then
12 | echo 1
13 | else
14 | echo 0
15 | fi
16 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_afterTopChange_sleep.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | sleep_value=$(awk -F'[:,]' '/"afterTopChange":/,/}/{if(/"sleep":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"afterTopChange": {/,/},/s/"sleep": '"$sleep_value"'/\"sleep\": '"$sleep"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/set_bypass_charge.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 |
3 | if [[ ${state} == 0 ]]; then
4 | sed -i "/^suto.bypass_charge=/s/.*/suto.bypass_charge=N/" "$file_path"
5 | elif [[ ${state} == 1 ]]; then
6 | sed -i "/^suto.bypass_charge=/s/.*/suto.bypass_charge=Y/" "$file_path"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_global_main_switch.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "global_switch"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_thermal_charge.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "thermal_charge"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_restore_charging_temperature.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="temperature_switch_start"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 | echo "$content"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/set_userspace_governor.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/media/0/Android/fas-rs/games.toml"
2 |
3 | if [[ ${state} == 0 ]]; then
4 | sed -i "/^userspace_governor =/s/.*/userspace_governor = false/" "$file_path"
5 | elif [[ ${state} == 1 ]]; then
6 | sed -i "/^userspace_governor =/s/.*/userspace_governor = true/" "$file_path"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_hookFunc_kill.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | kill_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"kill":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$kill_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$kill_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_meminfo_updateTime.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | updateTime_value=$(awk -F'[:,]' '/"meminfo":/,/}/{if(/"updateTime":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"meminfo": {/,/},/s/"updateTime": '"$updateTime_value"'/\"updateTime\": '"$updateTime"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/get_keep_std.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="keep_std"
3 | content=$(awk -F ' = ' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_clever_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"clever":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_freed_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_whiteList_smart.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | smart_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"smart":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$smart_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$smart_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_model_inlineHook.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | inlineHook_value=$(awk -F'[:,]' '/"model":/,/}/{if(/"inlineHook":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | sed -i '/"model": {/,/},/s/"inlineHook": '"\"$inlineHook_value\""'/\"inlineHook\": '"\"$inlineHook\""'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_bypass_level_time.sh:
--------------------------------------------------------------------------------
1 | if [ $switch == 1 ]; then
2 | sed -i "/^bypass_level_time=.*/s/bypass_level_time=.*/bypass_level_time=$start_time $end_time/" /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i "s/^\(bypass_level_time=\).*$/\10 0/" /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/value_current_max.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | search_term="current_max"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [[ "$content" -eq 0 ]]; then
6 | echo "0"
7 | else
8 | echo "1"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_a1Memory_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"a1Memory":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_appSleep_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_crazyKill_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"crazyKill":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_whiteList_system.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | system_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"system":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$system_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$system_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_appSleep_idle.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | idle_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"idle":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$idle_value" == "all" ]]; then
6 | echo "全部用户"
7 | elif [[ "$idle_value" == "current" ]]; then
8 | echo "当前用户"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_current_max.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | search_term="current_max"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [[ "$content" -eq 0 ]]; then
6 | echo "关闭"
7 | else
8 | echo "$content"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_full_and_then_stop.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "charge_full"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/QuantitativeStopCharging_switch/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_memThreshold_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"memThreshold":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/value_bypass_supply_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | search_term="bypass_supply_level"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "110" ]; then
6 | echo "0"
7 | else
8 | echo "1"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_temperature_mode.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "temperature_switch"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/QuantitativeStopCharging_switch/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_restore_charging_power.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | replacement="power_start=${restore_charging_power}"
3 |
4 | if [ "$switch" -eq 0 ]; then
5 | sed -i "/^power_start=/s/.*/power_start=110/" "$file"
6 | else
7 | sed -i "/^power_start=/s/.*/$replacement/" "$file"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/get_algorithm.sh:
--------------------------------------------------------------------------------
1 | file_path="/sdcard/Android/panel_qti_mem.txt"
2 | search_text="zram_alg"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | echo "$original_alg"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/get_zram_size.sh:
--------------------------------------------------------------------------------
1 | file_path="/sdcard/Android/panel_qti_mem.txt"
2 | search_text="zram_size"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | echo "$original_alg"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_whiteList_optional.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | optional_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"optional":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$optional_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$optional_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/get_bypass_charge.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_term="suto.bypass_charge"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "Y" ]; then
6 | echo "1"
7 | elif [ "$content" = "N" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_bypass_supply_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | replacement="bypass_supply_level=${bypass_supply_level}"
3 |
4 | if [ "$switch" -eq 0 ]; then
5 | sed -i "/^bypass_supply_level=/s/.*/bypass_supply_level=110/" "$file"
6 | else
7 | sed -i "/^bypass_supply_level=/s/.*/$replacement/" "$file"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/get_automatic_insertion_and_removal.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line
2 | do
3 | if echo "$line" | grep -q "power_reset"; then
4 | if [ "${line#*=}" = "1" ]; then
5 | echo "1"
6 | else
7 | echo "0"
8 | fi
9 | break
10 | fi
11 | done < /data/adb/modules/QuantitativeStopCharging_switch/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/get_userspace_governor.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="userspace_governor"
3 | content=$(awk -F ' = ' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/raccourcis.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 长按添加桌面快捷方式运存防线的总开关
5 | run get_ram.sh
6 | run set_ram.sh
7 |
8 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_initInjection_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"initInjection":/,/\"lmkd\"/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/summary_bypass_supply_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/MiuiVariableThermal/config.conf"
2 | search_term="bypass_supply_level"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "110" ]; then
6 | echo "关闭"
7 | else
8 | echo "$content"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/value_fps.sh:
--------------------------------------------------------------------------------
1 | fps=$(grep '^fps=' /data/adb/modules/MiuiVariableThermal/config.conf | awk -F'=' '{print $2}')
2 |
3 | brightness_level=$(echo $fps | awk '{print $1}')
4 | standby_level=$(echo $fps | awk '{print $2}')
5 |
6 | if [[ $brightness_level -eq 0 && $standby_level -eq 0 ]]; then
7 | echo "0"
8 | else
9 | echo "1"
10 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/set_stop_charging_the_battery_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | replacement="power_stop=${stop_charging_the_battery_level}"
3 |
4 | if [ "$switch" -eq 0 ]; then
5 | sed -i "/^power_stop=/s/.*/power_stop=110/" "$file"
6 | else
7 | sed -i "/^power_stop=/s/.*/$replacement/" "$file"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/default_mode.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cur_powermode=$(cat /dev/fas_rs/mode)
4 |
5 | case "$cur_powermode" in
6 | powersave)
7 | echo "省电模式"
8 | ;;
9 | balance)
10 | echo "均衡模式"
11 | ;;
12 | performance)
13 | echo "性能模式"
14 | ;;
15 | fast)
16 | echo "极速模式"
17 | ;;
18 | *)
19 | echo "未知模式"
20 | ;;
21 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/summary_mtk_fpsgo_enable.sh:
--------------------------------------------------------------------------------
1 | file="/sys/kernel/fpsgo/common/fpsgo_enable"
2 |
3 | if [ -e "$file" ]; then
4 | content=$(cat "$file")
5 | if [ "$content" -eq 1 ]; then
6 | echo "已开启"
7 | elif [ "$content" -eq 0 ]; then
8 | echo "已关闭"
9 | else
10 | echo "未知状态"
11 | fi
12 | else
13 | echo "您的设备可能不支持"
14 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/get_avail_mem_percent.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/ram/config.ini"
2 | search_text="avail_mem_percent"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | echo "$original_alg"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/set_screen_on_bypass_charge.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 |
3 | if [[ ${state} == 0 ]]; then
4 | sed -i "/^suto.screen_on_bypass_charge=/s/.*/suto.screen_on_bypass_charge=N/" "$file_path"
5 | elif [[ ${state} == 1 ]]; then
6 | sed -i "/^suto.screen_on_bypass_charge=/s/.*/suto.screen_on_bypass_charge=Y/" "$file_path"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/value_restore_charging_power.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_start"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "110" ]; then
6 | echo "0"
7 | else
8 | echo "1"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/get_screen_on_bypass_charge.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_term="suto.screen_on_bypass_charge"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "Y" ]; then
6 | echo "1"
7 | elif [ "$content" = "N" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/value_stop_charging_the_battery_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_stop"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "110" ]; then
6 | echo "0"
7 | else
8 | echo "1"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_hookFunc_kill.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | kill_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"kill":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$kill_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$kill_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_bypass_supply_temp.sh:
--------------------------------------------------------------------------------
1 | bypass_supply_temp=$(grep '^bypass_supply_temp=' /data/adb/modules/MiuiVariableThermal/config.conf | awk -F'=' '{print $2}')
2 |
3 | opening_temperature=$(echo $bypass_supply_temp | awk '{print $1}')
4 | closing_temperature=$(echo $bypass_supply_temp | awk '{print $2}')
5 |
6 | echo "开启温度:$opening_temperature 关闭温度:$closing_temperature"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/summary_restore_charging_power.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_start"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "110" ]; then
6 | echo "关闭"
7 | else
8 | echo "$content"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/summary_qualcomm_perfmgr_enable.sh:
--------------------------------------------------------------------------------
1 | file="/sys/module/perfmgr/parameters/perfmgr_enable"
2 |
3 | if [ -e "$file" ]; then
4 | content=$(cat "$file")
5 | if [ "$content" -eq 1 ]; then
6 | echo "已开启"
7 | elif [ "$content" -eq 0 ]; then
8 | echo "已关闭"
9 | else
10 | echo "未知状态"
11 | fi
12 | else
13 | echo "您的设备可能不支持"
14 | fi
--------------------------------------------------------------------------------
/annunciate:
--------------------------------------------------------------------------------
1 | *新的一年到来,祝各位事业蒸蒸日上!
2 |
3 | ————————————————————————
4 |
5 | 本软件属于免费软件,没有任何vip或者付费版,如果你花钱购买了此软件,那么恭喜你被骗了。
6 |
7 | 使用软件之前记得安装模块。可以点进其它设置中找到作者的酷安主页,然后翻他的动态,一般都会有说明和下载链接。
8 |
9 | 不要看到模块就装,有需要的就装,不需要的不装,模块不是装的越多越好,有些模块会冲突,有些模块机型不通用,根据自己的需求和使用习惯来装。
10 |
11 | 如果使用中出现问题,可以在群里给我反馈,如果有什么不懂的也随时欢迎前来咨询。
12 |
13 | 每次更新软件后最好清除一下数据,以免遇到bug,清除数据不会对模块设置和手机设置造成任何影响,或者卸载重新安装也行。
14 |
15 | *温馨提示:搞机有风险,操作需谨慎!
16 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_freed_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/summary_stop_charging_the_battery_level.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
2 | search_term="power_stop"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "110" ]; then
6 | echo "关闭"
7 | else
8 | echo "$content"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_a1Memory_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"a1Memory":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_appSleep_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_clever_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"clever":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_whiteList_smart.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | smart_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"smart":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$smart_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$smart_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_fast_fas_boost.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="fas_boost"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[fast\]/,0 { if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_crazyKill_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"crazyKill":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_whiteList_system.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | system_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"system":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$system_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$system_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/set_thermal_scene_time.sh:
--------------------------------------------------------------------------------
1 | if [ $switch == 1 ]; then
2 | sed -i "/^thermal_scene_time=.*/s/thermal_scene_time=.*/thermal_scene_time=$start_time $end_time $temperature_control_gear/" /data/adb/modules/MiuiVariableThermal/config.conf
3 | else
4 | sed -i "s/^\(thermal_scene_time=\).*$/\10 0 $temperature_control_gear/" /data/adb/modules/MiuiVariableThermal/config.conf
5 | fi
--------------------------------------------------------------------------------
/assets/kr-script/about/qq_channel.sh:
--------------------------------------------------------------------------------
1 | link="mqqapi://forward/url?src_type=web&style=default&plg_auth=1&version=1&url_prefix=aHR0cHM6Ly9xdW4ucXEuY29tL3Fxd2ViL3F1bnByby9zaGFyZT9fd3Y9MyZfd3d2PTEyOCZhcHBDaGFubmVsPXNoYXJlJmludml0ZUNvZGU9MjJiR3ZkOEJTdEQmYnVzaW5lc3NUeXBlPTkmZnJvbT0yNDY2MTAmYml6PWthJm1haW5Tb3VyY2VJZD1zaGFyZSZzdWJTb3VyY2VJZD1vdGhlcnMmanVtcHNvdXJjZT1zaG9ydHVybCMvb3V0"
2 |
3 | am start -a android.intent.action.VIEW -d "$link"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_hookFunc_pidfd_send_signal.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | pidfd_send_signal_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"pidfd_send_signal":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$pidfd_send_signal_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$pidfd_send_signal_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_memThreshold_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"memThreshold":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/get_bypass_charge_current.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_text="suto.bypass_charge_current"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | echo "$original_alg"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/get_powered_on_performance_enhancements.sh:
--------------------------------------------------------------------------------
1 | file="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_term="suto.powered_on_performance_enhancements"
3 | content=$(awk -F '=' -v term="$search_term" '$1 ~ "^"term"$" {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}' "$file")
4 |
5 | if [ "$content" = "Y" ]; then
6 | echo "1"
7 | elif [ "$content" = "N" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_whiteList_optional.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | optional_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"optional":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$optional_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$optional_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/value_bypass_level_time.sh:
--------------------------------------------------------------------------------
1 | bypass_level_time=$(grep '^bypass_level_time=' /data/adb/modules/MiuiVariableThermal/config.conf | awk -F'=' '{print $2}')
2 |
3 | start_time=$(echo $bypass_level_time | awk '{print $1}')
4 | end_time=$(echo $bypass_level_time | awk '{print $2}')
5 |
6 | if [[ $start_time -eq 0 && $end_time -eq 0 ]]; then
7 | echo "0"
8 | else
9 | echo "1"
10 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/get_hookFunc___android_log_print.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | __android_log_print_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"__android_log_print":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$__android_log_print_value" == "true" ]]; then
6 | echo "1"
7 | elif [[ "$__android_log_print_value" == "false" ]]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_initInjection_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"initInjection":/,/\"lmkd\"/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$enable_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$enable_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_balance_fas_boost.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="fas_boost"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[balance\]/,/\[performance\]/{ if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_performance_fas_boost.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="fas_boost"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[performance\]/,/\[fast\]/{ if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_powersave_fas_boost.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="fas_boost"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[powersave\]/,/\[balance\]/{ if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_fast_use_performance_governor.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="use_performance_governor"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[fast\]/,0 { if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/value_onscreen_mode.sh:
--------------------------------------------------------------------------------
1 | onscreen_mode=$(awk -F'=' '/^onscreen_mode/ {gsub(/[[:space:]"'\''\r]/, "", $2); print $2}' /sdcard/Android/perapp-rs/config.toml)
2 |
3 | case "$onscreen_mode" in
4 | "powersave")
5 | echo "powersave"
6 | ;;
7 | "balance")
8 | echo "balance"
9 | ;;
10 | "performance")
11 | echo "performance"
12 | ;;
13 | "fast")
14 | echo "fast"
15 | ;;
16 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/get_start_bypass_charge_battery_capacity.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_text="suto.start_bypass_charge_battery_capacity"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | echo "$original_alg"
8 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/set_powered_on_performance_enhancements.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 |
3 | if [[ ${state} == 0 ]]; then
4 | sed -i "/^suto.powered_on_performance_enhancements=/s/.*/suto.powered_on_performance_enhancements=N/" "$file_path"
5 | elif [[ ${state} == 1 ]]; then
6 | sed -i "/^suto.powered_on_performance_enhancements=/s/.*/suto.powered_on_performance_enhancements=Y/" "$file_path"
7 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_bypass_level_time.sh:
--------------------------------------------------------------------------------
1 | bypass_level_time=$(grep '^bypass_level_time=' /data/adb/modules/MiuiVariableThermal/config.conf | awk -F'=' '{print $2}')
2 |
3 | start_time=$(echo $bypass_level_time | awk '{print $1}')
4 | end_time=$(echo $bypass_level_time | awk '{print $2}')
5 |
6 | if [[ $start_time -eq 0 && $end_time -eq 0 ]]; then
7 | echo "关闭"
8 | else
9 | echo "时间段:$start_time点~$end_time点"
10 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/value_offscreen_mode.sh:
--------------------------------------------------------------------------------
1 | offscreen_mode=$(awk -F'=' '/^offscreen_mode/ {gsub(/[[:space:]"'\''\r]/, "", $2); print $2}' /sdcard/Android/perapp-rs/config.toml)
2 |
3 | case "$offscreen_mode" in
4 | "powersave")
5 | echo "powersave"
6 | ;;
7 | "balance")
8 | echo "balance"
9 | ;;
10 | "performance")
11 | echo "performance"
12 | ;;
13 | "fast")
14 | echo "fast"
15 | ;;
16 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_appSleep_bg.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | bg_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"bg":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$bg_value" == "ignore" ]]; then
6 | echo "忽略唤醒请求和拉起应用请求"
7 | elif [[ "$bg_value" == "allow" ]]; then
8 | echo "允许唤醒请求和拉起应用请求"
9 | elif [[ "$bg_value" == "deny" ]]; then
10 | echo "拒绝唤醒请求和拉起应用请求"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_balance_use_performance_governor.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="use_performance_governor"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[balance\]/,/\[performance\]/{ if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_performance_use_performance_governor.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="use_performance_governor"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[performance\]/,/\[fast\]/{ if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/value_powersave_use_performance_governor.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 | search_term="use_performance_governor"
3 | content=$(awk -F ' *= *' -v term="$search_term" '/\[powersave\]/,/\[balance\]/{ if ($1 ~ "^"term"$" || $1 ~ "^"term"=") {sub(/"/, "", $2); gsub(/ *$/, "", $2); print $2}}' "$file")
4 |
5 | if [ "$content" = "true" ]; then
6 | echo "1"
7 | elif [ "$content" = "false" ]; then
8 | echo "0"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/default_mode.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cur_powermode=$(cat /sdcard/Android/yc/uperf/cur_powermode.txt)
4 |
5 | case "$cur_powermode" in
6 | auto)
7 | echo "自动模式"
8 | ;;
9 | powersave)
10 | echo "省电模式"
11 | ;;
12 | balance)
13 | echo "均衡模式"
14 | ;;
15 | performance)
16 | echo "性能模式"
17 | ;;
18 | fast)
19 | echo "极速模式"
20 | ;;
21 | *)
22 | echo "未知模式"
23 | ;;
24 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_appSleep_top.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | top_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"top":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$top_value" == "ignore" ]]; then
6 | echo "忽略唤醒请求和拉起应用请求"
7 | elif [[ "$top_value" == "allow" ]]; then
8 | echo "允许唤醒请求和拉起应用请求"
9 | elif [[ "$top_value" == "deny" ]]; then
10 | echo "拒绝唤醒请求和拉起应用请求"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_hookFunc_pidfd_send_signal.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | pidfd_send_signal_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"pidfd_send_signal":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$pidfd_send_signal_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$pidfd_send_signal_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/raccourcis.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 长按添加桌面快捷方式定量停充的总开关
5 | run get_switch_quantitative_stop_charging.sh
6 | run set_switch_quantitative_stop_charging.sh
7 |
8 |
--------------------------------------------------------------------------------
/assets/kr-script/backup_tool/mirror_partition_extract.sh:
--------------------------------------------------------------------------------
1 | Time=$(date +"%Y%m%d%H%M%S")
2 | IFS=$'\n'
3 | echo "$extract" > $START_DIR/kr-script/backup_tool/img_extract_dir
4 | [[ ! -d "$extract" ]] && mkdir -p "$extract"
5 |
6 | for i in $img; do
7 | e=${i##*/}
8 | File="$extract/${e}_${Time}.img"
9 | [[ ! -L $i ]] && abort "!$e分区不存在无法提取"
10 | echo "- 开始提取$e分区…………"
11 | dd if="$i" of="$File"
12 | echo "- 已提取$e分区到:$File"
13 | echo
14 | done
15 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/summary_hookFunc___android_log_print.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | __android_log_print_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"__android_log_print":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "$__android_log_print_value" == "true" ]]; then
6 | echo "已启用"
7 | elif [[ "$__android_log_print_value" == "false" ]]; then
8 | echo "已停用"
9 | else
10 | echo "未知状态"
11 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/summary_onscreen_mode.sh:
--------------------------------------------------------------------------------
1 | onscreen_mode=$(awk -F'=' '/^onscreen_mode/ {gsub(/[[:space:]"'\''\r]/, "", $2); print $2}' /sdcard/Android/perapp-rs/config.toml)
2 |
3 | case "$onscreen_mode" in
4 | "powersave")
5 | echo "省电模式"
6 | ;;
7 | "balance")
8 | echo "均衡模式"
9 | ;;
10 | "performance")
11 | echo "性能模式"
12 | ;;
13 | "fast")
14 | echo "极速模式"
15 | ;;
16 | *)
17 | echo "未知模式"
18 | ;;
19 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/summary_offscreen_mode.sh:
--------------------------------------------------------------------------------
1 | offscreen_mode=$(awk -F'=' '/^offscreen_mode/ {gsub(/[[:space:]"'\''\r]/, "", $2); print $2}' /sdcard/Android/perapp-rs/config.toml)
2 |
3 | case "$offscreen_mode" in
4 | "powersave")
5 | echo "省电模式"
6 | ;;
7 | "balance")
8 | echo "均衡模式"
9 | ;;
10 | "performance")
11 | echo "性能模式"
12 | ;;
13 | "fast")
14 | echo "极速模式"
15 | ;;
16 | *)
17 | echo "未知模式"
18 | ;;
19 | esac
--------------------------------------------------------------------------------
/assets/kr-script/about/visible_set.sh:
--------------------------------------------------------------------------------
1 | rm -f /data/data/module.config.control/files/kr-script/module_control/visible/*
2 | mkdir -p /data/data/module.config.control/files/kr-script/module_control/visible/
3 | file_names=(${state//,/ })
4 | for name in "${file_names[@]}"
5 | do
6 | filename="${name}"
7 | echo "echo 1" > "/data/data/module.config.control/files/kr-script/module_control/visible/$filename"
8 | done
9 | am force-stop $PACKAGE_NAME;am start -n $PACKAGE_NAME/$PACKAGE_NAME.SplashActivity
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/set_algorithm.sh:
--------------------------------------------------------------------------------
1 | file_path="/sdcard/Android/panel_qti_mem.txt"
2 | search_text="zram_alg"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | new_line_content=$(echo "$line_content" | sed "s/$original_alg/$algorithm/")
8 | sed -i "${line_number}s/.*/$new_line_content/" "$file_path"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/set_zram_size.sh:
--------------------------------------------------------------------------------
1 | file_path="/sdcard/Android/panel_qti_mem.txt"
2 | search_text="zram_size"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | new_line_content=$(echo "$line_content" | sed "s/$original_alg/$zram_size/")
8 | sed -i "${line_number}s/.*/$new_line_content/" "$file_path"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/about/visible.sh:
--------------------------------------------------------------------------------
1 | directory="/data/data/module.config.control/files/kr-script/module_control/visible"
2 | if [ ! -d "$directory" ]; then
3 | mkdir -p "$directory"
4 | file_names=("asguard" "uperf" "dfps" "qti" "asopt" "feas" "perapp-rs" "fas-rs" "QuantitativeStopCharging_switch" "MiuiVariableThermal" "Bypass_Charge" "A1Memory" "ram")
5 | for name in "${file_names[@]}"
6 | do
7 | filepath="$directory/$name"
8 | echo "echo 1" > "$filepath"
9 | done
10 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/summary_mtk_perfmgr_enable.sh:
--------------------------------------------------------------------------------
1 | file1="/sys/module/mtk_fpsgo/parameters/perfmgr_enable"
2 | file2="/sys/module/perfmgr_mtk/parameters/perfmgr_enable"
3 | if [[ -f $file2 ]]; then
4 | file1=$file2
5 | fi
6 |
7 | if [ -e "$file" ]; then
8 | content=$(cat "$file")
9 | if [ "$content" -eq 1 ]; then
10 | echo "已开启"
11 | elif [ "$content" -eq 0 ]; then
12 | echo "已关闭"
13 | else
14 | echo "未知状态"
15 | fi
16 | else
17 | echo "您的设备可能不支持"
18 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/set_avail_mem_percent.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/ram/config.ini"
2 | search_text="avail_mem_percent"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | new_line_content=$(echo "$line_content" | sed "s/$original_alg/$avail_mem_percent/")
8 | sed -i "${line_number}s/.*/$new_line_content/" "$file_path"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/data/feas.conf" ]; then
15 | cat "/data/feas.conf"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
--------------------------------------------------------------------------------
/assets/kr-script/about/update.sh:
--------------------------------------------------------------------------------
1 | repository="ZhangJinhui-baoji/MCC"
2 |
3 | latest_release=$(curl --connect-timeout 2 --max-time 1 -s "https://api.github.com/repos/$repository/releases/latest" | awk -F'"' '/"tag_name": ".+"/{print $4}')
4 |
5 | if [ -z "$latest_release" ]; then
6 | echo "无法获取发行版信息"
7 | else
8 | current_version="$PACKAGE_VERSION_NAME"
9 | if [ "$latest_release" != "$current_version" ]; then
10 | echo "*发现新版本: $latest_release"
11 | else
12 | echo "当前已是最新版本: $current_version"
13 | fi
14 | fi
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/battery/battery_capacity.sh:
--------------------------------------------------------------------------------
1 | #查看出厂设计容量
2 | cc=$(cat /sys/class/power_supply/battery/charge_full_design)
3 | charge_full_design=$(($cc / 1000))
4 | #查看当前电池容量
5 | dc=$(cat /sys/class/power_supply/battery/charge_full)
6 | charge_full=$(($dc / 1000))
7 | #查看电池循环次数
8 | xh=$(cat /sys/class/power_supply/battery/cycle_count)
9 | #计算剩余容量百分比
10 | bfb=$(printf "%d" $((${dc}*100/${cc})))
11 | echo "出厂设计容量为 ${charge_full_design}mAh"
12 | echo "当前电池容量为 ${charge_full}mAh"
13 | echo "电池循环次数为 $xh次"
14 | echo "剩余容量百分比为 $bfb%"
15 |
16 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/set_bypass_charge_current.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_text="suto.bypass_charge_current"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | new_line_content=$(echo "$line_content" | sed "s/$original_alg/$bypass_charge_current/")
8 | sed -i "${line_number}s/.*/$new_line_content/" "$file_path"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/sync_dir/main/main.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | sleep 2
3 |
4 | sync_dir() {
5 | local app_name="$1"
6 | local source_path="$2"
7 | local target_path="/data/media/0/Download/$app_name"
8 |
9 | if [[ -d $source_path ]]; then
10 | echo "存在$app_name"
11 | [[ ! -d $target_path ]] && mkdir -p "$target_path"
12 | mount --bind "$source_path" "$target_path"
13 | chcon u:object_r:media_rw_data_file:s0 "$source_path"
14 | chown media_rw:media_rw "$target_path"
15 | fi
16 | }
17 |
18 | #同步路径
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asopt/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/sdcard/Android/naki/asopt/asopt.conf" ]; then
15 | cat "/sdcard/Android/naki/asopt/asopt.conf"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asguard/exswitch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | for var in $(echo ${exAS:-}); do
3 | result="$(dumpsys package ${var} | grep -s "ACCESSIBILITY_SERVICE" | sed 's/ /\n/g' | grep "${var}/" | sort | uniq)"
4 | if [[ -n "${result}" ]]; then
5 | result="$(echo "${result}" | sed "s:/\.:/${var}\.:g")"
6 | tmp="${tmp:-}${result} "
7 | fi
8 | done
9 | result="${tmp}"
10 |
11 | source $asguard/ASGuard.conf;
12 | exclude_lines=$(echo -e "${exclude}" | sed 's/ /\n/g')
13 | echo -e "${result}\n${exclude_lines}" | sed 's: :\\n:g' | sort | uniq
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_hookFunc_kill.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | kill_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"kill":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 kill 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 kill 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"hookFunc": {/,/},/s/"kill": '"$kill_value"'/\"kill\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/data/adb/modules/Bypass_Charge/system.prop" ]; then
15 | cat "/data/adb/modules/Bypass_Charge/system.prop"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_freed_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"freed":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"freed": {/,/},/s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/toolkit/install_busybox.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | function busybox_install() {
4 | for applet in `./busybox --list`; do
5 | case "$applet" in
6 | "sh"|"busybox")
7 | echo 'Skip' > /dev/null
8 | ;;
9 | *)
10 | ./busybox ln -sf busybox "$applet";
11 | ;;
12 | esac
13 | done
14 | echo '' > busybox_installed
15 | }
16 |
17 | if [[ ! "$TOOLKIT" = "" ]]; then
18 | cd "$TOOLKIT"
19 | if [[ ! -f busybox_installed ]]; then
20 | busybox_install
21 | fi
22 | fi
23 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_clever_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"clever":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"clever": {/,/},/s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_whiteList_smart.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | smart_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"smart":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 smart 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 smart 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"whiteList": {/,/},/s/"smart": '"$smart_value"'/\"smart\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/sync_dir/main/service.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | MODDIR=${0%/*}
3 |
4 | until [[ $(getprop sys.boot_completed) -eq 1 ]]; do
5 | sleep 2
6 | done
7 |
8 | sdcard_rw() {
9 | local test_file="/sdcard/Android/.TEST_FILE1"
10 | touch "$test_file"
11 | while [[ ! -f "$test_file" ]]; do
12 | touch "$test_file"
13 | sleep 1
14 | done
15 | rm "$test_file"
16 | }
17 |
18 | sdcard_rw
19 |
20 | nohup sh "$MODDIR/main.sh" &
21 | wait
22 |
23 | until [[ $? == 0 ]]; do
24 | nohup sh "$MODDIR/main.sh" &
25 | sleep 1
26 | wait
27 | done
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_a1Memory_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"a1Memory":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"a1Memory": {/,/},/s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_appSleep_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"appSleep":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"appSleep": {/,/},/s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_crazyKill_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"crazyKill":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"crazyKill": {/,/},/s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_whiteList_system.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | system_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"system":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 system 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 system 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"whiteList": {/,/},/s/"system": '"$system_value"'/\"system\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/set_start_bypass_charge_battery_capacity.sh:
--------------------------------------------------------------------------------
1 | file_path="/data/adb/modules/Bypass_Charge/system.prop"
2 | search_text="suto.start_bypass_charge_battery_capacity"
3 | line_number=$(grep -n "$search_text" "$file_path" | cut -d ':' -f 1)
4 | if [ -n "$line_number" ]; then
5 | line_content=$(sed -n "${line_number}p" "$file_path")
6 | original_alg=$(echo "$line_content" | sed 's/.*=//')
7 | new_line_content=$(echo "$line_content" | sed "s/$original_alg/$start_bypass_charge_battery_capacity/")
8 | sed -i "${line_number}s/.*/$new_line_content/" "$file_path"
9 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/read_default_rule.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line || [[ -n $line ]]; do
2 | line="$(echo "$line" | tr -d '\r')"
3 | if [[ $line == \** ]]; then
4 | mode=${line:2}
5 | case "$mode" in
6 | powersave)
7 | echo "省电模式"
8 | ;;
9 | balance)
10 | echo "均衡模式"
11 | ;;
12 | performance)
13 | echo "性能模式"
14 | ;;
15 | fast)
16 | echo "极速模式"
17 | ;;
18 | *)
19 | echo "未知模式"
20 | ;;
21 | esac
22 | fi
23 | done < /sdcard/Android/yc/uperf/perapp_powermode.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/read_off_screen_rule.sh:
--------------------------------------------------------------------------------
1 | while IFS= read -r line || [[ -n $line ]]; do
2 | line="$(echo "$line" | tr -d '\r')"
3 | if [[ $line == -* ]]; then
4 | mode=${line:2}
5 | case "$mode" in
6 | powersave)
7 | echo "省电模式"
8 | ;;
9 | balance)
10 | echo "均衡模式"
11 | ;;
12 | performance)
13 | echo "性能模式"
14 | ;;
15 | fast)
16 | echo "极速模式"
17 | ;;
18 | *)
19 | echo "未知模式"
20 | ;;
21 | esac
22 | fi
23 | done < /sdcard/Android/yc/uperf/perapp_powermode.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_memThreshold_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"memThreshold":/,/}/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"memThreshold": {/,/},/s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_fps.sh:
--------------------------------------------------------------------------------
1 | fps=$(grep '^fps=' /data/adb/modules/MiuiVariableThermal/config.conf | awk -F'=' '{print $2}')
2 |
3 | brightness_level=$(echo $fps | awk '{print $1}')
4 | standby_level=$(echo $fps | awk '{print $2}')
5 |
6 | if [[ $brightness_level -eq 0 ]]; then
7 | if [[ $standby_level -eq 0 ]]; then
8 | echo "游戏场景: 关闭 普通场景: 关闭"
9 | else
10 | echo "游戏场景: 关闭 普通场景: $standby_level"
11 | fi
12 | elif [[ $standby_level -eq 0 ]]; then
13 | echo "游戏场景: $brightness_level 普通场景: 关闭"
14 | else
15 | echo "游戏场景: $brightness_level 普通场景: $standby_level"
16 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_whiteList_optional.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | optional_value=$(awk -F'[:,]' '/"whiteList":/,/}/{if(/"optional":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 optional 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 optional 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"whiteList": {/,/},/s/"optional": '"$optional_value"'/\"optional\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_initInjection_enable.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | enable_value=$(awk -F'[:,]' '/"initInjection":/,/\"lmkd\"/{if(/"enable":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 enable 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 enable 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"initInjection": {/,/\"lmkd\"/ s/"enable": '"$enable_value"'/\"enable\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 同步目录
7 | 把任意目录实时同步到Download文件夹
8 |
9 |
10 |
11 | run sync_dir/set_sync_dir.sh
12 |
13 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/algorithm.sh:
--------------------------------------------------------------------------------
1 | function get_zram_device_path {
2 | zram_devices=$(ls /sys/block | grep "zram")
3 |
4 | for device in $zram_devices; do
5 | if [ -f "/sys/block/$device/comp_algorithm" ]; then
6 | echo "/sys/block/$device/comp_algorithm"
7 | return
8 | fi
9 | done
10 |
11 | echo ""
12 | }
13 |
14 | zram_path=$(get_zram_device_path)
15 |
16 | if [ -z "$zram_path" ]; then
17 | echo "No ZRAM device found or comp_algorithm file not accessible"
18 | else
19 | comp_algorithm=$(cat "$zram_path" | sed 's/\[//g; s/\]//g')
20 | echo "$comp_algorithm" | sed 's/ /\n/g'
21 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_hookFunc_pidfd_send_signal.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | pidfd_send_signal_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"pidfd_send_signal":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 pidfd_send_signal 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 pidfd_send_signal 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"hookFunc": {/,/},/s/"pidfd_send_signal": '"$pidfd_send_signal_value"'/\"pidfd_send_signal\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/sync_dir/value_sync_dir.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | FILE_PATH="/data/adb/modules/mcc_sync_dir/main.sh"
4 |
5 | if [ -r "$FILE_PATH" ]; then
6 |
7 | content=$(awk '/^#同步路径/{p=1; next} p && NF {sub(/^sync_dir /, ""); print}' "$FILE_PATH")
8 |
9 | if [ -n "$content" ]; then
10 | echo "$content"
11 | else
12 | echo "'QQ' '/data/media/0/Android/data/com.tencent.mobileqq/Tencent/QQfile_recv'\n'微信' '/data/media/0/Android/data/com.tencent.mm/MicroMsg/Download'"
13 | fi
14 | else
15 | echo "'QQ' '/data/media/0/Android/data/com.tencent.mobileqq/Tencent/QQfile_recv'\n'微信' '/data/media/0/Android/data/com.tencent.mm/MicroMsg/Download'"
16 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/set_hookFunc___android_log_print.sh:
--------------------------------------------------------------------------------
1 | json_file="/data/adb/modules/Hc_memory/config/memory.json"
2 |
3 | __android_log_print_value=$(awk -F'[:,]' '/"hookFunc":/,/}/{if(/"__android_log_print":/){gsub(/[" ]/, "", $2); print $2}}' "$json_file")
4 |
5 | if [[ "${state}" == 1 ]]; then
6 | new_value="true"
7 | echo "已将 __android_log_print 修改为 true"
8 | elif [[ "${state}" == 0 ]]; then
9 | new_value="false"
10 | echo "已将 __android_log_print 修改为 false"
11 | else
12 | echo "未知的状态"
13 | exit 1
14 | fi
15 |
16 | sed -i '/"hookFunc": {/,/},/s/"__android_log_print": '"$__android_log_print_value"'/\"__android_log_print\": '"$new_value"'/' "$json_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/set_fast.sh:
--------------------------------------------------------------------------------
1 | file="/data/media/0/Android/fas-rs/games.toml"
2 |
3 | awk '/^\[fast\]/{print; f=1; next} f{exit} 1' "$file" > "$file.tmp" && mv "$file.tmp" "$file"
4 |
5 | if [ "$fas_boost" -eq 1 ]; then
6 | fas_boost_var="true"
7 | else
8 | fas_boost_var="false"
9 | fi
10 |
11 | if [ "$use_performance_governor" -eq 1 ]; then
12 | use_performance_governor_var="true"
13 | else
14 | use_performance_governor_var="false"
15 | fi
16 |
17 | insert_content="fas_boost = $fas_boost_var\nuse_performance_governor = $use_performance_governor_var"
18 |
19 | awk -v content="$insert_content" '/\[fast\]/{print; print content; next} 1' "$file" > "$file.tmp" && mv "$file.tmp" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/adb_remote_summary.sh:
--------------------------------------------------------------------------------
1 | stared=`ps | grep adbd`
2 | stared2=`ps -ef | grep adbd`
3 | port=`getprop service.adb.tcp.port`
4 |
5 | if [[ ! -n "$port" ]]
6 | then
7 | echo ""
8 | return
9 | fi
10 |
11 |
12 | ip=`ifconfig wlan0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'` 2>/dev/null
13 | if [[ ! -n "$ip" ]]
14 | then
15 | ip=`ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'` 2>/dev/null
16 | fi
17 |
18 | if [[ -n "$stared" ]] || [[ -n "$stared2" ]]; then
19 | if [[ -n "$ip" ]]
20 | then
21 | echo "$ip:$port"
22 | else
23 | echo "手机IP:$port"
24 | fi
25 | else
26 | echo ""
27 | fi
28 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_thermal_scene_time.sh:
--------------------------------------------------------------------------------
1 | awk -F'[ =]+' '/^thermal_scene_time=/ {
2 | if ($2 == 0 && $3 == 0) {
3 | printf("关闭\n");
4 | } else if ($4 == 0) {
5 | printf("时间段:%s点~%s点 档位:零档\n", $2, $3);
6 | } else if ($4 == 1) {
7 | printf("时间段:%s点~%s点 档位:一档\n", $2, $3);
8 | } else if ($4 == 2) {
9 | printf("时间段:%s点~%s点 档位:二档\n", $2, $3);
10 | } else if ($4 == 3) {
11 | printf("时间段:%s点~%s点 档位:三档\n", $2, $3);
12 | } else if ($4 == 4) {
13 | printf("时间段:%s点~%s点 档位:四档\n", $2, $3);
14 | } else if ($4 == 5) {
15 | printf("时间段:%s点~%s点 档位:五档\n", $2, $3);
16 | }
17 | }' /data/adb/modules/MiuiVariableThermal/config.conf
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/set_ram.sh:
--------------------------------------------------------------------------------
1 | MODDIR=/data/adb/modules/ram
2 | script_name="/data/adb/modules/ram/ram.sh"
3 |
4 | if [[ ${state} == 1 ]]; then
5 | lastID=$(pgrep -f "$script_name")
6 | if [ "$lastID" != "" ]; then
7 | kill -KILL $lastID
8 | fi
9 | nohup $MODDIR/ram.sh > /dev/null 2>&1 &
10 | elif [[ ${state} == 0 ]]; then
11 | lastID=$(pgrep -f "$script_name")
12 | if [ "$lastID" != "" ]; then
13 | echo "进程 $lastID 已经结束"
14 | kill -KILL $lastID
15 | fi
16 |
17 | echo " "
18 | lastIDD=$(pgrep -f "$script_name")
19 | if [ "$lastIDD" != "" ]; then
20 | echo -e "\e[32m正在运行……\n\e[0m"
21 | else
22 | echo -e "\e[31m没有运行……\n\e[0m"
23 | fi
24 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/raccourcis.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 长按添加桌面快捷方式MIUI动态温控的总开关
5 | run get_global_main_switch.sh
6 | run set_global_main_switch.sh
7 |
8 |
9 | 手动开关旁路供电(开启会永久启用旁路供电,其他旁路规则将会失效,关闭不会造成影响)
10 | run get_switch_bypass_power_supply.sh
11 | run set_switch_bypass_power_supply.sh
12 |
13 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/mtk_feas.sh:
--------------------------------------------------------------------------------
1 | perfmgr=/sys/module/mtk_fpsgo/parameters/perfmgr_enable
2 | pandora_feas=/sys/module/perfmgr_mtk/parameters/perfmgr_enable
3 | if [[ -f $pandora_feas ]]; then
4 | perfmgr=$pandora_feas
5 | fi
6 | fpsgo=/sys/kernel/fpsgo/common/fpsgo_enable
7 | ged_kpi=/sys/module/sspm_v3/holders/ged/parameters/is_GED_KPI_enabled
8 |
9 | lock_value () {
10 | chmod 644 $2
11 | echo $1 > $2
12 | chmod 444 $2
13 | }
14 |
15 | set_fpsgo(){
16 | lock_value $state $fpsgo
17 | }
18 |
19 | set_perfmgr() {
20 | if [[ $(cat $fpsgo) != "1" ]]; then
21 | lock_value 1 $fpsgo
22 | fi
23 |
24 | if [[ $(cat $ged_kpi) != "1" ]]; then
25 | lock_value 1 $ged_kpi
26 | fi
27 |
28 | lock_value $state $perfmgr
29 | }
--------------------------------------------------------------------------------
/assets/kr-script.conf:
--------------------------------------------------------------------------------
1 | # 这是关于脚本引擎的定义
2 | # “#”开头的行是注释
3 | # 参数配置格式如:PARAM_NAM="value",务必遵守此格式!
4 | # 不要删除“未注明可空”的参数,以免引起不必要的错误
5 | #
6 | # 这个配置文件的解析引擎比较简陋,务必不要在参数配置行后面再加注释
7 | # 错误示例
8 | # param_name="value" # 参数说明
9 | # 正确示例
10 | # # 参数说明
11 | # param_name="value"
12 |
13 |
14 | # 核心执行器 core_executor
15 | # 工具包目录(放置busybox等工具)
16 | toolkit_dir="file:///android_asset/toolkit"
17 |
18 | # 这是kr-script执行脚本的入口
19 | executor_core="file:///android_asset/executor.sh"
20 |
21 | # 页面列表配置文件(可配置为空)
22 | page_list_config="file:///android_asset/kr-script/more.xml"
23 |
24 | # 收藏的功能配置(可配置为空)
25 | favorite_config="file:///android_asset/kr-script/module_control/config.xml"
26 |
27 | # 是否显示首页性能监视器(如果不配置,默认显示)
28 | allow_home_page="0"
29 |
--------------------------------------------------------------------------------
/assets/kr-script/about/update_log.sh:
--------------------------------------------------------------------------------
1 | repository="ZhangJinhui-baoji/MCC"
2 |
3 | latest_release=$(curl --connect-timeout 2 --max-time 1 -s "https://api.github.com/repos/$repository/releases/latest" | awk -F'"' '/"tag_name": ".+"/{print $4}')
4 |
5 | if [ -z "$latest_release" ]; then
6 | echo "无法获取发行版信息"
7 | else
8 | current_version="$PACKAGE_VERSION_NAME"
9 |
10 | if [ "$latest_release" != "$current_version" ]; then
11 | echo "*发现新版本: $latest_release\n"
12 |
13 | changelog=$(curl --connect-timeout 2 --max-time 1 -s "https://api.github.com/repos/$repository/releases/latest" | awk -v RS='"body":' -F '"' 'NR>1 {print $2}')
14 |
15 | changelog=$(echo -e "$changelog")
16 |
17 | echo -e "更新日志:\n$changelog"
18 | else
19 | echo "当前已是最新版本: $current_version"
20 | fi
21 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/child_processes_list.sh:
--------------------------------------------------------------------------------
1 | list_file="/sdcard/Android/HChai/HC_memory/名单列表.conf"
2 | tempfile="/sdcard/Android/HChai/HC_memory/tempfile"
3 | tempfile_temp="$tempfile"_temp
4 | list_file_temp="$list_file"_temp.conf
5 | awk '/{/{f++} f==2; /}/{if (f==2) print}' "$list_file" | sed 's/{//;s/}//' > "$tempfile"
6 | awk 'NF' "$tempfile" > "$tempfile_temp" && mv "$tempfile_temp" "$tempfile"
7 | grep -Fvf "$tempfile" "$list_file" > "$list_file_temp" && mv "$list_file_temp" "$list_file"
8 | rm "$tempfile"
9 | child_processes_fixed=$(echo -n "$child_processes" | tr '\n' '\t')
10 | awk -v child_processes="$child_processes_fixed" 'BEGIN{gsub(/\t/, "\n", child_processes)} {print} /{/{count++} count==2 && !inserted{print child_processes; inserted=1; next} ' "$list_file" > tmpfile && mv tmpfile "$list_file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/data/media/0/Android/perapp-rs/config.toml" ]; then
15 | cat "/data/media/0/Android/perapp-rs/config.toml"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
22 | 查看log
23 |
24 | if [[ -f "/data/media/0/Android/perapp-rs/error.log" ]]; then
25 | cat "/data/media/0/Android/perapp-rs/error.log"
26 | else
27 | echo "未发现log"
28 | fi
29 |
30 |
31 |
--------------------------------------------------------------------------------
/assets/kr-script/about/annunciate.sh:
--------------------------------------------------------------------------------
1 | # GitHub
2 | < "$temp_file" && mv "$temp_file" /data/media/0/Android/fas-rs/games.toml
3 |
4 | file="/data/media/0/Android/fas-rs/games.toml"
5 |
6 | if [ "$fas_boost" -eq 1 ]; then
7 | fas_boost_var="true"
8 | else
9 | fas_boost_var="false"
10 | fi
11 |
12 | if [ "$use_performance_governor" -eq 1 ]; then
13 | use_performance_governor_var="true"
14 | else
15 | use_performance_governor_var="false"
16 | fi
17 |
18 | insert_content="fas_boost = $fas_boost_var\nuse_performance_governor = $use_performance_governor_var"
19 |
20 | awk -v content="$insert_content" '/\[balance\]/{print; print content; next} 1' "$file" > "$file.tmp" && mv "$file.tmp" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/set_powersave.sh:
--------------------------------------------------------------------------------
1 | temp_file="/data/media/0/Android/fas-rs/temp_file.txt"
2 | sed '/\[powersave\]/,/\[balance\]/ {/^\[powersave\]/b;/^\[balance\]/b;d}' /data/media/0/Android/fas-rs/games.toml | awk '/\[powersave\]/{print; print ""; next} 1' > "$temp_file" && mv "$temp_file" /data/media/0/Android/fas-rs/games.toml
3 |
4 | file="/data/media/0/Android/fas-rs/games.toml"
5 |
6 | if [ "$fas_boost" -eq 1 ]; then
7 | fas_boost_var="true"
8 | else
9 | fas_boost_var="false"
10 | fi
11 |
12 | if [ "$use_performance_governor" -eq 1 ]; then
13 | use_performance_governor_var="true"
14 | else
15 | use_performance_governor_var="false"
16 | fi
17 |
18 | insert_content="fas_boost = $fas_boost_var\nuse_performance_governor = $use_performance_governor_var"
19 |
20 | awk -v content="$insert_content" '/\[powersave\]/{print; print content; next} 1' "$file" > "$file.tmp" && mv "$file.tmp" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/set_performance.sh:
--------------------------------------------------------------------------------
1 | temp_file="/data/media/0/Android/fas-rs/temp_file.txt"
2 | sed '/\[performance\]/,/\[fast\]/ {/^\[performance\]/b;/^\[fast\]/b;d}' /data/media/0/Android/fas-rs/games.toml | awk '/\[performance\]/{print; print ""; next} 1' > "$temp_file" && mv "$temp_file" /data/media/0/Android/fas-rs/games.toml
3 |
4 | file="/data/media/0/Android/fas-rs/games.toml"
5 |
6 | if [ "$fas_boost" -eq 1 ]; then
7 | fas_boost_var="true"
8 | else
9 | fas_boost_var="false"
10 | fi
11 |
12 | if [ "$use_performance_governor" -eq 1 ]; then
13 | use_performance_governor_var="true"
14 | else
15 | use_performance_governor_var="false"
16 | fi
17 |
18 | insert_content="fas_boost = $fas_boost_var\nuse_performance_governor = $use_performance_governor_var"
19 |
20 | awk -v content="$insert_content" '/\[performance\]/{print; print content; next} 1' "$file" > "$file.tmp" && mv "$file.tmp" "$file"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/child_processes.sh:
--------------------------------------------------------------------------------
1 | list_file="/sdcard/Android/HChai/HC_memory/名单列表.conf"
2 |
3 | if [ -z "$app" ]; then
4 | echo "请选择正在运行的应用后再点击确定"
5 | exit
6 | fi
7 |
8 | child_processes=$(ps -e | grep "$app" | awk '{print $NF}')
9 |
10 | if [ -n "$child_processes" ]; then
11 | while IFS= read -r child_processes_list; do
12 | existing_line=$(grep "^KILL $child_processes_list$" "$list_file")
13 |
14 | if [ -n "$existing_line" ]; then
15 | echo "已存在:$existing_line"
16 | else
17 | echo "KILL $child_processes_list 已添加"
18 | awk '{print} /{/{count++} count==2 && !inserted{print "KILL '"$child_processes_list"'"; inserted=1} ' "$list_file" > tmpfile && mv tmpfile "$list_file"
19 | fi
20 | done <<< "$child_processes"
21 |
22 | echo "该应用所有正在运行的进程已添加至名单列表,请使用编辑功能进行修改,如不修改,则会kill目前所有正在运行的进程,新添加的进程一般都在名单最顶端"
23 | else
24 | echo "此应用目前尚未发现正在运行的进程"
25 | fi
--------------------------------------------------------------------------------
/assets/kr-script/backup_tool/mirror_partition_brush_in.sh:
--------------------------------------------------------------------------------
1 | reboot_system() {
2 | if [[ $reboot_system -eq 1 ]]; then
3 | echo "即将在5秒后自动重启,开始倒计时……"
4 | for i in $(seq 5 -1 1); do
5 | echo $i
6 | sleep 1
7 | done
8 | echo "即将重启"
9 | reboot
10 | fi
11 | }
12 |
13 | reboot_recovery() {
14 | if [[ $reboot_recovery -eq 1 ]]; then
15 | echo "即将在5秒后自动重启,开始倒计时……"
16 | for i in $(seq 5 -1 1); do
17 | echo $i
18 | sleep 1
19 | done
20 | echo "即将重启"
21 | reboot recovery
22 | fi
23 | }
24 |
25 | [[ -z $img ]] && abort "!选择分区哈"
26 | IFS=$'\n'
27 | e=${img##*/}
28 | echo "- 您当前选择了$e分区"
29 | echo "- 刷入文件路径:$brush_in"
30 | echo "- 检测刷入镜像文件是否存在"
31 | [[ ! -L "$img" ]] && abort "!$e分区不存在无法刷入"
32 | if [[ -f "$brush_in" ]]; then
33 | echo "- 开始刷写$e分区"
34 | dd if="$brush_in" of="$img" && reboot_system && reboot_recovery
35 | else
36 | abort "!$brush_in刷入文件不存在无法刷写到$e分区"
37 | fi
38 | echo "- 完成"
39 | sleep 2
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/adb_remote_set.sh:
--------------------------------------------------------------------------------
1 | port="$port"
2 |
3 | if [[ ! "$switch" = "1" ]]
4 | then
5 | setprop service.adb.tcp.port -1
6 | stop adbd
7 | killall -9 adbd 2>/dev/null
8 | start adbd
9 | echo '远程调试服务已停止'
10 | setprop service.adb.tcp.port ""
11 | return 0
12 | fi
13 |
14 | setprop service.adb.tcp.port $port;
15 | stop adbd;
16 | killall -9 adbd 2>/dev/null
17 | sleep 1;
18 | start adbd;
19 |
20 | ip=`ifconfig wlan0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'` 2>/dev/null
21 | if [[ ! -n "$ip" ]]
22 | then
23 | ip=`ifconfig eth0 | grep "inet addr" | awk '{ print $2}' | awk -F: '{print $2}'` 2>/dev/null
24 | fi
25 |
26 | echo "在连接了和手机相同网络(局域网)的电脑上"
27 | echo '通过下面的命令'
28 | echo ''
29 |
30 | if [[ -n "$ip" ]]
31 | then
32 | echo "adb connect $ip:$port"
33 | else
34 | echo "adb connect 手机IP:$port"
35 | fi
36 |
37 | echo '来连接手机'
38 |
39 | echo '如果设备处于同一局域网且IP无误,依然无法连接'
40 | echo '可尝试保持网络调试开启状态下断开电脑、手机的WiFi重连再试'
41 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/sdcard/Android/yc/dfps/dfps.txt" ]; then
15 | cat "/sdcard/Android/yc/dfps/dfps.txt"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
22 | 查看帮助文档
23 |
24 | if [ -f "/sdcard/Android/yc/dfps/dfps_help_cn.md" ]; then
25 | cat "/sdcard/Android/yc/dfps/dfps_help_cn.md"
26 | else
27 | echo "没有文件"
28 | fi
29 |
30 |
31 |
32 | 查看log
33 |
34 | if [[ -f "/sdcard/Android/yc/dfps/dfps_log.txt" ]]; then
35 | cat "/sdcard/Android/yc/dfps/dfps_log.txt"
36 | else
37 | echo "未发现log"
38 | fi
39 |
40 |
41 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/data/temp_file2.txt"
3 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/feas.conf > "$temp_file2"
4 | mv "$temp_file2" /data/feas.conf
5 | exit 0
6 | fi
7 | temp_file="/data/temp_file.txt"
8 | echo "$apps" | while IFS= read -r app; do
9 | grep "$app " "/data/feas.conf" >> "$temp_file"
10 | done
11 | temp_file2="/data/temp_file2.txt"
12 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/feas.conf > "$temp_file2"
13 | mv "$temp_file2" /data/feas.conf
14 | temp_file3="/data/temp_file3.txt"
15 | echo "$apps" | while IFS= read -r app; do
16 | echo "$app 0" >> "$temp_file3"
17 | done
18 | temp_file3_tmp="/data/temp_file3.tmp"
19 | while IFS= read -r line; do
20 | pattern=$(echo "$line" | awk '{print $1}')
21 | sed -E "/$pattern / d" "$temp_file3" > "$temp_file3_tmp"
22 | mv "$temp_file3_tmp" "$temp_file3"
23 | done < "$temp_file"
24 | cat "$temp_file3"
25 | cat "$temp_file3" "$temp_file" >> /data/feas.conf
26 | rm "$temp_file" "$temp_file3"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 | 运存防线检测
20 | run set.sh
21 |
22 |
23 | 查看白名单文件
24 |
25 | if [ -f "/data/adb/modules/ram/白名单.conf" ]; then
26 | cat "/data/adb/modules/ram/白名单.conf"
27 | else
28 | echo "没有文件"
29 | fi
30 |
31 |
32 |
33 | 查看阈值文件
34 |
35 | if [ -f "/data/adb/modules/ram/config.ini" ]; then
36 | cat "/data/adb/modules/ram/config.ini"
37 | else
38 | echo "没有文件"
39 | fi
40 |
41 |
42 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看 ZRAM 配置文件
13 |
14 | if [ -f "/sdcard/Android/panel_qti_mem.txt" ]; then
15 | cat "/sdcard/Android/panel_qti_mem.txt"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
22 | 查看 AdjShield 配置文件
23 |
24 | if [ -f "/sdcard/Android/panel_adjshield.txt" ]; then
25 | cat "/sdcard/Android/panel_adjshield.txt"
26 | else
27 | echo "没有配置文件"
28 | fi
29 |
30 |
31 |
32 | 查看 AdjShield log
33 |
34 | if [[ -f "/sdcard/Android/log_adjshield.txt" ]]; then
35 | cat "/sdcard/Android/log_adjshield.txt"
36 | else
37 | echo "未发现log"
38 | fi
39 |
40 |
41 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/data/media/0/Android/fas-rs/games.toml" ]; then
15 | cat "/data/media/0/Android/fas-rs/games.toml"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
22 | 查看帮助文档
23 |
24 | if [ -f "/data/media/0/Android/fas-rs/doc_cn.md" ]; then
25 | cat "/data/media/0/Android/fas-rs/doc_cn.md"
26 | else
27 | echo "没有文件"
28 | fi
29 |
30 |
31 |
32 | 查看log
33 |
34 | if [[ -f "/data/media/0/Android/fas-rs/fas_log.txt" ]]; then
35 | cat "/data/media/0/Android/fas-rs/fas_log.txt"
36 | else
37 | echo "未发现log"
38 | fi
39 |
40 |
41 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看配置文件
13 |
14 | if [ -f "/sdcard/Android/yc/uperf/perapp_powermode.txt" ]; then
15 | cat "/sdcard/Android/yc/uperf/perapp_powermode.txt"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
22 | 查看调度文件
23 |
24 | if [ -f "/sdcard/Android/yc/uperf/uperf.json" ]; then
25 | cat "/sdcard/Android/yc/uperf/uperf.json"
26 | else
27 | echo "没有文件"
28 | fi
29 |
30 |
31 |
32 | 查看log
33 |
34 | if [[ -f "/sdcard/Android/yc/uperf/uperf_log.txt" ]]; then
35 | cat "/sdcard/Android/yc/uperf/uperf_log.txt"
36 | else
37 | echo "未发现log"
38 | fi
39 |
40 |
41 |
--------------------------------------------------------------------------------
/assets/kr-script/magisk_tool/sync_dir/set_sync_dir.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | SOURCE_DIR="$START_DIR/kr-script/magisk_tool/sync_dir/main/"
4 | TARGET_DIR="/data/adb/modules/mcc_sync_dir/"
5 |
6 | if [ ! -d "$TARGET_DIR" ]; then
7 | mkdir -p "$TARGET_DIR"
8 | fi
9 |
10 | cp -r "$SOURCE_DIR"* "$TARGET_DIR"
11 |
12 | if [ $? -eq 0 ]; then
13 | echo "模块创建成功!"
14 | else
15 | echo "模块创建失败!"
16 | fi
17 |
18 | FILE_PATH="/data/adb/modules/mcc_sync_dir/main.sh"
19 |
20 | modified_sync_dir=$(echo "$sync_dir" | sed "s|^|sync_dir |")
21 |
22 | echo "$modified_sync_dir" > /data/adb/modules/mcc_sync_dir/temp_file.tmp
23 |
24 | if [ -z "$sync_dir" ]; then
25 | sed -i '/^#同步路径/{n;/^$/,$d}' "$FILE_PATH"
26 | else
27 |
28 | sed -i "/^#同步路径/r /data/adb/modules/mcc_sync_dir/temp_file.tmp" "$FILE_PATH"
29 | fi
30 |
31 | rm /data/adb/modules/mcc_sync_dir/temp_file.tmp
32 |
33 | echo "目录设置完成,需要重启设备才能生效!"
34 |
35 | if [[ $reboot -eq 1 ]]; then
36 | echo "即将在5秒后自动重启,开始倒计时……"
37 | for i in $(seq 5 -1 1); do
38 | echo $i
39 | sleep 1
40 | done
41 | echo "即将重启"
42 | reboot
43 | fi
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MCC
2 | 一个可视化控制Magisk模块配置文件的应用
3 |
4 | ## 介绍
5 | APP是由 [helloklf](https://github.com/helloklf)(酷安:[嘟嘟斯基](http://www.coolapk.com/u/734809))提供的PIO框架二次创作而来,利用shell代码配合PIO框架的可视化界面,旨在于能够轻松修改Magisk模块配置文件,免去繁琐的操作,可视化模块功能,让模块功能看起来更加一目了然。
6 |
7 | ## 所支持控制的Magisk模块
8 |
9 | - ASGuard
10 | - 此功能的代码也来自模块作者
11 | - 模块作者:huzesama
12 | - https://github.com/huzesama
13 |
14 | - Uperf、Dfps、Qti
15 | - 模块作者:yc9559
16 | - https://github.com/yc9559
17 |
18 | - FEAS、FAS-RS、PERAPP-RS
19 | - FEAS模块发布在酷安
20 | - 作者:shadow3aaa
21 | - https://github.com/shadow3aaa
22 |
23 | - QSC定量停充、MIUI动态温控
24 | - 作者酷安:top大佬
25 | - http://www.coolapk.com/u/1373784
26 |
27 | - 旁路充电
28 | - 作者酷安:SutoLiu
29 | - http://www.coolapk.com/u/1842370
30 |
31 | - A1内存管理
32 | - 作者:OneB1ank
33 | - https://github.com/OneB1ank
34 |
35 | - 运存防线
36 | - 作者酷安:l奋斗的小青年
37 | - http://www.coolapk.com/u/1721862
38 |
39 | - A-SOUL
40 | - 作者:nakixii
41 | - https://github.com/nakixii
42 |
43 | ## 其他相关
44 |
45 | [PIO](https://github.com/helloklf/kr-scripts)|[Scene](https://github.com/helloklf/vtools)|[Scene官网](http://vtools.omarea.com)
46 |
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/set_app.sh:
--------------------------------------------------------------------------------
1 | if [[ $app = Scene ]]; then
2 | echo "正在激活 Scene ADB模式"
3 | adb shell sh /sdcard/Android/data/com.omarea.vtools/up.sh
4 |
5 | elif [[ $app = HeiYu ]]; then
6 | echo "正在激活 黑阈"
7 | adb shell sh /data/data/me.piebridge.brevent/brevent.sh
8 |
9 | elif [[ $app = XiaoHeiWu ]]; then
10 | echo "正在激活 小黑屋"
11 | adb shell sh /sdcard/Android/data/web1n.stopapp/files/demon.sh
12 |
13 | elif [[ $app = Shizuku ]]; then
14 | echo "正在激活 Shizuku"
15 | adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh || adb shell sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh
16 |
17 | elif [[ $app = IceBox ]]; then
18 | echo "正在激活 冰箱"
19 | adb shell sh /sdcard/Android/data/com.catchingnow.icebox/files/start.sh
20 |
21 | elif [[ $app = IceBox ]]; then
22 | echo "正在使用快否激活器激活「快否」"
23 | adb shell sh /storage/emulated/0/Android/data/cn.endureblaze.activatebenchaf/files/Run.sh
24 |
25 | elif [[ $app = PermissionDog ]]; then
26 | echo "正在激活 权限狗 AppOps"
27 | adb shell sh /storage/emulated/0/Android/data/com.web1n.permissiondog/files/starter.sh
28 | fi
29 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/get_thermal_scene.sh:
--------------------------------------------------------------------------------
1 | thermal_scene=$(grep '^thermal_scene=' /data/adb/modules/MiuiVariableThermal/config.conf | awk -F'=' '{print $2}')
2 |
3 | brightness_level=$(echo $thermal_scene | awk '{print $1}')
4 | standby_level=$(echo $thermal_scene | awk '{print $2}')
5 |
6 | case $brightness_level in
7 | 0)
8 | echo "亮屏档位:零档-无限制"
9 | ;;
10 | 1)
11 | echo "亮屏档位:一档-无限制"
12 | ;;
13 | 2)
14 | echo "亮屏档位:二档-无限制"
15 | ;;
16 | 3)
17 | echo "亮屏档位:三档-无限制"
18 | ;;
19 | 4)
20 | echo "亮屏档位:四档-无限制"
21 | ;;
22 | 5)
23 | echo "亮屏档位:五档-无限制"
24 | ;;
25 | *)
26 | echo "未知亮屏档位"
27 | ;;
28 | esac
29 |
30 | case $standby_level in
31 | 0)
32 | echo "息屏档位:零档-无限制"
33 | ;;
34 | 1)
35 | echo "息屏档位:一档-无限制"
36 | ;;
37 | 2)
38 | echo "息屏档位:二档-无限制"
39 | ;;
40 | 3)
41 | echo "息屏档位:三档-无限制"
42 | ;;
43 | 4)
44 | echo "息屏档位:四档-无限制"
45 | ;;
46 | 5)
47 | echo "息屏档位:五档-无限制"
48 | ;;
49 | *)
50 | echo "未知息屏档位"
51 | ;;
52 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/set.sh:
--------------------------------------------------------------------------------
1 | MODDIR=${0%/*}
2 | A=`am stack list | awk '/taskId/&&!/unknown/{print$2}'|awk -F '/' '{print $1}'`
3 | echo "$A"
4 |
5 | # 获取总内存
6 | mem_total=$(cat /proc/meminfo | grep "MemTotal" | awk '{print $2}')
7 | mem_total_gb=$(echo "scale=2;$mem_total/1024/1024" | bc)
8 |
9 | # 获取空闲内存
10 | mem_free=$(cat /proc/meminfo | grep "MemFree" | awk '{print $2}')
11 | mem_free_gb=$(echo "scale=2;$mem_free/1024" | bc)
12 |
13 | # 获取程序可用内存
14 | mem_available=$(cat /proc/meminfo | grep "MemAvailable" | awk '{print $2}')
15 | mem_available_gb=$(echo "scale=2;$mem_available/1024/1024" | bc)
16 |
17 | # 计算可用内存百分比
18 | mem_percent=$(echo "scale=2;$mem_available/$mem_total*100" | bc)
19 |
20 | echo ""
21 | echo "总内存: ${mem_total_gb}Gb"
22 | echo "空闲内存: ${mem_free_gb}Mb"
23 | echo "可用内存百分比: ${mem_available_gb}Gb (${mem_percent}%)"
24 |
25 | #注意,上述代码中的单位为GB,使用bc计算时需要用scale=2设置精度为2位小数。另外,在Linux系统中,一般将可用内存计算为“可用物理内存+缓存+已用交换空间-最小空闲内存”,而不是只计算“可用物理内存”,这也是该脚本中使用“MemAvailable”而不是“MemFree”的原因。
26 | echo ""
27 | script_name="ram.sh"
28 | lastID=$(pgrep -f "$script_name")
29 | if [ "$lastID" != "" ]; then
30 | echo -e "运行状态:正在运行……"
31 |
32 | else
33 | echo -e "运行状态:没有运行……"
34 |
35 | fi
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/sdcard/Android/temp_file2.txt"
3 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /sdcard/Android/panel_adjshield.txt > "$temp_file2"
4 | mv "$temp_file2" /sdcard/Android/panel_adjshield.txt
5 | exit 0
6 | fi
7 | temp_file="/sdcard/Android/temp_file.txt"
8 | echo "$apps" | while IFS= read -r app; do
9 | grep "$app " "/sdcard/Android/panel_adjshield.txt" >> "$temp_file"
10 | done
11 | temp_file2="/sdcard/Android/temp_file2.txt"
12 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /sdcard/Android/panel_adjshield.txt > "$temp_file2"
13 | mv "$temp_file2" /sdcard/Android/panel_adjshield.txt
14 | temp_file3="/sdcard/Android/temp_file3.txt"
15 | echo "$apps" | while IFS= read -r app; do
16 | echo "$app" >> "$temp_file3"
17 | done
18 | temp_file3_tmp="/sdcard/Android/temp_file3.tmp"
19 | while IFS= read -r line; do
20 | pattern=$(echo "$line" | awk '{print $1}')
21 | sed -E "/$pattern / d" "$temp_file3" > "$temp_file3_tmp"
22 | mv "$temp_file3_tmp" "$temp_file3"
23 | done < "$temp_file"
24 | cat "$temp_file3"
25 | cat "$temp_file3" "$temp_file" >> /sdcard/Android/panel_adjshield.txt
26 | rm "$temp_file" "$temp_file3"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/data/adb/modules/ram/temp_file2.txt"
3 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/adb/modules/ram/白名单.conf > "$temp_file2"
4 | mv "$temp_file2" /data/adb/modules/ram/白名单.conf
5 | exit 0
6 | fi
7 | temp_file="/data/adb/modules/ram/temp_file.txt"
8 | echo "$apps" | while IFS= read -r app; do
9 | grep "$app " "/data/adb/modules/ram/白名单.conf" >> "$temp_file"
10 | done
11 | temp_file2="/data/adb/modules/ram/temp_file2.txt"
12 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/adb/modules/ram/白名单.conf > "$temp_file2"
13 | mv "$temp_file2" /data/adb/modules/ram/白名单.conf
14 | temp_file3="/data/adb/modules/ram/temp_file3.txt"
15 | echo "$apps" | while IFS= read -r app; do
16 | echo "$app" >> "$temp_file3"
17 | done
18 | temp_file3_tmp="/data/adb/modules/ram/temp_file3.tmp"
19 | while IFS= read -r line; do
20 | pattern=$(echo "$line" | awk '{print $1}')
21 | sed -E "/$pattern / d" "$temp_file3" > "$temp_file3_tmp"
22 | mv "$temp_file3_tmp" "$temp_file3"
23 | done < "$temp_file"
24 | cat "$temp_file3"
25 | cat "$temp_file3" "$temp_file" >> /data/adb/modules/ram/白名单.conf
26 | rm "$temp_file" "$temp_file3"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 | 运行testing
20 | 如发现模块BUG,执行此脚本文件,把结果截图给模块作者
21 | sh /data/adb/modules/QuantitativeStopCharging_switch/testing.sh
22 |
23 |
24 | 查看配置文件
25 |
26 | if [ -f "/data/adb/modules/QuantitativeStopCharging_switch/config.conf" ]; then
27 | cat "/data/adb/modules/QuantitativeStopCharging_switch/config.conf"
28 | else
29 | echo "没有配置文件"
30 | fi
31 |
32 |
33 |
34 | 查看log
35 |
36 | if [[ -f "/data/adb/modules/QuantitativeStopCharging_switch/log.log" ]]; then
37 | cat "/data/adb/modules/QuantitativeStopCharging_switch/log.log"
38 | else
39 | echo "未发现log"
40 | fi
41 |
42 |
43 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asguard/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 查看详细配置内容
13 |
14 | if [ -f "/sdcard/Android/ASGuard.conf" ]; then
15 | cat "/sdcard/Android/ASGuard.conf"
16 | else
17 | echo "没有配置文件"
18 | fi
19 |
20 |
21 |
22 | 查看log
23 |
24 | if [[ -f "/sdcard/Android/log_ASG.txt" ]]; then
25 | cat "/sdcard/Android/log_ASG.txt"
26 | else
27 | echo "未发现log"
28 | fi
29 |
30 |
31 |
32 | 查看过滤开关
33 |
34 | source "/sdcard/Android/ASGuard.conf"
35 | if [[ -n $(echo ${exclude}) ]]; then
36 | echo "${exclude}" | sed "/^$/d"
37 | else
38 | echo "未发现"
39 | fi
40 |
41 |
42 |
43 |
44 |
45 | 删除log
46 |
47 | if [[ -f "/sdcard/Android/log_ASG.txt" ]]; then
48 | rm "/sdcard/Android/log_ASG.txt"
49 | echo "已删除"
50 | else
51 | echo "无log文件"
52 | fi
53 |
54 |
55 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/data/adb/modules/Bypass_Charge/temp_file2.txt"
3 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/adb/modules/Bypass_Charge/GameList.txt > "$temp_file2"
4 | mv "$temp_file2" /data/adb/modules/Bypass_Charge/GameList.txt
5 | exit 0
6 | fi
7 | temp_file="/data/adb/modules/Bypass_Charge/temp_file.txt"
8 | echo "$apps" | while IFS= read -r app; do
9 | grep "$app " "/data/adb/modules/Bypass_Charge/GameList.txt" >> "$temp_file"
10 | done
11 | temp_file2="/data/adb/modules/Bypass_Charge/temp_file2.txt"
12 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /data/adb/modules/Bypass_Charge/GameList.txt > "$temp_file2"
13 | mv "$temp_file2" /data/adb/modules/Bypass_Charge/GameList.txt
14 | temp_file3="/data/adb/modules/Bypass_Charge/temp_file3.txt"
15 | echo "$apps" | while IFS= read -r app; do
16 | echo "$app" >> "$temp_file3"
17 | done
18 | temp_file3_tmp="/data/adb/modules/Bypass_Charge/temp_file3.tmp"
19 | while IFS= read -r line; do
20 | pattern=$(echo "$line" | awk '{print $1}')
21 | sed -E "/$pattern / d" "$temp_file3" > "$temp_file3_tmp"
22 | mv "$temp_file3_tmp" "$temp_file3"
23 | done < "$temp_file"
24 | cat "$temp_file3"
25 | cat "$temp_file3" "$temp_file" >> /data/adb/modules/Bypass_Charge/GameList.txt
26 | rm "$temp_file" "$temp_file3"
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/emmc/emmc_detail.sh:
--------------------------------------------------------------------------------
1 | if [[ -f /sys/block/mmcblk0/device/life_time ]]; then
2 | bDeviceLifeTimeEstA=$(cat /sys/block/mmcblk0/device/life_time | cut -f1 -d ' ')
3 | fi
4 | # 0x00 未找到有关设备使用寿命的信息。
5 | # 0x01 设备估计使用寿命的 0% 到 10%。
6 | # 0x02 设备估计使用寿命的 10% 到 20%。
7 | # 0x03 设备估计使用寿命的 20% 到 30%。
8 | # 0x04 设备估计使用寿命的 30% 到 40%。
9 | # 0x05 设备估计使用寿命的 40% 到 50%。
10 | # 0x06 设备估计使用寿命的 50% 到 60%。
11 | # 0x07 设备估计使用寿命的 60% 到 70%。
12 | # 0x08 设备估计使用寿命的 70% 到 80%。
13 | # 0x09 设备估计使用寿命的 80% 到 90%。
14 | # 0x0A 设备估计使用寿命的 90% 到 100%。
15 | # 0x0B 设备已超过其估计的使用寿命。
16 |
17 | case $bDeviceLifeTimeEstA in
18 | "0x00"|"0x00")
19 | echo '已使用寿命 未知'
20 | ;;
21 | "0x01"|"0x1")
22 | echo '已使用寿命 0% ~ 10%'
23 | ;;
24 | "0x02"|"0x2")
25 | echo '已使用寿命 10% ~ 20%'
26 | ;;
27 | "0x03"|"0x3")
28 | echo '已使用寿命 20% ~ 30%'
29 | ;;
30 | "0x04"|"0x4")
31 | echo '已使用寿命 30% ~ 40%'
32 | ;;
33 | "0x05"|"0x5")
34 | echo '已使用寿命 40% ~ 50%'
35 | ;;
36 | "0x06"|"0x6")
37 | echo '已使用寿命 50% ~ 60%'
38 | ;;
39 | "0x07"|"0x7")
40 | echo '已使用寿命 60% ~ 70%'
41 | ;;
42 | "0x08"|"0x8")
43 | echo '已使用寿命 70% ~ 80%'
44 | ;;
45 | "0x09"|"0x9")
46 | echo '已使用寿命 80% ~ 90%'
47 | ;;
48 | "0x0A"|"0xA")
49 | echo '已使用寿命 90% ~ 100%'
50 | ;;
51 | "0x0B"|"0xB")
52 | echo '已超过预估寿命'
53 | ;;
54 | *)
55 | echo '已使用寿命 未知'
56 | ;;
57 | esac
58 |
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/emmc/emmc_summary.sh:
--------------------------------------------------------------------------------
1 | if [[ -f /sys/block/mmcblk0/device/life_time ]]; then
2 | bDeviceLifeTimeEstA=$(cat /sys/block/mmcblk0/device/life_time | cut -f1 -d ' ')
3 | fi
4 |
5 | # 0x00 未找到有关设备使用寿命的信息。
6 | # 0x01 设备估计使用寿命的 0% 到 10%。
7 | # 0x02 设备估计使用寿命的 10% 到 20%。
8 | # 0x03 设备估计使用寿命的 20% 到 30%。
9 | # 0x04 设备估计使用寿命的 30% 到 40%。
10 | # 0x05 设备估计使用寿命的 40% 到 50%。
11 | # 0x06 设备估计使用寿命的 50% 到 60%。
12 | # 0x07 设备估计使用寿命的 60% 到 70%。
13 | # 0x08 设备估计使用寿命的 70% 到 80%。
14 | # 0x09 设备估计使用寿命的 80% 到 90%。
15 | # 0x0A 设备估计使用寿命的 90% 到 100%。
16 | # 0x0B 设备已超过其估计的使用寿命。
17 |
18 | case $bDeviceLifeTimeEstA in
19 | "0x00"|"0x00")
20 | echo '已使用寿命 未知'
21 | ;;
22 | "0x01"|"0x1")
23 | echo '已使用寿命 0% ~ 10%'
24 | ;;
25 | "0x02"|"0x2")
26 | echo '已使用寿命 10% ~ 20%'
27 | ;;
28 | "0x03"|"0x3")
29 | echo '已使用寿命 20% ~ 30%'
30 | ;;
31 | "0x04"|"0x4")
32 | echo '已使用寿命 30% ~ 40%'
33 | ;;
34 | "0x05"|"0x5")
35 | echo '已使用寿命 40% ~ 50%'
36 | ;;
37 | "0x06"|"0x6")
38 | echo '已使用寿命 50% ~ 60%'
39 | ;;
40 | "0x07"|"0x7")
41 | echo '已使用寿命 60% ~ 70%'
42 | ;;
43 | "0x08"|"0x8")
44 | echo '已使用寿命 70% ~ 80%'
45 | ;;
46 | "0x09"|"0x9")
47 | echo '已使用寿命 80% ~ 90%'
48 | ;;
49 | "0x0A"|"0xA")
50 | echo '已使用寿命 90% ~ 100%'
51 | ;;
52 | "0x0B"|"0xB")
53 | echo '已超过预估寿命'
54 | ;;
55 | *)
56 | echo '已使用寿命 未知'
57 | ;;
58 | esac
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asguard/WriteConfig.sh:
--------------------------------------------------------------------------------
1 | conf=/sdcard/Android/ASGuard.conf
2 | source $conf >/dev/null 2>&1
3 | [ "$1" == 'AS' -o "$1" == 'package_whitelist' -o "$1" == 'exclude' -o "$1" == 'exAS' ] && eval "$1=\"\n$2\n\n\"" || eval "$1=\"$2\""
4 | text() {
5 | cat < ${conf}
--------------------------------------------------------------------------------
/assets/kr-script/backup_tool/block_device_name.sh:
--------------------------------------------------------------------------------
1 | version=8
2 | jian="$START_DIR/kr-script/backup_tool/by_name"
3 | log="$START_DIR/kr-script/backup_tool/block_device_version"
4 |
5 | [[ -f $log ]] && user_version=$(cat $log) || user_version=0
6 |
7 | if [[ $user_version -lt $version || ! -f $jian ]]; then
8 | a=0
9 | b=($(ls /dev/block/))
10 | for i in "${b[@]}"; do
11 | [[ -d /dev/block/$i ]] && unset b[$a]
12 | a=$((a+1))
13 | done
14 |
15 | rm -rf $jian &>/dev/null
16 | echo $version > $log
17 | AWK=$(awk --version 2>/dev/null)
18 | BLOCKDEV=$(which blockdev)
19 |
20 | find /dev/block -type l | while read o; do
21 | [[ -d "$o" ]] && continue
22 | c=$(basename "$o")
23 | echo ${b[@]} | grep -q "$c" && continue
24 | echo $c
25 | done | sort -u | while read Row; do
26 | BLOCK=$(find /dev/block -name $Row | head -n 1)
27 | size=$(blockdev --getsize64 "$BLOCK")
28 | File_Type=""
29 | if [[ $size -ge 1073741824 ]]; then
30 | File_Type=$(awk "BEGIN{print $size/1073741824}")G
31 | elif [[ $size -ge 1048576 ]]; then
32 | File_Type=$(awk "BEGIN{print $size/1048576}")MB
33 | elif [[ $size -ge 1024 ]]; then
34 | File_Type=$(awk "BEGIN{print $size/1024}")kb
35 | else
36 | File_Type=${size}b
37 | fi
38 | echo "$BLOCK|$Row 「大小:$File_Type」" >> $jian
39 | done
40 | fi
41 | cat $jian
--------------------------------------------------------------------------------
/assets/kr-script/module_control/MiuiVariableThermal/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 | 运行testing
20 | 如发现模块BUG,执行此脚本文件,把结果截图给模块作者
21 | sh /data/adb/modules/MiuiVariableThermal/testing.sh
22 |
23 |
24 | 查看配置文件
25 |
26 | if [ -f "/data/adb/modules/MiuiVariableThermal/config.conf" ]; then
27 | cat "/data/adb/modules/MiuiVariableThermal/config.conf"
28 | else
29 | echo "没有配置文件"
30 | fi
31 |
32 |
33 |
34 | 查看电流日志
35 |
36 | if [[ -f "/data/adb/modules/MiuiVariableThermal/current.txt" ]]; then
37 | cat "/data/adb/modules/MiuiVariableThermal/current.txt"
38 | else
39 | echo "未发现log"
40 | fi
41 |
42 |
43 |
44 | 查看log
45 |
46 | if [[ -f "/data/adb/modules/MiuiVariableThermal/log.log" ]]; then
47 | cat "/data/adb/modules/MiuiVariableThermal/log.log"
48 | else
49 | echo "未发现log"
50 | fi
51 |
52 |
53 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/data/media/0/Android/fas-rs/temp_file2.txt"
3 | sed '/\[game_list\]/,/\[powersave\]/ {/^\[game_list\]/b;/^\[powersave\]/b;d}' /data/media/0/Android/fas-rs/games.toml | awk '/\[game_list\]/{print; print ""; next} 1' > "$temp_file2" && mv "$temp_file2" /data/media/0/Android/fas-rs/games.toml
4 | exit 0
5 | fi
6 | temp_file="/data/media/0/Android/fas-rs/temp_file.txt"
7 | echo "$apps" | while IFS= read -r app; do
8 | grep "\"$app\"" "/data/media/0/Android/fas-rs/games.toml" >> "$temp_file"
9 | done
10 | temp_file2="/data/media/0/Android/fas-rs/temp_file2.txt"
11 | sed '/\[game_list\]/,/\[powersave\]/ {/^\[game_list\]/b;/^\[powersave\]/b;d}' /data/media/0/Android/fas-rs/games.toml | awk '/\[game_list\]/{print; print ""; next} 1' > "$temp_file2" && mv "$temp_file2" /data/media/0/Android/fas-rs/games.toml
12 | temp_file3="/data/media/0/Android/fas-rs/temp_file3.txt"
13 | echo "$apps" | while IFS= read -r app; do
14 | echo "\"$app\" = 0" >> "$temp_file3"
15 | done
16 | temp_file3_tmp="/data/media/0/Android/fas-rs/temp_file3.tmp"
17 | while IFS= read -r line; do
18 | pattern=$(echo "$line" | awk '{print $1}')
19 | sed -E "/$pattern/ d" "$temp_file3" > "$temp_file3_tmp"
20 | mv "$temp_file3_tmp" "$temp_file3"
21 | done < "$temp_file"
22 | cat "$temp_file3"
23 | temp_file4="/data/media/0/Android/fas-rs/temp_file4.txt"
24 | cat "$temp_file3" "$temp_file" > "$temp_file4"
25 | sed -i '/\[game_list\]/r '"$temp_file4" "/data/media/0/Android/fas-rs/games.toml"
26 | rm "$temp_file" "$temp_file3" "$temp_file4"
--------------------------------------------------------------------------------
/assets/kr-script/module_control/ram/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | run get_ram.sh
7 | run set_ram.sh
8 |
9 |
10 | 运存防线阈值
11 | 可用内存剩余百分比开始清理后台
12 |
20 | run set_avail_mem_percent.sh
21 |
22 |
23 |
24 |
25 |
26 | 应用白名单
27 | 当内存低于阈值时,不会被运存防线杀掉的应用
28 |
29 | run apps.sh
30 |
31 |
32 |
33 |
34 |
37 |
38 |
--------------------------------------------------------------------------------
/assets/executor.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # 参数说明
4 | # $1 脚本路径
5 |
6 | # 将要执行的具体脚本,执行 executor.sh 时传入,如 ./executor.sh test.sh
7 | script_path="$1"
8 |
9 | # 全局变量 - 会由脚本引擎为其赋值
10 | # 框架并不需要这些变量,如果你不需要可以将其删除
11 | # 如有需要,你也可以增加一些自己的变量定义
12 | # 但这个文件每次运行脚本都会被执行,不建议写太复杂的过程
13 | export EXECUTOR_PATH="$({EXECUTOR_PATH})"
14 | export START_DIR="$({START_DIR})"
15 | export TEMP_DIR="$({TEMP_DIR})"
16 | export ANDROID_UID="$({ANDROID_UID})"
17 | export ANDROID_SDK="$({ANDROID_SDK})"
18 | export SDCARD_PATH="$({SDCARD_PATH})"
19 | export BUSYBOX="$({BUSYBOX})"
20 | #export MAGISK_PATH="$({MAGISK_PATH})"
21 | export PACKAGE_NAME="$({PACKAGE_NAME})"
22 | export PACKAGE_VERSION_NAME="$({PACKAGE_VERSION_NAME})"
23 | export PACKAGE_VERSION_CODE="$({PACKAGE_VERSION_CODE})"
24 | export APP_USER_ID="$({APP_USER_ID})"
25 |
26 | # ROOT_PERMISSION 取值为:true 或 false
27 | export ROOT_PERMISSION=$({ROOT_PERMISSION})
28 |
29 | # 修复非ROOT权限执行脚本时,无法写入默认的缓存目录 /data/local/tmp
30 | export TMPDIR="$TEMP_DIR"
31 |
32 | # toolkit工具目录
33 | export TOOLKIT="$({TOOLKIT})"
34 | # 添加toolkit添加为应用程序目录
35 | if [[ ! "$TOOLKIT" = "" ]]; then
36 | # export PATH="$PATH:$TOOLKIT"
37 | PATH="$PATH:$TOOLKIT"
38 | fi
39 |
40 | # 安装busybox完整功能
41 | if [[ -f "$TOOLKIT/install_busybox.sh" ]]; then
42 | sh "$TOOLKIT/install_busybox.sh"
43 | fi
44 |
45 | # 判断是否有指定执行目录,跳转到起始目录
46 | if [[ "$START_DIR" != "" ]] && [[ -d "$START_DIR" ]]
47 | then
48 | cd "$START_DIR"
49 | fi
50 |
51 | # 运行脚本
52 | if [[ -f "$script_path" ]]; then
53 | chmod 755 "$script_path"
54 | # sh "$script_path" # 2019.09.02 before
55 | source "$script_path" # 2019.09.02 after
56 | else
57 | echo "${script_path} 已丢失" 1>&2
58 | fi
59 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/qti/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ZRAM 大小
6 | 当 RAM 快不足时,会对部分数据进行压缩
7 |
15 | run set_zram_size.sh
16 |
17 |
18 |
19 | ZRAM 压缩算法
20 | 可设置的压缩算法取决于内核支持
21 |
22 |
24 |
25 | run set_algorithm.sh
26 |
27 |
28 |
29 |
30 |
31 | AdjShield 配置
32 | 防止给定进程被 Android LMK 杀死
33 |
34 | run apps.sh
35 |
36 |
37 |
38 |
39 |
42 |
43 |
--------------------------------------------------------------------------------
/assets/kr-script/backup_tool/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 提取分区文件
6 | 可用于备份和提取系统分区img文件
7 | run mirror_partition_extract.sh
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 刷入分区文件
17 | 可用于刷写和恢复系统分区img文件
18 | run mirror_partition_brush_in.sh
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 请谨慎操作
30 |
31 |
32 |
33 |
34 | 此功能会对系统分区进行操作,使用此功能前,请确保你知道自己在干什么,如果刷错分区,会有很大概率导致设备无法正常启动。
35 |
36 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/asopt/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 放置方案
6 | 建议自行测试以选择更好的方案
7 |
13 |
14 |
15 |
16 |
17 | sed -i "s/^fallback=.*/fallback=$fallback/" /sdcard/Android/naki/asopt/asopt.conf | sh ./kr-script/module_control/asopt/reboot.sh
18 |
19 |
20 |
21 |
22 |
23 | 实现
24 | 仅适用于内核不低于“高通5.10 联发科5.15”的平台
25 |
31 |
32 |
33 |
34 |
35 | sed -i "s/^pertask=.*/pertask=$pertask/" /sdcard/Android/naki/asopt/asopt.conf | sh ./kr-script/module_control/asopt/reboot.sh
36 |
37 |
38 |
39 |
40 |
43 |
44 |
--------------------------------------------------------------------------------
/assets/kr-script/about/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 | am start -a android.intent.action.VIEW -d "https://h5.cloud.189.cn/share.html#/t/fyaqUnzA7Nzy"
12 |
13 |
19 | am start -a android.intent.action.VIEW -d "https://github.com/ZhangJinhui-baoji/MCC"
20 |
21 |
22 |
23 |
24 |
29 | run coolapk_app.sh
30 |
31 |
36 | run coolapk_frame.sh
37 |
38 |
39 |
40 |
41 | 作者告知
42 | 清除数据
43 |
44 |
45 |
46 | 更新日志
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/wifi.sh:
--------------------------------------------------------------------------------
1 | lu="/data/misc/apexdata/com.android.wifi"
2 |
3 | cd "$lu" && {
4 | if [[ -f WifiConfigStore.xml ]]; then
5 | egrep '"SSID|"PreSharedKey' WifiConfigStore.xml | sed -r 's/"\;|<\/string>//g; s//\nWiFi名称:/g; s//密码:/g' | sed '1{/^$/d}'
6 | elif [[ -f wpa_supplicant.conf ]]; then
7 | ssid=( $(sed -n '/ssid="/=' wpa_supplicant.conf') )
8 | key=( $(sed -n '/key_mgmt=/=' wpa_supplicant.conf') )
9 | num=0
10 |
11 | for i in "${ssid[@]}"; do
12 | sed -n "$i,${key[$num]}p" wpa_supplicant.conf | egrep 'ssid="|psk="|key_mgmt=NONE' | sed -r 's/"$//g; s/.*ssid="/\nWiFi名称:/g; s/.*psk="/密码:/g; s/.*key_mgmt=NONE/密码:无/g' | sed '1{/^$/d}'
13 | num=$((num + 1))
14 | done
15 | else
16 | echo "未找到 WiFi 配置文件"
17 | fi
18 | } || {
19 | echo "切换到 $lu 目录失败"
20 | lu="/data/misc/wifi"
21 |
22 | cd "$lu" && {
23 | if [[ -f WifiConfigStore.xml ]]; then
24 | egrep '"SSID|"PreSharedKey' WifiConfigStore.xml | sed -r 's/"\;|<\/string>//g; s//\nWiFi名称:/g; s//密码:/g' | sed '1{/^$/d}'
25 | elif [[ -f wpa_supplicant.conf ]]; then
26 | ssid=( $(sed -n '/ssid="/=' wpa_supplicant.conf') )
27 | key=( $(sed -n '/key_mgmt=/=' wpa_supplicant.conf') )
28 | num=0
29 |
30 | for i in "${ssid[@]}"; do
31 | sed -n "$i,${key[$num]}p" wpa_supplicant.conf | egrep 'ssid="|psk="|key_mgmt=NONE' | sed -r 's/"$//g; s/.*ssid="/\nWiFi名称:/g; s/.*psk="/密码:/g; s/.*key_mgmt=NONE/密码:无/g' | sed '1{/^$/d}'
32 | num=$((num + 1))
33 | done
34 | else
35 | echo "未找到 WiFi 配置文件"
36 | fi
37 | } || {
38 | echo "切换到 $lu 目录失败"
39 | echo "未找到 WiFi 配置文件"
40 | }
41 | }
--------------------------------------------------------------------------------
/assets/kr-script/module_control/A1Memory/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | run coolapk.sh
8 |
9 |
10 |
11 |
12 | 重启A1内存管理
13 | 杀死A1内存管理进程使设置生效
14 | pkill HC_memory
15 |
16 |
17 |
18 |
19 |
20 | 日志
21 | 日志级别
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | run set_log_level.sh
30 |
31 |
32 |
33 |
34 |
35 | 最近Activity信息
36 | 查看最近使用的活动信息
37 | dumpsys activity lru
38 |
39 |
40 |
41 |
42 | 查看配置文件
43 |
44 | if [ -f "/data/adb/modules/Hc_memory/config/memory.json" ]; then
45 | cat "/data/adb/modules/Hc_memory/config/memory.json"
46 | else
47 | echo "没有配置文件"
48 | fi
49 |
50 |
51 |
52 | 查看名单文件
53 |
54 | if [ -f "/sdcard/Android/HChai/HC_memory/名单列表.conf" ]; then
55 | cat "/sdcard/Android/HChai/HC_memory/名单列表.conf"
56 | else
57 | echo "没有文件"
58 | fi
59 |
60 |
61 |
62 | 查看日志文件
63 |
64 | if [ -f "/sdcard/Android/HChai/HC_memory/Run.log" ]; then
65 | cat "/sdcard/Android/HChai/HC_memory/Run.log"
66 | else
67 | echo "没有日志文件"
68 | fi
69 |
70 |
71 |
--------------------------------------------------------------------------------
/assets/kr-script/adb_tool/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | USB调试开关
7 | settings get global adb_enabled
8 | settings put global adb_enabled $state
9 |
10 |
11 | 无线调试
12 | 开启设备的网络调试端口
13 |
14 |
15 |
16 | run adb_remote_set.sh
17 |
18 |
19 | 连接无线调试
20 | 请确保设备在同一局域网内并开启无线调试
21 |
22 |
23 |
24 |
25 |
26 | run set_adb.sh
27 |
28 |
29 | 断开所有ADB连接
30 | { adb disconnect; stop adbd; adb kill-server; rm -rf "$START_DIR/kr-script/adb_tool/ip_port"; } &>/dev/null
31 |
32 |
33 |
34 |
35 |
36 | 应用激活
37 | run set_app.sh
38 |
39 |
40 |
41 |
42 |
43 | 执行命令
44 |
45 |
46 |
47 | run shell.sh
48 |
49 |
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 命令执行器
6 |
7 |
8 |
9 | run shell.sh
10 |
11 |
12 |
13 |
14 | 查看电池容量
15 | run battery/battery_capacity.sh
16 | *数据仅供参考
17 |
18 |
19 |
20 | UFS存储寿命
21 |
22 | run ufs/ufs_detail.sh
23 | *数据仅供参考
24 |
25 |
26 | EMMC存储寿命
27 |
28 | run emmc/emmc_detail.sh
29 | *数据仅供参考
30 |
31 |
32 | 查看WiFi记录
33 | run wifi.sh
34 | 用来查看连接过的WiFi信息记录
35 |
36 |
37 |
38 |
39 | 清理电池优化白名单
40 | 清理Doze模式白名单应用
41 | run doze_clear.sh
42 |
43 |
44 |
45 |
46 | SELinux
47 | [[ `getenforce` = Enforcing ]] && echo 1
48 | setenforce $state
49 |
50 |
51 | 安卓Doze
52 | run get_doze.sh
53 | run set_doze.sh
54 |
55 |
56 | CPU最高频率
57 | [[ `getprop sys.sptm.gover` = true ]] && echo 1
58 | [[ $state = 1 ]] && setprop sys.sptm.gover true || setprop sys.sptm.gover false
59 |
60 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/dfps/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/sdcard/Android/yc/dfps/temp_file2.txt"
3 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /sdcard/Android/yc/dfps/dfps.txt > "$temp_file2"
4 | mv "$temp_file2" /sdcard/Android/yc/dfps/dfps.txt
5 | exit 0
6 | fi
7 | temp_file="/sdcard/Android/yc/dfps/temp_file.txt"
8 | echo "$apps" | while IFS= read -r app; do
9 | grep "$app " "/sdcard/Android/yc/dfps/dfps.txt" >> "$temp_file"
10 | done
11 | temp_file2="/sdcard/Android/yc/dfps/temp_file2.txt"
12 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /sdcard/Android/yc/dfps/dfps.txt > "$temp_file2"
13 | mv "$temp_file2" /sdcard/Android/yc/dfps/dfps.txt
14 | temp_file3="/sdcard/Android/yc/dfps/temp_file3.txt"
15 | echo "$apps" | while IFS= read -r app; do
16 | echo "$app 0 0" >> "$temp_file3"
17 | done
18 | temp_file3_tmp="/sdcard/Android/yc/dfps/temp_file3.tmp"
19 | while IFS= read -r line; do
20 | pattern=$(echo "$line" | awk '{print $1}')
21 | sed -E "/$pattern / d" "$temp_file3" > "$temp_file3_tmp"
22 | mv "$temp_file3_tmp" "$temp_file3"
23 | done < "$temp_file"
24 | cat "$temp_file3"
25 | target_file="/sdcard/Android/yc/dfps/dfps.txt"
26 | insert_file="/sdcard/Android/yc/dfps/insert_file"
27 | cat "$temp_file3" "$temp_file" > "$insert_file"
28 | touch "$target_file"
29 | temp_target_file="/sdcard/Android/yc/dfps/temp_target_file.txt"
30 | need_insert=true
31 | while IFS= read -r line; do
32 | if [[ $line == -* ]]; then
33 | need_insert=false
34 | printf '%s\n%s\n' "$(cat "$insert_file")" "$line"
35 | elif [ "$need_insert" = true ]; then
36 | printf '%s\n' "$line"
37 | else
38 | echo "$line"
39 | fi
40 | done < "$target_file" > "$temp_target_file"
41 | mv "$temp_target_file" "$target_file"
42 | sed -i '/^-/{x;p;x}' "$target_file"
43 | rm "$temp_file" "$temp_file3" "$insert_file"
44 | pattern='[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*'
45 | variable=$(grep -Eo "$pattern" /sdcard/Android/yc/dfps/dfps.txt | head -n1)
46 | awk -v pat="^$variable" 'BEGIN {
47 | emptyLines = 0;
48 | firstMatch = 1;
49 | }
50 | {
51 | if ($0 ~ pat) {
52 | firstMatch = 0;
53 | print;
54 | emptyLines = 0;
55 | next;
56 | }
57 | if (emptyLines == 0 && NF == 0) {
58 | emptyLines = 1;
59 | print;
60 | }
61 | else if (emptyLines == 1 && NF > 0) {
62 | print;
63 | emptyLines = 0;
64 | }
65 | else if (emptyLines == 0 && NF > 0) {
66 | print;
67 | }
68 | }' /sdcard/Android/yc/dfps/dfps.txt > new_file.txt
69 | mv new_file.txt /sdcard/Android/yc/dfps/dfps.txt
--------------------------------------------------------------------------------
/assets/kr-script/other_tool/ufs/ufs_summary.sh:
--------------------------------------------------------------------------------
1 | if [[ -f /sys/devices/platform/soc/1d84000.ufshc/health_descriptor/life_time_estimation_a ]]; then
2 | bDeviceLifeTimeEstA=$(cat /sys/devices/platform/soc/1d84000.ufshc/health_descriptor/life_time_estimation_a)
3 | elif [[ -f /sys/devices/virtual/mi_memory/mi_memory_device/ufshcd0/dump_health_desc ]];then
4 | bDeviceLifeTimeEstA=$(cat /sys/devices/virtual/mi_memory/mi_memory_device/ufshcd0/dump_health_desc | grep bDeviceLifeTimeEstA | cut -f2 -d '=' | cut -f2 -d ' ')
5 | else
6 | bDeviceLifeTimeEstA=$(cat /sys/kernel/debug/*.ufshc/dump_health_desc 2>/dev/null | grep bDeviceLifeTimeEstA | cut -f2 -d '=' | cut -f2 -d ' ')
7 | fi
8 |
9 | dump_files=$(find /sys -name "dump_*_desc" | grep ufshc)
10 | if [[ "$bDeviceLifeTimeEstA" == "" ]];then
11 | # dump_files=$(find /sys -name "dump_*_desc" | grep ufshc)
12 | for line in $dump_files
13 | do
14 | str=$(grep 'bDeviceLifeTimeEstA' $line | cut -f2 -d '=' | cut -f2 -d ' ')
15 | if [[ "$str" != "" ]]; then
16 | bDeviceLifeTimeEstA="$str"
17 | fi
18 | done
19 | fi
20 |
21 | if [[ "$bDeviceLifeTimeEstA" == "" ]];then
22 | files=$(find /sys -name "life_time_estimation_a" | grep ufshc)
23 | for line in $files
24 | do
25 | str=$(cat $line)
26 | if [[ "$str" != "" ]]; then
27 | bDeviceLifeTimeEstA="$str"
28 | fi
29 | done
30 | fi
31 |
32 | # 0x00 未找到有关设备使用寿命的信息。
33 | # 0x01 设备估计使用寿命的 0% 到 10%。
34 | # 0x02 设备估计使用寿命的 10% 到 20%。
35 | # 0x03 设备估计使用寿命的 20% 到 30%。
36 | # 0x04 设备估计使用寿命的 30% 到 40%。
37 | # 0x05 设备估计使用寿命的 40% 到 50%。
38 | # 0x06 设备估计使用寿命的 50% 到 60%。
39 | # 0x07 设备估计使用寿命的 60% 到 70%。
40 | # 0x08 设备估计使用寿命的 70% 到 80%。
41 | # 0x09 设备估计使用寿命的 80% 到 90%。
42 | # 0x0A 设备估计使用寿命的 90% 到 100%。
43 | # 0x0B 设备已超过其估计的使用寿命。
44 |
45 | case $bDeviceLifeTimeEstA in
46 | "0x00"|"0x0")
47 | echo '已使用寿命 未知'
48 | ;;
49 | "0x01"|"0x1")
50 | echo '已使用寿命 0% ~ 10%'
51 | ;;
52 | "0x02"|"0x2")
53 | echo '已使用寿命 10% ~ 20%'
54 | ;;
55 | "0x03"|"0x3")
56 | echo '已使用寿命 20% ~ 30%'
57 | ;;
58 | "0x04"|"0x4")
59 | echo '已使用寿命 30% ~ 40%'
60 | ;;
61 | "0x05"|"0x5")
62 | echo '已使用寿命 40% ~ 50%'
63 | ;;
64 | "0x06"|"0x6")
65 | echo '已使用寿命 50% ~ 60%'
66 | ;;
67 | "0x07"|"0x7")
68 | echo '已使用寿命 60% ~ 70%'
69 | ;;
70 | "0x08"|"0x8")
71 | echo '已使用寿命 70% ~ 80%'
72 | ;;
73 | "0x09"|"0x9")
74 | echo '已使用寿命 80% ~ 90%'
75 | ;;
76 | "0x0A"|"0xA")
77 | echo '已使用寿命 90% ~ 100%'
78 | ;;
79 | "0x0B"|"0xB")
80 | echo '已超过预估寿命'
81 | ;;
82 | *)
83 | echo '已使用寿命 未知'
84 | ;;
85 | esac
86 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/apps.sh:
--------------------------------------------------------------------------------
1 | if [ -z "$apps" ]; then
2 | temp_file2="/sdcard/Android/yc/uperf/temp_file2.txt"
3 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /sdcard/Android/yc/uperf/perapp_powermode.txt > "$temp_file2"
4 | mv "$temp_file2" /sdcard/Android/yc/uperf/perapp_powermode.txt
5 | exit 0
6 | fi
7 | temp_file="/sdcard/Android/yc/uperf/temp_file.txt"
8 | echo "$apps" | while IFS= read -r app; do
9 | grep "$app " "/sdcard/Android/yc/uperf/perapp_powermode.txt" >> "$temp_file"
10 | done
11 | temp_file2="/sdcard/Android/yc/uperf/temp_file2.txt"
12 | grep -E -v -e '[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*' /sdcard/Android/yc/uperf/perapp_powermode.txt > "$temp_file2"
13 | mv "$temp_file2" /sdcard/Android/yc/uperf/perapp_powermode.txt
14 | temp_file3="/sdcard/Android/yc/uperf/temp_file3.txt"
15 | echo "$apps" | while IFS= read -r app; do
16 | echo "$app *" >> "$temp_file3"
17 | done
18 | temp_file3_tmp="/sdcard/Android/yc/uperf/temp_file3.tmp"
19 | while IFS= read -r line; do
20 | pattern=$(echo "$line" | awk '{print $1}')
21 | sed -E "/$pattern / d" "$temp_file3" > "$temp_file3_tmp"
22 | mv "$temp_file3_tmp" "$temp_file3"
23 | done < "$temp_file"
24 | cat "$temp_file3"
25 | target_file="/sdcard/Android/yc/uperf/perapp_powermode.txt"
26 | insert_file="/sdcard/Android/yc/uperf/insert_file"
27 | cat "$temp_file3" "$temp_file" > "$insert_file"
28 | touch "$target_file"
29 | temp_target_file="/sdcard/Android/yc/uperf/temp_target_file.txt"
30 | need_insert=true
31 | while IFS= read -r line; do
32 | if [[ $line == -* ]]; then
33 | need_insert=false
34 | printf '%s\n%s\n' "$(cat "$insert_file")" "$line"
35 | elif [ "$need_insert" = true ]; then
36 | printf '%s\n' "$line"
37 | else
38 | echo "$line"
39 | fi
40 | done < "$target_file" > "$temp_target_file"
41 | mv "$temp_target_file" "$target_file"
42 | sed -i '/^-/{x;p;x}' "$target_file"
43 | rm "$temp_file" "$temp_file3" "$insert_file"
44 | pattern='[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*'
45 | variable=$(grep -Eo "$pattern" /sdcard/Android/yc/uperf/perapp_powermode.txt | head -n1)
46 | awk -v pat="^$variable" 'BEGIN {
47 | emptyLines = 0;
48 | firstMatch = 1;
49 | }
50 | {
51 | if ($0 ~ pat) {
52 | firstMatch = 0;
53 | print;
54 | emptyLines = 0;
55 | next;
56 | }
57 | if (emptyLines == 0 && NF == 0) {
58 | emptyLines = 1;
59 | print;
60 | }
61 | else if (emptyLines == 1 && NF > 0) {
62 | print;
63 | emptyLines = 0;
64 | }
65 | else if (emptyLines == 0 && NF > 0) {
66 | print;
67 | }
68 | }' /sdcard/Android/yc/uperf/perapp_powermode.txt > new_file.txt
69 | mv new_file.txt /sdcard/Android/yc/uperf/perapp_powermode.txt
--------------------------------------------------------------------------------
/assets/kr-script/module_control/perapp-rs/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 亮屏模式
6 | 亮屏时的默认模式
7 |
8 |
9 |
10 |
11 |
12 |
13 | run set_onscreen_mode.sh
14 |
15 |
16 |
17 | 息屏模式
18 | 关闭屏幕时切换到对应模式
19 |
20 |
21 |
22 |
23 |
24 |
25 | run set_offscreen_mode.sh
26 |
27 |
28 |
29 |
30 |
31 | 省电模式
32 | 配置应用列表
33 |
34 | run set_powersave.sh
35 |
36 |
37 |
38 |
39 |
40 | 均衡模式
41 | 配置应用列表
42 |
43 | run set_balance.sh
44 |
45 |
46 |
47 |
48 |
49 | 性能模式
50 | 配置应用列表
51 |
52 | run set_performance.sh
53 |
54 |
55 |
56 |
57 |
58 | 极速模式
59 | 配置应用列表
60 |
61 | run set_fast.sh
62 |
63 |
64 |
65 |
66 |
69 |
70 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 全局默认模式
6 | 设置全局默认规则
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | echo "${default_mode}" > /dev/fas_rs/mode
15 |
16 |
17 |
18 |
19 |
20 |
21 | 配置合并
22 |
23 | run get_keep_std.sh
24 | run set_keep_std.sh
25 |
26 |
27 | 内置用户空间调速器
28 |
29 | run get_userspace_governor.sh
30 | run set_userspace_governor.sh
31 |
32 |
33 |
34 |
35 | 应用列表配置
36 | 配置(应用)名单
37 |
38 | run apps.sh
39 |
40 |
41 |
42 | 设置应用配置
43 | 先使用上面的功能添加包名,然后再进行设置
44 |
45 |
47 |
52 |
53 |
54 | run set_rules.sh
55 |
56 |
57 |
58 |
59 |
62 |
63 |
64 |
65 |
66 |
69 |
70 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/Bypass_Charge/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Y为开启旁路供电,N为关闭旁路供电
6 |
7 | run get_bypass_charge.sh
8 | run set_bypass_charge.sh
9 |
10 |
11 | 启动旁路充电电量
12 | 数值为50则表示剩余电量大于50%再启用旁路充电,小于50%则不启用旁路充电
13 |
21 | run set_start_bypass_charge_battery_capacity.sh
22 |
23 |
24 |
25 | 通电时拉满处理器性能释放并关闭LPM,极致性能以提升游戏体验。
26 |
27 | run get_powered_on_performance_enhancements.sh
28 | run set_powered_on_performance_enhancements.sh
29 |
30 |
31 | 此项为N则关闭屏幕后会继续启用旁路充电
32 |
33 | run get_screen_on_bypass_charge.sh
34 | run set_screen_on_bypass_charge.sh
35 |
36 |
37 | 充电电流
38 | 旁路充电时给电池充入的电流
39 |
40 | run set_bypass_charge_current.sh
41 |
42 |
43 |
44 |
45 |
46 | 游戏旁路
47 | 检测到打开游戏则开启模拟旁路充电,以降低游戏时电池发热问题,关闭应用则恢复充电
48 |
49 | run apps.sh
50 |
51 |
52 |
53 |
54 |
57 |
58 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/fas-rs/mode_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 省电模式
5 |
6 |
13 |
20 | run set_powersave.sh
21 |
22 |
23 |
24 |
25 |
26 | 均衡模式
27 |
28 |
35 |
42 | run set_balance.sh
43 |
44 |
45 |
46 |
47 |
48 | 性能模式
49 |
50 |
57 |
64 | run set_performance.sh
65 |
66 |
67 |
68 |
69 |
70 | 极速模式
71 |
72 |
79 |
86 | run set_fast.sh
87 |
88 |
89 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/feas/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 注意:
可能会永久生效,切勿在非游戏场景下开启。可以用来检测开启状态和是否支持FEAS!
7 |
8 |
9 |
10 | cat /sys/kernel/fpsgo/common/fpsgo_enable
11 | source $START_DIR/kr-script/module_control/feas/mtk_feas.sh; set_fpsgo
12 |
13 |
14 |
15 |
16 | perfmgr=/sys/module/mtk_fpsgo/parameters/perfmgr_enable
17 | pandora_feas=/sys/module/perfmgr_mtk/parameters/perfmgr_enable
18 | if [[ -f $pandora_feas ]]; then
19 | perfmgr=$pandora_feas
20 | fi
21 | cat $perfmgr
22 |
23 | source $START_DIR/kr-script/module_control/feas/mtk_feas.sh; set_perfmgr
24 |
25 |
26 |
27 | cat /sys/module/perfmgr/parameters/perfmgr_enable
28 | run qualcomm_feas.sh
29 |
30 |
31 |
32 |
33 |
34 | run get_on-off.sh
35 | run set_on-off.sh
36 |
37 |
38 |
39 |
40 | 开启feas的应用
41 | 配置开启feas的(应用)名单
42 |
43 | run apps.sh
44 |
45 |
46 |
47 | 设置应用帧率
48 | 先使用上面的功能添加包名,然后再进行设置
49 |
50 |
52 |
59 |
60 |
61 | run set_rules.sh
62 |
63 |
64 |
65 |
66 |
69 |
70 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/uperf/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 全局默认模式
6 | 设置全局默认规则
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | echo "${default_mode}" > /sdcard/Android/yc/uperf/cur_powermode.txt
16 |
17 |
18 |
19 |
20 |
21 |
22 | 动态调度应用
23 | 配置动态调度(应用)名单
24 |
25 | run apps.sh
26 |
27 |
28 |
29 | 设置应用调度
30 | 先使用上面的功能添加包名,然后再进行设置
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | run set_mode.sh
42 |
43 |
44 |
45 |
46 |
47 | 息屏规则
48 |
49 |
50 |
51 |
52 |
53 |
54 | run off_screen_rule.sh
55 |
56 |
57 |
58 | 默认规则
59 |
60 |
61 |
62 |
63 |
64 |
65 | run default_rule.sh
66 |
67 |
68 |
69 |
70 |
73 |
74 |
--------------------------------------------------------------------------------
/assets/kr-script/module_control/QuantitativeStopCharging_switch/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | run get_switch_quantitative_stop_charging.sh
6 | run set_switch_quantitative_stop_charging.sh
7 |
8 |
9 |
10 |
11 | 停止充电电量
12 |
13 |
21 | run set_stop_charging_the_battery_level.sh
22 |
23 |
24 |
25 | 恢复充电电量
26 |
27 |
35 | run set_restore_charging_power.sh
36 |
37 |
38 |
39 |
40 |
41 | 延时功能
42 |
50 | run set_delay_function.sh
51 |
52 |
53 |
54 |
55 |
56 | run get_full_and_then_stop.sh
57 | run set_full_and_then_stop.sh
58 |
59 |
60 | run get_automatic_insertion_and_removal.sh
61 | run set_automatic_insertion_and_removal.sh
62 |
63 |
64 |
65 |
66 | run get_temperature_mode.sh
67 | run set_temperature_mode.sh
68 |
69 |
70 | 停止充电温度
71 |
79 | run set_stop_charging_temperature.sh
80 |
81 |
82 |
83 | 恢复充电温度
84 |
92 | run set_restore_charging_temperature.sh
93 |
94 |
95 |
96 |
97 |
100 |
101 |
--------------------------------------------------------------------------------