forked from osm0sis/AnyKernel3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanykernel.sh
59 lines (44 loc) · 1.25 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
# AnyKernel3 Ramdisk Mod Script
# osm0sis @ xda-developers
## AnyKernel setup
# begin properties
properties() { '
kernel.string=Haruka! Kernel for Mi 9T/Redmi K20 By @RealAkito and @Vantom
do.devicecheck=0
do.modules=0
do.cleanup=1
do.cleanuponabort=0
device.name1=davinci
device.name2=davinciin
device.name3=
device.name4=
device.name5=
supported.versions=
'; } # end properties
# shell variables
block=/dev/block/bootdevice/by-name/boot;
is_slot_device=0;
ramdisk_compression=auto;
## AnyKernel methods (DO NOT CHANGE)
# import patching functions/variables - see for reference
. tools/ak3-core.sh;
## AnyKernel file attributes
# set permissions/ownership for included ramdisk files
chmod -R 750 $ramdisk/*;
chown -R root:root $ramdisk/*;
## AnyKernel install
dump_boot;
# begin ramdisk changes
# Add skip_override parameter to cmdline so user doesn't have to reflash Magisk
if [ -d $ramdisk/.backup ]; then
ui_print " "; ui_print "Magisk detected! Patching cmdline so reflashing Magisk is not necessary...";
patch_cmdline "skip_override" "skip_override";
else
patch_cmdline "skip_override" "";
fi;
# end ramdisk changes
# end ramdisk changes
ui_print " "; ui_print "Flashing Haruka! Kernel";
ui_print " "; ui_print "Enjoy";
write_boot;
## end install