Sunday, 2024-02-04

genericlinkshttps://paste.opensuse.org/pastes/ff0d8d383cfb Lastest journalctl00:01
genericv3Now i need to go, i'll try to continue tomorrow00:01
genericv3 Thanks again everyone00:01
T42_<b100dian> > Cannot find '/odm/bin/hw/android.hardware.keymaster@3.0-service-qti_HYBRIS_DISABLED00:03
T42_<b100dian> Interesting, why is that disabled00:03
T42_<elros34> apexd failed but could be simple issue with missing kernel patch form hadk-hot00:04
mallooking at the logs copying apexd.rc might have been incorrectly done droid-hal-init: /usr/libexec/droid-hybris/system/etc/init/apexd.rc: 1: Invalid section keyword found00:06
malwhich would result in the wrong apexd to be used which will fail00:06
T42_<b100dian> is anyone working on fairphone 5 already?00:08
T42_<b100dian> Am asking because I search for a new device: either one of https://www.gsmarena.com/compare.php3?idPhone1=11962&idPhone3=12013&idPhone2=12540 or the Xperia 5 IV that I have got one in the family.00:13
mal@b100dian I have an fp5, although at the moment it has sfos on top of mainline kernel, not the usual port00:18
T42_<b100dian> mal: that is very good to know. mainline however doesn't bring the camera capabilities does it?00:19
malwell I did implement the camera subsystem support in mainline for it but no sensor drivers yet00:22
malI need to find some android base to use for normal porting, unfortunately the sources from fairphone can't be built at the moment00:23
T42_<b100dian> I read about that stuff too. Are you considering that there's some reverse engineering applicable to those (probably sony sensor) blobs that could help with the mainline?00:24
T42_<b100dian> really lately I've poked at the postmarket wiki and cameras are off the table for anything 2018 and beyond00:26
T42_<b100dian> But I dont' know if something like waydroid can help as a workaround00:27
malI have some non-working sensor drivers for some of the cameras, not sure what the issue is yet with those since I made those myself00:28
T42_<b100dian> Sounds like a full-time job:)00:29
T42_<b100dian> Anyway, that answers my question, thank you. I will still have to figure out if 5 IV or a xiaomi for me and will trust you for FP5 ;) camera or no camera00:29
malI found some unofficial lineage device repos for fp5, need to make test build of those00:31
T42_<b100dian> Maybe there is something you can reply to this guy then? https://forum.sailfishos.org/t/what-would-be-required-for-a-port-to-fairphone-5/1787000:32
malyeah, I was planning on answering00:32
T42_<b100dian> cool00:36
T42_<b100dian> Thank you00:37
genericv2Hello, i am back. I'll try to fix errors i found, anyone have a idea about last log i sent?10:44
genericv2Fixed apexd.rc now, a laptop-moment typo10:48
genericv2Apexd at least runs now10:53
genericv2Mar 15 13:33:21 Mi6 droid-hal-init: mkdir("/dev/dm-user", 0755) failed File exists11:05
genericv2Mar 15 13:33:21 Mi6 droid-hal-init: mknod("/dev/kmsg_debug", S_IFCHR | 0622, makedev(1, 11)) failed File exists11:05
genericv2Mar 15 13:33:21 Mi6 droid-hal-init: Init encountered errors starting first stage, aborting11:05
genericv2is this happening cuz droid-hal-init fails for another reason and restarts?11:05
genericv2Yeah it's failing for another reason and tries to restart, then dies again because these files already exist11:14
genericv2Mar 15 13:50:58 Mi6 droid-hal-init: Failed to umount /debug_ramdisk: No such file or directory11:22
genericv2nope this is not we are looking for, probably11:26
genericv2hwservicemanager is failing, this is why droid-hal-init is exiting11:27
genericv2trying to find logs related to hwservicemanager, also now i can exetue binaries is /system/bin etc,11:29
genericv2Hmm, maybe these? libc: Unable to set property "ro.logd.kernel" to "true": connection failed; errno=111 (Connection refused)11:39
genericv2Same happens with hwservicemanager11:39
genericv2Found nothing related to these in had-faq and hadk-hot11:40
genericv2Checking irc logs, looks like it's a selinux error, i'll mess with kernel11:41
T42_<elros34> did you check kernel patch related to loop and apexd errors I was talking about?11:52
genericv2i was about to logout when you write that, i forget it. I'll check it now11:54
genericv2Yeah THE SAME THING happens. Both apexd-bootstrap and fastboot. "Leads to apexd-bootstrap failure, ueventd start and reboot to fastboot mode. Apply this: https://github.com/mer-hybris/android_kernel_sony_msm/pull/95"11:55
T42_<elros34> what about mal's advice from yesterday , did you check whether added rc files are correct?11:56
T42_<elros34> this kernel patch changed anything? apexd-bootstrap still exit with 1 cod?11:57
genericv2Yeah i checked them, 2 of them were blank, i fixed them11:57
genericv2i'll apply it noiw, backed up current kernel11:57
genericv2failed to apply :fire:11:58
genericv2i'll apply it manually11:58
genericv2These are different files, oof12:00
T42_<elros34> ah and you are booting to act dead mode (charging). Next time reboot (command) and boot normally12:06
genericv2I tried to apply the patch, there is some differences between these kernels but it must be okay i guess12:16
genericv2okaay12:16
genericv2lots of errors, great12:19
genericv2fixed the compile errors12:24
genericv2kernel booted fine12:27
T42_<elros34> did you manage to boot to normal mode instead act dead?12:28
genericv2rebooted now, it must boot to normal mode now12:29
genericv2how can i check boot mode?12:31
T42_<elros34> search "welcome"  word, there should be boot mode somewhere around12:31
genericv2Mar 15 14:56:03 Mi6 preinit: (18.21) Welcome to Sailfish OS 4.5.0.19 (Struven ketju)12:31
genericv2BOOTSTATE = USER12:32
T42_<elros34> boot target12:32
genericv2Booting to default.target12:32
T42_<elros34> thats good12:32
genericv2Apexd is okay i think. "Wait for property 'apexd.status=activated' took 5810ms"12:33
genericv2hwservicemanager is still crashing12:33
T42_<elros34> is droid-hal-init up? try to get logcat too12:34
genericv2it's dead, but i can execute logcat but it fails to start because logd is dead too12:34
genericv2/ # /system/bin/logd12:35
genericv2libc: Unable to set property "ro.logd.kernel" to "true": connection failed; errno=111 (Connection refused)12:35
genericv2libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2613 (logd), pid 2613 (logd)12:35
genericv2Aborted (core dumped)12:35
T42_<elros34> you need to be faster, try it  few times right after booting12:35
genericv2/ # /system/bin/logcat12:38
genericv2logcat: Failed to wait for logd.ready to become true. logd not running?12:38
genericv2trying to start logd gives the same error12:38
T42_<elros34> did you run this after droid-hal-init started or after it crashed?12:39
T42_<elros34> and use one in /usr/libexec/droid-hybris/12:40
genericv2i ran it before it crashed12:43
genericv2Active: active (running)12:43
genericv2usr/libexec/droid-hybris/system/bin/logcat is same too12:43
genericv2libc: Unable to set property "ro.logd.kernel" to "true": error code: 0xb12:49
genericv2ERROR CODE CHANGED12:49
genericv2nope its same12:50
genericv2https://paste.opensuse.org/pastes/03a23e64cbd612:52
T42_<b100dian> 11 resource temporarily not available. Curious that logcat cannot set that property, maybe you did a release build instead of debug of the android build?12:52
genericv2Also hwservicemanager can't set it12:53
genericv2i probably made a release build by accident12:53
T42_<elros34> I am not sure you can do it by accident. How new journal looks like?13:01
genericv3i am alive again, network issues13:02
genericv3i built everything like instructions, rootfs has "release" in its filename13:03
T42_<b100dian> No, I mean the android build, breakfast command or what you're using, what does it show you're building? Although to be fair, logcat should work in release builds too :hmm13:24
genericv3Ah okay, it's userdebug build.13:30
T42_<elros34> show latest log because for now we play guess game13:32
T42_<elros34> did you change anything selinux related in kernel?13:33
genericv3I'll be afk for a few minutes, i'll send it when i am back. i'll keep my irc client running so you can send messages.13:35
genericv3i added a few flags for selinux when i applied that apexd related patch.13:35
T42_<elros34> what flags? I am asking about  defconfig changes13:37
genericv3i am back14:10
genericv3defconfig flags, wait i'll find them14:10
genericv3CONFIG_SECURITY_SELINUX=y14:14
genericv3CONFIG_SECURITY_SELINUX_BOOTPARAM=y14:14
genericv3CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=014:14
genericv3CONFIG_SECURITY_SELINUX_DEVELOP=y14:14
genericv3CONFIG_DEFAULT_SECURITY_SELINUX=y14:14
T42_<elros34> you may try to remove at least SECURITY_SELINUX_BOOTPARAM*. I didn't see anything related in old logs but generally selinux shouldn't be disabled14:24
T42_<elros34> basically you should have not change anything selinux related in defconfig14:25
genericv3Normally i only had CONFIG_SECURITY_SELINUX=y14:27
genericv3i added these as a fix attempt14:28
genericv3for logcat14:28
T42_<elros34> its illusion:) you have probably minimized defconfig for who knows what reasons.14:29
T42_<elros34> so it's harder to figure out what changes you have. For your own curiosity you should check generated .config14:30
genericv3hehe, probably.14:33
genericv3i am at laptop (again), i'll check that generated .config file about in a hour14:34
genericv3yeah i disabled selinux by a mistake14:37
genericv3is permissive enough by the way? Or we need it to enforce14:39
T42_<elros34> leave what was default. I think it logs there should be some signs of wrong selinux state14:41
genericv3Okay then i will revert selinux changes from my defconfig and check generated full .config file14:56
genericv3What to do next14:56
T42_<elros34> no idea, because you  still didn't show latest journal log14:57
genericv3Oops sorry, i forget about it14:57
genericv3https://paste.opensuse.org/pastes/dbcecd58239115:03
genericv3i rebooted manually at the end15:03
T42_<elros34> at least apexd-bootstrap exit with 0 but still have some strange errors  like "DM_DEV_CREATE failed for [com.android.tzdata]: Bad file descriptor"15:09
genericv3yeah these are strange, i dont have a idea what is this tbh 😅15:12
T42_<elros34> ah you disabled selinux in this log15:26
genericv3yeah, it's still disabled. Still on laptop, can't rebuild kernel15:27
genericv3i can in approximately 30minutes, probably15:27
T42_<elros34> I am curious what instruction did you read which suggest that?15:28
genericv3i found these flags in irc log and simply added them for a quick test.15:29
genericv3didin't meant to disable selinux15:29
T42_<elros34> this breaks servicemanager, but logd complain about something else15:31
genericv3but servicemanager was crashing before this too15:32
T42_<elros34> this fails currently https://github.com/LineageOS/android_system_logging/blob/lineage-20.0/logd/main.cpp#L7815:50
genericv3Finally, i'll be afk for a few more minutes. After that i can rebuild the kernel.15:55
genericv2rebuilding kernel16:18
genericv2selinux is Permissive now.16:24
genericv2https://paste.opensuse.org/pastes/8dcc267f14cb lastest journal with permissive selinux16:26
genericv2HABUILD_SDK [sagit] kita@suse:~/hadk$ cat out/target/product/sagit/obj/KERNEL_OBJ/.config | grep SELINUX16:28
genericv2CONFIG_SDFAT_VIRTUAL_XATTR_SELINUX_LABEL="u:object_r:sdcard_external:s0"16:28
genericv2CONFIG_SECURITY_SELINUX=y16:28
genericv2# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set16:28
genericv2# CONFIG_SECURITY_SELINUX_DISABLE is not set16:28
genericv2CONFIG_SECURITY_SELINUX_DEVELOP=y16:28
genericv2CONFIG_SECURITY_SELINUX_AVC_STATS=y16:28
genericv2CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=016:28
genericv2# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set16:28
genericv2CONFIG_DEFAULT_SECURITY_SELINUX=y16:28
malgenericv2: you need to copy task_profiles.json from /system/etc (or something like that) to /etc and also add symlink /etc/task_profiles which points to /system/etc/task_profiles16:30
malthis is one of the currently undocumented things needed for android 13 base :)16:30
malthat should fix logd16:31
genericv2hehe, there is a lot needed for android 13 base docs ig16:32
genericv2copied and linked16:32
genericv2libc: Unable to set property "ro.logd.kernel" to "true": connection failed; errno=111 (Connection refused), again :(16:33
genericv2but it didint terminated, hm16:33
T42_<elros34> check logcat now16:33
genericv2IT WORKED16:34
genericv2i'll be quick and get logcat output16:36
genericv2https://paste.opensuse.org/pastes/6455949f207916:38
T42_<elros34> search for selinux stubs in hadk-hot16:40
genericv2i know that, i already added that line but it can't load it16:40
genericv2WAIT16:44
genericv2droid-hal-init didin;t exit this timew16:44
genericv2Only  dev-binderfs.mount and systemd-tmpfiles-setup.service  failed to start16:45
genericv2hwservicemanager is throwing some could not find errors rn16:46
T42_<elros34> so you added selinux stubs lines before you had working logcat? Then remove them and see. Lineage was started in selinux permissive mode too?16:46
genericv2i already had that selinux stub thing in hwservicemanager.rc, now i made it /data/.stowaways/sailfishos/usr/libexec/droid-hybris/system/lib64/libselinux_stubs.so instead of /usr/libexec/droid-hybris/system/lib64/libselinux_stubs.so and it worked i think16:47
genericv2SELinux was enforcing in lineage16:48
T42_<elros34> so what did you change so is permissive?16:49
T42_<b100dian> mal: so the libprocessgroup spam is not a non-error in A13, interesting, since it was present in A10 too16:49
genericv2I don't know why but i added "selinux=0" to bc.mk, that made selinux disable xD.16:50
genericv2removing that made selinux permissive again, selinux is set to permissive in config file.16:50
T42_<elros34> https://github.com/mer-hybris/hybris-patches/blob/hybris-20.0/system/core/0023-hybris-disable-the-usage-of-libprocessgroup-since-it.patch16:51
T42_<elros34> @genericv2 from where this hwservicemanager.rc with selinux stubs comes from? I could be wrong but I think this is not something added by default16:56
genericv2i may added it sometime, i don't remember it well tbh16:57
T42_<elros34> maybe it's good idea to upload your repos in case there are more unusual changes there16:59
genericv2i am a bit confused right now, what is the current issue?17:01
T42_<elros34> not working hw/vnd servicemanager17:03
genericv2Oh right. it's running but spamming logs, thats the issue17:04
T42_<elros34> I don't get how changing path from / to /data/.stowaways/sailfishos could fix anything17:06
genericv2i can restore its previous path to confirm it17:07
T42_<elros34> is it because of permitted_paths /data?17:08
malselinux_stubs is in manifest17:09
mal@b100dian yes, seems it's critical in a1317:09
genericv2yeah it reallly fixes things. When its /usr/libexec/droid-hybris/system/lib64/libselinux_stubs.so logcat brokes after a few seconds., droid-hal-init also dies17:10
genericv2these are okay with /data/.stowaways/sailfishos/usr/libexec/droid-hybris/system/lib64/libselinux_stubs.so17:10
T42_<elros34> what a security hole:)17:10
genericv2yeah xD17:10
genericv2linux lore17:10
mal@b100dian maybe there is some way to disable processgroup stuff more17:11
malfrom logd, but that needs then some more changes to rc files etc17:11
genericv2nothing to do?:(17:18
T42_<b100dian> Well it's not as security hole in a lvm build, but loading things from /data is.. the way we roll17:19
T42_<elros34> I was wondering how to fix this permited_paths in android13 but this quirk is great:)17:20
mallinker config has become a bit more difficult now because it's generated at runtime17:21
T42_<b100dian> ah, that two-step madness / mounting of APEX? Does it need changing or just waiting for it to be read?17:28
T42_<b100dian> I had a bunch of wait-for-linkerconfig sprinkled around here https://github.com/search?q=repo%3Asailfishos-on-sake%2Fdroid-config-sake+linkerconfig&type=code17:28
maloh, never seen that17:30
T42_<b100dian> that is A11 but the asus way may have incorporated some things earlier than others17:32
genericv2was trying to sign in to github, can i try these>17:39
T42_<b100dian> Not yet, you should fix hwcomposer first17:40
T42_<b100dian> These appear in boot racr conditions you may not have17:40
T42_<b100dian> *race17:41
T42_<b100dian> Like: I make lipatick work but not at first boot, needs a restart to display17:41
genericv2i don't know what to do but i'll try17:44
T42_<b100dian> You mentioned it doesnt find some stuff17:51
T42_<b100dian> I can't access the logcat paste17:52
genericv2wait a minute please i'll get logcat again17:52
genericv2https://paste.opensuse.org/ec5a817230fc17:55
genericv2must be enough17:55
genericv2i only can understand one thing from this logcat right now: everything is messed up😭17:57
T42_<b100dian> What's this "Expecting header 0x53595354 but found 0x564e4452. Mixing copies of libbinder?"17:58
genericv2There is18:00
genericv2./system/lib/libbinder.so18:00
genericv2./system/lib64/libbinder.so18:00
genericv2And so much more in phone rn18:00
genericv2Also ./usr/libexec/droid-hybris/system/lib64/libbinder.so etc.18:01
T42_<b100dian> Sounds like some kind of version mismatch.18:01
genericv2Like copies of libbinder.so is different than each other?18:04
malcheck gbinder.conf in /etc you probably have wrong version, it should have value 3118:06
malhttps://github.com/mer-hybris/droid-hal-configs/blob/android13/sparse-13/etc/gbinder.conf18:06
genericv2it does not exist18:08
genericv2created now18:08
T42_<b100dian> do you have `android_version_major` defined in droid config spec?18:09
mal@b100dian the root of the issue is incorrect submodule version18:09
genericv2yeah, i have. but its set to 3318:10
genericv2mal i can rebuild everything right now/18:10
malalso build newer mce so you don't have to hack things18:11
malbuild_packages.sh --mw=https://github.com/sailfishos/mce.git18:11
genericv2first of all where was the submodule18:12
genericv2compiling mce18:13
T42_<b100dian> I think it's nice to have branches for android versions in the submodule.. maybe a bit of headache to refactor existing functionality, but right now the "get latest" is also confusing a lot18:13
genericv2* Building of mce finished successfully18:13
mal@b100dian I should get one thing fixed in that android13 branch and merge it18:14
T42_<b100dian> The submodule of hybris/droid-configs18:15
genericv2i am afk, i'll do everything when i am back.18:18
genericv2i am back18:52
genericv2anything?18:52
genericv2i'll  try to add our previous modifications to sparsa while waiting18:58
T42_<b100dian> You need to change rhe submodule to point to the android13 branch19:17
genericv2on which directory, i forget everything19:21
genericv2okay got it19:23
genericv2no didint got it19:25
genericv2like git submodule add -b android13 https://github.com/mer-hybris/droid-hal-configs droid-configs-device ?19:28
genericv2gives an error nvm19:28
genericv2hm, looks like it's okay now19:30
malgenericv2: don't you have submodule already19:42
malin which case you just go to submodule folder and do git fetch, then git checkout android1319:43
genericv2i didin't knew that, this is my first time messing with git submodules19:43
genericv2okay correct the submodule branch is enough for now?19:46
genericv2what did i just write19:46
maladd also the task profile things19:46
malto sparse and other things you might need19:46
genericv2There was some rc files, i'll add them19:48
genericv2But i'll continue tomorrow, thanks everyone!19:49
malthose are in submodule already19:49
genericv2a19:49
genericv2true19:49
genericv2right*19:49
malas you remember you copied the things from the submodule repo19:49
genericv2yeah yeah, i remembered it now.19:50
genericv2bye for now :)19:51

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