Skip to content

Commit

Permalink
fix: update anykernel3 script
Browse files Browse the repository at this point in the history
  • Loading branch information
seppzer0 committed Sep 29, 2024
1 parent 2a7b103 commit bfdb02e
Showing 1 changed file with 14 additions and 28 deletions.
42 changes: 14 additions & 28 deletions builder/modifications/dumplinger/anykernel3/anykernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,36 @@ do.cleanup=1
do.cleanuponabort=0
device.name1=dumpling
device.name2=cheeseburger
supported.versions=13 - 14
supported.versions=14
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;
## boot files attributes
boot_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/bootdevice/by-name/boot;
is_slot_device=0;
ramdisk_compression=auto;
patch_vbmeta_flag=auto;
# boot shell variables
BLOCK=/dev/block/bootdevice/by-name/boot;
IS_SLOT_DEVICE=0;
RAMDISK_COMPRESSION=auto;
PATCH_VBMETA_FLAG=auto;

# import functions/variables and setup patching - see for reference (DO NOT REMOVE)
. tools/ak3-core.sh && attributes;
. tools/ak3-core.sh;

# boot install
dump_boot; # use split_boot to skip ramdisk unpack, e.g. for devices with init_boot ramdisk

# patch dtbo.img
username="$(file_getprop /system/build.prop "ro.build.user")";
echo "Found user: $username";
case "$username" in
"android-build") user=google;;
*) user=custom;;
esac;
hostname="$(file_getprop /system/build.prop "ro.build.host")";
echo "Found host: $hostname";
case "$hostname" in
*corp.google.com|abfarm*) host=google;;
*) host=custom;;
esac;

# begin ramdisk changes
backup_file init.rc;
insert_line init.rc "init.nethunter.rc" after "import /init.usb.configfs.rc" "import /init.nethunter.rc";

backup_file ueventd.rc;
insert_line ueventd.rc "/dev/hidg" after "/dev/pmsg0" "/dev/hidg* 0666 root root";
#backup_file ueventd.rc;
#insert_line ueventd.rc "/dev/hidg" after "/dev/pmsg0" "/dev/hidg* 0666 root root";
# end ramdisk changes

write_boot;
Expand Down

0 comments on commit bfdb02e

Please sign in to comment.