Saturday, 2024-11-16

ecrnhttps://github.com/Halium/hybris-patches/tree/halium-12.000:01
ecrnis this applied on top of the sources that then build into the system image?00:01
ecrnor is it just in the "host" copies somehow?00:04
malprobably used for building the image00:19
malbut can't be sure since I haven't used halium base00:19
ecrnhttps://pastebin.k4be.pl/view/raw/f3325ccb01:18
ecrnit must be either one of the libraries that malfunctions or the linking process01:19
ecrnI checked the patches and can't see anything suspicious (and the TLS stuff I don't quite understand so I don't know)01:20
ecrnhttps://pastebin.k4be.pl/view/raw/fbfc4d6b the tombstone01:23
ecrn    0000007d'1422b000-0000007d'1422bfff rw-     15000      1000  /vendor/lib64/libExynosHWCService.so (BuildId: af611bd4b9efcae64e3fe642d5b739fe)01:37
ecrn     0000007d'1422c000-0000007d'1422cfff rw-         0      1000  [anon:.bss]01:37
ecrnthe only rw segment next to rw of libExynosHWCService01:38
ecrnif (sm->checkService(String16("Exynos.HWCService")) != NULL) {03:58
ecrnthis is where the overwrite happens03:58
ecrnlibbinder.so and libbinder_ndk.so are not the problem06:07
rinigus@b100dian: thanks! I will check if aosp also is missing that property (I am sure they do) and file an issue. At least we will know why they disabled BOARD_VNDK_VERSION definition in the builds07:02
rinigusre odm.mount: we should track down all these _a and without variants in mounts and then change fixup mounts accordingly.07:04
rinigusI'll look inti it07:04
rinigusinto it07:04
rinigus@b100dian: opened https://github.com/sonyxperiadev/bug_tracker/issues/856 . let's see what they say regarding it08:18
rinigusbtw, stock has ro.vndk.version defined (had getprop from stock around)08:18
riniguswill look into mounts now08:19
rinigus@b100dian: should we merge nolvm branches into main and later deal with adding lvm parts when we get there? would be nicer to have the working branch as the default one :)08:24
T42<b100dian> rinigus: merge? Pushing should do it, no divergences yet I hope09:17
rinigus@b100dian: yes, pushing will be probably fine. if some divergences are there we can fix them09:18
rinigushunted down odm issue. in fixup we had oem, but in out/target/product/pdx223/vendor/etc/fstab.pdx223 we have oem_a. so, mount was created for sda76_a09:19
rinigusalso, after merge/push we can drop nolvm branches. would be cleaner repo :)09:20
rinigusexcept oem, haven't seen anything strange in mounts.09:23
riniguswill make new hal builds and push them to obs09:24
rinigus@b100dian: added reference mounts and /dev from aosp to https://github.com/sailfishos-sony-nagara/main/wiki/Reference-AOSP-mounts-and-devices09:33
riniguswill merge/push nolvm to main and drop nolvm09:34
T42<b100dian> Yes, oem might be a red herring, I was just wondering why us there and odm_root and where from as previously that was the real odm mount and used to redirect odm/etc to it while also making odm a place you can customize with say links or mounts to libs missing libs09:38
rinigus@b100dian: branches merged to main (config and hal). obs should have all up to date packages too.09:41
riniguswill build a  new image with mic and then can test as well09:41
rinigus@b100dian: as for why we have odm_root - no clue. maybe it was earlier mounted wrongly?09:43
T42<b100dian> hmm cannot locate symbol "_ZN7android12MetaDataBase13writeToParcelERNS_6ParcelE" referenced by "/system/lib64/libmedia.so"11:07
T42<b100dian> lipstick strace https://paste.mozilla.org/J0Rk5MTj/raw11:08
ecrnmal: fixed it at last11:10
ecrnit was caused by binder transaction failing due to kernel security not allowing11:11
ecrnwhich somehow caused either libbinder or something between libbinder and the ExynosHWCService to overwrite nearby heap memory and crash some time later11:12
ecrnhttps://github.com/Halium/hybris-patches/blob/halium-12.0/frameworks/native/0006-halium-never-set-FLAT_BINDER_FLAG_TXN_SECURITY_CTX-f.patch#L1511:14
ecrnthat patch was supposed to get rid of the problem in halium, but for some reason it didn't work as expected (maybe patching failed in the CI build?)11:15
ecrnI reset the flag in the kernel11:16
T42<b100dian> rinigus: VNDK related again? https://android.googlesource.com/platform/frameworks/av/+/refs/tags/android-14.0.0_r67/media/module/foundation/MetaDataBase.cpp#46511:23
ecrnI have a gui shell now :)11:48
ecrnlots of weird tearing, though11:48
rinigus@b100dian and mal : see https://github.com/sonyxperiadev/bug_tracker/issues/856#issuecomment-2480524233 regarding vdnk version property11:52
rinigus@b100dian: interesting. maybe we will hit the wall before lipstick then. I wonder how could I test that lib on aosp11:54
rinigus@b100dian: I am getting in logcat CANNOT LINK EXECUTABLE "/usr/libexec/droid-hybris/system/bin/minisfservice": library "libandroidicu.so" not found: needed by /system/lib64/libmedia.so in namespace (default)12:31
rinigussome hits in the channel log12:37
malrinigus: you need the usual symlinks12:57
rinigusmal: I thought that those were already there in our config. checking12:58
malhttps://github.com/mer-hybris/droid-config-sony-murray/tree/master/sparse/system in official builds12:58
malbut your build might need them in /odm since /system is probably read-only if you didn't package system etc12:59
malecrn: good that it works now13:00
rinigusmal: indeed. /system is mounted via /dev/mapper/dynpart-system_a . so, all there is gone.13:03
T42<b100dian> mal: /odm is also read only. But bind-mounting should still work13:03
rinigusbut same would be with /odm. its mounted from device too13:03
malwasn't there that /odm_root thingy?13:04
malI remember seeing that in some instructions13:04
rinigusmal: there is odm_root thingy too. should we disable odm mounting then?13:04
T42<b100dian> We have odm_root too, but I am AFK, don't know if it is rootfs or another mount13:04
malrinigus: what is mounted to /odm?13:05
rinigusits oem_a13:05
malI thought the point is that you mount odm_a to /odm_root and then symlink needed things from there to /odm or did misunderstand something13:05
malcan you show your mount services13:05
rinigusmal: I missed such instructions13:06
rinigusmal: here is the list - config.mount                    data_mirror-misc_de-null.mount  dev-binderfs.mount  metadata.mount            odm.mount                 vendor-dsp.mount13:07
rinigusdata_mirror-misc_ce-null.mount  data_mirror-ref_profiles.mount  linkerconfig.mount  mnt-vendor-persist.mount  vendor-bt_firmware.mount  vendor-firmware_mnt.mount13:07
rinigusthose are generated by hal13:09
rinigusI mean build_packages.sh --droid-hal13:10
rinigusand odm_root thingy comes from sparse mount13:12
T42<elros34> do you have aything important in odm partition?13:12
T42<b100dian> Yes, sony blobs:D13:13
T42<b100dian> But odm_root from sparse is useful in any way?13:13
T42<elros34> then mount it to odm_root, bind mount directory with these blobs to /odm/ directory and create needed symlinks13:14
rinigusthen we are supposed to block creation of odm mount . it was somewhere in spec, will find it out13:15
rinigusrpm/droid-hal-common.inc . but why its not blocked on official port?13:16
T42<elros34> maybe beacue they don't need any symlinks in /odm13:16
T42<elros34> it's dirty hack after all13:17
rinigusbut then how do they get to the blobs?13:17
rinigusactually, they have odm mounted properly.13:18
T42<elros34> and symlinks in system/13:18
rinigushmm, any other way to add those links than using /odm and /system? would /usr/libexec/droid... do?13:19
T42<elros34> strace particular service and see where it search for libs. IIRC odm was the only way unless you want bind mount to system13:20
T42<elros34> or maybe overlay it instead bind mount13:21
T42<elros34> other way would be probably changes in linker13:22
rinigusthanks for the tips. overlay or bind mounts sound easier13:22
T42<elros34> odm_root sunds much easier then overlayfs form, I don't understand why you want to avoid it13:23
malhttps://github.com/mlehtima/droid-config-fp4/tree/devel/sparse/odm13:26
malfp4 of course had much less stuff in odm than sonys13:26
rinigus@elros34: maybe. we would just need to get all the links then. shouldn't be too hard. but may break on odm updates13:33
malrinigus: I need to check again about patching linker config to prevent the need for that13:55
malthe issue has been so easy to solve in most devices with those couple of symlinks, only sonys without packaged /system and friends are causing issues14:01
rinigusmal: I think right now I will try to inject them directly to /system and see if it helps. looking at aosp state, I am convinced that we would have to redo it all against sony stock android. not sure how (no lineage for our models), but it should be possible14:19
T42<b100dian> rinigus: back at the keyboard. So we're back at shipping system :( ? I would like to try bind or overlay mounting first16:02
rinigus@b100dian: not yet. trying an overlay, but its bit trickier - seems to be bit late. right now will try to remount /system for rw and just add those links there16:03
rinigussorry, with overlay I can actually add links even before the corresponding system is mounted. testing ...16:07
T42<b100dian> nice16:08
T42<b100dian> curious, I am seeing /odm_root is /dev/mapper/dynpart-odm_a and /odm is /dev/sda76 so it doesn't come from sparse, they are both a 'thing'?16:08
rinigus@b100dian: no gui yet, but overlay can work16:11
rinigusjust /odm comes from hybris-hal while processing mounts16:12
T42<b100dian> I would've tried minimer but zypper in *qmlscene fails because: nothing provides the requested 'ssu-vendor-data'16:13
rinigusthe other one odm_root comes from our sparse. in principle, we don't need it if we go with overlays16:13
rinigusI will make config branch, so you could see what it involves16:14
T42<b100dian> you can push it to main (master?) and we'll clean up later16:15
rinigusOK, will do16:15
T42<b100dian> so you don't have `What=/dev/mapper/dynpart-odm_a` and `Where=/odm_root` in /usr/lib/systemd/system/odm_root.mount ?16:16
rinigus@b100dian: not anymore, that was fixed in https://github.com/sailfishos-sony-nagara/hybris-boot/commit/04cb5c1f2fc7b618dca58e1b4372b644f62b7a2f16:18
rinigusnew hal images at obs already16:18
T42<b100dian> haha ;)16:18
T42<b100dian> it's interesting that there _is_ something on that partition16:19
rinigus@b100dian: just a bit of time. adjusting script a bit16:32
rinigusfew minutes I hope. want to test on device before pushing16:32
T42<b100dian> No rush, im cooking (really, not ROMs)16:34
rinigus@b100dian: the first hack pushed to config16:44
rinigusstarted builds at obs16:44
rinigusI may try to cook together a bit better script for it then16:45
T42<b100dian> rinigus: may I add a requires:qt5-qtdeclarative-qmlscene to the patterns temporarily? I am not able to zypper in it, so I'm thinking to build it in the image so I can test minimer17:00
rinigussure, go ahead17:01
T42<b100dian> because of the `ssu-vendor-data` error above - do you have that if you enable route add on the device and MASQUERADE on the computer to have internet access?17:01
rinigus@b100dian: made a typo while sending prev commit - now its adding overlays into sparse17:03
rinigusre route add/MASQUERADE and ssu-vendor-data error - I don't follow. missed something17:03
rinigusnow see the error17:04
T42<elros34> looks like ssu-vendor-data is required by ssu so strange that you don't have it17:20
ecrnbtw, isn't hwcomposer an overkill to run a wayland compositor ontop? they usually would do with just one framebuffer...17:35
ecrnor a couple but for swapping, not composition17:35
rinigus@b100dian: made a separate overlay mount script - that should allow us to just drop links and files to sparse/overlay . pushed changes to config repo18:59
riniguswill also disable audit on cmd line. impossible to see anything in logs18:59
rinigus@b100dian: don't think its important, but just mentioning. we don't have keymaster running. same is on aosp where it fails to start. but wait_for_keymaster is there in sfos logs - waiting that magically show up19:26
T42<b100dian> rinigus: about audit, if it spares you some time, only update pdx223 for now, I am still flash my locally built kernel. I appreciate you building both platforms though ;)19:55
T42<b100dian> I will be testing the minimer next then look what service is waiting on keymaster on systemd side19:55
rinigus@b100dian: this build is very fast as I don't clean in between them.19:56
rinigusseems to work just fine19:56
rinigusre wait: I am sure sfos has some keymaster waiting script. but probably it does not have major impact in our current state - no gui19:57
rinigusI'll be finishing for today. will just push hal for your device too without audit in logs19:58
T42<edp_17> @b100dian , Hi Vlad. Approx in an hour, will you be available for helping with fingerprint? (if not, no worries, I'll do something else. :) )20:26
T42<b100dian> Hi @edp_17 if I remember correctly you had some problems with the android side of the services. I think anyone can give some hand if so20:53
T42<b100dian> But I am around20:54
malin case anyone has issues with csd microphone tests in android 14 base I think I know why those don't work20:56
malI will be fixing hybris-patches for that later today or tomorrow20:57
T42<b100dian> ringus: minimer suffers from the same camera metadata missing symbol hmm https://paste.mozilla.org/odxpgRW1/raw (and what may be  a spurious namespace warning)21:21
mal@b100dian that is where I got stuck also21:37
maldidn't have time yet to investigate more21:37
T42<b100dian> looking at the corresponding header, there are many metadatabase,h headers, and the frameworks/av/media one just skips writeToParcel because it should come from another library altogether, that's why the `!defined(__ANDROID_VNDK__)`21:41
T42<edp_17> @b100dian , I am not sure how to fix that android side for fingerprint but in logcat, I have got : "fpc_tac : sensor_command, Failed to send command: 0 to TA, status code: -9"21:48
T42<edp_17> logcat: https://paste.ubuntu.com/p/q5dwGCBwxX/21:48
T42<edp_17> And in dmesg I've got: "Could not find 'android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprint/default' for ctl.interface_start"21:48
T42<edp_17> dmesg: https://paste.ubuntu.com/p/W79ScCDT7q/21:49
T42<b100dian> You also have 6500 E fpc_hidl: Can't initialize the fingerprint HAL module !!! - can you check which process is 6500 (or the next number that comes in the next log)?21:49
T42<b100dian> droid-hal-init: Service 'fps_hal' (pid 6500) exited with status 021:50
T42<b100dian> ok, what does this service run as, can you also run it by hand and strace it? ideally with the user it is intended to be ran as21:51
T42<b100dian> If I rememer correctly, Elros suggested adding path to full strace binary by edinting a service .rc file if you find it21:52
T42<edp_17> I did strace log.21:53
T42<edp_17> strace -f -s 256 /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-fpcservice : https://paste.ubuntu.com/p/jt7hRk5Rfz/21:53
T42<edp_17> Also, I've extracted fresh logact for grepping that 'Can't initialize the fingerprint HAL module !!!" error. The process pid is always changing: https://paste.ubuntu.com/p/cYK3WsfkYr/21:54
T42<b100dian> yes, it seems to restart21:55
T42<edp_17> Yep.21:56
T42<edp_17> In the strace: "Error::Failed to open /dev/qseecom device"21:56
T42<b100dian> but is it the fpc_hal process  the one you traced?21:56
T42<b100dian> yes, but that strace was ran as defaultuser21:57
T42<b100dian> (thanks for including the command prompt at the beginning of the paste;)21:58
T42<edp_17> strace as root: https://paste.ubuntu.com/p/Z3fw6yyvfw/21:58
T42<b100dian> mal: I would like to gdb our symbol missing problem if possible, but I am running into`nothing provides the requested 'ssu-vendor-data'` on zypper in, do you have a suggestion what did we do wrong?21:59
T42<edp_17> No problem, I am always trying to provide clear logs showing how the command was executed. I think that helps.21:59
T42<edp_17> Now the error is: "sensor_command, Failed to send command: 0 to TA, status code: -9"22:00
T42<edp_17> Whatever it means.22:01
malwhat device is that again?22:03
T42<b100dian> @edp_17, do you still have a corresponding dmesg for that root logcat?22:03
T42<b100dian> mal: my question around ssu-vendor-data was for nagara (5iv/1iv)22:04
T42<edp_17> mal: moto g7 power (ocean) - los 7.1 base, sfos 4.622:04
T42<edp_17> @b100dian : dmesg: https://paste.ubuntu.com/p/gqVFqKfsK3/22:08
T42<b100dian> input 599 did you restart your device since october :) ?22:11
T42<edp_17> I just started it today about 40 mins ago22:11
T42<b100dian> @edp_17 I think you have to grab equivalent logcat from Lineage. Can you show the fstab you have in /vendor ? You might want to disable userdata encryption before booting that to not destroy your /data22:37
mal@b100dian I don't quite understand the issue you mentioned22:38
T42<b100dian> mal: there's something wrong with nagara configs here since the install (which we've yet made to show GUI) doesn't have a working zypper, leading to a ssu-vendor-data error22:40
T42<b100dian> like, zypper in gdb shows https://paste.mozilla.org/SLkJJ4q4/raw22:41
malwhat is the exact error?22:41
malshow ssu lr22:41
T42<b100dian> mal: at the end of this, above whole error: https://paste.mozilla.org/eTwYMbZn/raw22:44
malsomething is really wrong, did you build the image normally?22:47
T42<b100dian> hmm maybe it is because this repo https://github.com/sailfishos-sony-nagara/community-adaptation is used in the build https://build.sailfishos.org/project/show/nemo:devel:hw:sony:nagara ?22:48
T42<b100dian> right now the image is created with this script from ks downloaded from OBS https://github.com/sailfishos-on-sake/Release/blob/main/scripts/create-image.sh#L7122:50
T42<b100dian> so mic create fs more or less22:50
T42<edp_17> @b100dian : /vendor/etc/fstab.qcom : https://paste.ubuntu.com/p/Bm4JSh7TvB/22:51
malI'm confused what the point of that custom community adaptation repo is? why do you even have that?22:51
T42<edp_17> There is no encryption of user data.22:51
T42<b100dian> @edp_17 you need to remove fileencryption=ice22:52
T42<b100dian> mal: I think the fact that there are two devices, pdx223 and pdx223 and one family, nagara -> so I hardcoded nagara in the repo for now, instead of %{device}22:53
T42<b100dian> because download when creating mic was trying pdx224 repo22:53
T42<b100dian> actually instead of @DEVICE@22:54
T42<b100dian> (it's the only different commit)22:54
malare the things in /usr/share/ssu/board-mappings.d/ looking correct?22:56
T42<edp_17> @b100dian , fileencryption=ice removed. Same error. strace: https://paste.ubuntu.com/p/J5G3W4RDVn/22:59
T42<edp_17> dmesg: https://paste.ubuntu.com/p/bPkMPc26wK/22:59
T42<edp_17> and logcat: https://paste.ubuntu.com/p/Hw9B3K5FDP/23:01
T42<elros34> you were supposed to boot to lineage and check logs to compare with sfos logs23:01
T42<elros34> removing fileencryption is to prevent encrypting data files when you will boot android23:02
T42<elros34> sailfish doesn't use android's fstab, even /etc/fstab is rather empty23:03
T42<edp_17> Oh, I see. And once I am in android, what logs I should get? Logcat?23:03
T42<b100dian> mal: can't really say, first time with two devices in the same family. here's comparison with a xiaomi I have https://paste.mozilla.org/9cgpK9yw/raw23:03
T42<b100dian> @edp_17 logcat of fps_hal succeeding.. maybe there's some intermediary steps.23:04
T42<elros34> @b100dian maybe compare installed files with working device image, there is file with all installed packages next to created image23:05
T42<b100dian> mal: img-type=loop might be a problem as this was fs23:05
T42<elros34> installed rpms*23:06
mal@b100dian you have multiple mappings there?23:06
malalso why sony-nagara and using the usual codename?23:06
mal@b100dian if you look at that 05-sony-nagara.ini you can see it mentions zambezi in it, which is obviously wrong23:07
malthat whole thing seems to be a mess23:08
malneed to think how that is supposed to look like23:08
T42<b100dian> ah, good point about zambezi. But am not sure what do you mean with multiple mappings. For example, hal is https://github.com/sailfishos-sony-nagara/droid-hal-sony-nagara/tree/main/rpm23:08
malah, it seems that is close what official devices have23:10
T42<b100dian> mal: I wonder where does that zambezi come from, an initial github org search or hadk find in files does not show much23:13
T42<b100dian> @elros34 looking into the packages now23:13
maljust copypaste bug probably https://github.com/sailfishos-sony-nagara/droid-config-sony-nagara/blob/main/sparse/usr/share/ssu/board-mappings.d/05-sony-nagara.ini23:17
mal@b100dian what happens if you manually fix that file on device?23:18
T42<edp_17> @b100dian : Hmm. I've extracted the boot.img from los17.1.zip and flashed on device to slot B but it doesn't boot.23:24
T42<edp_17> It takes me into Los recovery and saying that my data may be corrupt and I should do a factory reset.23:25
T42<edp_17> I'll try to boot into android to get that log.23:25
T42<b100dian> mal: thanks for catching the diff, I was not aware the file was on the repo. Locally nothing changes immediately, maybe I need to reboot23:32
T42<b100dian> @edp_17 ah, so it is complicated.. maybe a dd backup of the current /data would be easier, from Los recovery, adb pull it then, and after finishing the experiment, push it back and copy it with dd again..23:33

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!