-
Notifications
You must be signed in to change notification settings - Fork 11
/
anykernel.sh
80 lines (72 loc) · 2.73 KB
/
anykernel.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
### AnyKernel3 Ramdisk Mod Script
## osm0sis @ xda-developers
### AnyKernel setup
# begin properties
properties() { '
kernel.string=SKLoader-Aplha-01 @SkyFaklist
do.devicecheck=1
do.modules=0
do.systemless=1
do.cleanup=1
do.cleanuponabort=0
device.name1=raphael
device.name2=raphaelin
device.name3=cepheus
supported.versions=12-13
supported.patchlevels=
'; } # end properties
### AnyKernel install
# begin attributes
attributes() {
set_perm_recursive 0 0 755 644 $ramdisk/*;
set_perm_recursive 0 0 750 750 $ramdisk/init* $ramdisk/sbin;
} # end attributes
## boot shell variables
block=/dev/block/by-name/boot;
is_slot_device=0;
ramdisk_compression=auto;
# import functions/variables and setup patching - see for reference (DO NOT REMOVE)
. tools/ak3-core.sh && attributes;
# boot install
dump_boot; # use split_boot to skip ramdisk unpack, e.g. for devices with init_boot ramdisk
# Marsia Custom sh
case "$ZIPFILE" in
*66fps*|*66hz*)
ui_print " • Setting 66 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=1"
;;
*69fps*|*69hz*)
ui_print " • Setting 69 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=2"
;;
*72fps*|*72hz*)
ui_print " • Setting 72 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=3"
;;
*75fps*|*75hz*)
ui_print " • Setting 75 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=4"
;;
*81fps*|*81hz*)
ui_print " • Setting 81 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=5"
;;
*84fps*|*84hz*)
ui_print " • Setting 84 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=6"
;;
*90fps*|*90hz*)
ui_print " • Setting 90 Hz refresh rate"
patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=7"
;;
*)
patch_cmdline "msm_drm.framerate_override" ""
fr=$(cat /sdcard/framerate_override | tr -cd "[0-9]");
[ $fr -eq 66 ] && ui_print " • Setting 66 Hz refresh rate" && patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=1"
[ $fr -eq 69 ] && ui_print " • Setting 69 Hz refresh rate" && patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=2"
[ $fr -eq 72 ] && ui_print " • Setting 72 Hz refresh rate" && patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=3"
[ $fr -eq 75 ] && ui_print " • Setting 75 Hz refresh rate" && patch_cmdline "msm_drm.framerate_override" "msm_drm.framerate_override=4"
;;
esac
write_boot; # use flash_boot to skip ramdisk repack, e.g. for devices with init_boot ramdisk
## end boot install