[Treble-Enabled Device Development A/AB ROMS] Daveron81:
Xiaomi Redmi 6

Hi,

Im testing treble rom on Xiaomi Redmi 6,

System is working, but the startup is problematic. System can start up to 1h (during this period you have only starting logo).

im not sure if this is a cause, but startup logcat is filled with the errors:

05-21 10:23:47.510 3427 3427 D MtkAudioLoud: mIsZeroCoeff 0 mFilterType 3
05-21 10:23:47.510 3427 3427 D AudioMTKFilterManager: mFixedParam 0
05-21 10:23:47.510 3427 3427 D AudioALSAStreamManager: -openOutputStream(), out = 0xae764000, status = 0x0, mStreamOutVector.size() = 1
05-21 10:23:47.511 3433 3433 I AudioFlinger: HAL output buffer size 256 frames, normal sink buffer size 768 frames
05-21 10:23:47.512 361 361 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio.effect@4.0::IEffectsFactory/default in either framework or device manifest.
05-21 10:23:47.515 3427 3446 E EffectsConfig: Failed to parse /vendor/etc/audio_effects.xml: Tinyxml2 error (3): /vendor/etc/audio_effects.xml (null)
05-21 10:23:47.515 3427 3446 E EffectsFactoryConfigLoader: Failed to parse XML configuration file
05-21 10:23:47.515 3427 3446 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xaee001ec in tid 3446 (HwBinder:3427_2), pid 3427 (audio@2.0-servi)
05-21 10:23:47.542 3449 3449 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
05-21 10:23:47.543 733 733 I /system/bin/tombstoned: received crash request for pid 3446
05-21 10:23:47.543 3449 3449 I crash_dump32: performing dump of process 3427 (target tid = 3446)
05-21 10:23:47.550 3449 3449 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-21 10:23:47.551 3449 3449 F DEBUG : LineageOS Version: '16.0-20190521-UNOFFICIAL-'
05-21 10:23:47.551 3449 3449 F DEBUG : Build fingerprint: 'Android/treble_arm_avS/phhgsi_arm_a:9/PQ3A.190505.002/190521:userdebug/test-keys'
05-21 10:23:47.551 3449 3449 F DEBUG : Revision: '0'
05-21 10:23:47.551 3449 3449 F DEBUG : ABI: 'arm'
05-21 10:23:47.551 3449 3449 F DEBUG : pid: 3427, tid: 3446, name: HwBinder:3427_2 >>> /vendor/bin/hw/android.hardware.audio@2.0-service-mediatek <<<
05-21 10:23:47.551 3449 3449 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xaee001ec
05-21 10:23:47.551 3449 3449 F DEBUG : r0 aee001b0 r1 0000006c r2 0006f3e8 r3 00000000
05-21 10:23:47.551 3449 3449 F DEBUG : r4 aee6f3e8 r5 ae713580 r6 ae775000 r7 00000000
05-21 10:23:47.551 3449 3449 F DEBUG : r8 ae713588 r9 00000001 r10 00000000 r11 abb9f5c0
05-21 10:23:47.551 3449 3449 F DEBUG : ip aebabd00 sp abb9f390 lr aeb85a3d pc aeb855d4
05-21 10:23:47.585 710 776 D connsyslogger: SD_LOG_ROOT is /mnt/sdcard/mtklog/connsyslog/fw.
05-21 10:23:47.587 3449 3449 F DEBUG :
05-21 10:23:47.587 3449 3449 F DEBUG : backtrace:
05-21 10:23:47.587 3449 3449 F DEBUG : #00 pc 0007e5d4 /system/lib/libc.so (ifree+52)
05-21 10:23:47.587 3449 3449 F DEBUG : #01 pc 0007ea39 /system/lib/libc.so (je_free+72)
05-21 10:23:47.587 3449 3449 F DEBUG : #02 pc 00002bbb /vendor/lib/libeffects.so (EffectLoadXmlEffectConfig+1458)
05-21 10:23:47.587 3449 3449 F DEBUG : #03 pc 0000195f /vendor/lib/libeffects.so (init+118)
05-21 10:23:47.588 3449 3449 F DEBUG : #04 pc 00001205 /vendor/lib/libeffects.so (EffectQueryNumberEffects+4)
05-21 10:23:47.588 3449 3449 F DEBUG : #05 pc 0002b791 /vendor/lib/hw/android.hardware.audio.effect@2.0-impl.so (android::hardware::audio::effect::V2_0::implementation::EffectsFactory::getAllDescriptors(std::__1::function<void (android::hardware::audio::effect::V2_0::Result, android::hardware::hidl_vec<android::hardware::audio::effect::V2_0::EffectDescriptor> const&)>)+44)
05-21 10:23:47.588 3449 3449 F DEBUG : #06 pc 000938d7 /system/lib/vndk-27/android.hardware.audio.effect@2.0.so (android::hardware::audio::effect::V2_0::BnHwEffectsFactory::_hidl_getAllDescriptors(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+126)
05-21 10:23:47.588 3449 3449 F DEBUG : #07 pc 00093e33 /system/lib/vndk-27/android.hardware.audio.effect@2.0.so (android::hardware::audio::effect::V2_0::BnHwEffectsFactory::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+90)
05-21 10:23:47.588 3449 3449 F DEBUG : #08 pc 0000df4b /system/lib/vndk-sp-27/libhwbinder.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+66)
05-21 10:23:47.588 3449 3449 F DEBUG : #09 pc 00010645 /system/lib/vndk-sp-27/libhwbinder.so (android::hardware::IPCThreadState::executeCommand(int)+712)
05-21 10:23:47.588 3449 3449 F DEBUG : #10 pc 00010275 /system/lib/vndk-sp-27/libhwbinder.so (android::hardware::IPCThreadState::getAndExecuteCommand()+116)
05-21 10:23:47.588 3449 3449 F DEBUG : #11 pc 0001084b /system/lib/vndk-sp-27/libhwbinder.so (android::hardware::IPCThreadState::joinThreadPool(bool)+38)
05-21 10:23:47.588 3449 3449 F DEBUG : #12 pc 000171d1 /system/lib/vndk-sp-27/libhwbinder.so (android::hardware::PoolThread::threadLoop()+12)
05-21 10:23:47.588 3449 3449 F DEBUG : #13 pc 0000d1f5 /system/lib/vndk-sp-27/libutils.so (android::Thread::_threadLoop(void*)+144)
05-21 10:23:47.588 3449 3449 F DEBUG : #14 pc 00064705 /system/lib/libc.so (__pthread_start(void*)+22)
05-21 10:23:47.588 3449 3449 F DEBUG : #15 pc 0001e04d /system/lib/libc.so (__start_thread+22)
05-21 10:23:47.601 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:47.667 3449 3449 E crash_dump32: unable to connect to activity manager: Connection refused
05-21 10:23:47.668 733 733 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_18
05-21 10:23:47.694 3456 3456 I aee_core_forwarder: Core forwarder(0) executable pid 3427 signo 11
05-21 10:23:47.695 3456 3456 E aee_core_forwarder: Cannot connect to aed coredump receiver, Connection refused
05-21 10:23:47.699 3456 3456 D aee_core_forwarder: process_coredump: process:3427 is 32 bit preread:1048576
05-21 10:23:47.699 3456 3456 I aee_core_forwarder: Parser result thread id: 3446
05-21 10:23:47.700 3456 3456 I aee_core_forwarder: socket name: android:aee_aedv, sfd: -1
05-21 10:23:47.700 3456 3456 E aee_core_forwarder: process_coredump: Unable to open connection to debuggerd: Connection refused
05-21 10:23:47.700 3456 3456 D aee_core_forwarder: Check free space of path:/data/vendor/core/, fsize:25470980096
05-21 10:23:47.700 3456 3456 E aee_core_forwarder: max core count: 10
05-21 10:23:47.700 3456 3456 E aee_core_forwarder: check_core_count is not pass. Don't generate core file.
05-21 10:23:47.700 3456 3456 I aee_core_forwarder: process_coredump: exit
05-21 10:23:47.702 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:47.705 3433 3433 E HalHidl : EffectsFactory 0xab9bf7a8 queryAllDescriptors: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: ' (from rpc)
05-21 10:23:47.705 3433 3436 E HalDeathHandler: HAL server crashed, audio server is restarting
05-21 10:23:47.705 3433 3433 E BufferProvider: AudioMixer() error -2147483646 querying number of effects
05-21 10:23:47.727 360 360 I ServiceManager: service 'media.audio_flinger' died
05-21 10:23:47.761 3458 3458 D mtkaudiohalservice: Start audiohalservice
05-21 10:23:47.761 3458 3458 D mtkaudiohalservice: registering IDevicesFactory
05-21 10:23:47.800 709 1205 E lsc_nvram: [do_mkdir] fail to mkdir [/sdcard/shading_otp]: 2[No such file or directory] (do_mkdir){#65:vendor/mediatek/proprietary/hardware/mtkcam/aaa/source/mt6765/lsc_mgr/LscUtil.h}
05-21 10:23:47.802 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:47.817 3458 3458 I ServiceManagement: Removing namespace from process name android.hardware.audio@2.0-service-mediatek to audio@2.0-servi.
05-21 10:23:47.818 3458 3458 I mtkaudiohalservice: Registration complete for android.hardware.audio@2.0::IDevicesFactory/default.
05-21 10:23:47.818 3458 3458 D mtkaudiohalservice: registered IDevicesFactory
05-21 10:23:47.818 3458 3458 D mtkaudiohalservice: registering IEffectsFactory
05-21 10:23:47.827 3458 3458 I mtkaudiohalservice: Registration complete for android.hardware.audio.effect@2.0::IEffectsFactory/default.
05-21 10:23:47.827 3458 3458 D mtkaudiohalservice: registered IEffectsFactory
05-21 10:23:47.827 3458 3458 D mtkaudiohalservice: registering ISoundTriggerHw sound_trigger.primary
05-21 10:23:47.889 3458 3458 I sound_trigger_hw_default: Start open device
05-21 10:23:47.889 3458 3458 I sound_trigger_hw_default: Start open device ing
05-21 10:23:47.889 3458 3458 I SoundTriggerHalImpl: onFirstRef() mModuleName primary mHwDevice 0xb1093100
05-21 10:23:47.890 3458 3458 I mtkaudiohalservice: Registration complete for android.hardware.soundtrigger@2.0::ISoundTriggerHw/default.
05-21 10:23:47.890 3458 3458 D mtkaudiohalservice: registered ISoundTriggerHwsound_trigger.primary
05-21 10:23:47.902 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:48.605 1128 1309 I chatty : uid=1000(system) AudioService identical 7 lines
05-21 10:23:48.705 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:48.801 709 1205 E lsc_nvram: [do_mkdir] fail to mkdir [/sdcard/shading_otp]: 2[No such file or directory] (do_mkdir){#65:vendor/mediatek/proprietary/hardware/mtkcam/aaa/source/mt6765/lsc_mgr/LscUtil.h}
05-21 10:23:48.805 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:48.906 1128 1309 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
05-21 10:23:49.006 1128 1309 W ServiceManager: Service media.audio_policy didn't start. Returning NULL
05-21 10:23:49.006 1128 1309 W AudioSystem: AudioPolicyService not published, waiting...

Is there any way to speed up startup? I have compiled your sources, so i can modify something if it will be necesery. Could you give me any clues how to solve long startup? And how to solve this cam problem written in logs?

PS: Downloaded roms (AOSP 9, lineage 16, rr) have the same error and startup time

Best regards,

---------- Post added at 11:08 AM ---------- Previous post was at 10:36 AM ----------

One more info,

I remounted vendor to RW and added to build.prop:

ro.audio.ignore_effects=true

But startup is still very long

---------------------------------------------

Found it. Its an issue with redmi 6. After reboot content of the /vendor/build.prop is regenerated to the state before modification (probably is keept in RAM). Modification have to be made in TWRP after mounting /vendor and everything is working,