[Moto G5S  ROMs, Kernels, Recoveries, & Other Devel] kalyansundhar:
Well, I am doing little bit here and there with whatever limited experience I have.

My main concern now is my lack of understanding on how everything fits in the big picture. And without knowing it if I make some change that shouldn't be screwing up something which works fine.

I think it is better for me to stop here, so that good developers could take it further. Anyway the repositories are public.

I cannot push system.img to github because of file size limitation. File size is 900MB and allowed limit is 100MB.

I would share it in my onedrive account and publish the link.

Bugs so far:

1) Developer options - Getting selinux permission issue which is blocked by global rule. I don't know how to override a global rule.

2) Moto Actions - Not working.

3) NFC - Getting zygote error related to seapp_context.

01-02 21:32:58.857 1534 1593 E ActivityManager: android.util.Log$TerribleFailure: Removing process that hasn't been killed: ProcessRecord{ffc4c99 8487:com.android.nfc/1027}
01-02 21:32:58.857 1534 1593 E ActivityManager:	at android.util.Log.wtf(Log.java:295)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at android.util.Slog.wtfStack(Slog.java:98)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at com.android.server.am.ActivityManagerService.removeLruProcessLocked(ActivityManagerService.java:3419)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at com.android.server.am.ActivityManagerService.processStartTimedOutLocked(ActivityManagerService.java:6611)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at com.android.server.am.ActivityManagerService.-wrap13(ActivityManagerService.java)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:1895)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at android.os.Handler.dispatchMessage(Handler.java:102)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at android.os.Looper.loop(Looper.java:154)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at android.os.HandlerThread.run(HandlerThread.java:61)
01-02 21:32:58.857 1534 1593 E ActivityManager:	at com.android.server.ServiceThread.run(ServiceThread.java:46)
01-02 21:32:58.872 8500 8500 E SELinux : seapp_context_lookup: No match for app with uid 1027, seinfo default, name com.android.nfc
01-02 21:32:58.873 8500 8500 E SELinux : selinux_android_setcontext: Error setting context for app with uid 1027, seinfo default: No such file or directory
01-02 21:32:58.873 8500 8500 E Zygote : selinux_android_setcontext(1027, 0, "default", "com.android.nfc") failed
01-02 21:32:58.873 8500 8500 F art : art/runtime/jni_internal.cc:492] JNI FatalError called: frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:631: selinux_android_setcontext failed
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] Runtime aborting...
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] Aborting thread:
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] "main" prio=5 tid=1 Native
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x73784268 self=0xa5a05400
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] | sysTid=555 nice=0 cgrp=default sched=0/0 handle=0xa86de534
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] | state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] | stack=0xbe70f000-0xbe711000 stackSize=8MB
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] | held mutexes= "abort lock"
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] kernel: (couldn't read /proc/self/task/555/stack)
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] native: (backtrace::Unwind failed for thread 555: Thread doesn't exist)
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] at com.android.internal.os.Zygote.nativeForkAndSpecialize(Native method)
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] at com.android.internal.os.Zygote.forkAndSpecialize(Zygote.java:95)
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:225)
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:853)
01-02 21:32:58.905 8500 8500 F art : art/runtime/runtime.cc:422] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)

Looks like all 3 issues boils down to selinux, file contexts, uevent permissions.

Thanks,

KS