[ "$(id -u)" -ne 2000 ] && echo "[ Eror Kontol ]" && exit 1
#Moddir
#Credits : HenVx0 && @modulegaming6969fps
#11294

#Tweaks
set_performance() {
setprop angle.supported 1 
setprop angle_gl_driver_all_angle 1 
setprop angle_gl_driver_selection_values angle 
setprop angle_debug_package org.chromium.angle 
setprop angle_debug_package com.activision.callofduty.warzone 
setprop angle_debug_package org.chromium.angle 
setprop angle_debug_package com.mobilelegends.mi 
setprop angle_debug_package com.pubg.krmobile 
setprop angle_debug_package com.proximabeta.mf.uamo 
setprop angle_debug_package com.proximabeta.mf.liteuamo 
setprop angle_debug_package com.netease.newspike 
setprop angle_debug_package com.garena.game.codm 
setprop angle_debug_package com.carxtech.sr 
setprop angle_debug_package jp.konami.pesam 
setprop angle_debug_package com.miraclegames.farlight84 
setprop angle_debug_package com.ea.gp.fifamobile 
setprop angle_debug_package com.dts.freefireth 
setprop angle_debug_package com.dts.freefiremax 
setprop angle_debug_package com.miHoYo.GenshinImpact 
setprop angle_debug_package com.levelinfinite.sgameGlobal 
setprop angle_debug_package com.mobile.legends 
setprop angle_debug_package com.tencent.ig 
setprop angle_debug_package com.tencent.iglite 
setprop angle_debug_package com.GlobalSoFunny.Sausage 
setprop angle_debug_package com.kurogame.wutheringwaves.global 
setprop angle_debug_package flar2.devcheck 
setprop angle_debug_package ru.andr7e.deviceinfohw 
setprop angle_debug_package com.finalwire.aida64 
setprop angle_debug_package com.riotgames.league.wildrift 
setprop angle_enabled_app com.activision.callofduty.warzone 
setprop angle_enabled_app com.riotgames.league.wildrift 
setprop angle_enabled_app com.mobilelegends.mi 
setprop angle_enabled_app com.pubg.krmobile 
setprop angle_enabled_app com.proximabeta.mf.uamo 
setprop angle_enabled_app com.proximabeta.mf.liteuamo 
setprop angle_enabled_app com.netease.newspike 
setprop angle_enabled_app com.garena.game.codm 
setprop angle_enabled_app com.carxtech.sr 
setprop angle_enabled_app jp.konami.pesam 
setprop angle_enabled_app com.miraclegames.farlight84 
setprop angle_enabled_app com.ea.gp.fifamobile 
setprop angle_enabled_app com.dts.freefireth 
setprop angle_enabled_app com.dts.freefiremax 
setprop angle_enabled_app com.miHoYo.GenshinImpact 
setprop angle_enabled_app com.levelinfinite.sgameGlobal 
setprop angle_enabled_app com.mobile.legends 
setprop angle_enabled_app com.tencent.ig 
setprop angle_enabled_app com.tencent.iglite 
setprop angle_enabled_app com.GlobalSoFunny.Sausage 
setprop angle_enabled_app com.kurogame.wutheringwaves.global 
setprop angle_enabled_app flar2.devcheck 
setprop angle_enabled_app ru.andr7e.deviceinfohw 
setprop angle_enabled_app com.finalwire.aida64 
setprop debug_app bellavita.toast
setprop debug.angle.markers 1 
setprop debug.angle.capture.enabled 1 
setprop debug.angle.capture.out_dir foo 
setprop debug.angle.capture.frame_start 0 
setprop debug.angle.capture.label bar 
setprop debug.angle.capture.trigger 20 
setprop debug.angle.capture.frame_end 200 
setprop debug.angle.backend 2 
setprop debug.angle.overlay FPS:Vulkan*PipelineCache*
setprop debug.angle.feature_overrides_enabled  preferLinearFilterForYUV:mapUnspecifiedColorSpaceToPassThrough 
setprop debug.angle.enable_vulkan_api_dump_layer 1 
setprop debug.apidump.detailed 1 
setprop debug.atrace.app_number 1 
setprop debug.atrace.tags.enableflags 0 
setprop debug.app.performance_restricted 1 
setprop debug.assert 1 
setprop debug.c2.use_dmabufheaps 1 
setprop debug.composition.type skiagl 
setprop debug.cpuprio 7 
setprop debug.choreographer.skipwarning 16 
setprop debug.choreographer.callback 120 
setprop debug.cpurend.vsync 0 
setprop debug.dev.ssrm.turbo 1 
setprop debug.dev.addfree 4 
setprop debug.dev.disable_sched_boost 1 
setprop debug.doze.component 0
setprop debug.disable.hwacc 1 
setprop debug.disable_sched_boost 1 
setprop debug.debuggerd.disable 0 
setprop debug.enable.gamed 0 
setprop debug.enable.wl_log 0 
setprop debug.egl.callstack 0 
setprop debug.egl.profiler 0 
setprop debug.egl.hw 0 
setprop debug.egl.force_msaa 0 
setprop debug.egl.force_fxaa 0 
setprop debug.egl.force_taa 0 
setprop debug.egl.buffcount 3 
setprop debug.egl.swapinterval 0 
setprop debug.enabletr 1 
setprop debug.enable.sglscale 0 
setprop debug.fb.rgb565 1 
setprop debug.force_rtl 0 
setprop debug.fw.bservice_enable 1 
setprop debug.gpurend.vsync 1 
setprop debug.gfx.driver 0 
setprop debug.gles.angle 1 
setprop debug.gralloc.gfx_ubwc_disable 1 
setprop debug.gralloc.enable_fb_ubwc 1 
setprop debug.gr.numframebuffers 3 
setprop debug.gr.swapinterval 0 
setprop debug.gpuprio 7 
setprop debug.gpu.scheduler_pre.emption 1 
setprop debug.heat_suppression 0 
setprop debug.hwc.compose_level 0 
setprop debug.hwc.bq_count 3 
setprop debug.hwc.otf 0 
setprop debug.hwc_dump_en 0 
setprop debug.hwui.multi_renderer.use 1 
setprop debug.hwui.disable_overlays 1 
setprop debug.hwui.skia_atrace_enabled 0
setprop debug.hwui.shadow.renderer skiagl 
setprop debug.hwui.renderer skiagl  
setprop debug.hwui.render_dirty_regions 0 
setprop debug.hwui.level 0 
setprop debug.hwui.fps_divisor 0 
setprop debug.hwui.disable_vsync 1 
setprop debug.hwui.show_dirty_regions 0 
setprop debug.hwui.use_gpu_pixel_buffers 1 
setprop debug.hwui.use_buffer_age 1 
setprop debug.hwui.skip_empty_damage 0 
setprop debug.hwui.use_partial_updates 0 
setprop debug.hwui.profile.maxframes 144 
setprop debug.hwui.disabledither 0 
setprop debug.hwui.target_cpu_time_percent 100 
setprop debug.hwui.target_gpu_time_percent 100 
setprop debug.hwui.use_hint_manager 1 
setprop debug.hwui.disable_draw_reorder 1 
setprop debug.hwui.disable_draw_defer 1 
setprop debug.hwui.enable_partial_updates 0 
setprop debug.ioprio 7 
setprop debug.javafx.animation.fullspeed 1 
setprop debug.javafx.animation.framerate 144 
setprop debug.kill_allocating_task 1 
setprop debug.lldb-rpc-server 0 
setprop debug.mali.disable_backend_affinity 1 
setprop debug.mediatek.appgamepq_compress 1 
setprop debug.mdlogger.Running 0 
setprop debug.mdpcomp.maxpermixer -1 
setprop debug.multicore.processing 1 
setprop debug.mdpcomp.logs 0 
setprop debug.mdlogger.Running 0 
setprop debug.mdpcomp.maxpermixer -1 
setprop debug.mdpcomp.mixedmode.disable 0 
setprop debug.multicore.processing 1 
setprop debug.mediatek.disp_decompress 1 
setprop debug.mediatek.high_frame_rate_sf_set_big_core_fps_threshold 144  
setprop debug.mtk_tflite.target_nnapi 29 
setprop debug.MB.running 72 
setprop debug.MB.inner.running 24 
setprop debug.OVRManager.cpuLevel 4 
setprop debug.OVRManager.gpuLevel 4 
setprop debug.overlayui.enable 1 
setprop debug.performance.tuning 1 
setprop debug.performance.disturb 0 
setprop debug.performance_schema 1 
setprop debug.perfhudes 1 
setprop debug.performance_schema_max_memory_classes 320 
setprop debug.performance_schema_max_socket_classes 20 
setprop debug.performance_schema_digests_size 9950000 
setprop debug.power_management_mode pref_max 
setprop debug.qctwa.statusbar 1 
setprop debug.qc.hardware 1 
setprop debug.qctwa.preservebuf 1 
setprop debug.qsg_renderer 1 
setprop debug.renderengine.backend skiagl  
setprop debug.renderer.process 0  
setprop debug.redroid.fps 144 
setprop debug.rs.rsov 1 
setprop debug.rs.script 0 
setprop debug.rs.shader.attributes 0 
setprop debug.rs.shader.uniforms 0 
setprop debug.rs.visual 0 
setprop debug.rs.default-CPU-driver 1 
setprop debug.rs.default-GPU-driver 1 
setprop debug.rs.default-CPU-buffer 262144 
setprop debug.rs.precision rs_fp_full 
setprop debug.rs.max-threads 8 
setprop debug.rs.min-threads 8 
setprop debug.rambooster.enable 0 
setprop debug.stagefright.omx_default_rank 0 
setprop debug.sdm.support_writeback 1 
setprop debug.sdm.disable_skip_validate 1 
setprop debug.systemui.latency_tracking 0 
setprop debug.stagefright.fps 0 
setprop debug.show_refresh_rate_overlay_spinner 0 
setprop debug.stagefright.c2inputsurface -1 
setprop debug.scenegraph.batching_performance 1 
setprop debug.systemuicompilerfilter speed 
setprop debug.sf.hwc_hotplug_error_via_neg_vsync 1 
setprop debug.sf.hwc_hdcp_via_neg_vsync 1 
setprop debug.sf.set_binder_thread_rt 1 
setprop debug.sf.showcpu 0 
setprop debug.sf.showupdates 0 
setprop debug.sf.showbackground 0 
setprop debug.sf.showfps 0 
setprop debug.sf.hw 0 
setprop debug.sf.enable_hgl 0 
setprop debug.sf.ddms 1 
setprop debug.sf.dump 0 
setprop debug.sf.set_idle_timer_ms 0 
setprop debug.sf.treat_170m_as_sRGB 0 
setprop debug.sf.max_igbp_list_size 0 
setprop debug.sf.disable_hwc_vds 1 
setprop debug.sf.enable_egl_image_tracker 0 
setprop debug.sf.luma_sampling 1 
setprop debug.sf.disable_client_composition_cache 1 
setprop debug.sf.enable_advanced_sf_phase_offset 0 
setprop debug.sf.enable_gl_backpressure 0 
setprop debug.sf.disable_backpressure 1 
setprop debug.sf.latch_unsignaled 1 
setprop debug.sf.gpu_freq_index 7 
setprop debug.sf.auto_latch_unsignaled 0 
setprop debug.sf.enable_hwc_vds 0 
setprop debug.sf.show_predicted_vsync 0 
setprop debug.sf.predict_hwc_composition_strategy 0
setprop debug.sf.kernel_idle_timer_update_overlay 1 
setprop debug.sf.support_kernel_idle_timer_enabled 0 
setprop debug.sf.vsync_reactor_ignore_present_fences 0 
setprop debug.sf.enable_transaction_tracing 1 
setprop debug.sf.use_phase_offsets_as_durations 0 
setprop debug.sf.ignore_hwc_physical_display_orientation 0 
setprop debug.sf.enable_adpf_cpu_hint 1 
setprop debug.sf.frame_rate_multiple_threshold 144 
setprop debug.sf_frame_rate_multiple_fences 144 
setprop debug.sf.early.app.duration 20000000 
setprop debug.sf.early.sf.duration 27600000 
setprop debug.sf.hwc.min.duration 23000000 
setprop debug.sf.late.app.duration 20000000 
setprop debug.sf.late.sf.duration 27600000 
setprop debug.sf.earlyGl.sf.duration 27600000 
setprop debug.sf.144_fps.early.app.duration 8333333 
setprop debug.sf.144_fps.early.sf.duration 11500000 
setprop debug.sf.144_fps.earlyGl.app.duration 8333333 
setprop debug.sf.144_fps.earlyGl.sf.duration 11500000 
setprop debug.sf.144_fps.late.app.duration 8333333 
setprop debug.sf.144_fps.late.sf.duration 11500000 
setprop debug.sf.high_fps.early.app.duration 10000000 
setprop debug.sf.high_fps.early.sf.duration 13800000 
setprop debug.sf.high_fps.earlyGl.app.duration 10000000 
setprop debug.sf.high_fps.earlyGl.sf.duration 13800000 
setprop debug.sf.high_fps.late.app.duration 10000000 
setprop debug.sf.high_fps.late.sf.duration 13800000 
setprop debug.sf.high_fps.hwc.min.duration 8500000 
setprop debug.sf.high_fps_early_phase_offset_ns 6100000 
setprop debug.sf.high_fps_early_gl_phase_offset_ns 650000 
setprop debug.sf.high_fps_late_app_phase_offset_ns 100000 
setprop debug.sf.earlyGl.app.duration 20000000 
setprop debug.sf.early_gl_phase_offset_ns 3000000 
setprop debug.sf.early_gl_app_phase_offset_ns 15000000 
setprop debug.sf.phase_offset_threshold_for_next_vsync_ns 6100000 
setprop debug.sf.early_phase_offset_ns 500000 
setprop debug.sqlite.journalmode 0 
setprop debug.tracing.screen_brightness 0.25659037
setprop debug.tracing.screen_state 2 
setprop debug.touchscreen.latency.scale 0,5 
setprop debug.qualcomm.sns.daemon 0 
setprop debug.qualcomm.sns.libsensor1 0 
setprop debug.vulkan.layers VK_LAYER_GOOGLE_threading 
setprop debug.vulkan.layers VK_LAYER_LUNARG_parameter_validation 
setprop debug.vulkan.layers VK_LAYER_LUNARG_object_tracker 
setprop debug.vulkan.layers VK_LAYER_LUNARG_core_validation 
setprop debug.vulkan.layers VK_LAYER_LUNARG_image 
setprop debug.vulkan.layers VK_LAYER_LUNARG_swapchain 
setprop debug.vulkan.layers VK_LAYER_GOOGLE_unique_objects 
setprop debug.vendor.sys.country_for_cam ID
setprop debug.vendor.sys.oobe.camera_skin brown 
}
set_performance > /dev/null 2>&1 
#Setprop
#Number 190283 Credits 


#Fstrim Everyboot
set_fsrim_interval() {
settings put global fstrim_mandatory_interval 1 
}
set_fsrim_interval > /dev/null 2>&1 


#CMD
set_cmd() {
cmd thermalservice override-status 0 
cmd power set-fixed-performance-mode-enabled 1 
cmd power set-adaptive-power-saver-enabled 1 
}
set_cmd > /dev/null 2>&1 


#Cache Trim
set_cache_trim() {
pm trim-caches 999G
}
set_cache_trim > /dev/null 2>&1 


#Ram Killer
{
for app in $(cmd package list packages -3 | cut -f 2 -d ":"); do
if [[ ! "$app" == "me.piebridge.brevent" ]]; then
cmd activity force-stop "$app"
cmd activity kill "$app"
fi
done
} > /dev/null 2>&1

#Surface Flinger
set_surface() {
properties=(
  "debug.sf.disable_backpressure 1"
  "debug.sf.hwc_hotplug_error_via_neg_vsync 1"
  "debug.sf.hwc_hdcp_via_neg_vsync 1"
  "debug.sf.set_binder_thread_rt 1"
  "debug.sf.gpu_freq_index 7"
  "debug.sf.ignore_hwc_physical_display_orientation 0"
  "debug.sf.enable_adpf_cpu_hint 1"
  "debug.sf.latch_unsignaled 0"
  "debug.sf.enable_hwc_vds 0"
  "debug.sf.disable_hwc_vds 1"
  "debug.sf.frame_rate_multiple_threshold 144"
  "debug.sf_frame_rate_multiple_fences 144"
  "debug.sf.enable_egl_image_tracker 0"
  "debug.sf.luma_sampling 1"
  "debug.sf.early_phase_offset_ns 500000"
  "debug.sf.auto_latch_unsignaled 0"
  "debug.sf.early.app.duration 20000000"
  "debug.sf.early.sf.duration 27600000"
  "debug.sf.earlyGl.app.duration 20000000"
  "debug.sf.earlyGl.sf.duration 27600000"
  "debug.sf.late.app.duration 20000000"
  "debug.sf.late.sf.duration 27600000"
  "debug.sf.high_fps.late.sf.duration 13800000"
  "debug.sf.hwc.min.duration 23000000"
  "debug.sf.enable_gl_backpressure 0"
  "debug.sf.enable_transaction_tracing 1"
  "debug.sf.enable_hgl 0"
  "debug.sf.ddms 1"
  "debug.sf.dump 0"
  "debug.sf.max_igbp_list_size 0"
  "debug.sf.showupdates 0"
  "debug.sf.showcpu 0"
  "debug.sf.showbackground 0"
  "debug.sf.showfps 0"
  "debug.sf.hw 0"
  "debug.sf.disable_client_composition_cache 1"
  "debug.sf.enable_advanced_sf_phase_offset 0"
  "debug.sf.use_phase_offsets_as_durations 0"
  "debug.sf.predict_hwc_composition_strategy 0"
  "debug.sf.treat_170m_as_sRGB 0"
  "debug.sf.set_idle_timer_ms 0"
  "debug.sf.early_gl_phase_offset_ns 3000000"
  "debug.sf.early_gl_app_phase_offset_ns 15000000"
  "debug.sf.high_fps_early_phase_offset_ns 6100000"
  "debug.sf.high_fps_early_gl_phase_offset_ns 650000"
  "debug.sf.high_fps_late_app_phase_offset_ns 100000"
  "debug.sf.phase_offset_threshold_for_next_vsync_ns 6100000"
  "debug.sf.144_fps.early.app.duration 8333333"
  "debug.sf.144_fps.early.sf.duration 11500000"
  "debug.sf.144_fps.earlyGl.app.duration 8333333"
  "debug.sf.144_fps.earlyGl.sf.duration 11500000"
  "debug.sf.144_fps.late.app.duration 8333333"
  "debug.sf.144_fps.late.sf.duration 11500000"
  "debug.sf.high_fps.late.sf.duration 13800000"
  "debug.sf.high_fps.late.app.duration 10000000"
  "debug.sf.high_fps.early.sf.duration 13800000"
  "debug.sf.high_fps.early.app.duration 10000000"
  "debug.sf.high_fps.earlyGl.sf.duration 13800000"
  "debug.sf.high_fps.earlyGl.app.duration 10000000"
  "debug.sf.high_fps.hwc.min.duration 8500000"
)

for prop in "${properties[@]}"; do
  setprop $prop
done
}
set_surface > /dev/null 2>&1 

#AndroidConfig
set_android() {
cmd device_config put runtime native.usap_pool_enabled 1 
cmd device_config put surfaceflinger running_without_sync_framework 1 
cmd device_config put surfaceflinger native_boot.SkiaTracingFeature__use_skia_tracing 1 
cmd device_config put dalvik dedupe_strings 1
cmd device_config put dalvik dex2oat_max_inference_threads 4 
cmd device_config put dalvik dex2oat_thread_count 4 
cmd device_config put dalvik jit_enable 1 
cmd device_config put dalvik jit_max_threads 4 
cmd device_config put dalvik jit_mode 2 
cmd device_config put dalvik jit_threshold 1048576 
cmd device_config put dalvik max_threads 8 
cmd device_config put dalvik vm_heapsize 512m 
cmd device_config put package_native_code optimizable_apps 1 
cmd device_config put graphics max_caches 4 
cmd device_config put graphics max_texture_atlas_size 2048 
cmd device_config put graphics max_layers 16 
cmd device_config put graphics max_texture_size 512 
cmd device_config put graphics max_cpu_usage 2.0 
cmd device_config put graphics_sf swapinterval 0 
cmd device_config put input filtered_accel_event_rate_hz 144 
cmd device_config put input accel_buffer_depth 2048 
cmd device_config put input accel_buffer_timeout_ms 50 
cmd device_config put input filtered_accel_lpf_coef 0.1 
cmd device_config put activity_manager min_low_ram_task_aspect_ratio 1.0 
cmd device_config put systemui enable_hw_accelerated_canvas 1 
cmd device_config put systemui accelerate_refresh_rate 1 
cmd device_config put systemui min_refresh_rate_for_fps_boost 144 
cmd device_config put systemui max_refresh_rate_for_fps_boost 144 
cmd device_config put surfaceflinger refresh_rate 144 
cmd device_config put surfaceflinger max_frame_buffer_acquired_count 4 
cmd device_config put surfaceflinger use_content_detection_for_refresh_rate 1 
cmd device_config put surfaceflinger game_default_frame_rate_override 144 
cmd device_config put surfaceflinger enable_frame_rate_override 0 
cmd device_config put surfaceflinger has_HDR_display 1 
cmd device_config put surfaceflinger supports_background_blur 1 
cmd device_config put surfaceflinger primary_display_orientation 0 
cmd device_config put surfaceflinger force_hwc_copy_for_virtual_displays 1 
cmd device_config put surfaceflinger protected_contents 1 
cmd device_config put surfaceflinger uclamp.min 130 
cmd device_config put surfaceflinger has_wide_color_display 1 
cmd device_config put surfaceflinger use_color_management 1 
cmd device_config put surfaceflinger set_touch_timer_ms 0 
cmd device_config put surfaceflinger max_virtual_display_dimension 4096 
cmd device_config put surfaceflinger wcg_composition_dataspace 143261696 
cmd device_config put surfaceflinger clear_slots_with_set_layer_buffer 0 
cmd device_config put surfaceflinger set_idle_timer_ms 0 
cmd device_config put surfaceflinger set_display_power_timer_ms 0 
cmd device_config put surfaceflinger enable_hwc 1 
cmd device_config put surfaceflinger min_swap_interval 1 
cmd device_config put surfaceflinger disable_expensive_timestamps 1 
cmd device_config put surfaceflinger enable_vds_tweak 1 
cmd device_config put surfaceflinger vsync_eventphase_offset_ns 6300000 
cmd device_config put surfaceflinger vsync_sfoffset_ns 6300000 
cmd device_config put surfaceflinger enable_debug_sf_vs 1 
cmd device_config put input tap_duration 60 
cmd device_config put input gesture_min_time 100 
cmd device_config put input default_key_press_repeat_rate 15 
cmd device_config put input gesture_min_distance 10 
cmd device_config put input touch_screen_sample_interval_ms 8 
cmd device_config put thermal high_temp_limit 90 
cmd device_config put thermal low_temp_limit 20 
cmd device_config put window_manager hardware_accelerated 1 
}
set_android > /dev/null 2>&1 

#Gmz Doze
run() {
pm disable --user 0 com.google.android.gms/com.google.android.gms.auth.managed.admin.DeviceAdminReceiver
pm disable --user 0 com.google.android.gms/com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver
dumpsys deviceidle whitelist -com.google.android.gms
}

run > /dev/null 2>&1 

#Activity Manager Fokus
{
settings put global activity_manager_constants "max_cached_processes=12800, background_settle_time=0, fgservice_min_shown_time=0, fgservice_min_report_time=0, fgservice_screen_on_before_time=0, fgservice_screen_on_after_time=0, content_provider_retain_time=0, gc_timeout=0, gc_min_interval=0, full_pss_min_interval=0, full_pss_lowered_interval=0, power_check_interval=0, power_check_max_cpu_1=0, power_check_max_cpu_2=0, power_check_max_cpu_3=0, power_check_max_cpu_4=0, service_usage_interaction_time=0, usage_stats_interaction_interval=0, service_restart_duration=0, service_reset_run_duration=0, service_restart_duration_factor=0, service_min_restart_time_between=0, service_max_inactivity=0, service_bg_start_timeout=0, CUR_MAX_CACHED_PROCESSES=0, CUR_MAX_EMPTY_PROCESSES=0, CUR_TRIM_EMPTY_PROCESSES=0, CUR_TRIM_CACHED_PROCESSES=0"
} > /dev/null 2>&1 

angle_allapp() {
settings put global angle_debug_package org.chromium.angle
settings put global angle_gl_driver_all_angle 1
settings put global angle.supported 1
settings put global angle_gl_driver_selection_values angle
settings put global angle_enabled_app org.chromium.angle
}

angle_allapp > /dev/null 2>&1 

#Other
(
  settings put global window_animation_scale 0,5 
  settings put global transition_animation_scale 0,5 
  settings put global animator_duration_scale 0,5 
  settings put global angle_debug_package org.chromium.angle 
  settings put global angle_gl_driver_all_angle 1 
  settings put global angle.supported 1 
  settings put global angle_gl_driver_selection_values angle 
  settings put global angle_enabled_app org.chromium.angle 
)> /dev/null 2>&1 

set_touch() {
settings put dalvik vm.dexopt.thermal-cutoff 0 
settings put global dalvik.vm.dexopt.thermal-cutoff 0 
settings put system dalvik.vm.dexopt.thermal-cutoff 0 
settings put systemui dalvik.vm.dexopt.thermal-cutoff 0 
settings put systemui min_refresh_rate_for_fps_boost 144 
settings put systemui max_refresh_rate_for_fps_boost 144 
settings put system peak_refresh_rate 144 
settings put system min_refresh_rate 144 
settings put global min_refresh_rate_for_fps_boost 144 
settings put global max_refresh_rate_for_fps_boost 144 
settings put global peak_refresh_rate 144 
settings put global min_refresh_rate 144 
settings put global device_name iPhone-15-Pro-Max 
settings put global device_device iPhone16,2 
settings put global device_model A2849 
settings put global device_brand apple 
settings put global device_manufacturer apple 
settings put surfaceflinger running_without_sync_framework 1 
settings put surfaceflinger refresh_rate 144 
settings put surfaceflinger max_frame_buffer_acquired_count 3 
settings put surfaceflinger use_content_detection_for_refresh_rate 1  
settings put surfaceflinger game_default_frame_rate_override 144 
settings put surfaceflinger enable_frame_rate_override 0  
settings put surfaceflinger has_HDR_display 0 
settings put surfaceflinger supports_background_blur 1 
settings put surfaceflinger primary_display_orientation 0  
settings put surfaceflinger force_hwc_copy_for_virtual_displays 0 
settings put surfaceflinger protected_contents 1  
settings put surfaceflinger uclamp.min 130 
settings put surfaceflinger has_wide_color_display 0 
settings put surfaceflinger use_color_management 0 
settings put surfaceflinger set_touch_timer_ms 0 
settings put surfaceflinger max_virtual_display_dimension 4096 
settings put surfaceflinger wcg_composition_dataspace 143261696 
settings put surfaceflinger clear_slots_with_set_layer_buffer 0 
settings put surfaceflinger set_idle_timer_ms 0 
settings put surfaceflinger set_display_power_timer_ms 0 
settings put surfaceflinger enable_hwc 0 
settings put surfaceflinger min_swap_interval 0 
settings put surfaceflinger disable_expensive_timestamps 1 
settings put surfaceflinger enable_vds_tweak 0 
settings put surfaceflinger vsync_eventphase_offset_ns 6300000 
settings put surfaceflinger vsync_sfoffset_ns 6300000 
settings put surfaceflinger enable_debug_sf_vs 0 
settings put global persist.sys.fps_unlock_allowed 144 
settings put global sys.fps_unlock_allowed 144 
settings put global persist.sys.composition.type skiagl 
settings put global persist.sys.ui.hw 1 
settings put global persist.sys.perf.topAppRenderThreadBoost.enable 1 
settings put global persist.device_config.surface_flinger_native_boot.SkiaTracingFeature__use_skia_tracing 1 
settings put global persist.sys.ui.hw 1 
settings put global persist.vendor.color.matrix 2 
settings put global persist.sys.minfree_6g 16384,20480,32768,131072,230400,286720 
settings put global persist.sys.minfree_8g 16384,20480,32768,131072,384000,524288 
settings put global persist.sys.minfree_12g 16384,20480,131072,384000,524288,819200 
settings put global persist.sys.minfree_def 16384,20480,32768,131072,230400,286720 
settings put global persist.vendor.qti.inputopts.enable 1 
settings put global persist.vendor.qti.inputopts.movetouchslop 1 
settings put global persist.sys.NV_FPSLIMIT 144 
settings put global persist.sys.NV_POWERMODE 1 
settings put global persist.sys.NV_PROFVER 15 
settings put global persist.sys.NV_STEREOCTRL 0 
settings put global persist.sys.NV_STEREOSEPCHG 0 
settings put global persist.sys.NV_STEREOSEP 20 
settings put global persist.dev.pm.dyn_samplingrate 1 
settings put global persist.device_config.runtime_native.usap_pool_enabled 1 
settings put global persist.device_config.nnapi_native.current_feature_level 7 
settings put global persist.device_config.nnapi_native.telemetry_enable 0 
settings put global persist.device_config.runtime_native.metrics.reporting-mods 2 
settings put global persist.device_config.runtime_native.metrics.reporting-mods-server 2 
settings put global persist.device_config.runtime_native.metrics.reporting-num-mods 100 
settings put global persist.device_config.runtime_native.metrics.reporting-num-mods-server 100 
settings put global persist.device_config.runtime_native.metrics.reporting-spec 1,5,30,60,600 
settings put global persist.device_config.runtime_native.metrics.reporting-spec-server 1,10,60,3600,*
settings put global persist.device_config.runtime_native.metrics.write-to-statsd 1 
settings put global persist.device_config.runtime_native.usap_pool_size_max 0 
settings put global persist.device_config.runtime_native.use_app_image_startup_cache 1 
settings put global persist.device_config.runtime_native_boot.disable_lock_profiling 0 
settings put global persist.device_config.runtime_native_boot.enable_uffd_gc_2 0 
settings put global persist.device_config.runtime_native_boot.iorap_blacklisted_packages 0 
settings put global persist.device_config.runtime_native_boot.iorap_perfetto_enable 0 
settings put global persist.device_config.runtime_native_boot.iorap_readahead_enable 0 
settings put global persist.device_config.runtime_native_boot.iorapd_options 0 
settings put global persist.device_config.tethering.bpf_net_maps_enable_java_bpf_map 0 
settings put global persist.sys.tran.device.name iPhone-15-Pro-Max 
settinga put global persist.sampling_profiler 1
settings put global persist.sys.scrollingcache 1 
settings put global persist.zygote.preload_threads 1 
settings put global persist.vendor.camera.HAL3.enabled 1 
settings put global persist.cpu.freq.boost 1
settings put global persist.ril.uart.flowctrl 10 
settings put global persist.data_netmgrd_mtu 1500
settings put global persist.telephony.support.ipv6 1
settings put global persist.telephony.support.ipv4 1
settings put global persist.sys.use_dithering 1
settings put global persist.sys.radio.force_lte_ca 1 
settings put global persist.sys.lte_rsrp 0 
settings put global persist.radio.use_se_table_only 1
settings put global persist.radio.data_ltd_sys_ind 1 
settings put global persist.radio.data_con_rprt 1 
settings put global persist.sys.dalvik.hyperthreading 1
settings put global persist.sys.dalvik.multithread 1 
settings put global persist.sys.fuse.passthrough.enable 1
settings put global persist.device_config.runtime_native_boot.iorap_readahead_enable 0 
settings put global persist.sys.purgeable_assets 1 
settings put global persist.sys.use_dithering 1
settings put global persist.vendor.sys.memplus.enable 0 
settings put global persist.sys.purgeable_assets 1
settings put global persist.cust.tel.eons 1
settings put global persist.vendor.verbose_logging_enabled 0 
settings put global persist.android.strictmode 0
settings put global persist.service.lgospd.enable 0
settings put global persist.service.pcsync.enable 0
settings put global persist.sys.power.default.powermode 1 
settings put global transsion_game_acceleration 1 
}

set_touch > /dev/null 2>&1 

#DeviceConfig
set_android() {
cmd device_config put runtime native.usap_pool_enabled 1 
cmd device_config put surfaceflinger running_without_sync_framework 1 
cmd device_config put surfaceflinger native_boot.SkiaTracingFeature__use_skia_tracing 1 
cmd device_config put activity_manager min_low_ram_task_aspect_ratio 0.1 
cmd device_config put cpu_power cpu_max_pwr_mgmnt 2.0 
cmd device_config put cpu_power max_cpu_power 2.0 
cmd device_config put gpu gpu_max_pwr_mgmnt 2.0 
cmd device_config put gpu max_gpu_power 2.0 
cmd device_config put dalvik dedupe_strings 1 
cmd device_config put dalvik vm.dexopt.thermal-cutoff 0 
cmd device_config put dalvik dex2oat_max_inference_threads 4 
cmd device_config put dalvik dex2oat_thread_count 4 
cmd device_config put dalvik jit_enable 1 
cmd device_config put dalvik jit_max_threads 4 
cmd device_config put dalvik jit_mode 2 
cmd device_config put dalvik max_threads 8 
cmd device_config put dalvik vm_heapsize 512m 
cmd device_config put global dalvik.vm.dexopt.thermal-cutoff 0 
cmd device_config put grapichs refresh_rate 144 
cmd device_config put graphics max_caches 3 
cmd device_config put graphics max_texture_atlas_size 128 
cmd device_config put graphics max_layers 16 
cmd device_config put graphics max_texture_size 128 
cmd device_config put graphics max_cpu_usage 3.0 
cmd device_config put graphics_sf swapinterval 0 
cmd device_config put input filtered_accel_event_rate_hz 200 
cmd device_config put input accel_buffer_depth 2048 
cmd device_config put input accel_buffer_timeout_ms 50 
cmd device_config put input filtered_accel_lpf_coef 0.1 
cmd device_config put input tap_duration 60 
cmd device_config put input gesture_min_time 100 
cmd device_config put input default_key_press_repeat_rate 15 
cmd device_config put input gesture_min_distance 10 
cmd device_config put input touch_screen_sample_interval_ms 5 
cmd device_config put package_native_code optimizable_apps 1 
cmd device_config put thermal high_temp_limit 95 
cmd device_config put thermal low_temp_limit 50 
cmd device_config put thermal dalvik.vm.dexopt.thermal-cutoff 0 
cmd device_config put system pointer_speed 7 
cmd device_config put window_manager hardware_accelerated 1 
}
set_android > /dev/null 2>&1 