Tuesday, 2024-12-17

sharksAnd just as I was about to give up - I made hybris-boot without any defconfig changes as elros34 suggested last night, and have a USB network interface.03:28
sharksI guess from here I'll fix just the errors from mer_verify_kernel_config, see if that doesn't break anything, then start blind debugging from there.03:29
sharksAlright - I've got logs. Still stuck on the device's initial splash screen - no gui, but I can telnet on port 2323.04:21
sharkshttps://paste.opensuse.org/pastes/3433bc267ddf04:22
sharksI'm not sure, but I think the significant issues in the journal log start around line 1908, "Failed to start droid-hal-init." Seems to spiral out of control from there, Droid bootctl goes next, then lipstick and so on.04:24
sharksInteresting - /system is mounted, but `$ ls /system/bin` complains "Too many levels of symbolic links"?04:29
sharksReading old irc logs, my issue might be that I have system-as-root. Have the same trouble as this chap, every file in `ls -al /system` is from 2009! https://piggz.co.uk/sailfishos-porters-archive/index.php?log=2021-10-19.txt#line7604:39
sharksTo my eye, mounts look okay?? https://paste.opensuse.org/pastes/ca22f728980104:42
sharks_/usr/lib/systemd/system/system.mount looks okay, too. Still trying to work out what's going on... https://paste.opensuse.org/pastes/a682dc85936405:16
T42<birdzhang> sharks: is system_root mounted?06:30
sharks_No, and the folder doesn't exist. Neither does system_root.mount.06:34
sharks_That said, in TWRP, the system_root folder does exist.06:34
sharks_But I can't see it in SFOS with `$ ls /`06:34
sharks_I don't know that I should have system_root anyway, should I? The stock Android & Lineage don't have it. This device is fairly old.06:38
T42<elros34> just search system-as-root in hadk-hot and follow instruction06:47
sharks_Just here? https://sailfishos.wiki/link/20#bkmrk-generally-it-is-a-sy I'll give it a go and let you know how I get on. Thanks.06:53
T42<elros34> btw build at least latest 4.x sfos version: https://forum.sailfishos.org/t/1974007:07
sharks_I am building 4.6.0.1307:09
sharks_I am struggling to understand the HADK-hot. The grammar is not ideal. I understand I need to modify ./device/*/*/rootdir/etc/fstab.qcom and change where the by-name/system mounts? Do I change it from /system to /system_root, then re-run `build_packages.sh --droid-hal`, make a new image and flash?07:11
T42<elros34> no, from /system to /. Then make hybris-hal and droid-hal. You can improve intruction if you want (yeah I know nobody will do it)07:16
T42<elros34> you have one of these noisy kernels form samsung with battery related drivers spamming it all around:P07:20
sharks_I've just made an account to edit the page, if I'm successful in my changes I'll update it to reflect what I did. Thanks for the clarification.07:21
sharks_Yes, the kernel is quite spammy. Bit annoying, but at this stage I'm just happy to get logs!07:21
T42<elros34> the best one I saw can spam from power_supply so hard that it prevents booting07:25
sharks_Lol. At least this one isn't that bad, it's only not booting because I don't know what I'm doing!07:26
T42<elros34> quiete common issues so far, you are not the first one07:28
sharks_Well I appreciate the help just the same07:30
*** amccarthy is now known as Guest334607:54
*** amccarthy_ is now known as amccarthy07:54
sharks_Bummer, that's not worked :(08:11
sharks_So I changed fstab so that `/dev/block/bootdevice/by-name/system` would mount at `/`, ran `build_packages.sh --droid-hal`, `make -j$(nproc --all) hybris-hal`, `make hybris-boot` for good measure, then `build_packages.sh --mic`. Flashed Lineage, then the new SFOS image, and no change.08:14
sharks_Journal log -> https://paste.opensuse.org/pastes/30bdb967c05d08:14
sharks_No system_root.mount, and the output of `$ findmnt` is identical. Clearly I have not done the right thing...?08:16
T42<elros34> yeah: make hybris-hal -> droid-hal, also you could check whether this did the job before making new image08:29
sharks_Just to clarify, you're saying I made hybris-hal and droid-hal in the wrong order, and also that I could have made this change in-place rather than rebuilding a new image?08:33
T42<elros34> yes: droid-hal package hybris hal. You could examine droid-hal-device.log  to see wheteher this did the job and of course then you can make changes on device if you really want and know how08:36
sharks_I'm not sure I do know how, so perhaps I'll go the long way around for now. You're happy though that I edited fstab correctly? This is what it currently looks like: https://paste.opensuse.org/pastes/9ea497cb7b5608:38
sharks_I'll start rebuilding another image, this time in the right order.08:39
sharks_I can't find droid-hal-device.log - where should I be looking for that??08:42
sharks_Sorry, I'm an idiot - was sitting there eating my dinner and realised you meant droid-hal-gt5note10wifi.log lol10:08
sharks_Alright - thanks Elros, I've got system mounted properly now that I did that in the right order. Still no droid-hal-init though, trying to work out why.10:32
sharks_I think it's because I don't have a /vendor directory, though I do have /system/vendor10:36
malbtw, 4.6.0.15 is the latest sailfish10:39
Mister_Magisteri thought its 5.something10:40
sharks_According to https://releases.sailfishos.org/sdk/targets/, latest is 4.6.0.13 and early-access is 5.0.0.29, no?10:41
sharks_I mean I have 4.6.0.15 on my X10IV, but that's not available here10:42
malit's fine to use .13 to build .15 image10:42
ecrnis it possible to build 5.0.0.29 now?11:05
ecrnbecause the device I have has notches and I heard sailfishos 5 has something done to support notched and rounded displays11:05
Thaodan@xo0on: Re: Xperia device porting. I own most of these yes. For all camera work well for taking pictures. Video doesn't work so well for the current blobs I and the Xperia 10 III port uses.11:10
ThaodanDidn't have much time to work on it recently but it works very well in a way that I don't have much to do to keep it up to date.11:11
malecrn: 4.6 also supports notch configs to some degree, not as much as 5.0.0 though11:24
sharks_Alright - I don't know what I'm doing, I tried adding a symlink in sparse from `vendor` to `system/vendor`, but that's made no difference. What am I doing wrong?11:27
malwhat are you trying to fix?11:28
sharks_droid-hal-init is failing because it can't find /vendor/etc/selinux. The files are in /system/vendor/ and /system_root/vendor, but /vendor doesn't exist.11:29
malso the symlink wasn't added?11:32
malwhat did you rebuild after adding the symlink, try adding it directly to device first11:33
malwait11:33
malhow did you do the selinux stuff in droid-configs?11:33
sharks_No, though for some reason now I can `$ ln -s /system/vendor /vendor` where it wouldn't let me before as / was read-only.11:38
sharks_So I don't know why sparse didn't add it, but I've got it now, at least temporarily11:39
sharks_What do you mean by the selinux stuff in droid-configs?\11:39
sharks_Are you referring to droid-configs/sparse/etc/selinux/config?11:40
sharks_That's all as per https://github.com/mer-hybris/droid-config-sony-seine/tree/eaa09db67b94352ef801417363008dc4005d9213/sparse/etc/selinux11:41
sharks_latest journal logs -> https://paste.opensuse.org/pastes/44592038617611:43
sharks_droid-hal-init is started!11:43
sharks_But then it stops again? Bugger.11:44
ecrnJun 13 19:51:32 GalaxyTabA9.7 invoker[1936]: library "libandroidicu.so" not found11:56
ecrnthat's a common problem I guess11:56
ecrnhttps://sailfishos.wiki/books/hadk/page/hadk-hot#bkmrk-%2A-since-hybris-17%3A11:58
SharksAh righto, I did read about that somewhere in the irc logs. Didn't spot it in the journal log. Thanks ecrn, I'll investigate it tomorrow. 11PM now, I'll sign off for the night12:04
SharksThanks again all12:05
*** amccarthy is now known as Guest338715:34
*** amccarthy_ is now known as amccarthy15:34
ecrnis there anything special android audio interface requires to enable fm radio capture?17:41
ecrnaudio_hw_primary_odm: device-fmradio_open_input_stream: cannot open FM Radio Recording stream as FM is not working17:46
ecrnand I set up the tuner as best as I could using v4l2-ctl, and left the device open with --sleep option17:47
ecrnsnr reported by a v4l2 control changed from about 10 to about 12017:47
ecrnwhen tuned to an FM station17:47
ecrnthere is no android.hardware.broadcastradio service though so I'm not sure how the radio is supposed to work on android17:55
malwell depends on the device how it does fm radio, this is for some qcom devices https://github.com/mer-hybris/qt5-qtmultimedia-plugin-mediaservice-irisradio18:09
ecrncat ./lib/hw/audio.primary.s5e8825.so | strings | grep -i fm18:15
ecrnand there are some things18:15
ecrnl_fmradio_mode18:16
ecrnFM_ON18:16
ecrnl_fmradio_external_key18:16
ecrn%s: skip set-route in case of FM on, usage_type(%d) and input_source(%d)18:16
ecrnthese are interesting18:16
ecrnmaybe some custom flag is passed somewhere18:16
ecrnby the standard api?18:16
malthat irisradio talks directly with kernel18:47
malyou need to find out what kind of fm radio chip your device has18:47
ecrns620 which is probably part of the wifi/bt combo18:49
ecrnprobably integrated in the soc18:49
malthen it might be that irisradio18:49
malcheck what kernel drivers you have enabled18:50
ecrnbut it is exynos18:51
ecrnhttps://github.com/LineageOS/android_hardware_samsung_slsi-linaro_exynos/blob/lineage-22.0/libaudio/audiohal/audio_hw.c19:09
ecrnnot exactly the driver but similar19:10
ecrnor, the hal module rather19:10
ecrnfor some other exynos19:10
ecrnhttps://github.com/LineageOS/android_hardware_samsung_slsi-linaro_exynos/blob/lineage-22.0/libaudio/audiohal/audio_hw.c#L344519:11
ecrnmaybe something to do with this?19:11
ecrn#define AUDIO_PARAMETER_KEY_FMRADIO_MODE                "fm_mode"19:13
ecrnso it is the custom parameter after all19:13
ecrnnow, what to do about passing it?19:13
ecrnpatch pulseaudio module to set it when capturing on fm input?19:14
ecrnprobably in my version it is "l_fmradio_mode" / "l_fmradio_volume" and the like19:30
ecrnhm, there is droid.set_parameters.v1 provided to use inside the pulseaudio modules19:33
ecrnso maybe additional module would do?19:33
malyou are confusing audio hal with fm radio19:55
maldifferent things19:55
ecrnam I?20:06
ecrnthe audio hal is not allowing audio capture from fm input20:06
ecrnunless l_fmradio_mode=on has been passed to set_parameters20:07
ecrnwhen it has been passed, there are no errors in audio capture20:07
ecrnjust silence20:07
ecrnso there is v4l2 control settings to figure out now20:08
ecrnbut at least there is an audio stream20:08
ecrnbefore this, there was flood of "audio_hw_primary_odm: device-fmradio_open_input_stream: cannot open FM Radio Recording stream as FM is not working" in the logcat when the input was selected as fm tuner and the capture stream was opened20:09
ecrnhttps://pastebin.k4be.pl/view/raw/b22c331920:10
ecrnI used this to set the parameters20:10
ecrnnow, the v4l2 controls... https://pastebin.k4be.pl/view/raw/eb89770420:15
ecrnl_external_chipset needs also to be set to false, otherwise it routes usbfm somehow21:11
ecrnI'm not sure about other parameters21:11
ecrnwow21:27
ecrnit works21:27
ecrnI had to set the mute control to 121:27
ecrnwho'd have guessed21:28
ecrnbut it routed the fm to speaker21:29
ecrnl_fmradio_external_key=false;l_fmradio_external_chipset=false;l_fmradio_mode=on;l_fmradio_volume=0.5;21:30
ecrnthat is the final set of parameters to the audio hal21:30
ecrnok, it routes to whatever is set as the current audio output22:23
sharks_Symlinking libandroidicu.so has worked, now I'm fighting lipstick - It keeps trying and failing to start, complaining that it can't find `/sys/fs/cgroup/memory/noswapping/tasks for disabling caching`, and that `Binder driver could not be opened.  Terminating.`22:24
sharks_I have got ssh now though22:27
ecrnso probably it is the time to start re-enabling the Kconfig options22:30
sharks_As in, start fiddling with defconfig again to try and get rid of all the warnings?22:32
malsharks_: which kernel version does your device use?22:34
malcheck the MEMCG options22:34
sharks_`uname -r` spits out version 3.10.10822:36
sharks_I'll have to work out what the MEMCG options are, give me a while...22:36
sharks_current logcat & journal -> https://paste.opensuse.org/pastes/f64c1a336d98, https://paste.opensuse.org/pastes/43101b37417b22:38
malhttps://github.com/mer-hybris/mer-kernel-check/blob/master/mer_verify_kernel_config#L30622:39
malthose 322:39
sharks_My defconfig doesn't contain those options, and mer_verify_kernel_config has no warning or error mentioning them?22:42
malwhich android base is that again?22:43
sharks_Lineage17.1, android 1022:43
maldid you remember correctly setup selinux as mentioned in faq22:43
malshow output of "ls -lR /etc/selinux"22:44
sharks_https://paste.opensuse.org/pastes/cb27f86d2ef222:45
sharks_It is as per https://github.com/mer-hybris/droid-config-sony-seine/tree/eaa09db67b94352ef801417363008dc4005d9213/sparse/etc/selinux22:45
maland you copied the target files correctly from device or build env22:47
malsizes seem reasonable at least22:47
sharks_Yeah I did copy them, was just checking I hadn't overwritten them accidentally22:48
sharks_But they're definitely the real deal22:48
malcheck the permissions of /dev/*binder22:48
sharks_All three are crw-------22:49
sharks_If I set them to 666 as per your comments here, they get reset after reboot? https://piggz.co.uk/sailfishos-porters-archive/index.php?log=2021-10-20.txt#line6922:51
malhmm, on some devices I check /dev/binder is 666 not 60022:51
malyeah, might need some udev rule to change the permissions, not sure why is hasn't been done automatically, usually ueventd.rc has that and our build generates udev rules for those22:53
sharks_Right, thanks - give me a moment to set that up.22:53
malthere have been cases where some files are not copied by build automatically and some permissions are missing22:54
mallook for ueventd*.rc in device repos22:55
sharks_Hang on, just set up the udev rule, binder issues are gone, but now I get 'logcat read failure'?23:00
sharks_Crap, we've broken droid-hal-init23:02
sharks_journal -> https://paste.opensuse.org/pastes/aff22384df5423:03
malwhat kind of udev rule did you add?23:15
malcheck the permissions again just in case23:16
sharks_https://paste.opensuse.org/pastes/a2526278e27d23:16
sharks_Permissions are okay23:17
sharks_Is there something wrong with the udev rule?23:17
malprobably ok23:17
sharks_I'll get rid of it and see if droid-hal-init comes back23:19
sharks_Yep23:21
sharks_That's stuffed me. Why would that rule break droid-hal-init?23:21
maltry changing only binder23:21
malalso check what binder-list tells23:22
sharks_yeh okay, changing only binder does not break droid-hal-init23:23
malbut even in that earlier log you had those ServiceManagement: Waited for hwservicemanager.ready for a second, waiting another...23:23
maldid you check that "look for ueventd*.rc in device repos"23:24
sharks_I've got ./device/samsung/msm8916-common/rootdir/etc/ueventd.qcom.rc, is that what we're looking for?23:26
sharks_And you're right, hwservicemanage is still waiting another second, and droid-hal-init is dead as a result - but I've got logd running now, where I didn't when all *binder were 666.23:27
sharks_Wait, no - logd is dead again23:29
sharks_Maybe I was just fast enough to catch it before it died23:29
malyeah23:31
sharks_Right, so if I'm fast enough, I get this out of logcat before it dies -> https://paste.opensuse.org/pastes/651597e7868c23:33
malI suspect this is some selinux issue23:34
sharks_Okay, I might have to start reading some textbooks then - I don't think I understand selinux well enough to know where to go next.23:35
malServiceManagement: getService: defaultServiceManager() is null23:36
malthat looks bad23:36
malwell usually we don't care much about selinux, we have disabled it to some degree23:36
malhmm23:37
malsharks_: is that ueventd.qcom.rc anywhere in out/ ?23:37
sharks_There is two files in ./out:23:38
sharks_./out/target/product/gt5note10wifi/obj/ETC/ueventd.qcom.rc_intermediates/ueventd.rc23:38
sharks_./out/target/product/gt5note10wifi/system/vendor/ueventd.rc23:38
malok, that is probably the file23:40
sharks_The first one at least, yeah23:40
malI check the device repo and it seems to copy it to vendor/ueventd.rc23:41
sharks_Oh righto. It's definitely there then23:42
malI found in logs that someone had failing hwservicemanager but not sure what the fix was and if it is relevant for you23:46
sharks_Is that <Shigenta>?23:47
ecrnin my case vndservicemanager required libselinux_stubs to be preloaded, but that was halium23:49
sharks_Shigenta's issue was hwservicemanager.rc had the wrong permissions, but that's not the case here...23:50
malsharks_: so you don't see anything from hwservicemanager in logcat?23:51
sharks_ecrn, yeah I don't have halium23:51
sharks_No, no mention of hwservicemanager in logcat.23:51
sharks_Journal is spammed full of 'Waited for hwservicemanager.ready for a second, waiting another'23:52
malthe relevant issue is  Service 'hwservicemanager' (pid 894) exited with status 123:54
malnot sure why that exits23:54
sharks_Hmm.23:54
sharks_I need to step away for about half an hour, but I'll be back and I'll try to track that down. Thanks for your help, mal.23:55
ecrnhm, does sailfish have libselinux_stubs.so somewhere, too?23:55
malI think I need to get some sleep now23:56
sharks_wait nvm, plans changed, don't need to go.23:56
sharks_That's fair enough though lol.23:56
ecrnit seems it does23:56
sharks_I'll see how I go on my own. Thanks again23:56
ecrnI'd try setenv LD_PRELOAD libselinux_stubs.so in hwservicemanager.rc23:58
malyeah, that is something to try23:58
sharks_That's already in there?23:59
sharks_setenv LD_PRELOAD /usr/libexec/droid-hybris/system/lib64/libselinux_stubs.so23:59
sharks_Although, wait...23:59
sharks_This is 32 bit23:59

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

Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!