sharks | And 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 |
---|---|---|
sharks | I 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 |
sharks | Alright - I've got logs. Still stuck on the device's initial splash screen - no gui, but I can telnet on port 2323. | 04:21 |
sharks | https://paste.opensuse.org/pastes/3433bc267ddf | 04:22 |
sharks | I'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 |
sharks | Interesting - /system is mounted, but `$ ls /system/bin` complains "Too many levels of symbolic links"? | 04:29 |
sharks | Reading 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#line76 | 04:39 |
sharks | To my eye, mounts look okay?? https://paste.opensuse.org/pastes/ca22f7289801 | 04: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/a682dc859364 | 05: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 instruction | 06: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/19740 | 07:07 |
sharks_ | I am building 4.6.0.13 | 07: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:P | 07: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 booting | 07: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 one | 07:28 |
sharks_ | Well I appreciate the help just the same | 07:30 |
*** amccarthy is now known as Guest3346 | 07:54 | |
*** amccarthy_ is now known as amccarthy | 07: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/30bdb967c05d | 08: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 image | 08: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 how | 08: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/9ea497cb7b56 | 08: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 lol | 10: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/vendor | 10:36 |
mal | btw, 4.6.0.15 is the latest sailfish | 10:39 |
Mister_Magister | i thought its 5.something | 10: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 here | 10:42 |
mal | it's fine to use .13 to build .15 image | 10:42 |
ecrn | is it possible to build 5.0.0.29 now? | 11:05 |
ecrn | because the device I have has notches and I heard sailfishos 5 has something done to support notched and rounded displays | 11: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 |
Thaodan | Didn'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 |
mal | ecrn: 4.6 also supports notch configs to some degree, not as much as 5.0.0 though | 11: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 |
mal | what 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 |
mal | so the symlink wasn't added? | 11:32 |
mal | what did you rebuild after adding the symlink, try adding it directly to device first | 11:33 |
mal | wait | 11:33 |
mal | how 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 temporarily | 11: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/selinux | 11:41 |
sharks_ | latest journal logs -> https://paste.opensuse.org/pastes/445920386176 | 11:43 |
sharks_ | droid-hal-init is started! | 11:43 |
sharks_ | But then it stops again? Bugger. | 11:44 |
ecrn | Jun 13 19:51:32 GalaxyTabA9.7 invoker[1936]: library "libandroidicu.so" not found | 11:56 |
ecrn | that's a common problem I guess | 11:56 |
ecrn | https://sailfishos.wiki/books/hadk/page/hadk-hot#bkmrk-%2A-since-hybris-17%3A | 11:58 |
Sharks | Ah 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 night | 12:04 |
Sharks | Thanks again all | 12:05 |
*** amccarthy is now known as Guest3387 | 15:34 | |
*** amccarthy_ is now known as amccarthy | 15:34 | |
ecrn | is there anything special android audio interface requires to enable fm radio capture? | 17:41 |
ecrn | audio_hw_primary_odm: device-fmradio_open_input_stream: cannot open FM Radio Recording stream as FM is not working | 17:46 |
ecrn | and I set up the tuner as best as I could using v4l2-ctl, and left the device open with --sleep option | 17:47 |
ecrn | snr reported by a v4l2 control changed from about 10 to about 120 | 17:47 |
ecrn | when tuned to an FM station | 17:47 |
ecrn | there is no android.hardware.broadcastradio service though so I'm not sure how the radio is supposed to work on android | 17:55 |
mal | well depends on the device how it does fm radio, this is for some qcom devices https://github.com/mer-hybris/qt5-qtmultimedia-plugin-mediaservice-irisradio | 18:09 |
ecrn | cat ./lib/hw/audio.primary.s5e8825.so | strings | grep -i fm | 18:15 |
ecrn | and there are some things | 18:15 |
ecrn | l_fmradio_mode | 18:16 |
ecrn | FM_ON | 18:16 |
ecrn | l_fmradio_external_key | 18:16 |
ecrn | %s: skip set-route in case of FM on, usage_type(%d) and input_source(%d) | 18:16 |
ecrn | these are interesting | 18:16 |
ecrn | maybe some custom flag is passed somewhere | 18:16 |
ecrn | by the standard api? | 18:16 |
mal | that irisradio talks directly with kernel | 18:47 |
mal | you need to find out what kind of fm radio chip your device has | 18:47 |
ecrn | s620 which is probably part of the wifi/bt combo | 18:49 |
ecrn | probably integrated in the soc | 18:49 |
mal | then it might be that irisradio | 18:49 |
mal | check what kernel drivers you have enabled | 18:50 |
ecrn | but it is exynos | 18:51 |
ecrn | https://github.com/LineageOS/android_hardware_samsung_slsi-linaro_exynos/blob/lineage-22.0/libaudio/audiohal/audio_hw.c | 19:09 |
ecrn | not exactly the driver but similar | 19:10 |
ecrn | or, the hal module rather | 19:10 |
ecrn | for some other exynos | 19:10 |
ecrn | https://github.com/LineageOS/android_hardware_samsung_slsi-linaro_exynos/blob/lineage-22.0/libaudio/audiohal/audio_hw.c#L3445 | 19:11 |
ecrn | maybe something to do with this? | 19:11 |
ecrn | #define AUDIO_PARAMETER_KEY_FMRADIO_MODE "fm_mode" | 19:13 |
ecrn | so it is the custom parameter after all | 19:13 |
ecrn | now, what to do about passing it? | 19:13 |
ecrn | patch pulseaudio module to set it when capturing on fm input? | 19:14 |
ecrn | probably in my version it is "l_fmradio_mode" / "l_fmradio_volume" and the like | 19:30 |
ecrn | hm, there is droid.set_parameters.v1 provided to use inside the pulseaudio modules | 19:33 |
ecrn | so maybe additional module would do? | 19:33 |
mal | you are confusing audio hal with fm radio | 19:55 |
mal | different things | 19:55 |
ecrn | am I? | 20:06 |
ecrn | the audio hal is not allowing audio capture from fm input | 20:06 |
ecrn | unless l_fmradio_mode=on has been passed to set_parameters | 20:07 |
ecrn | when it has been passed, there are no errors in audio capture | 20:07 |
ecrn | just silence | 20:07 |
ecrn | so there is v4l2 control settings to figure out now | 20:08 |
ecrn | but at least there is an audio stream | 20:08 |
ecrn | before 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 opened | 20:09 |
ecrn | https://pastebin.k4be.pl/view/raw/b22c3319 | 20:10 |
ecrn | I used this to set the parameters | 20:10 |
ecrn | now, the v4l2 controls... https://pastebin.k4be.pl/view/raw/eb897704 | 20:15 |
ecrn | l_external_chipset needs also to be set to false, otherwise it routes usbfm somehow | 21:11 |
ecrn | I'm not sure about other parameters | 21:11 |
ecrn | wow | 21:27 |
ecrn | it works | 21:27 |
ecrn | I had to set the mute control to 1 | 21:27 |
ecrn | who'd have guessed | 21:28 |
ecrn | but it routed the fm to speaker | 21:29 |
ecrn | l_fmradio_external_key=false;l_fmradio_external_chipset=false;l_fmradio_mode=on;l_fmradio_volume=0.5; | 21:30 |
ecrn | that is the final set of parameters to the audio hal | 21:30 |
ecrn | ok, it routes to whatever is set as the current audio output | 22: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 though | 22:27 |
ecrn | so probably it is the time to start re-enabling the Kconfig options | 22:30 |
sharks_ | As in, start fiddling with defconfig again to try and get rid of all the warnings? | 22:32 |
mal | sharks_: which kernel version does your device use? | 22:34 |
mal | check the MEMCG options | 22:34 |
sharks_ | `uname -r` spits out version 3.10.108 | 22: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/43101b37417b | 22:38 |
mal | https://github.com/mer-hybris/mer-kernel-check/blob/master/mer_verify_kernel_config#L306 | 22:39 |
mal | those 3 | 22:39 |
sharks_ | My defconfig doesn't contain those options, and mer_verify_kernel_config has no warning or error mentioning them? | 22:42 |
mal | which android base is that again? | 22:43 |
sharks_ | Lineage17.1, android 10 | 22:43 |
mal | did you remember correctly setup selinux as mentioned in faq | 22:43 |
mal | show output of "ls -lR /etc/selinux" | 22:44 |
sharks_ | https://paste.opensuse.org/pastes/cb27f86d2ef2 | 22:45 |
sharks_ | It is as per https://github.com/mer-hybris/droid-config-sony-seine/tree/eaa09db67b94352ef801417363008dc4005d9213/sparse/etc/selinux | 22:45 |
mal | and you copied the target files correctly from device or build env | 22:47 |
mal | sizes seem reasonable at least | 22:47 |
sharks_ | Yeah I did copy them, was just checking I hadn't overwritten them accidentally | 22:48 |
sharks_ | But they're definitely the real deal | 22:48 |
mal | check the permissions of /dev/*binder | 22: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#line69 | 22:51 |
mal | hmm, on some devices I check /dev/binder is 666 not 600 | 22:51 |
mal | yeah, 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 those | 22:53 |
sharks_ | Right, thanks - give me a moment to set that up. | 22:53 |
mal | there have been cases where some files are not copied by build automatically and some permissions are missing | 22:54 |
mal | look for ueventd*.rc in device repos | 22: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-init | 23:02 |
sharks_ | journal -> https://paste.opensuse.org/pastes/aff22384df54 | 23:03 |
mal | what kind of udev rule did you add? | 23:15 |
mal | check the permissions again just in case | 23:16 |
sharks_ | https://paste.opensuse.org/pastes/a2526278e27d | 23:16 |
sharks_ | Permissions are okay | 23:17 |
sharks_ | Is there something wrong with the udev rule? | 23:17 |
mal | probably ok | 23:17 |
sharks_ | I'll get rid of it and see if droid-hal-init comes back | 23:19 |
sharks_ | Yep | 23:21 |
sharks_ | That's stuffed me. Why would that rule break droid-hal-init? | 23:21 |
mal | try changing only binder | 23:21 |
mal | also check what binder-list tells | 23:22 |
sharks_ | yeh okay, changing only binder does not break droid-hal-init | 23:23 |
mal | but even in that earlier log you had those ServiceManagement: Waited for hwservicemanager.ready for a second, waiting another... | 23:23 |
mal | did 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 again | 23:29 |
sharks_ | Maybe I was just fast enough to catch it before it died | 23:29 |
mal | yeah | 23:31 |
sharks_ | Right, so if I'm fast enough, I get this out of logcat before it dies -> https://paste.opensuse.org/pastes/651597e7868c | 23:33 |
mal | I suspect this is some selinux issue | 23: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 |
mal | ServiceManagement: getService: defaultServiceManager() is null | 23:36 |
mal | that looks bad | 23:36 |
mal | well usually we don't care much about selinux, we have disabled it to some degree | 23:36 |
mal | hmm | 23:37 |
mal | sharks_: 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.rc | 23:38 |
sharks_ | ./out/target/product/gt5note10wifi/system/vendor/ueventd.rc | 23:38 |
mal | ok, that is probably the file | 23:40 |
sharks_ | The first one at least, yeah | 23:40 |
mal | I check the device repo and it seems to copy it to vendor/ueventd.rc | 23:41 |
sharks_ | Oh righto. It's definitely there then | 23:42 |
mal | I found in logs that someone had failing hwservicemanager but not sure what the fix was and if it is relevant for you | 23:46 |
sharks_ | Is that <Shigenta>? | 23:47 |
ecrn | in my case vndservicemanager required libselinux_stubs to be preloaded, but that was halium | 23:49 |
sharks_ | Shigenta's issue was hwservicemanager.rc had the wrong permissions, but that's not the case here... | 23:50 |
mal | sharks_: so you don't see anything from hwservicemanager in logcat? | 23:51 |
sharks_ | ecrn, yeah I don't have halium | 23: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 |
mal | the relevant issue is Service 'hwservicemanager' (pid 894) exited with status 1 | 23:54 |
mal | not sure why that exits | 23: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 |
ecrn | hm, does sailfish have libselinux_stubs.so somewhere, too? | 23:55 |
mal | I think I need to get some sleep now | 23:56 |
sharks_ | wait nvm, plans changed, don't need to go. | 23:56 |
sharks_ | That's fair enough though lol. | 23:56 |
ecrn | it seems it does | 23:56 |
sharks_ | I'll see how I go on my own. Thanks again | 23:56 |
ecrn | I'd try setenv LD_PRELOAD libselinux_stubs.so in hwservicemanager.rc | 23:58 |
mal | yeah, that is something to try | 23:58 |
sharks_ | That's already in there? | 23:59 |
sharks_ | setenv LD_PRELOAD /usr/libexec/droid-hybris/system/lib64/libselinux_stubs.so | 23:59 |
sharks_ | Although, wait... | 23:59 |
sharks_ | This is 32 bit | 23:59 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!