yashsingh1/xdaforums huggingface dataset:
[General Questions and Answers] zetet:
It may be worth trying: http://www.stupdroid.com/2017/12/twrp-root-Doogee-Mix-Lite.html

---------- Post added at 03:55 PM ---------- Previous post was at 03:54 PM ----------

Oh btw, can You check if OTG works on Your's device? Mine does not power up nor connect anything.
[Xperia Z1 Compact Android Development] munjeni:
Disclaimer:

* You flash this ROM at your own risk and responsibility.

* This ROM is provided without ANY WARRANTY WHATSOEVER, not even the warranty that it works.

* None of the developers of this ROM will be held accountable for any damages, complaints or anything.

This rom is pre pre pre pre alpha, almost nothing is working! Just for everybody who want see Oreo look. I'm out of free time but I will update each time when I get some free time. Whats working, whats not working...etc? You tell me! You fix something, you tell me! You found something, you tell me! Adb somehow is not working, you need to change ro.build.type from userdebug to eng and adb will start working. If you have idea about whats going on with adb, you tell me! Somehow managed to boot this rom, a lot of work and time I spent to get Oreo boot, got also credentials working but somehow camera is fail to work, probably we must use Snap camera instead of the Camera2? You can try snap camera and tell me. You can try other cameras too and tell me!

Enjoy! :)

Source code && how to build:

https://xdaforums.com/showpost.php?p=74724831&postcount=1008

Download:

https://mega.nz/#!ZB4ilbrL!nI_YV54IMBmKpA1BE4L9VYcwm3nsuLXAGKOu35NJdyQ
[Xperia Z1 Compact Android Development] munjeni:
Can you post some screenshoots? Whats working? Whats not working? Etc? I'm so lazy :)
[Xperia Z1 Compact Android Development] AreusShow:
risk

while it is very risky to put this firmware.:)
[Xperia Z1 Compact Android Development] munjeni:
Not a risky, just some more things is not working! Bugs need to be identified and fixed one by one.
[Xperia Z1 Compact Android Development] Viktor245:
Mobile data and camera are not working.
[Xperia Z1 Compact Android Development] munjeni:
Wifi ok?
[Xperia Z1 Compact Android Development] Viktor245:
Do not have the opportunity to check it out.
[Xperia Z1 Compact Android Development] zhy326_cn:
Wifi can't be opened
[Xperia Z1 Compact Android Development] -totonio-:
Waoo, I changed my phone, now I can use my z1c to test all lol

In the afternoon I'm going to install it!
[Xperia Z1 Compact Android Development] omkarmahananda:
i will wait for working mobile data and wifi build
[Xperia Z1 Compact Android Development] munjeni:
Me too :) I'm opened source code ppublic, everybody if free to use it and try fix something.
[Xperia Z1 Compact Android Development] omkarmahananda:
actually i have no idea how this thing work.

but can you help learning ?!

any thread or any website or anything?

thank you
[Xperia Z1 Compact Android Development] rodomaxi2:
Did you have think include magisk for this version?
[Xperia Z1 Compact Android Development] -totonio-:
Sorry for being late:

Audio doesn't work

Wifi doesn't work

I'm not able to test cell data

Camera doesn't work, neither footej

ADB doesn't work, no usb at all, the device isn't listed neither with adb devices and devices control panel in windows

Bluetooth yes

Vibrating yes
[Xperia Z1 Compact Android Development] nhicko95:
[MENTION=8556932]hackintosh5[/MENTION] here
[Xperia Z1 Compact Android Development] 115ek:
Heyho. I just tested building from [MENTION=4120742]munjeni[/MENTION] 's sources. Unfortunately TWRP throwed an error 6. I checked the updater script and found some strange lines. With them removed I was able to install and boot :)

I'm really up for doing some fixes, but for me it's learning by doing which can be a time intensive process. ;)

BTW: USB transfer works by disabling ADB in developer options... I just copied the screenshots off the device.
[Xperia Z1 Compact Android Development] -totonio-:
But ADB works to you? Can you see the phone if you do adb devices?

[MENTION=4120742]munjeni[/MENTION] can I try to replace the libs just like as porting a custom rom from the N builds? Or it is wasted time?
[Xperia Z1 Compact Android Development] 115ek:
Yes, adb works. But only if you revert this commit https://github.com/munjeni/android_device_sony_amami/commit/e0cde4386d51ad2b45d7700f495a85fdb75dc8d2.

Adb from the 8.0 tree seems to be broken, but maybe it's a problem with our devicetree. :rolleyes:

Nevertheles, as Munjeni already did, replacing the adbd with a prebuilt one (I used one from an Android 7 tree i had lying around) works quite fine.
[MENTION=4120742]munjeni[/MENTION] : Is adb built from 8.0 source working for you? Or is it a permission problem?
[Xperia Z1 Compact Android Development] 115ek:
Hey. I've got some news. Wifi was working for me. I just installed a new build and was able to connect :)

I can't test data connection - the sim reader is broken in my test device.

I think we should move ahead to lineage 15.1 (android 8.1) because support for lineage 15.0 was already dropped.

Unfortunately there are several build issues - let's see what the time brings.

*Edit: adb is fixed now :)
[Xperia Z1 Compact Android Development] 115ek:
Booted 15.1 some minutes ago.

Working

adb

MTP

brightness slider

not working

wifi

automatic brightness

audio

camera

LEDs

everything else...
[Xperia Z1 Compact Android Development] munjeni:
[MENTION=8036586]115ek[/MENTION] can you post logcat + dmesg from the fresh booted device?
[Xperia Z1 Compact Android Development] 115ek:
Sure ;)

Many, many errors. I made some "dirty" hacks to get the thing building. NFC is also disabled.

I'm happy to hear from you :good:

Logcat was too big - zip was neccessary...

dmesg seems really short - the beginning is missing. Maybe the buffer is too small. Where can I increase it? Do you know it immediately? Otherwise I'll look into it...

edit: I can also upload my built .zip - any idea where to upload? Should be free, fast and without these "become premium or download with 56kb/s..." sh*t ?
[Xperia Z1 Compact Android Development] omkarmahananda:
good going buddy
[Xperia Z1 Compact Android Development] Trandaa:
Use some cloud, for example Mega, or such stuff. These are free and fast
[Xperia Z1 Compact Android Development] nhicko95:
Use basketbuild.com it's simple its fast I recommended it [MENTION=6425591]SpiritCroc[/MENTION] and maybe you should try it
[Xperia Z1 Compact Android Development] munjeni:
[MENTION=8036586]115ek[/MENTION] from your log I see tad service failed to start, it is very important service and without it cred mgr, camera and almost everything related to it fail to start. You need to solve tad first. Seccond thing which I found is camera daemon and missing symbol, try to add missing simbol to libshims.
[Xperia Z1 Compact Android Development] 115ek:
It sounds like you already know the problem with tad service. Any idea how to fix it? ;)

From my understanding the 3 vendor blobs play a role:

ta_qmi_service

ta_param_loader

tad_static

They can access the trim area partition dev/block/bootdevice/by-name/TA and provide an interface to other services.

How to debug in such a case? What are you doing to fix such a problem? For me it seems like a permissions problem. Or the partition wasn't mounted successfully? :rolleyes:
[Xperia Z1 Compact Android Development] munjeni:
Last time when I checked that found android level changes in users and groups for some sockets, and I had problem changing user and groups since another services got broken if I change one secco d got broken and wice versa. If I not forgot I have hex edited some binaries for user and group and fixed some services but sorry it was half year ago, didn't remember. To debug tad look into logcat! Also you can start tad manualy with help of strace tool to get more idea! I will try build byself in next few days...
[Xperia Z1 Compact Android Development] 115ek:
I took some strace logs of the binaries. I don't know how to analyze them correctly. I just looked for negative return values.

Some examples:

openat(AT_FDCWD, "/property_contexts", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/system/etc/selinux/plat_property_contexts", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/plat_property_contexts", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3

This seems okay for me, binary is looking for context file, and fails to open it in some places. But finally it finds it and everything is okay.

faccessat(AT_FDCWD, "/dev/urandom", R_OK) = 0
futex(0xa85a20ec, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom(0xbec04568, 40, GRND_NONBLOCK) = -1 ENOSYS (Function not implemented)
openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 3

This one seems strange for me. Function not implemented...

Edit: Just read this ENOSYS The glibc wrapper function for getrandom() determined that the underlying kernel does not implement this system call. getrandom() was introduced in version 3.17 of the Linux kernel. We're using 3.4 :silly:

openat(AT_FDCWD, "/sys/power/wake_lock", O_WRONLY|O_APPEND|O_LARGEFILE) = -1 EACCES (Permission denied)

About this one I'm worried the most.

faccessat(AT_FDCWD, "/dev/socket/logdw", W_OK) = 0
faccessat(AT_FDCWD, "/dev/pmsg0", W_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/dev/pmsg0", W_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/dev/pmsg0", W_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/dev/pmsg0", W_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/dev/pmsg0", W_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/dev/pmsg0", W_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/dev/socket/logdw", W_OK) = 0
faccessat(AT_FDCWD, "/dev/socket/logdw", W_OK) = 0
faccessat(AT_FDCWD, "/dev/socket/logdw", W_OK) = 0
faccessat(AT_FDCWD, "/dev/socket/logdw", W_OK) = 0
faccessat(AT_FDCWD, "/dev/socket/logdw", W_OK) = 0

Here's another one...

openat(AT_FDCWD, "/etc/qmi_fw.conf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

And this file seems to be missing to. I wasn't even able to locate it in my android sourcetree :(

I appreciate any tipps and tricks concerning these errors and using strace like a pro :cool:
[Xperia Z1 Compact Android Development] munjeni:
This is where it fail:

[COLOR="Blue"]setgid32(1000) = 0
setgroups32(2, [2993, 3004]) = 0[/COLOR]
setuid32(2998) = 0
capset({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, {effective=1<<CAP_BLOCK_SUSPEND, permitted=1<<CAP_BLOCK_SUSPEND, inheritable=0}) = 0
openat(AT_FDCWD, "[COLOR="Green"]/sys/power/wake_lock[/COLOR]", O_WRONLY|O_APPEND|O_LARGEFILE) = -1 EACCES (Permission denied)
clock_gettime(CLOCK_REALTIME, {tv_sec=1518108019, tv_nsec=720804999}) = 0
getuid32() = [COLOR="Red"]2998[/COLOR]

user id 2998 and groups 2993,3004 , probably none of these for green! You can chech green with "ls -l /sys/power/wake_lock" . If you change owner and group for green some other service will fail. If I remember corectly I was play with it and last thing which I tried was hex modified binary (changed group id), but I didn't remember if I done it :)
[Xperia Z1 Compact Android Development] munjeni:
How did you solved INSTALL_LINUX_HEADERS error? I installed headers manualy, it was only workaround. And also what you have done for nfc to make it compile? This is where I am stuch right now:

ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:37.14: The type NativeNfcManager must implement the inherited abstract method DeviceHost.doSetScreenState(int)
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:37.14: The type NativeNfcManager must implement the inherited abstract method DeviceHost.enableDtaMode()
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:37.14: The type NativeNfcManager must implement the inherited abstract method DeviceHost.disableDtaMode()
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:37.14: The type NativeNfcManager must implement the inherited abstract method DeviceHost.dump(FileDescriptor)
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:37.14: The type NativeNfcManager must implement the inherited abstract method DeviceHost.getNciVersion()
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:37.14: The type NativeNfcManager must implement the inherited abstract method DeviceHost.routeAid(byte[], int, int)
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:143.20: The method routeAid(byte[], int) of type NativeNfcManager must override or implement a supertype method
ERROR: /home/Desktop/android/lineage/packages/apps/Nfc/nxp/src/com/android/nfc/dhimpl/NativeNfcManager.java:369.19: The method dump() of type NativeNfcManager must override or implement a supertype method
[Xperia Z1 Compact Android Development] 115ek:
I'm ashamed of this, but I just didn't built NFC :(

# NFC
#EEEE temporary disable
#PRODUCT_PACKAGES += \
# nfc.qcom \
# libnfc \
# libnfc_ndef \
# libnfc_jni \
# Nfc \
# Tag \
# com.android.nfc_extras

I thought there are things with higher priority...

And that's my way of "fixing" the INSTALL_LINUX_HEADERS error:

vendor/lineage/build/tasks/kernel.mk looks like that:

.PHONY: INSTALLED_KERNEL_HEADERS
INSTALLED_KERNEL_HEADERS: $(KERNEL_HEADERS_INSTALL_DEPS)

# Dependencies on $(KERNEL_OUT)/usr are deprecated
$(KERNEL_HEADERS_INSTALL_DIR): $(KERNEL_HEADERS_INSTALL_DEPS)
@echo "Depending on $(KERNEL_HEADERS_INSTALL_DIR) is deprecated." 1>&2
@echo "Use INSTALLED_KERNEL_HEADERS instead." 1>&2
#EEEE dirty hack
#@exit 1

I'm not quite sure what impact that has, but the build completes. The build system is so huge and complex :silly:

I don't know if there are people who understand it in all its details :confused:
[Xperia Z1 Compact Android Development] munjeni:
You omited linux headers and got a lot of errors in audio-caf and media-caf since it depend on linux headers? Something like:

LOCAL_C_INCLUDES += \
external/tinyalsa/include \
external/tinycompress/include \
external/expat/lib \
hardware/libhardware/include \
$(call include-path-for, audio-route) \
$(call include-path-for, audio-effects) \
$(LOCAL_PATH)/$(AUDIO_PLATFORM) \
$(LOCAL_PATH)/audio_extn \
$(LOCAL_PATH)/voice_extn \
[COLOR="Red"]$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include[/COLOR]

I'm solved it by manualy installing linux headers:

cd /home/Desktop/android/lineage/kernel/sony/msm8974 ; make O=/home/Desktop/android/lineage/out/target/product/amami/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=/home/Desktop/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- headers_install
[Xperia Z1 Compact Android Development] 115ek:
:confused:

Okay. Any way to do this automatically? Maybe in the device tree? A shellscript?

amami:/ # ls -l /sys/power/wake_lock
-rw-rw---- 1 radio wakelock 4096 1970-01-05 21:33 /sys/power/wake_lock
amami:/ # ls -n /sys/power/wake_lock
-rw-rw---- 1 1001 3010 4096 1970-01-05 21:33 /sys/power/wake_lock

How to check groupmembers? And where's the best place to set groupmembers? in init.*.rc files?

Actually ta_qmi_service is already in group wakelock. :confused:

# Trim Area QMI service
service ta_qmi_service /vendor/bin/ta_qmi_service
user oem_2998
group oem_2998 oem_2993 system root net_raw wakelock
disabled
[Xperia Z1 Compact Android Development] munjeni:
Yes but see output from your LS

1001 3010 4096 1970-01-05 21:33 /sys/power/wake_lock

wake_lock userid is 1001 and group 3010 which is diferent than defined in .rc files, thats why you getting permission denied

Edit:

If I remembered right, last time when I play with it I found that ta_qmi_service doing RE set uid and gid so if I remembred right I didn't fixed it by changing users and group, instead I was hex modified some binaries because of that RE set... you can try maybe I am wrong!
[Xperia Z1 Compact Android Development] munjeni:
Don't know right now, any idea is welcome :)
[Xperia Z1 Compact Android Development] 115ek:
What do you mean with RE set uid?
[Xperia Z1 Compact Android Development] munjeni:
Binary itself have function to set uid and gid itself on start, you can see that on strace. But again maybe I am wrong, didn't remember for sure! Thing which I remembered is I played with some binaries that way but can't tell for sure which one!
[Xperia Z1 Compact Android Development] 115ek:
But every security relevant function you do ends in a syscall... I think you can't set UID/ GID without syscalls.
[Xperia Z1 Compact Android Development] munjeni:
To be honest, I am not optimistic with Lineage 15.1 on Amami, it not going to work good. In the same time I am realy tired with android, it irritates me that every change in api kills all previous efforts, and that thing is happening all the time, reason is - to make you buy new phone. New comercial phone for me not going to happen :) This is what I am waiting for -> https://puri.sm/shop/librem-5/ to finally say bye bye to android...
[Xperia Z1 Compact Android Development] 115ek:
Yeah, I really can understand you. ;)

But before you give up on android it would be really cool if you share your knowledge :) How did you learned all that stuff?
[Xperia Z1 Compact Android Development] munjeni:
Simple self-taught, desire is first thing you need to have, than everything going spontaneously :)
[Xperia Z1 Compact Android Development] mirhl:
I don't really like going always by the devil's advocate route

But IMHO, after Oreo, I'd be quite expecting api breakages to diminish.

Also, mainline isn't that far from google's tip either.

Just saying
[Xperia Z1 Compact Android Development] munjeni:
I'm finished Lineage 15.1 test build -> http://munjeni.myiphost.com/otapackage.zip , hope somebody test and tell us whats working/whats not. Don't expect anything boombastic from me, I simple can't forget my lost title, so I will continue as a senior member, low active!
[Xperia Z1 Compact Android Development] Viktor245:
Your first Assembly is installed well,but this next animation is not.
[Xperia Z1 Compact Android Development] vyunov55:
Stuck in boot animation.

Sorry, my English is very bad. I`m from Russia
[Xperia Z1 Compact Android Development] Viktor245:
The same thing happens
[Xperia Z1 Compact Android Development] munjeni:
You can get dmesg and logcat?
[Xperia Z1 Compact Android Development] Viktor245:
How can it be done if Android does not start, everything stops on the animation at the entrance
[Xperia Z1 Compact Android Development] munjeni:
Ok, I will try on my own phone to make it boot...
[Xperia Z1 Compact Android Development] munjeni:
First problem was tad service because of the wrong group for tad socket:

service tad_static /sbin/tad_static /dev/block/bootdevice/by-name/TA 0,16
class trimarea
user oem_2997
group oem_2997 oem_2993 root
socket tad stream 0770 system [COLOR="Red"]oem_3993[/COLOR]
seclabel u:r:tad:s0

so tad failed to connect to tad socket. Fixed by changing red to oem_2993

Tad solved, credmgr script succed, updatemiscta and etc but now problem:

logcat:

aiting another...
02-11 12:47:18.992 432 432 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0x20000
02-11 12:47:18.992 432 432 D QSEECOMAPI: : App is not loaded in QSEE
02-11 12:47:19.002 432 432 D QSEECOMAPI: : Loaded image: APP id = 4
02-11 12:47:19.012 432 432 D QSEECOMAPI: : QSEECom_dealloc_memory
02-11 12:47:19.012 432 432 D QSEECOMAPI: : QSEECom_shutdown_app, app_id = 4
02-11 12:47:19.029 432 432 E CredMgrDaemon: InitializeAndOpenSession() ended. result 1 - CREDMGR_RESULT_GENERIC_ERRO
R

dmesg:

←[32m[ 139.853083] ←[33mQSEECOM←[0m: qseecom_load_app: App (tzlibasb) does'nt exist, loading apps for first time
←[32m[ 139.858575] ←[33mQSEECOM←[0m: qseecom_load_app: App with id 4 (tzlibasb) now loaded
←[32m[ 139.869340] ←[33mQSEECOM←[0m: qseecom_unload_app: App id 4 now unloaded
←[32m[ 192.193310] ←[33mhealthd←[0m: battery l=72 v=4052 t=29.1 h=2 st=2 c=227 fc=2401000 cc=16 chg=a
←[32m[ 252.193272] ←[33mhealthd←[0m: battery l=72 v=4063 t=29.1 h=2 st=2 c=176 fc=2401000 cc=16 chg=a
←[32m[ 267.890421] ←[33mQSEECOM←[0m: qseecom_load_app: App (tzlibasb) does'nt exist, loading apps for first time
←[32m[ 267.895960] ←[33mQSEECOM←[0m: qseecom_load_app: App with id 4 (tzlibasb) now loaded
←[32m[ 267.906657] ←[33mQSEECOM←[0m: qseecom_unload_app: App id 4 now unloaded

I have no idea whats missing, you are welcome to tell me! May might be soccomp_policy? Idea?
[Xperia Z1 Compact Android Development] vyunov55:
Thank you for your work. But sorry I can't help you. I don't understand that. :good:
[Xperia Z1 Compact Android Development] 115ek:
Heyho.

Just took a strace of credmgrd. Maybe it got something to do with it :rolleyes:

Or is the problem lying at an earlier point? libQSEEComAPI.so ? :confused:

openat(AT_FDCWD, "/data/credmgr/credmgrstat.db", O_RDWR|O_CREAT|O_LARGEFILE|O_CLOEXEC, 0600) = 3
fstat64(3, {st_mode=S_IFREG|0660, st_size=16384, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0660, st_size=16384, ...}) = 0
fstatat64(AT_FDCWD, "/data/credmgr/credmgrstat.db", {st_mode=S_IFREG|0660, st_size=16384, ...}, 0) = 0
ioctl(3, _IOC(_IOC_READ, 0xf5, 0xc, 0x4), 0xbea453c8) = -1 ENOTTY (Not a typewriter)
pread64(3, "SQLite format 3\0\20\0\1\1\0@ \0\0\0\1\0\0\0\4"..., 100, 0) = 100
fcntl64(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
fcntl64(3, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1073741826, l_len=510}) = 0
fcntl64(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=1073741824, l_len=1}) = 0
fstatat64(AT_FDCWD, "/data/credmgr/credmgrstat.db-journal", 0xbea44990, 0) = -1 ENOENT (No such file or directory)
fstat64(3, {st_mode=S_IFREG|0660, st_size=16384, ...}) = 0
fstatat64(AT_FDCWD, "/data/credmgr/credmgrstat.db-wal", 0xbea44990, 0) = -1 ENOENT (No such file or directory)

and this:

fstatat64(AT_FDCWD, "/system/etc/cmsk.dat", 0xbea454b0, 0) = -1 ENOENT (No such file or directory)
[Xperia Z1 Compact Android Development] munjeni:
No, its i think missing socket:

connect(4, {sa_family=AF_UNIX, sun_path="/dev/socket/suntory/suntrold.sock"}, 35) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=2053, tv_nsec=109265177}) = 0
sendto(4, "\2\0\0\0", 4, 0, NULL, 0) = 4
sendto(4, "\330\220\221\247", 4, 0, NULL, 0) = 4
recvfrom(4, "done", 4, 0, NULL, NULL) = 4
close(4) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1518448875, tv_nsec=327229273}) = 0
getuid32() = 0
writev(3, [{iov_base="\0\200\34\353\260\201ZY\37\201\23", iov_len=11}, {iov_base="\6", iov_len=1}, {iov_base="CredMgrDaemon\0", iov_len=14}, {iov_base="android_get_control_socket faile"..., iov_len=34}], 4) = 60
clock_gettime(CLOCK_REALTIME, {tv_sec=1518448875, tv_nsec=327648596}) = 0
getuid32() = 0
writev(3, [{iov_base="\0\200\34\353\260\201ZT\205\207\23", iov_len=11}, {iov_base="\6", iov_len=1}, {iov_base="CredMgrDaemon\0", iov_len=14}, {iov_base="CreateSocket() ended. result 1 -"..., iov_len=62}], 4) = 88
clock_gettime(CLOCK_REALTIME, {tv_sec=1518448875, tv_nsec=328021200}) = 0
getuid32() = 0

And I can see a lot of ENOENT, missing files need to be checked, maybe its inside cache partition instead of data partition (just example). For example on my build I have success in this (not a case in your build?):

fstatat64(AT_FDCWD, "/data/credmgr/credmgrstat.db", {st_mode=S_IFREG|0660, st_size=16384, ...}, 0) = 0
ioctl(4, _IOC(_IOC_READ, 0xf5, 0xc, 0x4), 0xbea45308) = -1 ENOTTY (Not a typewriter)

Check log from credmgr script -> /cache/credmgr.log , on my build its succed.

Files /data/credmgr/credmgrstat.db-journal and /data/credmgr/credmgrstat.db-wal not exist on cm14.1 and I think that -1 error for these 2 files can be ignored. I have no idea whats missing, this (android_get_control_socket failed) is only a thing in your log which make me think that socket is a problem

Edit:

I'm getting excatly the same strace log on lineage 14.1 , excatly the same android get control socket error. That error is because socket allready exist. On lineage 14.1 credmgr is ok!