Friday, 2024-09-13

*** ggabriel is now known as Guest337714:10
T42<rahulyx> Hi, I got into sfos on lenovo k6 note (karatep). The display is blank tho. I haven't flashed hybris-boot.img yet, booted from fastboot. I've added selinux=1 to the cmdline. Checked systemctl, a few services have failed. Here are the logs: https://paste.mozilla.org/4HHFJb3c What should be my next step to debug?18:23
maldo you have something in /system and /vendor ?18:25
malwhich android base?18:25
T42<rahulyx> Yeah. I see contents: https://paste.mozilla.org/afZxyVpf Base is 18.118:26
T42<rahulyx> Android 1118:26
T42<Mister_Magister> why did you add selinux=118:27
malchecking "journalctl -b --no-pager" for anything from droid-hal-init is important, one thing is that do you have proper selinux config in /etc/selinux18:27
T42<Mister_Magister> also did you format the data? is it not encrypted?18:28
T42<rahulyx> @Mister_Magister hadk-faq says "Do not disable selinux, set it to 1 from kernel cmdline and make it permissive" for 17.1, did the same18:28
T42<rahulyx> Yeah, formatted the /data. It is not encrypted18:28
T42<Mister_Magister> ah android 11 is not lineage 11 my bad18:28
T42<Mister_Magister> but android 11 is base 1818:29
malsince mounts seems to be, then one usual issue is "You may need to replace symlinks with the actual files from your device." in the selinux part of 17.1 instructions18:30
T42<rahulyx> Nothing explicit is specified for hybris-18. I was told to apply hybris-16 and 17 patches18:30
T42<Mister_Magister> aight18:31
malcheck if /etc/selinux/minimum/contexts/files/file_contexts and /etc/selinux/minimum/policy/policy.30 are symlinks18:31
malif they are then you didn't replace the symlinks with the actual files18:31
T42<rahulyx> @mal, yeah, I symlinked the files. Not sure if I symlinked the right files tho, Here are they: https://paste.mozilla.org/vXhxJ23B18:33
malthat is not what the instructions say, and of course symlinks would never point to some local files in build system18:34
T42<rahulyx> Okay, so I replace the symlinks with the actual files, right?18:34
malthe instructions say that you remove the symlink and copy the file it targeted (keep the name of the symlink when copying)18:35
maland those symlinks point to wrong place any way18:35
maldo you have on device files /vendor/etc/selinux/vendor_file_contexts and /vendor/etc/selinux/precompiled_sepolicy18:36
T42<rahulyx> Got it. I couldn't locate those files in /vendor. What are other common names I should look for?18:36
malor something like that18:36
malshow what you have in /vendor/etc/selinux/18:36
maland /system/etc/selinux18:36
T42<rahulyx> This is from hadk dir, right? Or from the device/sfos?18:38
malyou can check on device18:38
T42<rahulyx> Here you go: https://paste.mozilla.org/yTpZuB5318:40
malyou can see those files there18:41
malbut I see another issue, system mount is incorrect18:41
malfind your device fstab in the source tree, somewhere in device/$VENDOR/$DEVICE or something and check what system mount point says there18:42
T42<rahulyx> What are the other common names for fstab? I don't see an fstab there18:44
malif it has /system then you might need to change it to /, based on that earlier paste you showed your system partition is actually android root partition and the actual system is in /system/system so replacing /system with / in fstab and rebuilding should allow build to fix the mount18:44
malin $ANDROID_ROOT run: find device/ -name '*fstab*'18:45
T42<rahulyx> I see this: device/lenovo/karate-common/rootdir/etc/fstab.qcom18:46
T42<rahulyx> /dev/block/bootdevice/by-name/system         /system            ext4    ro,barrier=1       wait,recoveryonly18:47
T42<rahulyx> And this is what I added in fixup-mountpoints:             -e 's block/bootdevice/by-name/system mmcblk0p52 ' \18:47
T42<rahulyx> So I replace /system with / in fstab and rebuild, right?18:48
malyes18:49
malalso fix those selinux files when rebuilding18:50
malin droid-configs18:50
T42<rahulyx> I will18:50
T42<rahulyx> Those selinux files, do I pull them from the device?18:51
malthat works also19:28
malif you don't find then in out/19:28
mal*them19:28
T42<rahulyx> I keep getting error 7 while trying to flashing in TWRP. I'm manually unzipping now. Any workaround?19:33
malthat is a usual problem, quite annying one, I think some people changed the installation packaging format but it's a bit hacky way19:39
T42<rahulyx> Alright!19:40
T42<rahulyx> I managed to rebuild everything and run it again... bootloops now. Do I have to flash hybris-boot.img? I've been booting from fastboot so far19:41
T42<rahulyx> It boots back to Android. I do see Mer Boat Loader on dmesg tho. Here are the logs: https://paste.mozilla.org/HJmWuGZh19:43
T42<rahulyx> This is the init.log: https://paste.mozilla.org/zbFR9p3Y19:50
malif you somehow create file init_enter_debug2 to sailfish os root i.e. in /data/.stowaways/sailfishos/init_enter_debug2 if in recovery20:00
T42<rahulyx> Did that. Doesn't reboot now. But unable to telnet either20:04
malthat way you get it to stop boot before systemd starts and then you can do changes on device and then continue boot to test those20:04
malis the usb interface up?20:04
T42<rahulyx> Yeah20:04
T42<rahulyx> I see Mer Boat Loader and also the RNDIS interface20:05
maldoes the interface have ip address?20:07
T42<rahulyx> Screen is stuck at splash with the text "Fastboot Mode". Last time it went completely blank20:07
malfastboot mode?20:08
malthat is not good20:08
T42<rahulyx> No, there is no IP address. Keeps saying network activation failed20:08
malbut if screen says fastboot mode20:08
T42<rahulyx> Uh I booted hybris-boot.img from fastboot. It is still stuck there20:08
malhave you tried setting ip to the usb interace, 192.168.2.2 for example20:09
T42<rahulyx> Let me try20:09
T42<rahulyx> I'm in20:11
T42<rahulyx> However, I see nothing in /system and /vendor20:12
malI know, like I it stops early so you can interact with it before continuing boot20:12
T42<rahulyx> Alright. What do I check now?20:13
malso first thing is to enable persistent journal20:13
malhttps://github.com/mer-hybris/hadk-faq?tab=readme-ov-file#persistent-journalctl20:14
malyou could also mask droid-hal-init to see if that is the one causing the issues20:14
malif you want to mask that run: ln -s /dev/null /etc/systemd/system/droid-hal-init.service20:15
T42<rahulyx> On it20:16
malthen you can use the command it printed when you telnet'd in the continue, something about writing continue to some path20:16
T42<rahulyx> Masking droid-hal-init and "continue" freezes the device. Telnet becomes unresponsive. Had to hard reboot20:51
maldid you try reconnecting telnet, does the interface still exist?20:53
malsometimes the telnet needs to be reconnected20:53
T42<rahulyx> That worked20:59
T42<rahulyx> The display is off20:59
T42<rahulyx> Where do I start the debugging from?21:01
malso are you now in telnet after you continued?21:02
malwhen check what is failing with systemctl21:03
T42<rahulyx> Yeah, I'm in telnet after continuing21:03
malalso checking journal probably might tell what could be wrong21:03
malof course debugging droid-hal-init is needed but those other things might give hints21:03
T42<rahulyx> I checked systemctl: https://paste.mozilla.org/fuJjVQsn21:04
malnothing too bad in that21:17
malmaybe starting droid-hal-init manually and monitoring logs when doing that might help21:18
malso open a second telnet and in it run journalctl -fa21:19
malthen in the first window run the commands from /usr/bin/droid/droid-hal-startup.sh21:19
T42<elros34> @rahulyx check last point about apexd-bootstrap here: https://sailfishos.wiki/books/hadk/page/hadk-hot#bkmrk-hybris-18 -wip21:55

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