Saturday, 2024-02-03

genericv2How can i define droid_target_aarch64? Added "%define droid_target_aarch64" to both  "droid-configs/rpm/droid-config-sagit.spec" and "droid-hal-version-sagit/rpm/droid-hal-version-sagit.spec" but it didin't worked. Maybe a stupid question02:40
genericv2Okay i figured it out now02:49
genericv2still fails :)))))02:55
genericv2https://paste.opensuse.org/pastes/83e0488bfb7a Where am i supposed to enable these? They already exist in my defconfig, i am confused.10:07
genericv2Is there any chance of it not finding the correct defconfig or something?10:09
malgenericv2: the "%define droid_target_aarch64 1" goes only to droid-hal-$DEVICE.spec10:19
malmake sure you add it to correct place in the file, "%include rpm/dhd/droid-hal-device.inc" has to be the last line in the file, add any changes to earlier lines in the file10:20
genericv2ah i fixed that yesterday, after logging out. this is another error.10:21
malcheck the whole droid-hal-sagit.log for all of the defconfig errors10:21
genericv2There is a lot errors (and warning) there. I'll correct them.10:23
malerrors are the important ones10:24
genericv2Most of errors are already defined in my defconfig file.10:46
genericv2hm10:46
genericv2Fixed all errors in defconfig (again), it still gives these errors,10:57
malare you sure you edit the correct defconfig? arch/arm64/configs/sagit_defconfig11:01
genericv2I am sure. Also tree uses "sagit_defconfig" so it must be okay\11:01
maland you run make hybris-hal (or just make hybris-boot) before checking again?11:03
genericv2I always do "make hybris-boot" after editing defconfig.11:03
malshow list of all defconfig errors you see in droid-hal-sagit.log11:04
genericv2droid-hal-sagit.log: https://paste.opensuse.org/pastes/bd8dd7def43d11:06
genericv2For an exapmle it says CONFIG_VT is unset, but it is set. https://paste.opensuse.org/pastes/ec87e5d4fba211:07
mal"Can't open /home/kita/hadk/out/target/product/sagit/obj/*/.config:" can you check what paths you have in there11:09
malso it's can't find the kernel config output file which explains why it complains about the errors, I think I should have a look to make that error critical so people actually notice that11:10
genericv2Oh i missed that. Saw it now. Probably i made a mistake while setting up the environment11:11
malis that path correct?11:12
malor did you somehow define ANDROID_ROOT to wrong path or something like that?11:12
genericv2ANDROID_ROOT is set to /home/kita/hadk, which is correct11:13
maland is the out/ folder there?11:13
malcheck what you have in out/target/product/11:14
genericv2Okay found the issue now, "$ANDROID_ROOT/out/' is soft linked to "/parentroot/parentroot/mnt/out" (Which is my hdd). It works on ubuntu chroot but it's broken on sfos sdk. I'll correct that symlink now.11:15
malI do some bind mount magic in .hadk file to get android root to external disk11:19
genericv2Yeah bind mount is a better alternative to symlink for this. I first tried to bind mount actually but it didin't work for some reason😄11:27
malI have the whole android root in external disk and in .hadk like this: ANDROID_ROOT="$HOME/some_path" and 'sudo mount --bind /parentroot/real_android_root_path "$HOME/some_path"'11:31
maljust to note that I use ubuntu on host and only use HABUILD_SDK when building very old android versions which might have issues with new ubuntu environments, mostly I build hybris-hal directly in host11:33
malprobably building on host can work also on other distros for reasonably new android bases11:34
genericv2Now this is happening: https://paste.opensuse.org/pastes/0630b15fe21411:54
genericv2Oh okay my mistake11:56
genericv2sh files and selinux thingies are okay now, but i am not sure about "absolute symlink' errors,11:59
genericv2Fixed it.12:11
genericv2PlatformSDK [kita@suse hadk]$ rpm/dhd/helpers/build_packages.sh --configs12:11
genericv2* Installing ccache...12:11
genericv2!! can't install ccache12:11
genericv2what 😭12:12
genericv2Error: Subprocess failed. Error: RPM failed: warning: /home/.zypp-cache/packages/jolla/oss/aarch64/ccache-3.1.9-1.5.3.jolla.aarch64.rpm: Header V3 RSA/SHA256 Signature, key ID 47394f23: NOKEY12:13
genericv2error: bdb error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch12:13
genericv2Something is wrong with repositories i think?12:14
genericv2Fixed that. And hopefully this is the last error: https://paste.opensuse.org/pastes/260662f32d8912:36
malwhich package is missing, check the droid-local-repo folder12:41
genericv2There is droid-config-sagit but err says droid-config is missing. Same with others "droid-config-sagit-pulseaudio-settings" exist but it's searching for "droid-config-pulseaudio-settings"12:48
malcheck all of the packages in that list12:50
malalso check the log file, maybe it explains the issue12:50
genericv2There is a file conflict. https://paste.opensuse.org/pastes/5d1652e4a22a So it can't install package droid-config-sagit12:53
maladd these 4 lines to your droid-config spec https://github.com/mer-hybris/droid-config-sony-lena/blob/master/droid-config-common.inc#L12C1-L15C32 and then build_packages.sh -c12:55
genericv2Another error, about bluez now: https://paste.opensuse.org/pastes/3d260b0f651813:00
genericv2conflict*13:01
malsb2 -t $VENDOR-$DEVICE-$PORT_ARCH -R -m sdk-install zypper in droid-local-repo/sagit/droid-config-sagit-bluez5-1-202402031300.aarch64.rpm -bluez5-configs-mer13:02
T42_<elros34> you know all or most of these erorrs are known and you can find solution in either channel logs or even hadk pdf/hot/faq. You don't have to wait for somebody advice13:12
genericv2you are right, sorry13:16
genericv2I got "Failed to extract filesystem!" while sideloading the image via recovery, great.14:48
genericv2i'll try to install it manually14:51
genericv2Stuck on Mi logo. Now i can't even telnet to it. It simply disconnects after 3 seconds15:10
genericv3I am checking udevadm, phone connects as usb0 and disconnects after 3 SECONDS.15:21
genericv3tried with another cable, same15:22
genericv3Also it's not connecting as 'mer', it's connecting as 'MI 6'15:24
maldidn't you have working kernel earlier?15:29
T42_<elros34> https://sailfishos.wiki/link/20#bkmrk-%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0-%2A-if-your-de-115:29
genericv3The kernel must work, it was okay without rootfs.15:30
genericv3i'll wait for the battery to drain.15:30
T42_<elros34> reset to fastboot, flash kernel and check again. IF device reboots few times it can switch to other slot or something15:31
genericv3I can't reset right now, my power button is broken, but no problem i will wait for it to power off.15:35
genericv3We did fix the kernel with mal, i could connect to the device with telnet before flashing the rootfs.15:35
genericv3Right now it's stuck at 'MI' logo. when i plug it into my pc it connects as 'Mi 6', shows up as usb0 in 'ip l' command and disconnects after 3 seconds. I'll check logs in '/data/.stowaways/sailfishos' after it turns off, and continue debugging on low battery.15:35
T42_<elros34> doesn't it reboots after this 3 seconds? press some volume key and enter to recovery15:37
malif it reboots can't you boot to fastboot or recovery using some volume key?15:37
genericv3No it's just stuck. It does not reboot, kernel is alive.15:38
genericv3It just can't keep a usb connection15:38
genericv3https://paste.opensuse.org/pastes/90cb8d10271615:41
malmaybe droid-hal-init did something to usb which makes it fail15:46
T42_<elros34> I do not see this idProduct=0a02 in https://github.com/LineageOS/android_device_xiaomi_msm8998-common/blob/lineage-20/rootdir/etc/init.qcom.usb.rc15:48
genericv3i modified init-debug script to make the device reboot automatically in a minute no matter what.19:16
maldid you try to get into the second telnet at port 2323 using the /init_enter_debug2 ?19:20
T42_<elros34> How did you modify it and replace files in kerne or rootfs? Better create what mal suggest. Did you check for init.log to confirm that your device boots correctly?19:29
malalso good to enable persistent journal logs in rootfs19:31
genericv3it tried to serve telnet server on 2323 but it failed with an error, saw this on init.log. i sent that error to here but it probably dodin't reached here, my irc client bugged for a moment.19:32
genericv3adb pull /data/.stowaways/sailfishos/init-debug, i edited it and pushed. But it's not working right now probably. i am checking things.19:34
T42_<elros34> yeah you probably mess it up like that, either internally or permissions19:35
genericv3Yeah xD i messed it up. Currently the phone reboots after 8 seconds (without my high-tech auto reboot script)19:37
T42_<elros34> remove init.log, reboot, and check whether is recreated. This is simple way to see if your /init-debug is even executed19:38
genericv3init-debug got executed now, removed init.log and set init-debug's permissions to 777. Now it's stuck at Mi logo again, which causes the real error.19:41
genericv3That error was something like "Failed to create /some/path/android0/iSerial: Permission denied19:42
T42_<elros34> probably irrelevant, did you finally create init_enter_debug2?19:42
genericv3Created it now, do i need to do anything else?20:19
genericv3Okaay i am in20:24
genericv3At port 2323 now20:24
genericv3What i must check now20:28
malfor example enabling persistent journal and then continue boot, you could also mask droid-hal-init and usb-moded and then continue which would probably prevent anything messing with usb20:30
genericv3Enabled persistent logging and rebooted.20:42
genericv3Waiting for phone to power off again20:44
genericv3Got a journal file.20:52
genericv3Failed to start droid-hal-init20:52
malshow the whole log20:53
genericv3i was searching for more errors, i'll save it to a file and send. Another err: can't execute /sbin/droid-hal-init20:54
genericv3https://paste.opensuse.org/pastes/cc62e14dbc7a21:00
malcheck what is mounted in /system in telnet 232321:03
malwhich version of droid-configs submodule do you use?21:05
genericv3Nothing is mount on system, did i do something wrong.21:06
genericv3i am not sure, i need to check21:08
malah, sorry, it's mounted later21:09
malso try masking droid-hal-init and usb-moded and then continue21:09
T42_<elros34> is that system-as-root? check what you have in /system/21:15
genericv3Masking droid-hal-init and usb-moded made init continue without breaking telnet21:16
malok, now check what is in /system21:16
genericv3sde43 is mounted at /system, it's the correct partition21:17
genericv3Everything is okay inside, lineage system partition21:17
malit's possible you have wrong submodule version21:18
T42_<elros34> I doubt it's correct, show 'ls -al /system/'21:19
genericv3it is. Also i am on my laptop right now, my desktop is busy. Can we fix it without rebuilding things for now?21:20
mal@elros34 I mean if the build didn't use android13 branch for droid-config submodule it would have wrong version of droid-hal-init.service21:21
malgenericv3: check the file /usr/lib/systemd/system/droid-hal-init.service does it have lines like "ProtectSystem=full"21:22
T42_<elros34> side note: be aware that you built not latest sfos release21:23
genericlinkshttps://paste.opensuse.org/pastes/a057ea36b94b21:23
T42_<elros34> so its not correct, https://sailfishos.wiki/link/20#bkmrk-%C2%A0system-as-root%3A-htt21:24
genericv3mal yes it have that line21:25
genericv3i am not supposed to build the lastest sfos version? i didin't knew that21:25
malok, so now you have two issues, incorrect /system mount and incorrect droid-hal-init.service21:26
malfor latter issue replace the file manually with content of https://raw.githubusercontent.com/mer-hybris/droid-hal-configs/android13/sparse-13/usr/lib/systemd/system/droid-hal-init.service21:26
genericv3What about sfos release, i built the lastest one21:26
mallatest is 4.5.0.2421:27
malbut that sfos version is not critical right now, just something to note for next image you build21:27
malit's possible to fix the /system mount manually on device but that needs some editing of mount service files21:29
genericv3Replaced droid-hal-init.service now21:31
T42_<elros34> mal: I guess these reboot_on_failure in custom apexd.rc you have added are some safety feature but this will not ease debugging. If that service will fail most probably ueventd will start and mess everything/reboot unless something changed since previous android release21:32
mal@elros34 I didn't add anything like that there, the only reason for custom apexd.rc is to use the patched apexd from libexec21:34
genericv3Now what to do for /system21:34
malgenericv3: also copy/replace the files in /usr/libexec/droid-hybris/system/etc/init with these https://github.com/mer-hybris/droid-hal-configs/tree/android13/sparse-13/usr/libexec/droid-hybris/system/etc/init21:36
malmake sure you copy the content correctly from raw view of the files21:36
mal@elros34 probably would make sense to remove the reboot stuff from the apexd.rc21:37
T42_<elros34> I think so at least from apex-bootstrap which is first thing which like to fail. Better would be probably preventing ueventd from starting not matter what but I do not remember details anymore21:41
malyeah, ueventd is annoying21:41
T42_<elros34> I think critical or shutdown critical cause this issue https://android.googlesource.com/platform/system/core/+/refs/heads/android10-c2f2-s1-release/rootdir/init.rc21:43
malgenericv3: for system mount issue, you need to rename the file system.mount to system_root.mount in /usr/lib/systemd/system and replace the Where=/system with Where=/system_root and also add new system.mount file with content https://pastebin.com/jUeqtugK21:50
malyou also need symlink for the new mount service in /etc/systemd/system/local-fs.target.wants (run "ln -s /usr/lib/systemd/system/system_root.service" in that folder)21:52
genericv3 my laptop decided to kill its wlan adapter for no reason, i am trying to fix it right now21:56
genericv3Okay rc files are done, continuing on /system22:01
genericv3Aa, pastebin is banned in my country (🥰), Can you share that file with suse paste22:03
genericv3did everything, rebooting22:07
maldid you get the file somehow already?22:08
genericv3Except that file*22:09
T42_<elros34> most important:)22:09
malhttps://paste.opensuse.org/pastes/4588ace0186522:09
genericlinkshehe, sorry xD22:10
genericlinkshmm22:22
genericlinksit crashed after doing everything22:22
genericlinksill check logs22:23
genericlinksit's rebooting after making init continue booting22:24
genericlinkswe talked about this i think22:25
genericlinksnope iits okay rn22:28
genericlinks /usr/sbin/dummy_compositor: unrecognized option '--hwc-restart'22:28
genericlinks. /system seems okay now22:30
malremove files /usr/lib/systemd/user/lipstick.service.d/50-compositor.conf, /usr/lib/systemd/user/jolla-actdead-charging.service.d/50-compositor.conf and /usr/lib/systemd/user/jolla-startupwizard-pre-user-session.service.d/50-compositor.conf22:34
genericv3Looks better now (it's fun to watch journalctl -f) There is no much errors right now, just "Device /dev/sailfish/home does not exist or access denied" Could this block boot?22:39
genericv3WAIT IT DID VOOT422:41
genericv3BOOT*22:41
genericv3it's still stuck on mi logo but it says "DIM", "POWER_DOWN" as current display state . And i can wake the screen by tapping to home button, these dont actually make something of course journalctl is just logging these.22:43
genericv3hadk-hot time22:44
genericv3there is some missing libraries tho22:45
malthat /dev/sailfish/home is not a problem22:52
malwhat missing libraries, forgot one thing, did you build "make libui_compat_layer" when building hybris-hal22:54
malwhich means do you have libui_compat_layer.so in out/target/product/sagit/system/lib64/ in your android_root22:55
malor on your device in /usr/libexec/droid-hybris/system/lib6422:56
genericv3oops, no i didint22:59
genericv3There is only libui.so22:59
malyou'll need that to get UI working22:59
malbut at least there was some progress already23:00
genericv3can i stole it from somewhere for now? Actually i can turn on my pc right now, i can build that library and push it to the phone, right?23:00
genericv3yeah we made a lot of progress, thanks to you guys :)23:01
T42_<b100dian> Which Android base? Sorry if you already written23:11
T42_<b100dian> Missing libraries could be linked from /odm to be found, or betyer, bind mounted23:12
genericv3lineage-2023:13
genericv3built that library now by the way23:13
malyou can copy it to the location I mentioned23:16
genericv3copied23:17
genericv3There is some errors about libGLESv2_afreno too, this is also a problem ig23:18
genericv3yeah its stuck again23:19
genericv3probably cuz of that library23:19
T42_<elros34> check logcat now23:20
genericv3hm, any chances of /system still being broken? "/system/bin/logcat: not found"23:21
genericv3But i can ls to it23:21
genericv3also same with bin/bootanimation etc.23:22
T42_<b100dian> /usr/libexec/droid-hybris/system/bin/logcat23:22
T42_<b100dian> but it might just fail because droid-hal-init fails23:23
T42_<b100dian> so you need to run it as soon as possible after droid-hal-init23:23
genericv3it says not found again23:23
T42_<elros34> do you check this after booting or while you are in init script?23:24
genericv3After booting23:24
T42_<elros34> so droid-hal-init works or not?23:24
genericv3oh, no it doesnt work. it's currently masked. i can interact with the device via screen23:26
T42_<elros34> it's essential part of android adaptation, you need it23:26
genericv3So we need to fix that, gonna check whats wrong with it i forget it.23:27
T42_<elros34> there is nothing to fix, just unmask it and follow logs23:28
genericv3droid-hal-init.service: Service lacks both ExecStart= and ExecStop= setting. Refusing23:30
genericv3ill check its service file23:30
genericv3it's empty, i made a mistake23:32
genericv3https://raw.githubusercontent.com/mer-hybris/droid-hal-configs/android13/sparse-13/usr/lib/systemd/system/droid-hal-init.service (sendung here to quickly grab it from my laptop)23:34
genericv3https://raw.githubusercontent.com/mer-hybris/droid-hal-configs/android13/sparse-13/usr/lib/systemd/system/droid-hal-init.service23:34
genericv3xD23:35
genericv3https://raw.githubusercontent.com/mer-hybris/droid-hal-configs/android13/sparse-13/usr/lib/systemd/system/droid-hal-init.service23:35
genericv3it failed to start as excepted.23:43
genericv3Wha23:43
genericv3phone reeboted itself to fastboot23:43
genericv3Journalctl catched some partition mount issues23:43
T42_<b100dian> maybe changed sides A/B because of no succesful boot23:44
genericv3My phone don't have project treble23:45
T42_<b100dian> sorry, I don't know which device. Can you show logs of the partition mount issues?23:45
T42_<b100dian> lineage-20 w/o treble, interesting :)23:46
genericv3No problem. I'll take logs again, if it could boot of course23:46
genericv3yeah😅 it was running crdroid 10 actually (which is android 14)23:46
genericv3Flashed lineage 20 for sfos23:47
genericv3i'll reboot from fastboot, i hope there is no big problem23:47
genericv3not sure if this chipset can survive a hard brick23:47
T42_<elros34> remember these apexd.rc file you added? Remove reboot_on_failure lines from it23:47
T42_<elros34> @b100dian yeah it had even lineage-15 or 16 specific bug in kernel23:49
genericv3Okaay, i'll telnet to it. seems like there is no problem right now23:49
genericv3yeah i am in, that was just a temporary problem23:50
genericv3Done, no more reboot on failure23:51
genericv3There is so much apex errors (no such file or directory)23:53
genericv3droid-hal-init failed too23:53
genericv3😎😎😎everything is going fine23:53
T42_<b100dian> @elros34 so a new software / old hw combo23:53
T42_<b100dian> genericv3: logcat as early as possible?23:54
genericv3Does journalctl count? Couldn't launch logcat on previous attempt.23:54
T42_<elros34> both apexd services  works?23:55
genericv3there is a lot of apex errors as i said, but i didin't saw the service exiting, i think..23:56
T42_<elros34> then search why droid-hal-init fails23:57
malhmm, did I add those cetain apex patches to that base, the ones needed for non-updatable apexes or something23:59

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