From 0cdb1fbe15d2ab9774fe750f8e26d0d015108f11 Mon Sep 17 00:00:00 2001 From: rafa_99 Date: Sat, 24 Oct 2020 02:03:18 +0100 Subject: Updated Scripts --- anykernel.sh | 48 +++++++----------------------------------------- build.sh | 8 ++++++++ tools/ak3-core.sh | 6 +++--- 3 files changed, 18 insertions(+), 44 deletions(-) create mode 100755 build.sh diff --git a/anykernel.sh b/anykernel.sh index d37e327..01198ba 100755 --- a/anykernel.sh +++ b/anykernel.sh @@ -1,64 +1,30 @@ # AnyKernel3 Ramdisk Mod Script # osm0sis @ xda-developers -## AnyKernel setup -# begin properties properties() { ' -kernel.string=ExampleKernel by osm0sis @ xda-developers +kernel.string=Lavender Custom Kernel do.devicecheck=1 do.modules=0 do.systemless=1 do.cleanup=1 -do.cleanuponabort=0 -device.name1=maguro -device.name2=toro -device.name3=toroplus -device.name4=tuna -device.name5= +do.cleanuponabort=1 +device.name1= +device.name2= supported.versions= supported.patchlevels= -'; } # end properties +'; } # shell variables -block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot; +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 -set_perm_recursive 0 0 755 644 $ramdisk/*; -set_perm_recursive 0 0 750 750 $ramdisk/init* $ramdisk/sbin; - - ## AnyKernel install dump_boot; - -# begin ramdisk changes - -# init.rc -backup_file init.rc; -replace_string init.rc "cpuctl cpu,timer_slack" "mount cgroup none /dev/cpuctl cpu" "mount cgroup none /dev/cpuctl cpu,timer_slack"; - -# init.tuna.rc -backup_file init.tuna.rc; -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"; -append_file init.tuna.rc "bootscript" init.tuna; - -# fstab.tuna -backup_file fstab.tuna; -patch_fstab fstab.tuna /system ext4 options "noatime,barrier=1" "noatime,nodiratime,barrier=0"; -patch_fstab fstab.tuna /cache ext4 options "barrier=1" "barrier=0,nomblk_io_submit"; -patch_fstab fstab.tuna /data ext4 options "data=ordered" "nomblk_io_submit,data=writeback"; -append_file fstab.tuna "usbdisk" fstab; - -# end ramdisk changes - write_boot; -## end install +## end installrite_boot; diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..36bf8a5 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +HOSTNAME=$(hostname) +USERNAME=$(whoami) +TIMESTAMP=$(date '+%Y%m%d_%H%M%S') +EXCLUDE=$(find . -name "*placeholder*" | sed s:"\./"::g | xargs) + +zip -r "$USERNAME"_"$HOSTNAME"-"$TIMESTAMP".zip * -x .git README.md LICENSE build.sh $EXCLUDE diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 79f3a32..0d58013 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -155,7 +155,7 @@ unpack_ramdisk() { if [ -f ramdisk.cpio ]; then comp=$($bin/magiskboot decompress ramdisk.cpio 2>&1 | grep -v 'raw' | sed -n 's;.*\[\(.*\)\];\1;p'); else - abort "No ramdisk found to unpack. Aborting..."; + echo "No ramdisk found to unpack. But not aborting :)..."; fi; if [ "$comp" ]; then mv -f ramdisk.cpio ramdisk.cpio.$comp; @@ -173,7 +173,7 @@ unpack_ramdisk() { cd $ramdisk; EXTRACT_UNSAFE_SYMLINKS=1 cpio -d -F $split_img/ramdisk.cpio -i; if [ $? != 0 -o ! "$(ls)" ]; then - abort "Unpacking ramdisk failed. Aborting..."; + echo "Unpacking ramdisk failed. But not aborting :)..."; fi; if [ -d "$home/rdtmp" ]; then cp -af $home/rdtmp/* .; @@ -224,7 +224,7 @@ repack_ramdisk() { fi; fi; if [ "$packfail" ]; then - abort "Repacking ramdisk failed. Aborting..."; + echo "Repacking ramdisk failed. But not aborting :)..."; fi; if [ -f "$bin/mkmtkhdr" -a -f "$split_img/boot.img-base" ]; then -- cgit v1.2.3