[Samsung Galaxy Nexus] 7175:
No problem man, hope this helps some people using xda search. Yeah the ones with "zImage-flash" in the name are anykernel-updaters. Definitely do a nandroid first before trying em as usual. To answer your question: yes, the ramdisk (.cpio.gz file=.img) is very important since it has init files, fstabs, sbin, some other functions like padding the actual zImage Linux kernel with reserved space. That's why it's called the ramdisk (usually initramfs) and is the reason the img is bigger than summed contents. The initrc's are basically rc scripts for /init and have all system startup procedures: directory creation and population for {/sys,/proc,/acct}, services aka daemonized processes which are detached from the shell to run async (e.g. su --daemon &), event triggers (e.g. adbd start/stop). You see a bunch of the init files if you browse the phone's root, also should be one in /data/local/tmp. Other directories like /system and /data are populated by mounting partitions in /dev/block. The mount information is in the fstabs. The readonly system bin 'sbin' has critical binaries, such as adbd and event-symlinks to init for android, and it often contains extra binaries and scripts that configure the kernel-created /sys, /proc, /acct filesystems to interact with hardware and drive/moderate system load. You can find Fancy kernel's customized scripts and the binaries it uses in /sbin. The critical /sbin material is usually adbd (adb daemon) and a couple symbolic links.

The helpful thing about the anykernel install is that it uses the init files, fstabs, sbin files, and ***new SELinux stuff *** (file_contexts, *context*, *selinux*, etc) from the previous kernel's ramdisk. If your rom was developed along with a custom built kernel, it might have some extra files at root that tie into the boot sequence, parameter settings, and event operation of the system; e.g., Vanir has init.vanir.rc and CM has init.cm.rc (sp) added. These make a really big difference like whether you get past the boot animation or even the google screen. The new SELinux complicates this more by adding a new filesystem 'selinuxfs' which is likely the source of a lot of kernel-rom mingling issues... Long story short, flashing an afterstock kernel that has a boot.img often leads to a "SELinux=disabled" status a lot of the time which needs to be renamed "SELinux=hairpin-trigger-rogue-menstruation". This is basically an error status for both Enforced and Permissive failing. Correctly active or inactive SELinux should not be designated Disabled. The only safe statuses are "Enforced" and "Permissive"(=SELinux doesn't enforce configured context for files/processes but logs it instead).

The anykernel r45 I posted shouldn't cause selinux menstruation. I'm running permissive on Vanir. You can check this executing "getenforce" or "getsebool" in the terminal, set to 0 or 1 with setenforce. Also there might be a viewable status in settings-->About Phone, should be at the bottom. Clicking it may cause a freeze-halt though.

Hope that's helpful, there's a lot on this subject to search. I'd search the githubs of kernel devs for specific advanced Android linux kernel specs. Also the anykernelized fancy kernel I zipped together is not complete, but it seems to run pretty well. I'm going to put together an injector to try out a bunch of different combos and run a cat'd ramdisk. I'd like to include all the SELinux binaries that /system/bin uses, at least the toolbox linked ones like TWRP's mini-toolbox, as well as a dynamic R48 mksh to take precidence over these R43 lossy 150KB versions I see packed in roms. :) Such a great shell.

Glad to see someone else noticing these things like selinux missing and the phone self-wiping while you're sleeping. Lol "hack it really stable", that's the best line I've ever read on xda. :good::good: