- introduce unpack_vendorrd <name|path> to allow only unpacking a specific VNDRBOOT v4+ sub-ramdisk
- repack_ramdisk repacks any found unpacked VNDRBOOT v4+ sub-ramdisk and leaves others untouched
- all working directory variables
- all user set variables
- add backwards compat so devs have time to update anykernel.sh
- overdue core variable cleanup, part 3/x
- KernelSU currently requires the Manager app be run after first rooted to dump /data/adb/ksud, and then it will process any pending modules_update.img on the next reboot
- the above is problematic since some custom kernels providing KernelSU support will require a working module system to overlay .ko kernel modules needed for feature support and sometimes the ROM won't boot without these matching
- work around this KernelSU behavior by dumping ksud ourselves as-needed during the AK3 helper module installation, allowing seamless initial KernelSU kernel support installation with AK3 helper module .ko support
See: https://github.com/tiann/KernelSU/issues/945
- attributes function now runs via core in setup_ak and reset_ak, but only if it exists, allowing more easy removal of it for setups with no ramdisk changes (so all should now remove the awkward `&& attributes` call from anykernel3.sh, see next commit)
- for multi-partition zips with multiple ramdisks requiring different files, multiple attributes functions may now be specified, either redefine attributes() in anykernel.sh for the next partition, or add a different function for each partition, e.g. boot_attributes() and vendor_boot_attributes()
- fix block=auto multi-partition setup creating an "auto-files" directory instead of final found block, e.g. "init_boot-files"
- some recoveries don't allow reading/changing shell context and will show an error:
sh: write error: Invalid argument
- these recoveries seem to allow loop mounts unlike most LOS Recovery builds lately, so hide the error output