Saturday, 2024-11-02

rinigus@b100dian: added the notes on exploring stock ROM into wiki07:47
rinigus@b100dian: https://github.com/sonyxperiadev/bug_tracker/issues/848 - I'll try to build it using r5507:47
rinigus@b100dian: actually went for r67. recent PRs applied, all except kernel. let's see if it builds09:16
T42<b100dian> rinugus: wow, patchelf to the rescue:)10:17
T42<b100dian> I will look over the wiki today and continue with hybris boot10:18
rinigus@b100dian: there are also 4 unmerged PRs in addition. will add that to wiki under aosp14 later when the build is finished and I have tested it on device11:14
T42<b100dian> rinugus: good luck!11:43
rinigus@b100dian: you too! :)11:46
rinigus@b100dian: builds cleanly, but stuck on android logo. looks like the same issue with health as before. will fix and try again13:22
T42<b100dian> Is this in a repo you can make a pull request to?13:30
T42<b100dian> I myself tried to use the existing stock + lineage GSI as form of recovery, as there's no recovery if you flash hybris boot.13:32
T42<b100dian> To do that I have thought about removing encription from fstab.qcom from stock vendor.img (thanks for the instructions to unpack!)13:33
T42<b100dian> But I cannot mount vendor.img r/w locally because `sudo mount -o loop,rw vendor-edited.img /mnt/vendor -t ext4` gives13:33
T42<b100dian> couldn't mount RDWR because of unsupported optional features (4000)13:33
T42<b100dian> in dmesg13:34
T42<b100dian> That optional feature is EXT4_FEATURE_INCOMPAT_LARGEDIR according to kernel/fs/ext4/ext4.h13:34
T42<b100dian> but tune2fs -l doesn't show large_dir .. weird13:34
T42<b100dian> anyway, I might try binary patching, I just need to space-fill "inlinecrypt" from the binary image, what could possibly go wrong ;))13:35
T42<b100dian> In the meantime I am reverting a promising kernel commit https://github.com/sonyxperiadev/kernel/commit/0ea619fbd3aa56e764ee12ca680423ff2b7ce38613:37
rinigus@b100dian: and we booted into aosp14!13:53
malwhich device?13:54
riniguswill write down what I did under aosp14 wiki page.13:54
rinigusmal: nagara 1iv13:54
riniguson r67 :)13:54
T42<b100dian> rinigus \o/13:55
rinigus@b100dian: check whether that image is in sparse android format. I had the same issue - had to convert using simg2img13:55
rinigusgood job by bartcubbins13:55
rinigus@b100dian: re repo - yes, it is https://github.com/sonyxperiadev/device-sony-common/blob/master/hardware/health/CycleCountBackupRestore.cpp#L9213:58
T42<b100dian> re vendor.img: it's not sparse.14:00
rinigus@b100dian: is it vendor from stock or aosp?14:02
T42<b100dian> Stock. Actually I coukd move to aosp when you update the wiki. Le's see, what works?14:03
rinigus@b100dian: I can mount here stock vendor as ro but not ro14:05
rinigusOK, will work on wiki :)14:05
malif r67 now builds I should test moving to that on x10iv and v14:07
malhopefully the needed changes are added to the repos soon14:08
malrinigus: or was that recent push to device-sony-common related to it being built now?14:13
rinigusmal: just few minutes, writing it down then I drop url here14:14
malthanks14:16
rinigus@b100dian and mal: updated https://github.com/sailfishos-sony-nagara/main/wiki/AOSP-1414:22
malthanks14:26
rinigusas you can see, several PRs are waiting to be applied14:27
T42<b100dian> rinigus: do you still get a missing lib in `logcat -b radio` as was with A13?14:29
rinigus@b100dian: let me check14:30
rinigusbtw, maybe we can pull missing libs from stock if needed14:31
T42<b100dian> Yup, that was the suggestion https://github.com/sonyxperiadev/bug_tracker/issues/847#issuecomment-2451165112 here14:31
malrinigus: yes, hopefully we get those in already next week so I can make new build, I could of course make a test build already14:31
rinigusmal: I think it will be merged quickly. I have also reported my successful test and that should help the process :)14:32
malyeah14:32
rinigus@b100dian: exactly. RIL still has the same issue14:38
T42<b100dian> Yes, it's the same odm partition14:41
riniguslooks like wifi is not working completely; bt not working; camera not working;14:41
rinigusbut screen works :)14:41
rinigusand sound14:41
T42<b100dian> rinigus: actually forget about not encrypting userdata... our userdata is on /dev/block/dm-44 which means we need parsedynparts16:12
T42<b100dian> but fp4 port and sake only had system/vendor etc there, not userdata16:13
T42<b100dian> so we need to somehow disable the super partition or find a small partition for the rootfs, that is unused..16:13
riniguswhat's parsedynparts? looks like I have to read up on "super" partition16:14
T42<b100dian> Yeah, it's this thing that you can put in your device spec https://github.com/tchebb/parse-android-dynparts16:21
T42<b100dian> Then you can mount them like this at runtime (stolen from mal) https://github.com/sailfishos-on-sake/droid-config-sake/commit/40d0ab86a7aa0f236be282dbf8c9fcbdfc0f19a516:21
T42<b100dian> that repo can be built and and you can test the already super you have extracted like16:22
T42<b100dian> ~/git/parse-android-dynparts/build/parse-android-dynparts super_X-FLASH-ALL-6348.img16:22
T42<b100dian> it shows we have in the super.img these: odm_a product_a system_a system_b system_ext_a vendor_a vendor_dlkm_a16:22
T42<elros34> userdata on super partition? are you sure this is really the case?16:23
T42<b100dian> wait.. whew I was wrong16:23
T42<b100dian> it is just formatted in a way to be used as a dm- device16:23
T42<b100dian> :whew:16:23
rinigus:)16:24
T42<b100dian> this still complicates debugging.. I don't have access to hybris-boot's init.log since I don't have access to a recovery boot that gives you the powers to make the /data ext4.. Sony's recovery is not offering adb access, only sideload16:27
T42<b100dian> rinigus: recovery (vol-dn + power) on aosp what does that offer?16:27
rinigus@b100dian: when in fastbootd and you go into recovery, you have adb access. including adb root16:28
rinigusright now there16:28
T42<b100dian> hmm I get 'unauthorized' in adb devices16:33
malwhy not format userdata to ext4 with fastboot?16:37
T42<b100dian> man: that works but I need to fingure out why I can't access recovery through adb shell anyway, since fastboot does not allow me to inspect the files after trying hybris-boot once16:43
malhow does the device behave now?16:45
maldoes it reboot? if so how soon?16:45
T42<b100dian> it reboots after 60 seconds,16:47
malso usb16:47
T42<b100dian> yeah, not arguing with that :)16:48
maldo you have that one commit reverted and the usual defconfig changes in kernel https://github.com/mer-hybris/android_kernel_sony_msm/blob/hybris-sony-aosp/LA.UM.9.12.r1/arch/arm64/configs/aosp_lena_pdx213_defconfig#L93216:48
mal@b100dian which build of android do you have user or userdebug?16:50
T42<b100dian> wait, which commit did you reverted? searching for that in mer-hybris sony kernel branches16:52
malthis https://github.com/sonyxperiadev/kernel/commit/0ea619fbd3aa56e764ee12ca680423ff2b7ce386 if your kernel has that16:52
T42<b100dian> yes.. that's the one I found too.16:52
T42<b100dian> I am currently not building AOSP per se, only hybris-boot, in the trees of the same AOSP14 of sony nagara that rinigus just booted16:53
malcheck the defconfig16:55
malthere is also possibility that there is more than 1 udc which could cause issues, I haven't seen that on qcom devices yet but could happen with some devices16:56
malhttps://github.com/mer-hybris/hybris-boot/blob/master/init-script#L23716:56
rinigus@b100dian: re vol-dn+power. not sure, what you mean. powering up with usb and holding vol-dn?16:57
malsome devices provide correct udc via kernel commandline but I haven't yet implemented support for that, it's on my todo list16:57
T42<b100dian> rinigus: without usb cable https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/flash-tool/useful-key-combinations16:58
rinigus@b100dian: but what do you have as a system and the rest? doesn't hybris-boot rely on those too? I presume you have stock still16:59
T42<b100dian> mal: good point. I do have another device in stock (not the dummy one), let me hardcode that :D16:59
T42<b100dian> rinigus: My plan was to just boot the init script to get telnet. From previous experience and learning with the help of @elros34 you can do that and if you boot hybris-boot you even have an init.log on your /data/ partition17:00
T42<b100dian> I just need access to that log from e.g. recovery to iterate faster in outputting dmesg etc17:00
rinigus@b100dian: I get all access I need if I enter fastboot, then fastboot reboot fastboot, and in that, select to enter recovery. that makes adb available. is this not working for you?17:01
rinigusre logs - nice! hopefully it will work17:01
T42<b100dian> unfortunately not - but, as I said earlier, recovery is just boot.img, so it should be AOSP vs Stock boot thing, lemme try17:18
T42<elros34> just a reminder if you forget there are 2 init.log files: one created by init-script in initramfs (hybris-boot) and second in /data/.stowaways/sailfishos/init.log created by copy of the same script located in /data/.stowaways/sailfishos/init-debug17:31
T42<elros34> don't forget about all correct permissions for for init-debug scripts17:32
T42<b100dian> Hmm you mean I still got logs only *after* building rootfs.. good point, I may have mixed them up..18:14
T42<elros34> not necessary, you just need to have /init-debug scripts in right place, or copy init.log from initramfs to data18:20
T42<elros34> in init-script. its not confusing at all. :P18:20
T42<b100dian> :)18:31
malif you have sd card you could mount it in initramfs and dump some logs etc there18:44
malthat is how I debug init if usb fails18:45
T42<b100dian> good idea ! it has one ;)18:58
T42<b100dian> mal: I am not doing this correctly - what device should I use for mount, /dev/block/mmcblk1p1 or /dev/mmcblk1p1 ? and what filesystem?20:36
T42<elros34> I guess /dev/mmcblk1p121:22
T42<elros34> file system shouldn't matter, use ext421:23
T42<elros34> or mmcblk0p121:25
T42<b100dian> interesting, in android I see it as mmcblk1 not 0, and I inserted in in the C2 (the only other device I have with sfos + sdcard) and still mmcblk1 was21:28
T42<elros34> mmcblk0 might be reserved for internall memeory21:30
mal@b100dian maybe show the diff to init-script so we can verify it[6~21:45
T42<b100dian> pushing this somewhere, yes22:04
T42<b100dian> changes are in the last commit of https://github.com/mer-hybris/hybris-boot/compare/master...sailfishos-sony-nagara:hybris-boot:master22:17
T42<b100dian> however I might have borked something due to previous commit changes, since I've tried a bit of what I had last time on sake22:18
mal@b100dian p2?22:22
T42<b100dian> Yes there are two partitions22:23
malalso why not in the debug side where it has that sleep 60, before that22:24
T42<b100dian> The first one is exfat, would that work?:D And has data from the phone I stole it from22:24
T42<b100dian> So mount just before sleep and restart? I can try22:25
malthat udc stuff seems wrong22:26
malwhat udc did you have in android22:27
T42<b100dian> a600000.dwc3 and dummy-smth22:27
T42<b100dian> that udc stuff was from an older version, patched and works for sake - though echo to mode might not be needed here22:28
T42<b100dian> but I can back it out too22:28
malah, so there is only one non-dummy22:28
malthen it should be fine22:29
malI thought there were two non-dummy ones22:29
T42<b100dian> I found a reference to antoher one in some init scripts, but it is not present in android22:30
malI thought we have the write to peripheral already22:31
malor is it still missing22:32
T42<b100dian> not when I checked out a couple of days ago / not in master22:33
malI'll check some things when I'm back home, in a bus now so not very practical22:33
T42<b100dian> I have a /vendor/bin/init.qcom.usb.sh which says22:33
T42<b100dian> # Start peripheral mode on primary USB controllers for Automotive platforms22:33
T42<b100dian> echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode22:34
T42<b100dian> thanks, no rush22:34
malhmm22:34
T42<b100dian> that is guarded by /sys/devices/soc0/machine being SA, mine is WAIPIO, so I don't think it is related22:50
mal@b100dian can you verify that rndis.usb0 is valid for your device? on fp5 I had to use rndis.rndis, also remove gsi stuff you added, that won't work23:11

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