rinigus | @b100dian: added the notes on exploring stock ROM into wiki | 07:47 |
---|---|---|
rinigus | @b100dian: https://github.com/sonyxperiadev/bug_tracker/issues/848 - I'll try to build it using r55 | 07:47 |
rinigus | @b100dian: actually went for r67. recent PRs applied, all except kernel. let's see if it builds | 09:16 |
T42 | <b100dian> rinugus: wow, patchelf to the rescue:) | 10:17 |
T42 | <b100dian> I will look over the wiki today and continue with hybris boot | 10: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 device | 11: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 again | 13: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` gives | 13:33 |
T42 | <b100dian> couldn't mount RDWR because of unsupported optional features (4000) | 13:33 |
T42 | <b100dian> in dmesg | 13:34 |
T42 | <b100dian> That optional feature is EXT4_FEATURE_INCOMPAT_LARGEDIR according to kernel/fs/ext4/ext4.h | 13:34 |
T42 | <b100dian> but tune2fs -l doesn't show large_dir .. weird | 13: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/0ea619fbd3aa56e764ee12ca680423ff2b7ce386 | 13:37 |
rinigus | @b100dian: and we booted into aosp14! | 13:53 |
mal | which device? | 13:54 |
rinigus | will write down what I did under aosp14 wiki page. | 13:54 |
rinigus | mal: nagara 1iv | 13:54 |
rinigus | on 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 simg2img | 13:55 |
rinigus | good job by bartcubbins | 13:55 |
rinigus | @b100dian: re repo - yes, it is https://github.com/sonyxperiadev/device-sony-common/blob/master/hardware/health/CycleCountBackupRestore.cpp#L92 | 13: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 ro | 14:05 |
rinigus | OK, will work on wiki :) | 14:05 |
mal | if r67 now builds I should test moving to that on x10iv and v | 14:07 |
mal | hopefully the needed changes are added to the repos soon | 14:08 |
mal | rinigus: or was that recent push to device-sony-common related to it being built now? | 14:13 |
rinigus | mal: just few minutes, writing it down then I drop url here | 14:14 |
mal | thanks | 14:16 |
rinigus | @b100dian and mal: updated https://github.com/sailfishos-sony-nagara/main/wiki/AOSP-14 | 14:22 |
mal | thanks | 14:26 |
rinigus | as you can see, several PRs are waiting to be applied | 14: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 check | 14:30 |
rinigus | btw, maybe we can pull missing libs from stock if needed | 14:31 |
T42 | <b100dian> Yup, that was the suggestion https://github.com/sonyxperiadev/bug_tracker/issues/847#issuecomment-2451165112 here | 14:31 |
mal | rinigus: yes, hopefully we get those in already next week so I can make new build, I could of course make a test build already | 14:31 |
rinigus | mal: I think it will be merged quickly. I have also reported my successful test and that should help the process :) | 14:32 |
mal | yeah | 14:32 |
rinigus | @b100dian: exactly. RIL still has the same issue | 14:38 |
T42 | <b100dian> Yes, it's the same odm partition | 14:41 |
rinigus | looks like wifi is not working completely; bt not working; camera not working; | 14:41 |
rinigus | but screen works :) | 14:41 |
rinigus | and sound | 14:41 |
T42 | <b100dian> rinigus: actually forget about not encrypting userdata... our userdata is on /dev/block/dm-44 which means we need parsedynparts | 16:12 |
T42 | <b100dian> but fp4 port and sake only had system/vendor etc there, not userdata | 16: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 |
rinigus | what's parsedynparts? looks like I have to read up on "super" partition | 16:14 |
T42 | <b100dian> Yeah, it's this thing that you can put in your device spec https://github.com/tchebb/parse-android-dynparts | 16: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/40d0ab86a7aa0f236be282dbf8c9fcbdfc0f19a5 | 16:21 |
T42 | <b100dian> that repo can be built and and you can test the already super you have extracted like | 16:22 |
T42 | <b100dian> ~/git/parse-android-dynparts/build/parse-android-dynparts super_X-FLASH-ALL-6348.img | 16: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_a | 16:22 |
T42 | <elros34> userdata on super partition? are you sure this is really the case? | 16:23 |
T42 | <b100dian> wait.. whew I was wrong | 16:23 |
T42 | <b100dian> it is just formatted in a way to be used as a dm- device | 16: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 sideload | 16: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 root | 16:28 |
rinigus | right now there | 16:28 |
T42 | <b100dian> hmm I get 'unauthorized' in adb devices | 16:33 |
mal | why 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 once | 16:43 |
mal | how does the device behave now? | 16:45 |
mal | does it reboot? if so how soon? | 16:45 |
T42 | <b100dian> it reboots after 60 seconds, | 16:47 |
mal | so usb | 16:47 |
T42 | <b100dian> yeah, not arguing with that :) | 16:48 |
mal | do 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#L932 | 16: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 branches | 16:52 |
mal | this https://github.com/sonyxperiadev/kernel/commit/0ea619fbd3aa56e764ee12ca680423ff2b7ce386 if your kernel has that | 16: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 booted | 16:53 |
mal | check the defconfig | 16:55 |
mal | there 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 devices | 16:56 |
mal | https://github.com/mer-hybris/hybris-boot/blob/master/init-script#L237 | 16:56 |
rinigus | @b100dian: re vol-dn+power. not sure, what you mean. powering up with usb and holding vol-dn? | 16:57 |
mal | some devices provide correct udc via kernel commandline but I haven't yet implemented support for that, it's on my todo list | 16:57 |
T42 | <b100dian> rinigus: without usb cable https://developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/flash-tool/useful-key-combinations | 16: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 still | 16:59 |
T42 | <b100dian> mal: good point. I do have another device in stock (not the dummy one), let me hardcode that :D | 16: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/ partition | 17:00 |
T42 | <b100dian> I just need access to that log from e.g. recovery to iterate faster in outputting dmesg etc | 17: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 |
rinigus | re logs - nice! hopefully it will work | 17: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 try | 17: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-debug | 17:31 |
T42 | <elros34> don't forget about all correct permissions for for init-debug scripts | 17: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 data | 18:20 |
T42 | <elros34> in init-script. its not confusing at all. :P | 18:20 |
T42 | <b100dian> :) | 18:31 |
mal | if you have sd card you could mount it in initramfs and dump some logs etc there | 18:44 |
mal | that is how I debug init if usb fails | 18: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/mmcblk1p1 | 21:22 |
T42 | <elros34> file system shouldn't matter, use ext4 | 21:23 |
T42 | <elros34> or mmcblk0p1 | 21: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 was | 21:28 |
T42 | <elros34> mmcblk0 might be reserved for internall memeory | 21:30 |
mal | @b100dian maybe show the diff to init-script so we can verify it[6~ | 21:45 |
T42 | <b100dian> pushing this somewhere, yes | 22:04 |
T42 | <b100dian> changes are in the last commit of https://github.com/mer-hybris/hybris-boot/compare/master...sailfishos-sony-nagara:hybris-boot:master | 22: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 sake | 22:18 |
mal | @b100dian p2? | 22:22 |
T42 | <b100dian> Yes there are two partitions | 22:23 |
mal | also why not in the debug side where it has that sleep 60, before that | 22:24 |
T42 | <b100dian> The first one is exfat, would that work?:D And has data from the phone I stole it from | 22:24 |
T42 | <b100dian> So mount just before sleep and restart? I can try | 22:25 |
mal | that udc stuff seems wrong | 22:26 |
mal | what udc did you have in android | 22:27 |
T42 | <b100dian> a600000.dwc3 and dummy-smth | 22:27 |
T42 | <b100dian> that udc stuff was from an older version, patched and works for sake - though echo to mode might not be needed here | 22:28 |
T42 | <b100dian> but I can back it out too | 22:28 |
mal | ah, so there is only one non-dummy | 22:28 |
mal | then it should be fine | 22:29 |
mal | I thought there were two non-dummy ones | 22:29 |
T42 | <b100dian> I found a reference to antoher one in some init scripts, but it is not present in android | 22:30 |
mal | I thought we have the write to peripheral already | 22:31 |
mal | or is it still missing | 22:32 |
T42 | <b100dian> not when I checked out a couple of days ago / not in master | 22:33 |
mal | I'll check some things when I'm back home, in a bus now so not very practical | 22:33 |
T42 | <b100dian> I have a /vendor/bin/init.qcom.usb.sh which says | 22:33 |
T42 | <b100dian> # Start peripheral mode on primary USB controllers for Automotive platforms | 22:33 |
T42 | <b100dian> echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode | 22:34 |
T42 | <b100dian> thanks, no rush | 22:34 |
mal | hmm | 22:34 |
T42 | <b100dian> that is guarded by /sys/devices/soc0/machine being SA, mine is WAIPIO, so I don't think it is related | 22: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 work | 23:11 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!