Thursday, 2023-06-29

*** Danct12 is now known as Guest450202:01
T42<neochapay> ```05:21
T42<neochapay> cat out/target/product/tb8788p1_64_bsp/obj/KERNEL_OBJ/.config | grep SELINUX05:21
T42<neochapay> # CONFIG_MTK_SELINUX_AEE_WARNING is not set05:21
T42<neochapay> CONFIG_SECURITY_SELINUX=y05:21
T42<neochapay> # CONFIG_SECURITY_SELINUX_DISABLE is not set05:22
T42<neochapay>  (re @elros34: do you have enabled ...)05:22
T42<neochapay> now problem is05:54
T42<neochapay> ```05:54
T42<neochapay> Multiple same specifications for
T42<neochapay> Multiple same specifications for
T42<neochapay> SELinux: Loaded service_contexts from:05:54
T42<neochapay>     /system/etc/selinux/plat_hwservice_contexts05:54
T42<neochapay>     /system_ext/etc/selinux/system_ext_hwservice_contexts05:54
T42<neochapay>     /vendor/etc/selinux/vendor_hwservice_contexts05:54
T42<neochapay> libc: Unable to set property "hwservicemanager.ready" to "true": connection failed; errno=111 (Connection refused)```05:54
T42<elros34> so looks like it's wrongly disabled but I do not remember whther this is critical on hybris-18. What about selinux files?09:35
T42<smatkovi> Does the building host have to be booted with selinux or something else? I thought it was the building host09:49
T42<elros34> no09:51
T42<neochapay> I will fix it. Just add CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 into kernel config (re @elros34: so looks like it's w...)09:55
T42<neochapay> next problem - i have /system and /vendor on rootfs09:55
T42<neochapay> and init trying to remount /data as rootfs09:55
T42<neochapay> i disable SwitchRoot09:56
T42<neochapay> ```09:56
T42<neochapay> --- a/init/switch_root.cpp09:56
T42<neochapay> +++ b/init/switch_root.cpp09:56
T42<neochapay> @@ -70,6 +70,9 @@ std::vector<std::string> GetMounts(const std::string& new_root) {09:56
T42<neochapay>  }  // namespace09:56
T42<neochapay> 09:56
T42<neochapay>  void SwitchRoot(const std::string& new_root) {09:56
T42<neochapay> +    LOG(INFO) << "[hybris] Skip switching root to '" << new_root << "'";09:56
T42<neochapay> +    return;09:56
T42<neochapay> +09:56
T42<neochapay>      auto mounts = GetMounts(new_root);09:56
T42<neochapay> 09:56
T42<neochapay>      LOG(INFO) << "Switching root to '" << new_root << "'";```09:56
T42<neochapay> now i have ```09:57
T42<neochapay> tmpfs on /system/apex type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)```09:57
T42<neochapay>  in mountpoints and all droid part not work09:57
T42<neochapay> Of course, I can disable this too ... but is this the right way?10:00
T42<elros34> disable what? /system/apex? It's needed10:01
T42<elros34> could you show whole log, it's hard to guess form snippets.10:01
T42<neochapay> disable mount /system/apex as tmpfs (re @elros34: disable what? /syste...)10:01
T42<neochapay> full log :
T42<TheVancedGamer> please refrain from sending files here, opt for a pastebin instead10:06
T42<neochapay> fixed
T42<neochapay> now i have ```10:08
T42<neochapay> tmpfs on /system/apex type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)10:08
T42<neochapay> ```10:08
T42<neochapay>  in mount and empty /system/apex dir10:08
T42<smatkovi> Shouldn't we also make selinux permissive, or is that not that essential?10:13
T42<elros34> not sure, I think ports usually use permissive but probably because nobody cares to change it. I will ask 3th time, did you copy correct /etc/selinux files?10:15
T42<elros34> that is strange: starting service 'zygote'...10:16
T42<neochapay> / # ls /etc/selinux/minimum/contexts/files/vendor_file_contexts -la10:17
T42<neochapay> lrwxrwxrwx    1 root     root            40 Jun 28 09:10 /etc/selinux/minimum/contexts/files/vendor_file_contexts -> /vendor/etc/selinux/vendor_file_contexts (re @elros34: not sure, I think po...)10:17
T42<neochapay> it's from /usr/libexec/droid-hybris/system/etc/init/hw/init.zygote64_32.rc (re @elros34: that is strange: sta...)10:17
T42<elros34> did you package /system partition or it's simply mounted?10:18
T42<neochapay> packaged (re @elros34: did you package /sys...)10:18
T42<elros34> logcat works?10:21
T42<neochapay> if run logd manualy yes (re @elros34: logcat works?)10:21
T42<elros34> can you show log? I wonder why apexd (bootstrap) doesn't work. Is it missing in filesystem?10:23
T42<neochapay> / # ls -la /system/bin/apexd10:23
T42<neochapay> -rwxr-xr-x    1 root     root        592352 Jun 25 18:12 /system/bin/apexd (re @elros34: can you show log? I ...)10:23
T42<neochapay> logcat10:24
T42<neochapay> but i am trying run something manualy and umount apex10:24
T42<elros34> so /vendor is also packaged by you?10:28
T42<neochapay> yes (re @elros34: so /vendor is also p...)10:28
T42<elros34> did you try to start apex bootstrap?10:34
T42<neochapay> ```10:43
T42<neochapay> / # /system/bin/apexd --bootstrap10:43
T42<neochapay> / #```10:43
T42<neochapay>  (re @elros34: did you try to start...)10:43
T42<elros34> end what is exit status of it? I see bunch of processes with exited with status 12710:45
T42<neochapay> how i can check ? (re @elros34: end what is exit sta...)10:45
T42<elros34> 'echo $?' after command returns10:46
T42<neochapay> ```10:47
T42<neochapay> / # /system/bin/apexd --bootstrap10:47
T42<neochapay> / # echo $?10:47
T42<neochapay> 0```10:47
T42<elros34> so why it's 127 in droid-hal-init..10:47
T42<neochapay> Yeap...why...10:55
T42<elros34> maybe you should strace -f droid-hal-init to get some ideas. Looks like all services exit with 127 code11:02
T42<neochapay> (re @elros34: maybe you should str...)11:11
T42<elros34> did you start it correctly: mask service, reboot, and so on?11:57
T42<neochapay> Just run manualy (re @elros34: did you start it cor...)11:58
T42<elros34> while previous instance is up too?11:58
T42<neochapay> yeap...trying mask and restart (re @elros34: while previous insta...)11:59
T42<elros34> if you can please use some different paste with raw view support for suche a huge log12:00
T42<neochapay> Which one do you recommend? (re @elros34: if you can please us...)12:02
T42<elros34> anything will be better:) for example12:03
T42<Mister_Magister> :)12:07
T42<neochapay> i have 14mb of logs hehehe12:08
T42<neochapay> only 2 mb (re @Mister_Magister: :...)12:08
T42<Mister_Magister> telegram files kinda work but suck for12:09
Mister_Magisterirc side12:09
T42<neochapay> yeap....i know12:09
T42<TheVancedGamer> :D12:10
T42<Mister_Magister> you can use ghostbin.lain.la12:10
T42<neochapay> 413 Request Entity Too Large12:11
T42<neochapay> haha (re @Mister_Magister: you can use ghostbin...)12:11
T42<Mister_Magister> lmao12:11
T42<TheVancedGamer> paste.myself5.de12:11
T42<neochapay> You are best (re @TheVancedGamer:
T42<elros34> what namespaces options do you have enabled 'zcat /proc/config.gz | grep CONFIG_.*_NS'?12:24
T42<neochapay> ```12:28
T42<neochapay> / # zcat /proc/config.gz | grep CONFIG_.*_NS12:28
T42<neochapay> CONFIG_UTS_NS=y12:28
T42<neochapay> CONFIG_IPC_NS=y12:28
T42<neochapay> # CONFIG_USER_NS is not set12:28
T42<neochapay> CONFIG_PID_NS=y12:28
T42<neochapay> CONFIG_NET_NS=y12:28
T42<neochapay> # CONFIG_NET_NSH is not set```12:28
T42<neochapay>  (re @elros34: what namespaces opti...)12:28
T42<elros34> this is probably unrelated to your current issue but enable USER_NS when you will build kernel next time12:31
T42<neochapay> added. start to rebuild image (re @elros34: this is probably unr...)12:35
T42<elros34> no, this will probably not help, other ports also have it disabled and it only cause unrelated issue12:37
T42<elros34> do you have some custom hybris patches?12:37
T42<neochapay> now drop all my changes12:38
T42<neochapay> trying to build new image12:39
T42<elros34> next time you can add -s128 to strace, watch out this will increase log size even more12:42
T42<neochapay> 25MB (re @elros34: next time you can ad...)12:48
T42<elros34> s1024 to even more size and illegability:) btw I saw you didn't had audit=0 in kernel cmdline, add it12:50
T42<elros34> partially related to previous libdl issue. Does your device use dynamic partitions?13:27
T42<neochapay> i reflash new image16:22
T42<neochapay> in first i have crash with creating /dev/kmsg_debug16:22
T42<neochapay> i was fix it with ```16:23
T42<neochapay> diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp16:23
T42<neochapay> index 8841c0b..81add10 10064416:23
T42<neochapay> --- a/init/first_stage_init.cpp16:23
T42<neochapay> +++ b/init/first_stage_init.cpp16:23
T42<neochapay> @@ -210,9 +210,9 @@ int FirstStageMain(int argc, char** argv) {16:23
T42<neochapay>  #endif16:23
T42<neochapay>      //CHECKCALL(mknod("/dev/kmsg", S_IFCHR | 0600, makedev(1, 11)));16:23
T42<neochapay> 16:23
T42<neochapay> -    if constexpr (WORLD_WRITABLE_KMSG) {16:23
T42<neochapay> -        CHECKCALL(mknod("/dev/kmsg_debug", S_IFCHR | 0622, makedev(1, 11)));16:23
T42<neochapay> -    }16:23
T42<neochapay> +//    if constexpr (WORLD_WRITABLE_KMSG) {16:23
T42<neochapay> +//        CHECKCALL(mknod("/dev/kmsg_debug", S_IFCHR | 0622, makedev(1, 11)));16:23
T42<neochapay> +//    }```16:23
T42<neochapay> now i have another bug
T42<neochapay> [   45.202665] .(5)[1145:droid-hal-init]droid-hal-init 7: Unable to move mount at '/data': Invalid argument16:23
T42<neochapay> i just format one part to ext4 and mount it as /data and push all rootfs into it (re @elros34: partially related to...)16:24
T42<elros34> I do not understand. So your device use dynamic (super partition)?16:26
T42<neochapay> yea my device use super partion but i just format it into ext4 and push all rootfs with /system /vendor and sfos rootfs on it (re @elros34: I do not understand....)16:27
T42<elros34> Are you sure you moved all partitions  from super which can be splited and correctly? Do you put sfos to tarball or loop image?16:29
T42<elros34> you know tarball doesn't preserve for example "capabilities" and that way you could lose them if they were set in /system16:30
T42<neochapay> no i format super partion to ext4 and push all stuff on it without any dynamic partions (re @elros34: Are you sure you mov...)16:30
T42<elros34> yeah but how do you push them there16:30
T42<elros34> if together with sfos tarball then it can be wrong16:31
T42<elros34> see official devices which package /system, they use loop image not tarball16:31
T42<neochapay> can you send me link ? (re @elros34: see official devices...)16:31
T42<elros34> There were at least one case when some clock related changes didn't work on ports because 'caps' were lost during tarball creation16:34
T42<elros34> about /dev/kmsg_debug, I am pretty sure somebody issue with it, search in logs and maybe ask him16:35
T42<elros34> have you tried commenting whole 'if' out?
T42<neochapay> trying now (re @elros34: have you tried comme...)16:52
T42<elros34> frankly because all of this unusual issues: libdl and exit code 127, I suggest you to flash original super partition back and use parse-android-dynparts instead16:56
T42<neochapay> have any instuctions about it ? (re @elros34: frankly because all ...)16:58
T42<elros34> it's in hadk-hot with link to fp4 repos and systemd units16:59
T42<neochapay> here ? (re @elros34: it's in hadk-hot wit...)17:02
T42<neochapay> i have stupid idea ^_^17:15
T42<neochapay> ```17:15
T42<neochapay> simg2img vendor.img vendor_droid.img17:15
T42<neochapay> sudo mount -o loop vendor_droid.img /vendor```17:15
T42<TheVancedGamer> mal: so I finally booted Halium 13 with quite some stuff working, but now minimediaservice seems to want `` which is in vndk apex, but it seemingly needs the service as well. any ideas?17:33
mal@TheVancedGamer I think I had some issue like that until I made sure needed android side services are running, not sure about halium but I needed to make sure this is done "setprop vold.decrypt trigger_restart_framework"18:54
T42<TheVancedGamer> mal: thanks, ill take a look19:02
malmight depend on device19:04
T42<TheVancedGamer> mal: what interests me more is media.c2@1.2 is already present, but it wants 1.0 for some reason19:05
malnot sure what requests that19:11
T42<TheVancedGamer> minimedia, apparently19:11
T42<neochapay> ```19:21
T42<neochapay> / # /sbin/droid-hal-init19:21
T42<neochapay> /bin/sh: /sbin/droid-hal-init: Too many levels of symbolic links```19:21
T42<neochapay> sweeeet19:21
malmaybe check strace19:27
T42<neochapay> ```19:58
T42<neochapay> / # strace -s 99999 /sbin/droid-hal-init19:58
T42<neochapay> execve("/sbin/droid-hal-init", ["/sbin/droid-hal-init"], 0x7fd02266b0 /* 12 vars */) = -1 ELOOP (Too many levels of symbolic links)19:58
T42<neochapay> strace: exec: Too many levels of symbolic links19:58
T42<neochapay> +++ exited with 1 +++```19:58
T42<elros34> do you have correct layout in /system?20:02
T42<neochapay>'s wrong (re @elros34: do you have correct ...)21:11
T42<neochapay> looks like rootfs
T42<elros34> it's system-as-root, didn't you use mentioned fp4 repo as an example? It also have same layout21:17
T42<elros34> so system_root.mount and system.mount21:18
T42<neochapay> i think it's result of SwitchRoot("/system") in init (re @elros34: it's system-as-root,...)21:18
T42<elros34> so it looks like that only after you run droid-hal-init?21:19
T42<elros34> I do not get how this would even work so I am pretty sure this just common system-as-root21:25
T42<neochapay> I was recheck - it's not system-at-root (re @elros34: I do not get how thi...)21:28
malbased on that paste you showed /system contains root, how do you mount system?21:38
T42<neochapay> mount -o loop /usr/share/droid/system.img /system (re @SailfishFreenodeIRCBridgeBot: <mal>based on that p...)21:40
malhave you tried mounting that to /system_root and then bind mount /system_root/system to /system21:41
malbecause this is root
T42<neochapay> ```21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 18: starting service 'apexd-bootstrap'...21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: SVC_EXEC service 'apexd-bootstrap' pid 1177 (uid 0 gid 1000+0 context default) started; waiting...21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: Service 'apexd-bootstrap' (pid 1177) exited with status 127 waiting took 0.002000 seconds21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: Sending signal 9 to service 'apexd-bootstrap' (pid 1177) process group... HYBRIS: killing PID instead of process group.21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: Service with 'reboot_on_failure' option failed, shutting down system.21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: reboot-bootloader: Error writing bootloader_message: Bootloader command pending.21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: Clear action queue and start shutdown trigger21:43
T42<neochapay> Jun 29 10:19:01 T1100 unknown: .(6)[1124:droid-hal-init]droid-hal-init 17: Entering shutdown mode```21:43
T42<neochapay> meh...21:43
maluse pastebin21:43
malwhy do you think /system you showed should not be mounted the way I said?21:44
T42<elros34> now it's different, how is possible that previously there was no "reboot_on_failure"?21:44
malor was that last one with system_root way21:45
malwhich android base is that?21:45
T42<neochapay> i ts very strange...i mount on my pc - i have /system/bin correctly.... (re @SailfishFreenodeIRCBridgeBot: <mal>why do you thin...)21:45
T42<neochapay> on phone is different21:45
T42<neochapay> Android 1121:45
T42<elros34> linkerconfig also fails with 127 or it's different now?21:51

Generated by 2.17.1 by Marius Gedminas - find it at!