Wednesday, 2023-03-29

T42<TheVancedGamer> @elros34 I gave up on 9C, reported Redmi Note 9 with hybris-17.1 and now I have telnet on port 23, I had diagnosis.log previously saying AUTOFS4_FS is missing, after enabling that now I have no diagnosis.log and init.log only mentions "Failed to boot init in real rootfs"06:46
T42<TheVancedGamer> I should mention this device is also dynamic partitions based, should I try to add parse-android-dynparts now or later?06:47
T42<elros34> gave up without even trying? For sure there is more than that error and it's related to your data partition. You will need to handle dynamic partitions anyway but this is not related07:03
T42<TheVancedGamer> that device was just pain07:03
T42<TheVancedGamer> aarch64 kernel, armhf trees07:03
T42<TheVancedGamer> anyway, for this device I have data mounted on /data, /target/data07:04
T42<TheVancedGamer> what am I looking for in init.log?07:06
T42<elros34> errors as usual07:06
T42<TheVancedGamer> wait, I don't have sbin/ in /target07:07
T42<TheVancedGamer> is that normal?07:07
T42<elros34> did you install sailfish without error?07:08
T42<TheVancedGamer> yes07:08
T42<elros34> how did you managed that?07:10
T42<TheVancedGamer> installed it from twrp after building mic?07:12
T42<TheVancedGamer> i'm building for a device with much better trees, 9C was just a mess07:12
T42<elros34> and it works just  like that, impossible:)07:13
T42<TheVancedGamer> / # ls /target/07:13
T42<TheVancedGamer> afs/     data/    etc/     home/    init.rc  proc/    root/    usr/07:13
T42<TheVancedGamer> 07:13
T42<TheVancedGamer> i believe this is concerning07:13
T42<elros34> show that log07:13
T42<TheVancedGamer> how do I pull files from telnet? :P07:14
T42<elros34> what do you want to pull? Format /data in twrp than then boot again and install sfos manually because twrp installation almost never works07:16
T42<TheVancedGamer> ok07:16
T42<elros34> boot again hybris-boot not twrp07:17
T42<TheVancedGamer> so after formatting data and rebooting, I get telnet07:19
T42<TheVancedGamer> I unpack rootfs in telnet?07:19
T42<iDrinkCoffee> hello world, it is I, the troll07:20
T42<TheVancedGamer> ok @elros34 I now have init-debug in real rootfs07:35
T42<TheVancedGamer> thanks for the pointers07:35
T42<TheVancedGamer> so I add08:03
T42<TheVancedGamer> ```08:03
T42<TheVancedGamer> # For mount partitions08:03
T42<TheVancedGamer> Requires: parse-android-dynparts```08:03
T42<TheVancedGamer> 08:03
T42<TheVancedGamer> to my patterns08:03
T42<TheVancedGamer> but how will it get built?08:03
T42<TheVancedGamer> where do I define the repo so that issuing just —mw would build it?08:04
T42<elros34> you need to build it yourself, search recent channel log, mal gives more up-to-date instruction with fp4 example how to handle all of this08:05
T42<TheVancedGamer> i've built it already, I want to autobuild it08:06
T42<elros34> so read the script08:07
T42<TheVancedGamer> found it, yes08:07
T42<TheVancedGamer> but it's built by dhd, and that's pulled as a module from sfos repos08:07
T42<TheVancedGamer> forking would become a bit unnecessary, no?08:09
T42<TheVancedGamer> or should I fork it and add the buildmw line for parse-android-dynparts08:09
T42<elros34> It's up to you unless you want to upstream that build but not sure this will be included08:10
T42<TheVancedGamer> also, why isn't cpio just added into allowed paths?08:10
T42<TheVancedGamer> I could make a PR for it if needed08:10
T42<elros34> IIRC cpio is addedin hybris1808:11
T42<TheVancedGamer> not in 17.1, and it doesn't show it either08:12
T42<TheVancedGamer> it's also possible to add the executable into soong config paths which eliminates the need for the temporary path restrictions var08:12
T42<elros34> so this patch need to be added fro 17 base:
T42<TheVancedGamer> yes, basically08:15
T42<TheVancedGamer> this should apply as-is08:15
T42<k1gen> mal: hey, anything else to try with sound?09:06
T42<TheVancedGamer> @elros34 I got a bit farther this time, product is mounted by dynparts service but for system I get12:53
T42<TheVancedGamer> `Mar 29 15:35:32 RedmiNote9 bash[1572]: device-mapper: reload ioctl on dynpart-system  failed: Invalid argument`12:53
T42<TheVancedGamer> I get the same error if I run dmsetup manually as well12:55
malhow do you run dmsetup? using the command in my script?12:58
T42<TheVancedGamer> yes12:58
mal@k1gen no ideas right now, need to check logs a bit more12:58
T42<TheVancedGamer> more confusingly product is fine, I can access all files as well12:58
T42<k1gen> mal: thank you! feel free to ping me if you need anything that can help you12:59
T42<TheVancedGamer> ```13:00
T42<TheVancedGamer> / # dmsetup create --concise "$(parse-android-dynparts /dev/mmcblk0p43)"13:00
T42<TheVancedGamer> device-mapper: reload ioctl on dynpart-system  failed: Invalid argument13:00
T42<TheVancedGamer> Command failed```13:00
T42<TheVancedGamer> but I only get /dev/mapper/dynpart-product13:00
T42<TheVancedGamer> it is ext4 so that shouldn't be an issue13:03
T42<TheVancedGamer> failing bit taken from strace13:06
mal@k1gen if you want to try to debug other issues in the meantime maybe you could get some information about sensors, check what sensor related processes are running, try to see if restarting sensorfwd systemd service helps13:06
T42<TheVancedGamer> mal: I crosschecked with FP4 repo, everything is the same13:10
maland partition if correct?13:29
malcan you show the list of partitions in for example /dev/block/bootdevice/by-name/13:30
T42<k1gen> mal: sensorfwd starts fine by systemd, here's log when I start it manually and try some sensor tests in csd: tell me if you need anything else13:31
malwhat sensor related processes are running check "ps aux | grep -i sensor"13:34
T42<k1gen> mal: sensorfwd without full path to executable is mine, not systemd's13:36
T42<TheVancedGamer> mal:13:44
T42<TheVancedGamer> / # ls /dev/block/platform/bootdevice/by-name/13:44
T42<TheVancedGamer> boot           expdb          lk             misc           persistbak     sec1           tee213:44
T42<TheVancedGamer> boot_para      ffu            lk2            nvcfg          proinfo        seccfg         userdata13:44
T42<TheVancedGamer> cache          flashinfo      logo           nvdata         protect1       spmfw          vbmeta13:44
T42<TheVancedGamer> cust           frp            md1img         nvram          protect2       sspm_1         vbmeta_system13:44
T42<TheVancedGamer> devinfo        gsort          md_udc         otp            recovery       sspm_2         vbmeta_vendor13:44
T42<TheVancedGamer> dtbo           gz1            metadata       para           scp1           super13:44
T42<TheVancedGamer> exaid          gz2            minidump       persist        scp2           tee113:44
T42<TheVancedGamer> was I supposed to add super to fixup-mountpoints?13:45
mal@k1gen install libgbinder-tools if it's not installed and then show output of "binder-list -d /dev/hwbinder"13:56
malor maybe just the things related to sensors from that output13:56
T42<k1gen> mal:
T42<k1gen> I don't want to accidentally grep something you might find useful13:57
mal@k1gen to get debug output from sensorfw you need to start it with: sensorfwd -c=/etc/sensorfw/primaryuse.conf --systemd --log-level=debug --no-magnetometer-bg-calibration14:00
T42<k1gen> got it, let me send the new logs14:00
T42<TheVancedGamer> mal: not sure you saw it, but
maldo you need anything in dmesg when you run that dmsetup14:03
T42<k1gen> mal: I tried to access sensors while sensorfwd was launched in the following order: light, proximity, gyro & accelerometer, compass14:03
T42<TheVancedGamer> hold on, I didn't check (re @SailfishFreenodeIRCBridgeBot: <mal>do you need any...)14:04
T42<TheVancedGamer> [ 5437.724160]  (7)[1783:dmsetup]device-mapper: table: 253:1: linear: Invalid argument count14:05
T42<TheVancedGamer> [ 5437.724178]  (7)[1783:dmsetup]device-mapper: ioctl: error adding target to table14:05
malstrange error14:13
mal@k1gen just curious, why did you never fix the mount service I mentioned some days ago i.e. metadata.mount and mnt-vendor-persist.mount ?14:16
malthose could in theory have some effect on things14:16
maljust replace the device node with the actual device in those14:17
malyou can see if real device in for example output of ls -l /dev/block/bootdevice/by-name/14:17
mal*the real device14:17
malso some like /dev/sda1 or whatever instead of the by-name path in the mount service14:18
T42<TheVancedGamer> so what do I do about this?14:18
T42<k1gen> mal: thanks, let me try fixing those14:19
T42<k1gen> mal: fixed them:
T42<k1gen> thanks for instructions14:27
T42<k1gen> mal: it fixed all the sensors!14:28
T42<k1gen> only sound, camera & flashlight and vibro remain14:33
malyeah, I thought it should fix sensors, sometimes sensors have configuration files in persist partition14:34
malwas there any difference to sound issue after fixing the mounts?14:34
T42<k1gen> nope, same segfault with libraries not found. do you need logs?14:38
malgdb of pulseaudio with debug log output in it14:40
malmaybe you could install back the pulseaudio-modules-droid and remove the jb2q one since that didn't help14:41
T42<k1gen> mal: do I have to remake that custom .pa file you suggested earlier?14:45
T42<k1gen> oh and do I have to mask both the user pulseaudio.service and the system one or just user's?14:49
malyou need to change custom .pa only if you have quirks in it14:50
T42<k1gen> I deleted it after installing jb2q stuff14:51
T42<k1gen> it contained load-module module-droid-card hw_volume=false14:51
malno need to add it back now, we might need to do that later when testing14:53
T42<k1gen> got it. what about masking question?14:54
mal@TheVancedGamer what does that parse-android-dynparts /dev/mmcblk0p43 return on your device?14:54
malyou can leave it masked14:55
T42<TheVancedGamer> mal: it returns all 3 dynamic partitions14:56
T42<TheVancedGamer> or if you want specific output:14:56
T42<TheVancedGamer> dynpart-product,,,ro,0 1386960 linear /dev/mmcblk0p43 2048;dynpart-system,,,ro,0 5453792 linear /dev/mmcblk0p43 1904640,5453792 515632 linear /dev/mmcblk0p43 1389008,5969424 32 linear /dev/mmcblk0p43 7358432,5969456 2601888 linear /dev/mmcblk0p43 8676520;dynpart-vendor,,,ro,0 1318056 linear /dev/mmcblk0p43 735846414:56
*** Daaanct12 is now known as Danct1214:58
maldoes running it with only the last part work (vendor) is system the only issue15:00
malI mean giving vendor info to dmsetup15:00
T42<TheVancedGamer> dynpart-vendor,,,ro,0 1318056 linear /dev/mmcblk0p43 7358464 ?15:01
T42<TheVancedGamer> that works, yes15:01
malnow try manually only system15:01
malthat system looks strange, it has so many things in it15:02
T42<TheVancedGamer> doesn't work15:02
T42<iDrinkCoffee> this build of los is not using a opensource vendor (re @TheVancedGamer: doesn't work)15:02
T42<TheVancedGamer> I just flashed lineage, booted it and installed sfos15:02
T42<TheVancedGamer> doesn't matter15:02
T42<iDrinkCoffee> so it a lot bigger than the actual size of the os so it fills the remaining space in super (re @iDrinkCoffee: this build of los is...)15:02
T42<k1gen> mal: pa gdb:
mal@TheVancedGamer I wonder if we have too old dmsetup15:05
T42<TheVancedGamer> hmm, I don't know15:06
T42<TheVancedGamer> this one works as-is on Ubuntu Touch15:06
malwhich lvm2 does ubuntu touch have?15:06
T42<TheVancedGamer> need to check, let me get my device15:07
T42<TheVancedGamer> ah, parse-android-dynparts is triggered in initrd15:08
T42<TheVancedGamer> mal:
mal@TheVancedGamer that doesn't really tell which dmsetup version they have15:23
T42<TheVancedGamer> I can't seem to make it run on sailfish15:24
T42<TheVancedGamer> from what I do gather dmsetup in sailfish is much older15:24
T42<TheVancedGamer> library version 1.02.155 (2018-12-18) instead of 1.02.146 (2017-12-18) of sailfish15:28
T42<TheVancedGamer> library version 1.02.155 (2018-12-18) for UT instead of 1.02.146 (2017-12-18) of sailfish (edited)15:28
T42<TheVancedGamer> oookay, copying the library from UT ramdisk into sailfish rootfs did make dmsetup pick up the library, but still doesn't work15:30
mal@TheVancedGamer which file did you copy?15:50
T42<TheVancedGamer> libdevmapper.so15:50
T42<k1gen> mal: what do you think of gdb? is it different with metadata and persist mounted?16:19
mallooks the same16:21
T42<k1gen> sad16:22
T42<k1gen> well, ping me if you want me to try something or need more logs on pulse16:27
T42<k1gen> mal: if you have time, we can debug camera until you have any ideas on sound16:28
T42<k1gen> if you want to, of course16:28
malhow did camera fail?16:32
T42<k1gen> I open the camera app after reboot and it works until:16:34
T42<k1gen> 1) I make a photo and swipe left to check it16:34
T42<k1gen> 2) I switch to video mode16:34
T42<k1gen> 3) I switch to selfie mode16:34
T42<k1gen> 4) I close the app and open it again16:34
T42<k1gen> in all cases but the app freezes, in 4 it's a black screen and freeze16:34
maldo you see anything in logcat when that happens, about something waiting16:35
T42<k1gen> let me reboot and check with working camera. I'll send logcat file16:36
maldoes it successfully take that first picture?16:37
T42<k1gen> yeah16:37
T42<k1gen> by the way, there's an issue with reboots: sometimes phone goes in bootloader and stays there with "no valid slot to boot" message, it can be fixed in no time with fastboot --set-active=a, but it's still quite weird and uncomfortable. also 3 times out of 4 ui freezes on pin code entry, and ssh disconnects if already connected or doesn't let you in if you wasn't. sometimes hybris-boot.img reflash helps16:40
T42<k1gen> "freezes on pin code entry"16:41
T42<k1gen> ^ only after reboots, and on forth-fifth digit of six-digit passcode16:41
malyou probably have bootctl service failing16:42
malit informs some part of the system that the boot was successful if it's not done then every 7 boots or was it 5 it fails16:43
T42<k1gen> now after metadata and persist mount fine, device freezes after 3 of 4 reboots not on passcode entry, but on spinning circle animation, then screen turns off and no ssh access16:44
T42<k1gen> also if I try to reboot device by holding power button, ui turns on for half a second literally to say "goodbye"16:45
T42<k1gen> 10 minutes of constant rebooting already, since I said I'd take camera logcat16:47
malthat spinning circle could suggest ofono is not ready16:48
T42<k1gen> let me reflash the kernel and see if spinning circle disappears16:48
T42<k1gen> nope, stuck 10-15 frames past than last time16:50
T42<k1gen> mal: when I boot successfully, what should I send besides the journal?16:50
T42<k1gen> ok, I booted into system16:51
T42<k1gen> mal: journal of clean boot, no camera attempts, just one lockscreen unlock:
T42<k1gen> yeah, Failed to start Droid bootctl.16:53
T42<k1gen> mal: any idea how to fix these reboot issues, or do you need more info/logs?17:01
malthat bootctl issue should be fixed by this
T42<k1gen> mal: how do I build specific pull request with
T42<edp_17> With what command can I check/set the  volume from command line?18:14
mal@k1gen you should not build that, it's too new, you can just copy the file from your droid-configs-device/sparse/ to sparse/ and edit it18:45
mal@edp_17 I would assume pactl18:46
T42<edp_17> Thanks. I'll try to play with it.18:50
malwhy do you want to do that?18:50
T42<k1gen> mal: sorry it took so long, here's camera logcat: while logcat was launched I opened the camera app first time a minute after a reboot, was in photo mode for 5 seconds, switched to video mode, chose to close the app after sailfish dialogue apperared, then opened the app again and switched to photo mode18:58
T42<edp_17> mal : I thought there was no sound because it was muted or something. So, wanted to test whether that's the case.19:08
T42<k1gen> mal: with this in my /lib/udev/rules.d bootctl still fails:
mal@k1gen try to check the command here manually
T42<k1gen> mal: Marking boot as successful19:40
malwhat happens if you run it second time?19:41
T42<k1gen> no output19:41
malwondering if it really marked it successful19:41
T42<k1gen> I also executed /usr/bin/droid/ before last reboot, but rebooted straight to bootloader with "no valid slot to boot"19:42
mallooks like something odd happens with that bootctl19:46
T42<k1gen> something odd happens a lot on my device :)19:47
T42<k1gen> it'd be nice to fix this no valid slot to boot stuff before we go anywhere where I need to reboot a lot19:52
malyeah, it needs some investigation21:24

Generated by 2.17.1 by Marius Gedminas - find it at!