Advertisement
Guest User

Anykernel3.sh

a guest
May 7th, 2021
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | None | 0 0
  1. # AnyKernel3 Ramdisk Mod Script
  2. # osm0sis @ xda-developers
  3.  
  4. ## AnyKernel setup
  5. # begin properties
  6. properties() { '
  7. kernel.string=Mi K30(4G) Kernel test
  8. do.devicecheck=1
  9. do.modules=0
  10. do.systemless=0
  11. do.cleanup=1
  12. do.cleanuponabort=0
  13. device.name1=phoenix
  14. supported.versions=10
  15. supported.patchlevels=
  16. '; } # end properties
  17.  
  18. # shell variables
  19. block=/dev/block/bootdevice/by-name/boot;
  20. is_slot_device=0;
  21. ramdisk_compression=auto;
  22.  
  23.  
  24. ## AnyKernel methods (DO NOT CHANGE)
  25. # import patching functions/variables - see for reference
  26. . tools/ak3-core.sh;
  27.  
  28.  
  29. ## AnyKernel file attributes
  30. # set permissions/ownership for included ramdisk files
  31. set_perm_recursive 0 0 755 644 $ramdisk/*;
  32. set_perm_recursive 0 0 750 750 $ramdisk/init* $ramdisk/sbin;
  33.  
  34.  
  35. ## AnyKernel install
  36. dump_boot;
  37.  
  38. # begin ramdisk changes
  39.  
  40. # init.rc
  41. backup_file init.rc;
  42. replace_string init.rc "cpuctl cpu,timer_slack" "mount cgroup none /dev/cpuctl cpu" "mount cgroup none /dev/cpuctl cpu,timer_slack";
  43.  
  44. # init.tuna.rc
  45. backup_file init.tuna.rc;
  46. insert_line init.tuna.rc "nodiratime barrier=0" after "mount_all /fstab.tuna" "\tmount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data remount nosuid nodev noatime nodiratime barrier=0";
  47. append_file init.tuna.rc "bootscript" init.tuna;
  48.  
  49. # fstab.tuna
  50. backup_file fstab.tuna;
  51. patch_fstab fstab.tuna /system ext4 options "noatime,barrier=1" "noatime,nodiratime,barrier=0";
  52. patch_fstab fstab.tuna /cache ext4 options "barrier=1" "barrier=0,nomblk_io_submit";
  53. patch_fstab fstab.tuna /data ext4 options "data=ordered" "nomblk_io_submit,data=writeback";
  54. append_file fstab.tuna "usbdisk" fstab;
  55.  
  56. # end ramdisk changes
  57.  
  58. write_boot;
  59. ## end install
  60.  
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement