[Galaxy Note 3 Android Development] gj86:
Actually what I meant was moving the export ril & ril shim lib line to the start of the early-init part of the ramdisk not removing all other early-init codes.

The crash:

--------- beginning of crash

12-04 11:52:47.255 826 826 F libc : CANNOT LINK EXECUTABLE "/system/bin/rild": cannot locate symbol "_ZN7android6Parcel13writeString16EPKtj" referenced by "/system/lib/libril.so"...

12-04 11:52:47.255 826 826 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 826 (rild)

05-16 01:32:25.062 845 845 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

05-16 01:32:25.062 845 845 F DEBUG : LineageOS Version: 'unknown'

05-16 01:32:25.062 845 845 F DEBUG : Build fingerprint: 'samsung/hltexx/hlte:4.4.2/KOT49H/N9005XXUENC2:user/release-keys'

05-16 01:32:25.062 845 845 F DEBUG : Revision: '0'

05-16 01:32:25.062 845 845 F DEBUG : ABI: 'arm'

05-16 01:32:25.062 845 845 F DEBUG : pid: 826, tid: 826, name: rild >>> /system/bin/rild <<<

05-16 01:32:25.062 845 845 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

05-16 01:32:25.062 845 845 F DEBUG : r0 00000000 r1 0000033a r2 00000006 r3 00000008

05-16 01:32:25.062 845 845 F DEBUG : r4 b6fd258c r5 00000006 r6 b6fd2534 r7 0000010c

05-16 01:32:25.062 845 845 F DEBUG : r8 be946740 r9 00000001 sl be946760 fp b6f5f010

05-16 01:32:25.062 845 845 F DEBUG : ip 00000000 sp be9466d8 lr b6fb229f pc b6fb2cbc cpsr 600f0010

05-16 01:32:25.073 845 845 F DEBUG :

05-16 01:32:25.073 845 845 F DEBUG : backtrace:

05-16 01:32:25.073 845 845 F DEBUG : #00 pc 00046cbc /system/bin/linker (__dl_tgkill+12)

05-16 01:32:25.073 845 845 F DEBUG : #01 pc 0004629b /system/bin/linker (__dl_pthread_kill+34)

05-16 01:32:25.073 845 845 F DEBUG : #02 pc 0003e59f /system/bin/linker (__dl_raise+10)

05-16 01:32:25.073 845 845 F DEBUG : #03 pc 0003d05b /system/bin/linker (__dl___libc_android_abort+34)

05-16 01:32:25.073 845 845 F DEBUG : #04 pc 0003bf60 /system/bin/linker (__dl_abort+4)

05-16 01:32:25.073 845 845 F DEBUG : #05 pc 0003e0a3 /system/bin/linker (__dl___libc_fatal+22)

05-16 01:32:25.073 845 845 F DEBUG : #06 pc 00009c93 /system/bin/linker (__dl__ZL29__linker_init_post_relocationR19KernelArgumentBlockj+3146)

05-16 01:32:25.073 845 845 F DEBUG : #07 pc 00008fb3 /system/bin/linker (__dl___linker_init+358)

05-16 01:32:25.074 845 845 F DEBUG : #08 pc 000027c0 /system/bin/linker (_start+4)

Sometime happen once or twice, sometimes keeps happening and phone goes into loop.

This can be avoided by moving this line export LD_SHIM_LIBS /system/lib/libril.so|libshim_ril.so to the start of the early-init section of init.qcom.rc script. like this:

on early-init

export LD_SHIM_LIBS /system/lib/libril.so|libshim_ril.so

.

.

.other_early_init_codes

.

.

export LD_SHIM_LIBS /system/lib/libril.so|libshim_ril.so

I hope I've explained things better now. I'm still not sure what makes the phone recover from the crash and continue booting but sometimes it just seems to loop. However, It's your kernel whichever you chose it's up to you.

More information:

Stuck in boot animation problem seems to caused by:

chmod 0640 /sys/fs/selinux/enforce
chmod 0440 /sys/fs/selinux/policy

in early-init section in init.qcom.rc script. Removing this lines allowed the boot to complete. Hope this helps someone.