[OnePlus 6 & 6T Cross Device Development] Chiyo-chan:
Hi,

I'm here yet again to bother you with one of my many problems (well for now, it's hopefully the last one :D).

Thanks in advance again for your help!

Since a couple of week, I'm facing an intermittent phone not booting issue. It's stays forever at the booting animation.

Restarting the phone by any means (long push on power, adb reboot...) and the phone restarts. It usually takes one restart (but sometime more) for the phone to be able to boot.

I first tough it was a magisk's module causing it, but after some investigations, I realized it also happens when boot partition is reflashed to the default one provided with the ROM. I've tried to reflash the ROM, to both slot, and it didn't correct the problem.

I've attached a ZIP file containing 3 logcat (trimmed to 5k lines) taken when:

logcat-magisk-trim.ok: phone boots OK (with magisk)

logcat-magisk-trim.ko: phone doesn't boot (with magisk)

logcat-nomagisk-trim.ko: phone doesn't boot (default boot partition, no magisk)

The problematic part seems to located at the beginning of the not booting logs (or at least the "--------- beginning of crash" of line makes me think so, as it's not present in booting logcat).

Any idea what's happening? Is my

--------- beginning of system
07-25 20:38:39.243 668 668 I vold : Vold 3.0 (the awakening) firing up
07-25 20:38:39.243 668 668 D vold : Detected support for: ext4 f2fs ntfs vfat
07-25 20:38:39.247 668 668 D vold : VoldNativeService::start() completed OK
07-25 20:38:39.667 723 740 I QISL : QSEE Interrupt Service Listener Thread is started
07-25 20:38:39.667 723 740 I QISL : QSEE Interrupt Service Listener was activated successfully
07-25 20:38:39.668 723 723 D SPL : Call QSEECom_register_listener()
07-25 20:38:39.668 723 723 D SPL : Registered listener sucessfully!
07-25 20:38:39.668 723 723 D SPL : pipe read-fd [33] write-fd [34]
07-25 20:38:39.668 723 723 D SPL : Create thread
07-25 20:38:39.668 723 723 D SPL : Thread created sucessfully.
07-25 20:38:39.668 723 741 D SPL : spl_dispatch() started
07-25 20:38:39.668 723 741 D SPL : ==== Wait For Request ======
07-25 20:38:39.672 668 668 I Checkpoint: cp_prepareCheckpoint called
07-25 20:38:39.683 668 668 I vold : fscrypt_initialize_systemwide_keys
07-25 20:38:39.683 668 668 D vold : Key exists, using: /data/unencrypted/key
07-25 20:38:39.692 725 725 I keystore2: keystore2_main: Keystore2 is starting.
07-25 20:38:39.692 725 725 I keystore2: keystore2_main: Setting up sqlite logging for keystore2
07-25 20:38:39.694 725 725 W keystore2: keystore2::metrics_store: In update_keystore_crash_sysprop: Failed to read the existing system property due to: In read_keystore_crash_count: Property not set..Therefore, keystore crashes will not be logged.
07-25 20:38:39.695 725 725 I keystore2: keystore2_main: Starting thread pool now.
07-25 20:38:39.699 725 745 I keystore2: keystore2::shared_secret_negotiation: Shared secret negotiation concluded successfully.
07-25 20:38:39.775 725 725 I keystore2: keystore2::globals: Add emulation wrapper around Keymaster device for security level: SecurityLevel(1)
07-25 20:38:39.775 725 745 I keystore2: keystore2::shared_secret_negotiation: No StrongBox Keymint available, so no RoT transfer
07-25 20:38:39.777 725 725 I keystore2: keystore2_main: Not publishing IRemotelyProvisionedKeyPool service: In new_native_binder: Failed to get TEE Remote Provisioner instance.
07-25 20:38:39.777 725 725 I keystore2:
07-25 20:38:39.777 725 725 I keystore2: Caused by:
07-25 20:38:39.777 725 725 I keystore2: 0: In get_remotely_provisioned_component.
07-25 20:38:39.777 725 725 I keystore2: 1: In connect_remotely_provisioned_component.
07-25 20:38:39.777 725 725 I keystore2: 2: Error::Km(ErrorCode(-68))
07-25 20:38:39.777 725 725 I keystore2: keystore2_main: Successfully registered Keystore 2.0 service.
07-25 20:38:39.777 725 725 I keystore2: keystore2_main: Joining thread pool now.
07-25 20:38:39.792 668 668 I vold : Kernel doesn't support FS_IOC_ADD_ENCRYPTION_KEY. Falling back to session keyring
07-25 20:38:39.792 668 668 D vold : Added key 476074646 (ext4:eae0ee14e881ca2a) to keyring 478969013 in process 668
07-25 20:38:39.792 668 668 D vold : Added key 531603033 (f2fs:eae0ee14e881ca2a) to keyring 478969013 in process 668
07-25 20:38:39.792 668 668 D vold : Added key 40657023 (fscrypt:eae0ee14e881ca2a) to keyring 478969013 in process 668
07-25 20:38:39.796 668 668 I vold : Wrote system DE key reference to:/data/unencrypted/ref
07-25 20:38:39.796 668 668 D vold : Generating standard storage key
07-25 20:38:39.797 668 668 D vold : Added key 96556985 (ext4:4518c91a397f884c) to keyring 478969013 in process 668
07-25 20:38:39.797 668 668 D vold : Added key 231609439 (f2fs:4518c91a397f884c) to keyring 478969013 in process 668
07-25 20:38:39.797 668 668 D vold : Added key 166962956 (fscrypt:4518c91a397f884c) to keyring 478969013 in process 668
07-25 20:38:39.798 668 668 I vold : Wrote per boot key reference to:/data/unencrypted/per_boot_ref
07-25 20:38:39.820 668 668 I incfs : Initial API level of the device: 27
07-25 20:38:39.820 668 668 I incfs : ro.incremental.enable:
07-25 20:38:39.820 668 668 E incfs : IncFs_Features: failed to open features dir, assuming v1/none.: No such file or directory
07-25 20:38:39.821 725 747 I keystore2: keystore2::maintenance: In early_boot_ended.
07-25 20:38:39.827 725 747 I keystore2: keystore2::globals: Touching Keystore 2.0 database for this first time since boot.
07-25 20:38:39.827 725 747 I keystore2: keystore2::globals: Calling cleanup leftovers.
07-25 20:38:39.842 725 747 I keystore2: keystore2::super_key: Starting boot level watcher.
07-25 20:38:39.842 725 747 I keystore2: keystore2::maintenance: Call to earlyBootEnded succeeded for security level TRUSTED_ENVIRONMENT.
07-25 20:38:39.842 725 763 I keystore2: keystore2::super_key: Read keystore.boot_level value 30
07-25 20:38:39.842 725 747 E keystore2: keystore2::maintenance: Call to earlyBootEnded failed for security level STRONGBOX: In call_with_watchdog: getting keymint device.
07-25 20:38:39.842 725 763 I keystore2: keystore2::super_key: Read keystore.boot_level value 30
07-25 20:38:39.842 725 747 E keystore2: keystore2::error: In call_with_watchdog: getting keymint device
07-25 20:38:39.842 725 747 E keystore2:
07-25 20:38:39.842 725 747 E keystore2: Caused by:
07-25 20:38:39.842 725 747 E keystore2: 0: In get_keymint_device.
07-25 20:38:39.842 725 747 E keystore2: 1: In connect_keymint: Trying to get Legacy wrapper.
07-25 20:38:39.842 725 747 E keystore2: 2: Error::Km(ErrorCode(-68))
07-25 20:38:39.842 668 668 E vold : keystore2 Keystore earlyBootEnded returned service specific error: -68
07-25 20:38:40.535 668 668 D vold : fscrypt_init_user0
07-25 20:38:40.535 668 668 D vold : Preparing: /data/misc/vold/user_keys
07-25 20:38:40.536 668 668 D vold : Preparing: /data/misc/vold/user_keys/ce
07-25 20:38:40.536 668 668 D vold : Preparing: /data/misc/vold/user_keys/de
07-25 20:38:40.549 668 668 D vold : Added key 736441699 (ext4:99e3a546eb8cb03d) to keyring 478969013 in process 668
07-25 20:38:40.549 668 668 D vold : Added key 1060010926 (f2fs:99e3a546eb8cb03d) to keyring 478969013 in process 668
07-25 20:38:40.549 668 668 D vold : Added key 334653438 (fscrypt:99e3a546eb8cb03d) to keyring 478969013 in process 668
07-25 20:38:40.550 668 668 D vold : Installed de key for user 0
07-25 20:38:40.550 668 668 D vold : fscrypt_prepare_user_storage for volume null, user 0, serial 0, flags 1
07-25 20:38:40.550 668 668 D vold : Preparing: /data/system/users/0
07-25 20:38:40.551 668 668 D vold : Preparing: /data/misc/profiles/cur/0
07-25 20:38:40.551 668 668 D vold : Preparing: /data/system_de/0
07-25 20:38:40.552 668 668 D vold : Preparing: /data/vendor_de/0
07-25 20:38:40.552 668 668 D vold : Preparing: /data/misc_de/0
07-25 20:38:40.552 668 668 D vold : Preparing: /data/user_de/0
07-25 20:38:40.552 668 668 I vold : Verified that /data/system_de/0 has the encryption policy 99e3a546eb8cb03d v1 modes 127/4 flags 0x0
07-25 20:38:40.552 668 668 I vold : Verified that /data/vendor_de/0 has the encryption policy 99e3a546eb8cb03d v1 modes 127/4 flags 0x0
07-25 20:38:40.552 668 668 I vold : Verified that /data/misc_de/0 has the encryption policy 99e3a546eb8cb03d v1 modes 127/4 flags 0x0
07-25 20:38:40.552 668 668 I vold : Verified that /data/user_de/0 has the encryption policy 99e3a546eb8cb03d v1 modes 127/4 flags 0x0
07-25 20:38:40.553 668 668 D vold : /system/bin/vold_prepare_subdirs
07-25 20:38:40.553 668 668 D vold : prepare
07-25 20:38:40.553 668 668 D vold :
07-25 20:38:40.553 668 668 D vold : 0
07-25 20:38:40.553 668 668 D vold : 1
07-25 20:38:40.622 897 897 I odsign : Trying to retrieve existing HMAC key...
07-25 20:38:40.623 897 897 I odsign : Trying to retrieve existing keystore key...
07-25 20:38:40.633 897 897 I odsign : Verified public key signature.
07-25 20:38:40.633 897 897 I odsign : Initialized Keystore key.
07-25 20:38:40.633 897 897 I odsign : Device doesn't support fsverity. Falling back to full verification.
07-25 20:38:40.684 898 898 I odrefresh: ART APEX version 330400000
07-25 20:38:40.684 898 898 I odrefresh: Factory ART APEX mounted.
07-25 20:38:40.684 898 898 I odrefresh: System properties are set to default values.
07-25 20:38:40.684 898 898 I odrefresh: Factory ART APEX mounted.
07-25 20:38:40.684 898 898 I odrefresh: System properties are set to default values.
07-25 20:38:40.685 898 898 I odrefresh: Factory APEXes mounted.
07-25 20:38:40.685 898 898 I odrefresh: System properties are set to default values.
07-25 20:38:40.687 897 897 I odsign : Metrics report is empty
07-25 20:38:40.688 897 897 I odsign : /data/misc/odsign/odsign.info not found.
07-25 20:38:40.689 897 897 I odsign : odrefresh said artifacts are VALID
07-25 20:38:40.689 897 897 I odsign : On-device signing done.
07-25 20:38:40.698 725 763 I keystore2: keystore2::super_key: keystore.boot_level 1000000000 hits maximum 1000000000, finishing.
--------- beginning of crash
02-11 09:23:51.797 935 935 F linker : CANNOT LINK EXECUTABLE "/system/bin/netd": library "libnetd_resolv.so" not found: needed by main executable
02-11 09:23:51.866 952 952 I wificond: wificond is starting up...
02-11 09:23:51.870 952 952 I HidlServiceManagement: Registered android.system.wifi.keystore@1.0::IKeystore/default
02-11 09:23:52.339 1068 1068 I android.hardware.wifi@1.0-service: Wifi Hal is booting up...
02-11 09:23:52.342 1068 1068 I HidlServiceManagement: Registered android.hardware.wifi@1.6::IWifi/default
02-11 09:23:52.404 1124 1124 I irsc_util: Starting irsc tool
02-11 09:23:52.406 1124 1124 I irsc_util: Num of entries:299
02-11 09:23:52.415 1124 1124 I irsc_util: Ending irsc tool
02-11 09:23:54.015 1217 1217 I gsid : no DSU: No such file or directory
02-11 09:23:54.250 1216 1235 D BootAnimation: BootAnimationShownTiming start time: 10754ms
02-11 09:23:54.348 1293 1293 F linker : CANNOT LINK EXECUTABLE "/system/bin/netd": library "libnetd_resolv.so" not found: needed by main executable
02-11 09:23:54.357 1279 1279 I installd: installd firing up
02-11 09:23:54.454 1298 1298 I storaged: Unable to get AIDL health service, trying HIDL...
02-11 09:23:54.469 1324 1324 I imsrcsd : Uce Service HAL is starting up...
02-11 09:23:54.476 1324 1324 I imsrcsd : Uce Service HAL loading imsrcsbaseimpl
02-11 09:23:54.597 1324 1324 I imsrcsd : Starting Service for First Time imsbaseimpl
02-11 09:23:54.599 1324 1324 I imsrcsd : Interface com.qualcomm.qti.uceservice@2.3::IUceService com.qualcomm.qti.uceservice is found in manifest
02-11 09:23:54.600 1324 1324 I HidlServiceManagement: Registered com.qualcomm.qti.uceservice@2.3::IUceService/com.qualcomm.qti.uceservice
02-11 09:23:54.601 1324 1324 I imsrcsd : Interface com.qualcomm.qti.imscmservice@2.2::IImsCmService qti.ims.connectionmanagerservice is found in manifest
02-11 09:23:54.602 1324 1324 I HidlServiceManagement: Registered com.qualcomm.qti.imscmservice@2.2::IImsCmService/qti.ims.connectionmanagerservice
02-11 09:23:54.605 1324 1324 I imsrcsd : Interface vendor.qti.ims.factory@1.1::IImsFactory default is not found in manifest
02-11 09:23:54.608 1324 1324 I imsrcsd : Interface vendor.qti.ims.factory@1.0::IImsFactory default is found in manifest
02-11 09:23:54.609 1324 1324 I HidlServiceManagement: Registered vendor.qti.ims.factory@1.0::IImsFactory/default
02-11 09:23:54.611 1324 1324 I imsrcsd : Interface vendor.qti.ims.callinfo@1.0::IService default is found in manifest
02-11 09:23:54.612 1324 1324 I HidlServiceManagement: Registered vendor.qti.ims.callinfo@1.0::IService/default
02-11 09:23:54.612 1324 1324 I imsrcsd : ImsRcsBaseImpl ImsCallInfo After Registering Service
02-11 09:23:56.859 1719 1719 I wificond: wificond is starting up...
02-11 09:23:56.862 1719 1719 I HidlServiceManagement: Registered android.system.wifi.keystore@1.0::IKeystore/default
02-11 09:23:59.356 1990 1990 F linker : CANNOT LINK EXECUTABLE "/system/bin/netd": library "libnetd_resolv.so" not found: needed by main executable
02-11 09:23:59.506 1298 1298 E storaged: getService package_native failed
02-11 09:23:59.518 1298 1996 I storaged: storaged: Start
02-11 09:24:00.672 2010 2010 I imsrcsd : Uce Service HAL is starting up...
02-11 09:24:00.672 2010 2010 I imsrcsd : getAndroidPropValue : vendor.ims.DATA_DAEMON_STATUS[1]
02-11 09:24:01.875 2027 2027 I wificond: wificond is starting up...
02-11 09:24:01.879 2027 2027 I HidlServiceManagement: Registered android.system.wifi.keystore@1.0::IKeystore/default
02-11 09:24:01.928 725 751 I keystore2: keystore2::watchdog: Watchdog thread idle -> terminating. Have a great day.
02-11 09:24:04.357 2083 2083 F linker : CANNOT LINK EXECUTABLE "/system/bin/netd": library "libnetd_resolv.so" not found: needed by main executable
02-11 09:24:04.531 1298 1996 E storaged: getService package_native failed
02-11 09:24:05.672 2010 2010 I imsrcsd : RCS not supported
02-11 09:24:06.876 2105 2105 I wificond: wificond is starting up...
02-11 09:24:06.880 2105 2105 I HidlServiceManagement: Registered android.system.wifi.keystore@1.0::IKeystore/default
02-11 09:24:09.358 2161 2161 F linker : CANNOT LINK EXECUTABLE "/system/bin/netd": library "libnetd_resolv.so" not found: needed by main executable
--------- beginning of main
02-11 09:24:11.872 2165 2165 I FastMixerState: sMaxFastTracks = 8
02-11 09:24:11.875 2165 2165 V MediaUtils: physMem: 8001900544