*** ggabriel is now known as Guest3377 | 14: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 |
---|---|---|
mal | do you have something in /system and /vendor ? | 18:25 |
mal | which android base? | 18:25 |
T42 | <rahulyx> Yeah. I see contents: https://paste.mozilla.org/afZxyVpf Base is 18.1 | 18:26 |
T42 | <rahulyx> Android 11 | 18:26 |
T42 | <Mister_Magister> why did you add selinux=1 | 18:27 |
mal | checking "journalctl -b --no-pager" for anything from droid-hal-init is important, one thing is that do you have proper selinux config in /etc/selinux | 18: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 same | 18:28 |
T42 | <rahulyx> Yeah, formatted the /data. It is not encrypted | 18:28 |
T42 | <Mister_Magister> ah android 11 is not lineage 11 my bad | 18:28 |
T42 | <Mister_Magister> but android 11 is base 18 | 18:29 |
mal | since 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 instructions | 18:30 |
T42 | <rahulyx> Nothing explicit is specified for hybris-18. I was told to apply hybris-16 and 17 patches | 18:30 |
T42 | <Mister_Magister> aight | 18:31 |
mal | check if /etc/selinux/minimum/contexts/files/file_contexts and /etc/selinux/minimum/policy/policy.30 are symlinks | 18:31 |
mal | if they are then you didn't replace the symlinks with the actual files | 18: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/vXhxJ23B | 18:33 |
mal | that is not what the instructions say, and of course symlinks would never point to some local files in build system | 18:34 |
T42 | <rahulyx> Okay, so I replace the symlinks with the actual files, right? | 18:34 |
mal | the instructions say that you remove the symlink and copy the file it targeted (keep the name of the symlink when copying) | 18:35 |
mal | and those symlinks point to wrong place any way | 18:35 |
mal | do you have on device files /vendor/etc/selinux/vendor_file_contexts and /vendor/etc/selinux/precompiled_sepolicy | 18:36 |
T42 | <rahulyx> Got it. I couldn't locate those files in /vendor. What are other common names I should look for? | 18:36 |
mal | or something like that | 18:36 |
mal | show what you have in /vendor/etc/selinux/ | 18:36 |
mal | and /system/etc/selinux | 18:36 |
T42 | <rahulyx> This is from hadk dir, right? Or from the device/sfos? | 18:38 |
mal | you can check on device | 18:38 |
T42 | <rahulyx> Here you go: https://paste.mozilla.org/yTpZuB53 | 18:40 |
mal | you can see those files there | 18:41 |
mal | but I see another issue, system mount is incorrect | 18:41 |
mal | find your device fstab in the source tree, somewhere in device/$VENDOR/$DEVICE or something and check what system mount point says there | 18:42 |
T42 | <rahulyx> What are the other common names for fstab? I don't see an fstab there | 18:44 |
mal | if 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 mount | 18:44 |
mal | in $ANDROID_ROOT run: find device/ -name '*fstab*' | 18:45 |
T42 | <rahulyx> I see this: device/lenovo/karate-common/rootdir/etc/fstab.qcom | 18:46 |
T42 | <rahulyx> /dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly | 18: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 |
mal | yes | 18:49 |
mal | also fix those selinux files when rebuilding | 18:50 |
mal | in droid-configs | 18:50 |
T42 | <rahulyx> I will | 18:50 |
T42 | <rahulyx> Those selinux files, do I pull them from the device? | 18:51 |
mal | that works also | 19:28 |
mal | if you don't find then in out/ | 19:28 |
mal | *them | 19:28 |
T42 | <rahulyx> I keep getting error 7 while trying to flashing in TWRP. I'm manually unzipping now. Any workaround? | 19:33 |
mal | that is a usual problem, quite annying one, I think some people changed the installation packaging format but it's a bit hacky way | 19: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 far | 19: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/HJmWuGZh | 19:43 |
T42 | <rahulyx> This is the init.log: https://paste.mozilla.org/zbFR9p3Y | 19:50 |
mal | if you somehow create file init_enter_debug2 to sailfish os root i.e. in /data/.stowaways/sailfishos/init_enter_debug2 if in recovery | 20:00 |
T42 | <rahulyx> Did that. Doesn't reboot now. But unable to telnet either | 20:04 |
mal | that way you get it to stop boot before systemd starts and then you can do changes on device and then continue boot to test those | 20:04 |
mal | is the usb interface up? | 20:04 |
T42 | <rahulyx> Yeah | 20:04 |
T42 | <rahulyx> I see Mer Boat Loader and also the RNDIS interface | 20:05 |
mal | does the interface have ip address? | 20:07 |
T42 | <rahulyx> Screen is stuck at splash with the text "Fastboot Mode". Last time it went completely blank | 20:07 |
mal | fastboot mode? | 20:08 |
mal | that is not good | 20:08 |
T42 | <rahulyx> No, there is no IP address. Keeps saying network activation failed | 20:08 |
mal | but if screen says fastboot mode | 20:08 |
T42 | <rahulyx> Uh I booted hybris-boot.img from fastboot. It is still stuck there | 20:08 |
mal | have you tried setting ip to the usb interace, 192.168.2.2 for example | 20:09 |
T42 | <rahulyx> Let me try | 20:09 |
T42 | <rahulyx> I'm in | 20:11 |
T42 | <rahulyx> However, I see nothing in /system and /vendor | 20:12 |
mal | I know, like I it stops early so you can interact with it before continuing boot | 20:12 |
T42 | <rahulyx> Alright. What do I check now? | 20:13 |
mal | so first thing is to enable persistent journal | 20:13 |
mal | https://github.com/mer-hybris/hadk-faq?tab=readme-ov-file#persistent-journalctl | 20:14 |
mal | you could also mask droid-hal-init to see if that is the one causing the issues | 20:14 |
mal | if you want to mask that run: ln -s /dev/null /etc/systemd/system/droid-hal-init.service | 20:15 |
T42 | <rahulyx> On it | 20:16 |
mal | then you can use the command it printed when you telnet'd in the continue, something about writing continue to some path | 20:16 |
T42 | <rahulyx> Masking droid-hal-init and "continue" freezes the device. Telnet becomes unresponsive. Had to hard reboot | 20:51 |
mal | did you try reconnecting telnet, does the interface still exist? | 20:53 |
mal | sometimes the telnet needs to be reconnected | 20:53 |
T42 | <rahulyx> That worked | 20:59 |
T42 | <rahulyx> The display is off | 20:59 |
T42 | <rahulyx> Where do I start the debugging from? | 21:01 |
mal | so are you now in telnet after you continued? | 21:02 |
mal | when check what is failing with systemctl | 21:03 |
T42 | <rahulyx> Yeah, I'm in telnet after continuing | 21:03 |
mal | also checking journal probably might tell what could be wrong | 21:03 |
mal | of course debugging droid-hal-init is needed but those other things might give hints | 21:03 |
T42 | <rahulyx> I checked systemctl: https://paste.mozilla.org/fuJjVQsn | 21:04 |
mal | nothing too bad in that | 21:17 |
mal | maybe starting droid-hal-init manually and monitoring logs when doing that might help | 21:18 |
mal | so open a second telnet and in it run journalctl -fa | 21:19 |
mal | then in the first window run the commands from /usr/bin/droid/droid-hal-startup.sh | 21:19 |
T42 | <elros34> @rahulyx check last point about apexd-bootstrap here: https://sailfishos.wiki/books/hadk/page/hadk-hot#bkmrk-hybris-18 -wip | 21:55 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!