Tuesday, 2024-07-30

*** amccarthy is now known as Guest164107:41
*** amccarthy_ is now known as amccarthy07:41
T42<elros34> do you mind sharing something about these commits? you should be able to telnet now09:22
T42<hacker12455> reverted these three `msm_serial_hs: make the Bluetooth tty thread RT`09:57
T42<hacker12455> `tty: add tty_port_set_policy function` and `tty: move tty_port workqueue to be a kthread`09:57
T42<hacker12455> and replicated that change I did before for good measure09:58
T42<hacker12455> https://github.com/Hacker1245/android_kernel_motorola_msm8953/commit/e82bb60154f2797db34af2ffa7984f58140d9081#diff-108c8393f1a9d1607e356c52b725f8423fd7469a460b1e6e863d901fbc30ee1909:58
T42<elros34> ah infamous config_vt issue from lineage-15/16 age10:00
T42<elros34> enable also CONFIG_USER_NS10:01
T42<hacker12455> still seems to just blink12:43
T42<hacker12455> no reboot so far12:44
T42<hacker12455> https://bpa.st/7SEQ12:45
T42<hacker12455> anything in kernel config warnings which I'd need?12:45
T42<hacker12455> this is a arm64 port12:45
T42<hacker12455> maybe I need permissive selinux?12:52
T42<hacker12455> let me try with that 4.6.0.13 rootfs13:01
T42<hacker12455> or let's see if I can even telnet in without the rootfs13:02
T42<hacker12455> ok so I have this13:06
T42<hacker12455> 192.168.2.2013:06
T42<hacker12455> yeah I can telnet in that way13:06
T42<hacker12455> now extracting the 4.6.0.13 rootfs13:10
T42<hacker12455> still blinks13:21
T42<hacker12455> no ip13:21
T42<hacker12455> ah wait13:24
T42<hacker12455> let me dig through what I did in the pastr13:24
T42<hacker12455> hmm15:55
T42<hacker12455> `Jun 13 12:52:53 MotoG5 sh[1481]: /bin/sh: can't open '/usr/bin/droid/droid-hal-early-init.sh': No such file or directory`15:55
T42<hacker12455> `Jun 13 12:52:53 MotoG5 sh[1490]: nohup: can't execute '/sbin/droid-hal-init': Too many levels of symbolic links`15:55
T42<hacker12455> https://bpa.st/HJ3A15:59
malcheck that mounts are working16:16
T42<hacker12455> https://bpa.st/Y7KA16:17
malwhich android base was that?16:24
malyou added correct android version to droid-config spec?16:24
malalso that droid-hal-early-init.sh is not an error, that is optional file16:25
T42<hacker12455> android 1117:00
T42<hacker12455> hybris 18.117:00
T42<hacker12455> and yes to the second question17:00
T42<hacker12455> `%define android_version_major 11` in droid-config-cedric.spec17:01
maland submodule is new enough?17:02
gv2hey mal, built eveything and booted to hybris, it got stuck at oem logo as expected.17:04
gv2journal: https://paste.opensuse.org/pastes/0810b9224af4 what to focus on first?17:04
malfixup mount points17:04
malyou can see a lot of droid mounts fail17:05
gv2yeah trying to figure out that, my fixup-mountpoints file seems okay but i'll check again17:06
malrecheck the paths, if you want help show both fstab from your android device repo and what you have added to fixup17:10
gv2a minute i'll check everything again.17:15
*** genv2 is now known as gv217:29
gv2mal: https://paste.opensuse.org/pastes/e1f8fbb15a41 fixup-mountpoints17:38
gv2fstab: https://github.com/LineageOS/android_device_xiaomi_dipper/blob/lineage-21/rootdir/etc/fstab.qcom17:38
*** genv2 is now known as gv217:56
malgv2: have another look at those /system, /system_ext and /vendor, notice anything different in those in fstab compared to the others17:58
malthen you should see what is wrong in fixup18:00
gv2yup they don't have "bootdevice" there๐Ÿ˜€  Fixed the file, now lets see18:00
T42<hacker12455> hm? (re @SailfishFreenodeIRCBridgeBot: <mal>and submodule i...)18:02
mal@hacker12455 just wondering if you created the repo just now or is it some old repo you reuse18:03
T42<hacker12455> it's fresh18:03
malcan you check the /system content, how does it look?18:04
*** gv2 is now known as dedgv219:00
T42<hacker12455> https://bpa.st/TRIA19:05
*** dedgv2 is now known as gv219:06
T42<hacker12455> looks normal to me19:10
T42<hacker12455> hm19:15
T42<hacker12455> https://bpa.st/WOYQ19:15
malno, that looks like system as root19:22
malbut why wasn't that automatically done correctly19:24
malcan you show your fstab19:24
T42<hacker12455> fstab.qcom?19:30
T42<hacker12455> https://bpa.st/Z3VA19:30
T42<hacker12455> and fixup-mountpoints19:31
T42<hacker12455> https://bpa.st/CUSQ19:31
T42<b100dian> Not the first time fstab lies19:34
T42<b100dian> At least for my xiaomi was the same19:35
malyeah, so maybe changing the fstab is the solution19:41
T42<TheVancedGamer> would this place be suited for asking libgbinder questions?19:42
malsure19:42
T42<TheVancedGamer> I have this code:19:42
T42<TheVancedGamer> ```19:42
T42<TheVancedGamer> uint32_t IBootControl::getNumberSlots()19:42
T42<TheVancedGamer> {19:42
T42<TheVancedGamer>     if (!client)19:42
T42<TheVancedGamer>         return uint32_t();19:42
T42<TheVancedGamer> 19:42
T42<TheVancedGamer>     GBinderRemoteReply *reply = gbinder_client_transact_sync_reply(client, 1, NULL, &status);19:42
T42<TheVancedGamer>     GBinderReader reader;19:42
T42<TheVancedGamer>     gbinder_remote_reply_init_reader(reply, &reader);19:42
T42<TheVancedGamer>     uint32_t out;19:42
T42<TheVancedGamer>     gbinder_reader_read_uint32(&reader, &out);19:42
T42<TheVancedGamer>     gbinder_remote_reply_unref(reply);19:43
T42<TheVancedGamer>     std::cout << out << std::endl;19:43
T42<TheVancedGamer>     return out;19:43
T42<TheVancedGamer> }```19:43
T42<TheVancedGamer> 19:43
T42<TheVancedGamer> it should return correct slots, but instead I get this:19:43
malargh, pastebin, next time19:43
T42<TheVancedGamer> ```19:43
T42<TheVancedGamer> [root@OnePlus6T muhammad]# ./out19:43
T42<TheVancedGamer> Slots are 2149582850```19:43
T42<TheVancedGamer> yeah.... i don't think i have that many slots19:43
T42<TheVancedGamer> oops, I thought it'd fit well19:43
T42<TheVancedGamer> sorry19:43
malall lines show separately on irc19:43
T42<TheVancedGamer> ouch19:43
T42<TheVancedGamer> i'll put that on a pastebin19:43
gv2and notify spam :D19:43
T42<TheVancedGamer> mal: https://paste.myself5.de/atinesiwak.cpp19:44
T42<TheVancedGamer> I honestly don't see anything wrong19:44
T42<TheVancedGamer> unless I'm constructing the reader wrong?19:45
T42<hacker12455> hm can I test it by just changing it on the device? (re @SailfishFreenodeIRCBridgeBot: <mal>yeah, so maybe ...)19:45
T42<hacker12455> or do I need to rebuild droid-hal19:45
mal@hacker12455 well it's possible to test on device but it needs some changes, you need to make the current system.mount to be system_root.mount and the create a separate system.mount to bind mount the system_root/system to /system19:47
T42<hacker12455> sure I can try that19:48
T42<hacker12455> and I guess I just change the fstab to use direct paths?19:48
malyes, just replace /system with / in fstab, then make hybris-hal and then droid-hal build should do it correctly19:49
T42<hacker12455> that is if I can even find fstab.qcom19:50
T42<TheVancedGamer> what device?19:50
T42<hacker12455> cedric19:50
gv2must be at rootdir/etc/fstab.qcom etc19:50
T42<hacker12455> moto g519:50
T42<TheVancedGamer> or if there's a common tree19:50
T42<hacker12455> well I have /etc/fstab19:50
T42<TheVancedGamer> it's probably there19:51
gv2ah device tree*19:51
T42<hacker12455> on device19:51
T42<hacker12455> well yeah I know where it is in the tree19:51
T42<hacker12455> but I wonder what I need to change on device19:51
T42<hacker12455> to test it here19:51
T42<TheVancedGamer> mal: ping :P19:52
T42<TheVancedGamer> sorry if i'm being annoying, I've been writing my own codegen for a while and seeing it fail like this makes me want to cry lol19:52
malyeah, trying to check that code19:53
gv2as far as i remember if you are not going to rebuild you only must fix systemd units as mal said19:53
T42<TheVancedGamer> maybe the OP6T does have 21 million slots :D19:53
T42<hacker12455> what do I put in system.mount?19:57
T42<hacker12455> that one pastebin link I found by searching is dead19:58
mal@TheVancedGamer try reading second uint32? afaik hidl always has first a status value and then the actual value19:59
T42<TheVancedGamer> oh19:59
T42<TheVancedGamer> i'll try that19:59
malwell the first one is int32, not uint32 but doesn't matter much20:00
T42<TheVancedGamer> I did that, still same value20:00
malfor bot?20:00
mal*both20:00
T42<TheVancedGamer> yeah20:00
malhmm20:00
malcheck the status of gbinder_client_transact_sync_reply i.e. the last status parameter20:01
T42<TheVancedGamer> `-2147483647`20:01
T42<TheVancedGamer> yeah it's dead20:01
malso the transaction failed20:01
malyou are sure client is ok?20:01
T42<TheVancedGamer> it's definitely not NULL20:01
T42<TheVancedGamer> I did add null checks20:01
malhow do you create it?20:02
T42<b100dian> That last one looks like min_int20:02
T42<TheVancedGamer> mal: https://paste.myself5.de/unifucucog.cpp20:02
T42<TheVancedGamer> I call that after setting `serviceName` to `android.hardware.boot@1.0::IBootControl/default`20:03
T42<TheVancedGamer> as listed in list_sync()20:03
T42<hacker12455> so uh, anyone has contents of system.mount?20:03
T42<hacker12455> that I need to paste in20:03
*** genv2 is now known as gv220:05
T42<hacker12455> already created system_root.mount20:05
gv2a basic systemd mount unit20:05
gv2bind mount /system_root/system to /system20:05
T42<b100dian> What=/system_root/system20:06
gv2Where=/system20:06
T42<hacker12455> ah20:06
T42<hacker12455> got it20:06
maland then options to make it bind mount20:06
T42<hacker12455> only the bind option?20:07
T42<hacker12455> or something else too20:07
malyeah20:07
T42<hacker12455> Options=bind20:07
gv2yup20:07
T42<b100dian> For system_root.mount Where=/system_root20:07
T42<b100dian> Options=bind for system_root.mount and ro,barrier=1 for system.mount I have20:09
T42<hacker12455> instantly reboots now20:09
T42<hacker12455> removed init_enter_debug2320:10
T42<hacker12455> *debug220:10
T42<hacker12455> some selinux issue?20:11
T42<hacker12455> hmm20:18
T42<hacker12455> maybe I can chroot into the rootfs and grab some logs?20:18
T42<TheVancedGamer> mal: any ideas? :P20:18
mal@hacker12455 removing init_enter_debug2 until you are sure things work is bad idea20:21
T42<hacker12455> yeah i readded it20:21
mal@TheVancedGamer what is that serviceName20:21
T42<TheVancedGamer> mal: `android.hardware.boot@1.0::IBootControl/default`20:22
T42<TheVancedGamer> as indicated in list_sync()20:22
T42<hacker12455> any ideas on what to check now?20:22
maland you see that in binder-list?20:22
maljournal log20:22
T42<hacker12455> no journal entries20:23
T42<hacker12455> do I try to continue boot?20:23
gv2@hacker12455 first of all create init_enter_debug2 again. then telnet to the device, start init and instantly do "journalctl --follow"20:24
gv2maybe it'll help20:24
maldid you continue boot from init_enter_debug2?20:24
maljournal starts only after you do the continue command20:25
T42<hacker12455> https://bpa.st/NFCA20:25
T42<hacker12455> here we go20:25
maldid you do selinux things correctly?20:26
T42<hacker12455> did this20:27
T42<hacker12455> `Add to sparse: https://github.com/mer-hybris/droid-config-sony-seine/tree/eaa09db67b94352ef801417363008dc4005d9213/sparse/etc/selinux. You may need to replace symlinks with the actual files from your device.`20:27
T42<hacker12455> guess I need actual files then?20:27
malyes20:27
T42<hacker12455> so mount up system and grab the files?20:28
T42<hacker12455> because this is in /etc/selinux now20:29
T42<hacker12455> https://bpa.st/RZEA20:29
mal@TheVancedGamer just to be sure, check remote you get and only then ref it, that is how we do it usually20:29
mal@hacker12455 you need to add the folder structure from that repo to /etc/selinux and copy any files and for symlinks replace those with the actual files from /system or /vendor20:31
gv2i messed up that once in my previous sagit port ๐Ÿ˜€ need to be careful20:32
T42<hacker12455> here's what I have in /system selinux20:32
T42<hacker12455> https://bpa.st/KNOA20:32
malhttps://github.com/mer-hybris/droid-config-sony-seine/blob/eaa09db67b94352ef801417363008dc4005d9213/sparse/etc/selinux/minimum/policy/policy.30 and https://github.com/mer-hybris/droid-config-sony-seine/blob/eaa09db67b94352ef801417363008dc4005d9213/sparse/etc/selinux/minimum/contexts/files/file_contexts20:34
malfind the files those point to from device and copy20:34
T42<hacker12455> with the names in there?20:37
T42<hacker12455> or with vendor_file_contexts20:37
malthe names as in git20:38
T42<hacker12455> got iy20:38
T42<hacker12455> *it20:38
T42<hacker12455> do I try continuing init or reboot first20:39
malif you haven't continued yet then you can continue20:39
T42<hacker12455> https://bpa.st/KZ4Q20:40
T42<hacker12455> still alive btw20:50
T42<hacker12455> what now?20:51
T42<b100dian> Mask droid-hal-init and start it manually, grab logcat21:07
maldroid-hal-init fails, you need to see why it fails21:07
T42<b100dian> Add audit=0 in cmdline maybe21:08
T42<b100dian> Kernel cmdline21:08
T42<hacker12455> trying to start it just returns too many levels of symbolic links21:10
T42<hacker12455> `/bin/sh: droid-hal-init: Too many levels of symbolic links`21:10
T42<hacker12455> also that doesn21:11
T42<hacker12455> *doesn21:11
T42<hacker12455> damnit21:11
T42<hacker12455> doesn21:11
T42<hacker12455> doesn't exist21:11
T42<hacker12455> `Jun 13 17:42:04 MotoG5 sh[1812]: /bin/sh: can't open '/usr/bin/droid/droid-hal-early-init.sh': No such file or directory`21:11
T42<hacker12455> https://bpa.st/PFUA21:11
gv2droid-hal-early-init.sh is optional, thats not a problem21:13
T42<hacker12455> yeah but what about the symbolic links thing21:14
T42<elros34> did you both read hadk-hot? it has answers for most of the questions you were asking21:15
T42<elros34> hacker12455 are you sure all of your mount points are correct now? try  findmnt command21:19
T42<hacker12455> https://bpa.st/VADA21:19
T42<hacker12455> wait why didn't /system get bind mounted21:21
T42<elros34> it is21:21
T42<elros34> get full journall without audit junk21:22
T42<hacker12455> do I unmask droid-init-hal?21:23
T42<elros34> sure21:24
T42<elros34> it's required21:24
T42<hacker12455> https://bpa.st/YWYQ21:29
T42<hacker12455> and reboots21:29
T42<hacker12455> after continuing boot21:29
T42<hacker12455> added audit=0 to cmdline21:29
T42<elros34> boringssl fails  that is why device reboots21:31
T42<hacker12455> yeah I see21:32
T42<elros34> search  for not updatable apex in hadk-hot for solution21:33
T42<hacker12455> can I apply this directly on device?21:33
T42<hacker12455> wait21:34
T42<hacker12455> no21:34
T42<hacker12455> that's in kernel?21:34
T42<hacker12455> or mer init21:34
T42<elros34> it's in android/droid init, you must patch sources21:35
T42<elros34> I guess youcan copy built binaries if you don't want  rebuild whole image21:36
T42<hacker12455> rebuild droid-hal?21:38
T42<hacker12455> or hybris-hal21:38
T42<elros34> hybris-hal, droid-hal are just rpm packages21:40
T42<elros34> or both of you want rebuilt whole image21:41
T42<hacker12455> I just want to build and copy the binaries21:42
T42<hacker12455> but what do I need to build21:43
T42<elros34> hybris-hal21:44
T42<hacker12455> what binaries do I grab afterwards?21:58
T42<elros34> you should see what were built by make command22:01
T42<elros34> don't messup permissions when copying22:01
T42<hacker12455> well I see build out/target/product/cedric/obj/ROOT/hybris-boot_intermediates/init22:06
T42<hacker12455> and the initramfs.gz22:07
T42<elros34> is that really all? Are you sure these apex related changes are really applied?22:10
T42<hacker12455> do I just copy the whole initramfs or what?22:11
T42<hacker12455> rebuilding it again just to see if I missed anything22:11
T42<hacker12455> where should these changes end up?22:12
T42<elros34> but rebuilding will help, only first 'make' after making changes wil really rebuild files22:12
T42<hacker12455> I see it's building the kernel now22:13
T42<elros34> I do not remember anymore, probaly init (droid-hal-init) or something related22:13
T42<hacker12455> the hell, did that even build right22:17
T42<hacker12455> I can't see droid-hal-init in out anywhere22:17
T42<hacker12455> am I supposed to build it in habuild_sdk?22:18
T42<elros34> of course, like previously when you were following hadk pdf22:19
T42<hacker12455> then I did that22:19
T42<hacker12455> unless the file is not named droid-hal-init22:19
T42<hacker12455> or it's somewhere else22:20
T42<elros34> it's called init, copied and renamed to droid-hal-init during droid-hal packaging22:21
T42<hacker12455> https://bpa.st/IFDA22:23
T42<hacker12455> well then it's one of those22:23
T42<elros34> I guess system/bin/init one if you didn't see file being build when running make hybris-hal then I have my doubts that you have really applied patch22:26
T42<hacker12455> checked and it did get patched22:27
T42<hacker12455> so then why didn22:30
T42<hacker12455> *didn't it show up22:30
T42<hacker12455> the source itself was patched22:33
T42<hacker12455> https://bpa.st/6JXQ22:40
T42<hacker12455> panel is lit up now22:40
T42<hacker12455> no graphics on screen22:40
T42<elros34> a lot of spam but droid-hal-init works now, check logcat for graphics/hwcomposer failure reason22:49
T42<hacker12455> think this is it22:53
T42<hacker12455> `06-13 15:17:25.255  2164  2164 F linker  : CANNOT LINK EXECUTABLE "/usr/libexec/droid-hybris/system/bin/minisfservice": library "libandroidicu.so" not found: needed by /system/lib/libmedia.so in namespace (default)`22:53
T42<elros34> maybe but there are a lots of false this kind of errors now22:54
T42<elros34> create symlink and check22:55
T42<hacker12455> https://irc.thaodan.de/.imgstore/438b1cb1/logcat.txt22:55
T42<hacker12455> where is the sparse directory?22:55
T42<elros34> sparse is in droid-config, its basically your / on device22:55
T42<hacker12455> ah22:55
T42<hacker12455> do I also symlink the 32 bit one?22:58
T42<elros34> probably not22:59
T42<elros34> but nothing bad will happen23:00
T42<hacker12455> I'll do it then23:00
T42<hacker12455> do I just reboot it now or restart something23:00
T42<elros34> maybe restart this minimediaservice23:01
T42<hacker12455> how?23:01
T42<elros34> start it manually for example and see whether it works23:02
T42<hacker12455> `CANNOT LINK EXECUTABLE "/usr/libexec/droid-hybris/system/bin/minimediaservice": library "libicuuc.so" not found: needed by /apex/com.android.art/lib/libandroidicu.so in namespace (default)`23:03
T42<hacker12455> guess I now symlink all the stuff it asks for?23:04
T42<elros34> not all but you may try this one too, next time start with "strace -e file -s256"23:05
T42<hacker12455> https://bpa.st/G3FQ23:06
T42<hacker12455> here you go23:07
T42<elros34> does it restart itself with same error now?23:07
T42<hacker12455> `06-13 15:46:21.341  8392  8392 F linker  : CANNOT LINK EXECUTABLE "/usr/libexec/droid-hybris/system/bin/minimediaservice": library "libnativehelper.so" not found: needed by /system/lib/libmediandk.so in namespace (default)`23:08
T42<elros34> something is wrong but I remember similar behavior on device with not updatble apex. Add another symlink, as you can see in strace it really can't find that file too23:09
T42<hacker12455> https://bpa.st/RMZA23:11
T42<hacker12455> so it doesn't seem to die now23:12
T42<hacker12455> what now?23:12
T42<hacker12455> restart something?23:13
T42<elros34> check logcat, display.qservice starts?23:15
T42<hacker12455> nope23:17
T42<hacker12455> this thing seems to still complain23:17
T42<hacker12455> `06-13 15:51:51.873  9425  9425 F linker  : CANNOT LINK EXECUTABLE "/apex/com.android.os.statsd/bin/statsd": library "libstatssocket.so" not found: needed by main executable`23:17
T42<elros34> no idea wheter it's related23:18
T42<hacker12455> https://bpa.st/MURQ23:18
T42<hacker12455> wouldn't hurt to add it I guess?23:18
T42<elros34> sure, you may also reboot23:19
T42<hacker12455> rebooted23:25
T42<hacker12455> https://irc.thaodan.de/.imgstore/31c98b92/logcat2.txt23:26
T42<hacker12455> will try more later23:32

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