[Moto G 4G Android Development] sevenrock:
Hi,

[MENTION=7751333]Allstargaurav[/MENTION]: FYI: my kernel repo now contains a lineage-16.0 branch:

https://github.com/sevenrock/android_kernel_motorola_msm8226/commits/lineage-16.0

It was forked from the oreo-m2 branch from

https://github.com/falcon-pie/android_kernel_motorola_msm8226.git

and contains 9 patches to add getrandom() to the kernel and also

46 security-related patches merged from my cm-14.1 branch:

https://github.com/sevenrock/android_kernel_motorola_msm8226/commits/cm-14.1

Your ROM boots fine on my phone, thanks!, but I am having

problems to build a working ROM myself, it loops the bootanima-

tion forever. I am suspecting some problems in the wifi area.

This is a logcat snippet from your ROM:

$ grep -i StartWifi logcat_xda
09-01 06:04:08.879 557 557 I SystemServer: StartWifi
09-01 06:04:09.931 557 557 D SystemServerTiming: StartWifi took to complete: 1052ms
09-01 06:04:09.931 557 557 I SystemServer: StartWifiScanning
09-01 06:04:09.936 557 557 D SystemServerTiming: StartWifiScanning took to complete: 5ms
09-01 06:04:09.937 557 557 I SystemServer: StartWifiP2P
09-01 06:04:09.990 557 557 D SystemServerTiming: StartWifiP2P took to complete: 53ms

and this is from mine:

$ grep -i "No service published" logcat10 | grep SystemServiceRegistry | grep -i wifi
08-27 17:32:06.334 543 543 E SystemServiceRegistry: No service published for: wifi
08-27 17:32:06.334 543 543 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: wifi
08-27 17:32:06.960 543 583 E SystemServiceRegistry: No service published for: wifip2p
08-27 17:32:06.960 543 583 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: wifip2p

The complete logcat from this area look like this:

08-27 17:32:06.334 543 543 E SystemServiceRegistry: No service published for: wifi
08-27 17:32:06.334 543 543 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: wifi
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:143)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at android.app.SystemServiceRegistry$51.createService(SystemServiceRegistry.java:603)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at android.app.SystemServiceRegistry$51.createService(SystemServiceRegistry.java:600)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at android.app.SystemServiceRegistry$CachedServiceFetcher.getService(SystemServiceRegistry.java:1098)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:1014)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at android.app.ContextImpl.getSystemService(ContextImpl.java:1721)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at org.lineageos.platform.internal.ProfileTriggerHelper.<init>(ProfileTriggerHelper.java:77)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at org.lineageos.platform.internal.ProfileManagerService.initialize(ProfileManagerService.java:294)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at org.lineageos.platform.internal.ProfileManagerService.initialize(ProfileManagerService.java:290)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at org.lineageos.platform.internal.ProfileManagerService.onStart(ProfileManagerService.java:259)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:126)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:113)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at org.lineageos.platform.internal.LineageSystemServer.startServices(LineageSystemServer.java:85)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at org.lineageos.platform.internal.LineageSystemServer.run(LineageSystemServer.java:60)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at java.lang.reflect.Method.invoke(Native Method)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.server.SystemServer.startOtherServices(SystemServer.java:1642)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.server.SystemServer.run(SystemServer.java:434)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.server.SystemServer.main(SystemServer.java:297)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at java.lang.reflect.Method.invoke(Native Method)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
08-27 17:32:06.334 543 543 E SystemServiceRegistry:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
08-27 17:32:06.339 543 543 W LineageSystemServer: ***********************************************
08-27 17:32:06.340 543 543 E LineageSystemServer: BOOT FAILURE starting org.lineageos.platform.internal.ProfileManagerService
08-27 17:32:06.340 543 543 E LineageSystemServer: java.lang.RuntimeException: Failed to start service org.lineageos.platform.internal.ProfileManagerService: onStart threw an exception
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:128)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:113)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.LineageSystemServer.startServices(LineageSystemServer.java:85)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.LineageSystemServer.run(LineageSystemServer.java:60)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at java.lang.reflect.Method.invoke(Native Method)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.server.SystemServer.startOtherServices(SystemServer.java:1642)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.server.SystemServer.run(SystemServer.java:434)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.server.SystemServer.main(SystemServer.java:297)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at java.lang.reflect.Method.invoke(Native Method)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:838)
08-27 17:32:06.340 543 543 E LineageSystemServer: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.WifiInfo android.net.wifi.WifiManager.getConnectionInfo()' on a null object reference
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.ProfileTriggerHelper.getActiveSSID(ProfileTriggerHelper.java:188)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.ProfileTriggerHelper.<init>(ProfileTriggerHelper.java:78)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.ProfileManagerService.initialize(ProfileManagerService.java:294)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.ProfileManagerService.initialize(ProfileManagerService.java:290)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at org.lineageos.platform.internal.ProfileManagerService.onStart(ProfileManagerService.java:259)
08-27 17:32:06.340 543 543 E LineageSystemServer:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:126)
08-27 17:32:06.340 543 543 E LineageSystemServer:	... 10 more

The local_manifest.xml used

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<!-- Motorola repos -->
<project path="device/motorola/peregrine" name="sevenrock/android_device_motorola_peregrine" remote="github" revision="lineage-16.0" />
<project path="device/motorola/msm8226-common" name="MotoDevelopment/android_device_motorola_msm8226-common" remote="github" revision="lineage-16.0" />
<project path="kernel/motorola/msm8226" name="MotoDevelopment/android_kernel_motorola_msm8226" remote="github" revision="oreo-m2" />
<project path="vendor/motorola" name="RenanQueiroz/proprietary_vendor_motorola" remote="github" revision="lineage-16.0" />

<project path="packages/resources/devicesettings" name="LineageOS/android_packages_resources_devicesettings" revision="lineage-16.0" remote="github"/>

<project path="hardware/qcom/power" name="LineageOS/android_hardware_qcom_power" groups="qcom,pdk" />
<project path="hardware/qcom/wlan-caf" name="arco/android_hardware_qcom_wlan" remote="github" revision="lineage-16.0-caf" />
<project path="device/qcom/common" name="LineageOS/android_device_qcom_common" revision="lineage-15.1" remote="github"/>
<project path="system/qcom" name="LineageOS/android_system_qcom" groups="qcom" revision="lineage-15.1" />
<project path="device/qcom/sepolicy" name="LineageOS/android_device_qcom_sepolicy" />

<project path="external/connectivity" name="LineageOS/android_external_connectivity" />

</manifest>

My peregrine device tree is based on

https://github.com/MotoDevelopment/android_device_motorola_falcon/tree/lineage-16.0

I used the wlan-caf repo because it was mentioned here:

https://review.lineageos.org/#/c/LineageOS/android_hardware_libhardware_legacy/+/223521/

The bt repo mentioned there may fix the bt problems you are seeing,

I did not test it because my device does not boot :(

Do you have any idea, or better patches ;), which could solve my problem?

Regards, sevenrock