[Android Q&A, Help & Troubleshooting] emowing:
I am trying to port a rom for MT6753 to another MT6753 device.

1. Pulled boot.img from both devices and unpacked it.

2. Replace zImage and repacked

3. Pulled system from both devices

4. Flash modified boot image and modified system image.

5. Device boot loop at kernel logo, its never made it to the boot animation

I tried to add in a kernel command line to set the kernel to permissive mode but that didn't work either. Basically every system services fail to start due to SELinux. Can someone point me into the right direction?

Here is a snippet of the error:

[ 18.858085]<0> (0)[1:init]init: starting 'logd'
[ 18.859407]<0> (0)[1:init]init: starting 'healthd'
[ 18.861050]<0> (0)[1:init]init: Warning! Service lmkd needs a SELinux domain defined; please fix!
[ 18.861109]<0> (0)[1:init]init: starting 'lmkd'
[ 18.862705]<0> (0)[1:init]init: Warning! Service servicemanager needs a SELinux domain defined; please fix!
[ 18.862764]<0> (0)[1:init]init: starting 'servicemanager'
[ 18.864314]<0> (0)[1:init]init: Warning! Service vold needs a SELinux domain defined; please fix!
[ 18.864370]<0> (0)[1:init]init: starting 'vold'
[ 18.865946]<0> (0)[1:init]init: Warning! Service netd needs a SELinux domain defined; please fix!
[ 18.866003]<0> (0)[1:init]init: starting 'netd'
[ 18.871492]<0>-(0)[397:init]audit_printk_skb: 78 callbacks suppressed
[ 18.871542]<0> (0)[397:init]type=1400 audit(1458538708.960:161): avc: denied { execute } for pid=397 comm="init" name="logd" dev="mmcblk0p20" ino=736 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.871647]<0> (0)[397:init]init: cannot execve('/system/bin/logd'): Permission denied
[ 18.877051]<0> (0)[399:init]type=1400 audit(1458538708.960:162): avc: denied { execute } for pid=399 comm="init" name="lmkd" dev="mmcblk0p20" ino=731 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.877154]<0> (0)[399:init]init: cannot execve('/system/bin/lmkd'): Permission denied
[ 18.877884]<0> (0)[400:init]type=1400 audit(1458538708.970:163): avc: denied { execute } for pid=400 comm="init" name="servicemanager" dev="mmcblk0p20" ino=831 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.877912]<0> (0)[400:init]init: cannot execve('/system/bin/servicemanager'): Permission denied
[ 18.878539]<0> (0)[401:init]type=1400 audit(1458538708.970:164): avc: denied { execute } for pid=401 comm="init" name="vold" dev="mmcblk0p20" ino=867 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.878563]<0> (0)[401:init]init: cannot execve('/system/bin/vold'): Permission denied
[ 18.879377]<0> (0)[398:healthd]binder: read put err 29189 to user 0000007fa502c108, thread error 29189:29185
[ 18.880704]<0> (0)[402:init]type=1400 audit(1458538708.970:165): avc: denied { execute } for pid=402 comm="init" name="netd" dev="mmcblk0p20" ino=778 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.880730]<0> (0)[402:init]init: cannot execve('/system/bin/netd'): Permission denied
[ 18.881022]<0> (0)[1:init]init: Warning! Service debuggerd needs a SELinux domain defined; please fix!
[ 18.881037]<0> (0)[1:init]init: starting 'debuggerd'
[ 18.881591]<0> (0)[1:init]init: Warning! Service debuggerd64 needs a SELinux domain defined; please fix!
[ 18.881605]<0> (0)[1:init]init: starting 'debuggerd64'
[ 18.882052]<0> (0)[1:init]init: Warning! Service surfaceflinger needs a SELinux domain defined; please fix!
[ 18.882066]<0> (0)[1:init]init: starting 'surfaceflinger'
[ 18.882495]<0> (0)[1:init]init: Warning! Service drm needs a SELinux domain defined; please fix!
[ 18.882509]<0> (0)[1:init]init: starting 'drm'
[ 18.882937]<0> (0)[1:init]init: Warning! Service media needs a SELinux domain defined; please fix!
[ 18.882951]<0> (0)[1:init]init: starting 'media'
[ 18.883378]<0> (0)[1:init]init: Warning! Service installd needs a SELinux domain defined; please fix!
[ 18.883393]<0> (0)[1:init]init: starting 'installd'
[ 18.883815]<0> (0)[1:init]init: Warning! Service keystore needs a SELinux domain defined; please fix!
[ 18.883848]<0> (0)[1:init]init: starting 'keystore'
[ 18.884288]<0> (0)[1:init]init: Warning! Service mobile_log_d needs a SELinux domain defined; please fix!
[ 18.884302]<0> (0)[1:init]init: starting 'mobile_log_d'
[ 18.884738]<0> (0)[1:init]init: Warning! Service netdiag needs a SELinux domain defined; please fix!
[ 18.884752]<0> (0)[1:init]init: starting 'netdiag'
[ 18.885175]<0> (0)[1:init]init: Warning! Service aal needs a SELinux domain defined; please fix!
[ 18.885189]<0> (0)[1:init]init: starting 'aal'
[ 18.885694]<0> (0)[1:init]init: Warning! Service autokd needs a SELinux domain defined; please fix!
[ 18.885708]<0> (0)[1:init]init: starting 'autokd'
[ 18.886140]<0> (0)[1:init]init: Warning! Service DMAgent needs a SELinux domain defined; please fix!
[ 18.886154]<0> (0)[1:init]init: starting 'DMAgent'
[ 18.886591]<0> (0)[1:init]init: Warning! Service PPLAgent needs a SELinux domain defined; please fix!
[ 18.886605]<0> (0)[1:init]init: starting 'PPLAgent'
[ 18.887040]<0> (0)[1:init]init: Warning! Service agpsd needs a SELinux domain defined; please fix!
[ 18.887054]<0> (0)[1:init]init: starting 'agpsd'
[ 18.887610]<0> (0)[405:init]type=1400 audit(1458538708.980:166): avc: denied { execute } for pid=405 comm="init" name="surfaceflinger" dev="mmcblk0p20" ino=843 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.887641]<0> (0)[405:init]init: cannot execve('/system/bin/surfaceflinger'): Permission denied
[ 18.887953]<0> (0)[404:init]type=1400 audit(1458538708.980:167): avc: denied { execute } for pid=404 comm="init" name="debuggerd64" dev="mmcblk0p20" ino=669 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.887980]<0> (0)[404:init]init: cannot execve('/system/bin/debuggerd64'): Permission denied
[ 18.888238]<0> (0)[403:init]type=1400 audit(1458538708.980:168): avc: denied { execute } for pid=403 comm="init" name="debuggerd" dev="mmcblk0p20" ino=668 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.888264]<0> (0)[403:init]init: cannot execve('/system/bin/debuggerd'): Permission denied
[ 18.888526]<0> (0)[406:init]type=1400 audit(1458538708.980:169): avc: denied { execute } for pid=406 comm="init" name="drmserver" dev="mmcblk0p20" ino=682 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.888553]<0> (0)[406:init]init: cannot execve('/system/bin/drmserver'): Permission denied
[ 18.888817]<0> (0)[407:init]type=1400 audit(1458538708.980:170): avc: denied { execute } for pid=407 comm="init" name="mediaserver" dev="mmcblk0p20" ino=751 scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
[ 18.888842]<0> (0)[407:init]init: cannot execve('/system/bin/mediaserver'): Permission denied
[ 18.889579]<0> (0)[408:init]init: cannot execve('/system/bin/installd'): Permission denied
[ 18.889887]<0> (0)[410:init]init: cannot execve('/system/bin/mobile_log_d'): Permission denied
[ 18.890610]<0> (0)[411:init]init: cannot execve('/system/bin/netdiag'): Permission denied
[ 18.891061]<0> (0)[412:init]init: cannot execve('/system/bin/aal'): Permission denied
[ 18.891349]<0> (0)[413:init]init: cannot execve('/system/bin/autokd'): Permission denied
[ 18.891629]<0> (0)[409:init]init: cannot execve('/system/bin/keystore'): Permission denied
[ 18.891910]<0> (0)[414:init]init: cannot execve('/system/bin/dm_agent_binder'): Permission denied
[ 18.892188]<0> (0)[415:init]init: cannot execve('/system/bin/ppl_agent'): Permission denied
[ 18.893582]<0> (0)[416:init]init: cannot execve('/system/bin/mtk_agpsd'): Permission denied