**** BEGIN LOGGING AT Tue Jan 12 02:59:57 2021 Jan 12 07:09:53 Morning! Jan 12 07:10:40 Herrie: at my side I just need to get a hold on libstagefright_ccodec.so Jan 12 07:11:34 Morning! Jan 12 07:11:42 Tofe: Your luna-next works? Jan 12 07:11:56 And test_vibrator? Jan 12 07:16:58 luna-next doesn't fully start because of the missing .so Jan 12 07:17:11 I didn't try test_vibrator yet Jan 12 07:26:11 Tofe: I have luna-sysmgr segfaulting. How do you know this .so is missing? Jan 12 07:26:26 I don't have it but I didn't see it in logcat Jan 12 07:31:33 Herrie: it's shown as a fatal error when I start luna-next from the console Jan 12 07:31:40 Ah ok Jan 12 07:31:46 I can try that as well Jan 12 09:19:32 Tofe: How to manually start luna-next? Jan 12 09:19:39 Been a long time since I tried that ;) Jan 12 09:34:54 Tofe: When I export all the variables in luna-next.conf and run with ,/luna-next -plugin evdevtouch:/dev/input/event1 -plugin evdevkeyboard I get boot logo! Jan 12 09:35:22 https://paste.ubuntu.com/p/b9DnwCF78M/ Jan 12 10:06:13 Tofe: gdb backtrace for LunaSysMgr crash: seems vibration related: https://paste.ubuntu.com/p/qKwN3QywG8/ Jan 12 10:06:31 Seeing we were using legacy 5.1 API on 7.1 already, could simply be it broke Jan 12 10:17:42 When I disable the 2 lines in LunaSysMgr's Main.cpp for the haptics I get UI and sound Jan 12 10:19:18 WiFi Connects, html5test.com works Jan 12 10:19:53 Bluetooth scans Jan 12 10:26:28 And connects Jan 12 10:26:34 Seems sensors & vibration are broken though Jan 12 10:39:22 Herrie: that's a good progress ! :) Jan 12 10:39:46 I'm surprised by the location of the crash Jan 12 10:40:12 inside nyx itself... or maybe it's when it tries to load the android module via libhybris Jan 12 10:44:01 Tofe: Yeah also sensors have issues Jan 12 10:54:17 Might be a permission thing or other configuration for sensorfw Jan 12 13:46:27 Tofe: A little birdie told me we might want to test these 2 flags: https://github.com/UbuntuTouch-sagit/android_device_xiaomi_msm8998-common/blob/halium-9.0/BoardConfigCommon.mk#L216-L217 so we don't need to manually add the bits you added yesterday for the various components such as FM, BT etc Jan 12 13:52:06 Herrie: which components ? the services/impl things ? Jan 12 13:52:43 Yes seems so Jan 12 13:53:01 I'll test it npow Jan 12 13:53:12 ok, that's good to know Jan 12 13:53:44 Explanation at: https://source.android.com/devices/architecture/vndk/build-system Jan 12 13:59:22 I'm doing a clean build so let's see Jan 12 13:59:30 MAybe it will "fix" other issues automagically Jan 12 13:59:38 :) Jan 12 14:01:23 well, on my side it tells me it has to rebuild 16000 objects Jan 12 14:01:56 Yeah that's why I test it :P Jan 12 14:01:59 Goes quickly here :P Jan 12 14:07:33 I'm already at 42% , shouldn't be long either Jan 12 14:17:36 Fails for me @ 58-59% Jan 12 14:17:37 device/xiaomi/mido/camera/QCamera2/HAL/CameraParameters.cpp:23:10: fatal error: 'camera/CameraParameters.h' file not found Jan 12 14:18:01 65%, still ongoing Jan 12 14:18:03 device/xiaomi/mido/camera/QCamera2/util/QCameraDisplay.h:33:10: fatal error: 'gui/DisplayEventReceiver.h' file not found Jan 12 14:18:10 device/xiaomi/mido/camera/QCamera2/util/QCameraDisplay.h:33:10: fatal error: 'gui/DisplayEventReceiver.h' file not found Jan 12 14:18:38 device/xiaomi/mido/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera_dbg.h:34:10: fatal error: 'utils/Log.h' file not found Jan 12 14:19:10 weird, these are pretty basic Jan 12 14:22:26 For my part I'm mostly interested in libstagefright_ccodec :) Jan 12 14:25:35 damn ! still nothing Jan 12 14:45:34 Weird that yours fails Jan 12 14:45:38 And mine runs Jan 12 14:45:40 Without it Jan 12 14:54:36 but mine builds :p Jan 12 16:23:46 I have UI :P Jan 12 16:23:53 But not with these flags :P Jan 12 16:50:39 hehe Jan 12 17:01:17 oh, wait, my status was all wrong Jan 12 17:01:25 "ServiceManagement: Waited one second for android.hardware.media.omx@1.0::IOmxStore/default. Waiting another..." Jan 12 17:01:38 this is the actual issue holding my luna-next Jan 12 17:04:39 oooh it's not completely fatal ! I have UI ! Jan 12 17:06:15 systemd[1]: luna-sysmgr.service: Main process exited, code=killed, status=11/SEGV Jan 12 17:13:07 also crash on vibrator_exists Jan 12 17:28:26 Herrie: the issue is that /system/lib64/libhardware_legacy.so doesn't contain the vibrator code anymore Jan 12 17:28:35 and libhybris doesn't test its pointers :p Jan 12 17:32:34 migrating it doesn't look like rocket science though https://android.googlesource.com/platform/hardware/libhardware/+/refs/tags/android-security-9.0.0_r64/modules/vibrator/vibrator.c Jan 12 17:33:30 Yeah probably not Jan 12 17:33:55 It already was giving headaches in 7.1 because it was moved to legacy Jan 12 17:34:15 and even easier: we can also simply write the number of milliseconds in /sys/class/timed_output/vibrator/enable and it works Jan 12 17:34:21 I noticed the hapics hybris module was disabled for mido Jan 12 17:34:29 like "echo 50 > /sys/class/timed_output/vibrator/enable" Jan 12 17:34:34 And probably for other targets too Jan 12 17:35:22 Anyway. I'll just patch libhybris for the moment. Jan 12 17:36:06 Yeah that would be easiest probably Jan 12 17:37:19 And RIL doesn't really seem to behave as well here I guess Jan 12 17:37:34 But RIL is always a pain so not really surprised there Jan 12 17:37:40 hehe Jan 12 17:37:49 Sensors I'm not sure what's up Jan 12 17:38:04 I see some permission issues in logs Jan 12 17:38:30 Tried looking in mer-core and mer-hybris for some clues but didn't find much Jan 12 17:44:13 with https://github.com/webOS-ports/nyx-modules-hybris/pull/6 I have sysmgr and appmgr working Jan 12 17:47:22 Nasty workaround, but get things running at least :P Jan 12 17:48:13 well, the real fix is to support it in libhybris and/or in mainline nyx Jan 12 17:49:07 because frankly, echoing a number in a file isn't that hard :) Jan 12 17:49:20 No ;) Jan 12 17:49:28 For sensors, we might want to try to bump sensorfw Jan 12 17:49:40 yes, that would be a good start Jan 12 17:49:43 We're on 0.11.4 latest is 0.12.1 Jan 12 17:49:55 Though I don't see anything in commits that pops out Jan 12 17:49:58 https://git.sailfishos.org/mer-core/sensorfw/commits/master Jan 12 17:54:20 I hope we're fine with this kind of change: https://git.sailfishos.org/mer-core/sensorfw/commit/2926a491dd603a7ad482a928440efba63caa2acb Jan 12 17:54:51 We don't use their service file I think Jan 12 17:54:53 but same, I don't see any relevant change for newer android Jan 12 17:55:25 Could be some of these new userid's that were added in Android again Jan 12 18:03:49 Similar to: https://github.com/Tofee/meta-smartphone-1/commit/b9ad840cd095f17b5dc35eba63cd183c43b8d5d5#diff-65e03e6511a679064b44ea03985138406501ebaa2cbe18d01c69fcf9435c1ef9 Jan 12 18:07:09 I reactivated android at boot, now I'm booting into luna-next smoothly Jan 12 18:07:18 just wait-for-android.sh isn't working, but well Jan 12 18:08:05 well, when it doesn't crash.... which just happened Jan 12 18:09:12 sensorfwd[1634]: hw_get_module() failed No such file or directory Jan 12 18:11:43 There are some new ID"s like: https://github.com/LineageOS/android_system_core/blob/lineage-16.0/libcutils/include/private/android_filesystem_config.h#L116-L131 Jan 12 18:13:18 Though nothing that looks suspect Jan 12 18:13:49 https://git.sailfishos.org/mer-core/sensorfw/blob/master/core/hybrisadaptor.cpp#L39 this looks quite android-9 aware Jan 12 18:13:59 do we have USE_BINDER ? Jan 12 18:21:06 Probably no USE_BINDER at our end yet Jan 12 18:23:03 that's probably a mistake Jan 12 18:23:20 (but maybe not, I'm not so sure...) Jan 12 18:23:45 Well it could be Jan 12 18:23:58 Binder is used more in 8 and 9 Jan 12 18:24:28 yes, but we run android in a container, does it block this communication ? Jan 12 18:24:42 maybe not, as it's a kernel module Jan 12 18:28:49 and of course, autohybris and binder together have never been used... great Jan 12 18:29:53 Well yes could be we're in unchartered territory here Jan 12 18:29:59 oh, but wait, using binder means it will bring libgbinder glib-2.0 etc Jan 12 18:30:21 let's first see what ubports uses Jan 12 18:32:29 "QtUbuntu-Sensors provides Android haptic feedback, GPS, orientation, and accelerometer sensors to QtSensors. Weare trying to replace this component with sensorfw, a single daemon capable of providing these functions using An-droid or standard Linux kernel drivers" not sure if it's still up to date Jan 12 18:32:57 https://github.com/ubports/qtubuntu-sensors/tree/xenial_-_android9 yep, still is, I think Jan 12 18:37:00 Mer uses sensorfw though Jan 12 18:37:50 And they use it with Android 8/9 targets as well Jan 12 18:40:40 https://github.com/ubports/platform-api/commits/xenial_-_android9 ok so here's what I think: ubports still uses its own libhybris API wrapper (platform-api), and has done some work so make it use HIDL for Android 9. So no sensorfw there. Mer uses binder and sensorfw, but no lxc container, and if we want to access binder from luneos userspace we'll need additional libs like libgbinder from Mer Jan 12 18:41:46 ... and hope that lxc doens't cut us out with some namespace isolation thing Jan 12 18:42:06 Worth a try? Jan 12 18:42:09 but libgbinder seems the way to go Jan 12 18:42:10 yes Jan 12 18:42:18 Probably less work v.s. going Ubuntu route as well Jan 12 18:42:24 That would be quite some rework Jan 12 18:42:37 Adding libgbinder (if we don't have it already) should be quite straight forward Jan 12 18:43:02 I don't think we have it yet, we have no need of binder so far Jan 12 18:43:23 but with HIDL in Android 9, it's the standard way to deal with APIs Jan 12 18:43:30 (I think :) ) Jan 12 18:43:41 let me sketch up a recipe Jan 12 18:54:02 https://github.com/Tofee/meta-webos-ports/commit/c738ef0104f51b217fde7836c218164e5d7ea6b3 Jan 12 18:55:29 now, let's see if I can get sensorfw to use that one... Jan 12 19:05:55 ok, I'm now rebuilding sensorfw... I'll push the change as well Jan 12 19:09:55 Herrie: 3 last commits: https://github.com/Tofee/meta-webos-ports/commits/testing/halium-9.0 Jan 12 19:10:11 it builds, but that's all I can say ! Jan 12 19:13:05 mmh I don't see anything happening Jan 12 19:13:42 sensorfw started, but that's all it seems Jan 12 19:14:09 oh, I forgot libgbinder's configuration Jan 12 19:18:05 Herrie: it works ! Jan 12 19:18:34 Oohhh nice! Jan 12 19:18:54 I've just put "[General] ApiLevel = 28" in /etc/gbinder.conf Jan 12 19:19:05 like the README suggests at the end Jan 12 19:19:12 reboot, and tadaa Jan 12 19:19:52 That wasn't too bad to fix Jan 12 19:21:14 Though using binder on 7.1/5.1 might give issues Jan 12 19:21:35 I don't get any signal bars but could be because I have 2 sims inside Jan 12 19:30:23 Herrie: binder on 7.1/5.1 won't work, it doesn't provide HIDL there afaik Jan 12 19:30:51 but frankly, my longterm target here is to have all our targets on 9.0 Jan 12 19:31:24 ideally with a GSI Jan 12 19:36:03 Tofe: Yeah true Jan 12 19:36:41 I didn't look yet, but do you know if lineage 16.0 exists for our good ol' touchpad ? Jan 12 19:37:44 ah, yes it does, with evervolv Jan 12 19:38:44 Yeah not sure how good it is but well Jan 12 19:39:09 If we can do everything on 9.0 would be nice Jan 12 20:05:52 Tofe: for RIL https://gitlab.com/ubports/community-ports/android9/fxtec-pro1/fxtec-pro1/-/raw/master/overlay/system/etc/ofono/ril_subscription.conf Jan 12 20:06:21 transport=binder:name=slot1 Jan 12 20:06:28 From NotKit Jan 12 20:45:53 Herrie: for ril, you forgot to mention that a binder plugin would probably be needed, isn't it Jan 12 20:46:03 Yes Jan 12 20:46:09 Seems so Jan 12 20:46:22 (I'm catching up on NotKit's advices) Jan 12 20:46:56 Ofono ril binder Jan 12 20:47:34 I think we already got most of the packages packaged up when we upgraded oFono, the new ones should be "easy" probably to add Jan 12 20:47:49 yep, I have libgrillio also and libgbinder is there now Jan 12 20:54:29 mmh libgbinder-radio is missing, let's see Jan 12 20:54:52 ah, separate repo Jan 12 21:32:02 ok, recipes added, I now have the bars but no network. However I'm not even sure I have a sim card in this one :D Jan 12 21:35:27 it's all pushed on meta-wop if you want to play :) Jan 12 21:35:46 for me I'll leave it here today, I'm already very happy with the situation :) Jan 12 21:48:14 Tofe: Ah great Jan 12 21:48:24 I'll give it a go at my end as well when I find some time Jan 12 21:48:43 Have another kid for a day for playdate & sleepover and still some painting to do :P Jan 12 21:48:54 Yeah I'm also very happy with how quickly things fall into place now :) Jan 12 21:50:44 iirc there are also some things to do regarding audio, the miniafservice is useless now or something like that Jan 12 21:50:58 there's a new thing, but I forgot the name Jan 12 21:58:23 Yeah I noticed BT connected but audio didn't play Jan 12 21:58:29 Via BT Jan 12 21:58:31 Speaker is OK Jan 12 21:58:55 Might be good to add the gbinder.conf? Jan 12 21:59:27 Not to forget :P Jan 12 22:51:41 Tofe: Sensors OK here too Jan 12 22:51:53 But no bars Jan 12 22:52:05 But I have 2 sims, that might cause it Jan 12 22:52:34 Hmmz getting Unknown RIL transport: binder in the logs Jan 12 23:12:50 Tofe: BTW Mer uses this for Vibrator via libhybris: https://github.com/mer-hybris/qt5-feedback-haptics-droid-vibrator Jan 12 23:14:42 Seems straight forward and simple, similar to what you described **** ENDING LOGGING AT Wed Jan 13 02:59:57 2021